Implementing: Channels
Moderator: Team Members
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Implementing: Channels
Sure ill do this after work today.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Implementing: Channels
Here are the new DB tables I'm proposing:
Code: Select all
CREATE TABLE `channels` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` TEXT NOT NULL,
`password` TEXT NULL,
`level_restriction` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;
CREATE TABLE `channel_classes` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`channel_id` INT(10) UNSIGNED NOT NULL,
`class_id` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
INDEX `fk_channelclasses_channelid` (`channel_id`),
CONSTRAINT `fk_channelclasses_channelid` FOREIGN KEY (`channel_id`) REFERENCES `channels` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;
CREATE TABLE `channel_races` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`channel_id` INT(10) UNSIGNED NOT NULL,
`race_id` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
INDEX `fk_channelraces_channelid` (`channel_id`),
CONSTRAINT `fk_channelraces_channelid` FOREIGN KEY (`channel_id`) REFERENCES `channels` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Implementing: Channels
Ok, new table to support bitwise races/classes, since John so cleverly suggested it!
Code: Select all
CREATE TABLE `channels` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(128) NOT NULL COLLATE 'latin1_general_ci',
`password` VARCHAR(128) NULL DEFAULT NULL COLLATE 'latin1_general_ci',
`level_restriction` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
`classes` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
`races` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE INDEX `uk_channels_name` (`name`)
)
COLLATE='latin1_general_ci'
ENGINE=InnoDB;
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Implementing: Channels
Can't seem to send data updates to the update server
Code: Select all
INSERT INTO `channels` (`id`, `name`, `password`, `level_restriction`, `classes`, `races`) VALUES
(1, 'Level_1-9', NULL, 1, 0, 0),
(2, 'Level_10-19', NULL, 10, 0, 0),
(3, 'Level_20-29', NULL, 20, 0, 0),
(4, 'Level_30-39', NULL, 30, 0, 0),
(5, 'Level_40-49', NULL, 40, 0, 0),
(6, 'Level_50-59', NULL, 50, 0, 0),
(7, 'Level_60-69', NULL, 60, 0, 0),
(8, 'Level_70-79', NULL, 70, 0, 0),
(9, 'Level_80-89', NULL, 80, 0, 0),
(10, 'Level_90', NULL, 90, 0, 0),
(11, 'Barbarian', NULL, 0, 0, 1),
(12, 'Dark Elf', NULL, 0, 0, 2),
(13, 'Dwarf', NULL, 0, 0, 4),
(14, 'Erudite', NULL, 0, 0, 8),
(15, 'Froglok', NULL, 0, 0, 16),
(16, 'Gnome', NULL, 0, 0, 32),
(17, 'Half Elf', NULL, 0, 0, 64),
(18, 'Halfling', NULL, 0, 0, 128),
(19, 'High Elf', NULL, 0, 0, 256),
(20, 'Human', NULL, 0, 0, 512),
(21, 'Iksar', NULL, 0, 0, 1024),
(22, 'Kerra', NULL, 0, 0, 2048),
(23, 'Ogre', NULL, 0, 0, 4096),
(24, 'Ratonga', NULL, 0, 0, 8192),
(25, 'Troll', NULL, 0, 0, 16384),
(26, 'Wood Elf', NULL, 0, 0, 32768),
(27, 'Fae', NULL, 0, 0, 65536),
(28, 'Arasai', NULL, 0, 0, 131072),
(29, 'Sarnak', NULL, 0, 0, 262144),
(30, 'Vampire', NULL, 0, 0, 524288),
(31, 'Guardian', NULL, 0, 8, 0),
(32, 'Berserker', NULL, 0, 16, 0),
(33, 'Monk', NULL, 0, 64, 0),
(34, 'Bruiser', NULL, 0, 128, 0),
(35, 'Shadowknight', NULL, 0, 512, 0),
(36, 'Paladin', NULL, 0, 1024, 0),
(37, 'Templar', NULL, 0, 8192, 0),
(38, 'Inquisitor', NULL, 0, 16384, 0),
(39, 'Warden', NULL, 0, 65536, 0),
(40, 'Fury', NULL, 0, 131072, 0),
(41, 'Mystic', NULL, 0, 524288, 0),
(42, 'Defiler', NULL, 0, 1048576, 0),
(43, 'Wizard', NULL, 0, 8388608, 0),
(44, 'Warlock', NULL, 0, 16777216, 0),
(45, 'Illusionist', NULL, 0, 67108864, 0),
(46, 'Coercer', NULL, 0, 134217728, 0),
(47, 'Conjuror', NULL, 0, 536870912, 0),
(48, 'Necromancer', NULL, 0, 1073741824, 0),
(49, 'Swashbuckler', NULL, 0, 8589934592, 0),
(50, 'Brigand', NULL, 0, 17179869184, 0),
(51, 'Troubador', NULL, 0, 68719476736, 0),
(52, 'Dirge', NULL, 0, 137438953472, 0),
(53, 'Ranger', NULL, 0, 549755813888, 0),
(54, 'Assasin', NULL, 0, 1099511627776, 0),
(55, 'Animalist', NULL, 0, 2199023255552, 0),
(56, 'Beastlord', NULL, 0, 4398046511104, 0),
(57, 'Auction', NULL, 0, 0, 0),
(58, 'Crafting', NULL, 0, 0, 0),
(59, 'Help', NULL, 0, 0, 0),
(60, 'Noobie', NULL, 0, 0, 0),
(61, 'Trading', NULL, 0, 0, 0),
(62, 'Scat\'s_Channel_of_UBERNESS', NULL, 0, 0, 0);You do not have the required permissions to view the files attached to this post.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Implementing: Channels
Damnit. That script bug still isn't fixed... I may need to re-write the module to NOT use PHPBB3's db object, since it traps errors and won't let me auto-correct in the script. I'll fix this and submit the data for you, Scatto.
Edit:
Of course, you HAD to have a channel name with an apostrophe, didn't you! haha... dunno why that is rejected. Will look into it, well, someday.
Sumitted.
Edit:
Of course, you HAD to have a channel name with an apostrophe, didn't you! haha... dunno why that is rejected. Will look into it, well, someday.
Sumitted.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Implementing: Channels
Haha thanks!
- alfa
- Team Member
- Posts: 550
- Joined: Fri Jul 27, 2007 6:24 pm
- Location: France
- Contact:
Re: Implementing: Channels
Scat, never got /whochannel working, not implement ?
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Implementing: Channels
I did not know about that command! I'll get on it now thanks. Any others I missed? And does /whochannel list the channels you're in or who's in the channel?
Edit:
Really weird. They call it 'chatwho', heh. They are so inconsistent. The other commands have 'channel' in them.
Edit:
Really weird. They call it 'chatwho', heh. They are so inconsistent. The other commands have 'channel' in them.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Implementing: Channels
Typical. Whatever mood the 14th dev to work on Chat was that day, got the command.
WHO QA'S THIS CLIENT?! I'd be freaking out if I worked for SOE QA
WHO QA'S THIS CLIENT?! I'd be freaking out if I worked for SOE QA
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Implementing: Channels
Figured I'd bump this thread vs corrupt the IRC dev thread with chat stuff... but here's the weird thing.
I swear, I have seen the CHAT__DEBUG lines that say a new player logs in and joins all these channels... 1_9, 10-19, etc... but when I look at this thread, or the code, nothing "magically" joins them that I can see. So, 2 questions...
1) In order to have the default World Channels in the Emu, do I need this Channels table filled with data?
2) or is the client somehow pushing a /join {blah} itself on new character create and thus I have never noticed this until now?
And lastly (Jab) how does this affect your new IRC global channel? If it doesn't, then I'll get the data back into Channels and see how it works.
Edit: Wow, Scat or I added those channels to DB Patcher almost 2 years ago, and I never included it in the downloadable data. Not sure how I was ever seeing players joining stock channels then.
I swear, I have seen the CHAT__DEBUG lines that say a new player logs in and joins all these channels... 1_9, 10-19, etc... but when I look at this thread, or the code, nothing "magically" joins them that I can see. So, 2 questions...
1) In order to have the default World Channels in the Emu, do I need this Channels table filled with data?
2) or is the client somehow pushing a /join {blah} itself on new character create and thus I have never noticed this until now?
And lastly (Jab) how does this affect your new IRC global channel? If it doesn't, then I'll get the data back into Channels and see how it works.
Edit: Wow, Scat or I added those channels to DB Patcher almost 2 years ago, and I never included it in the downloadable data. Not sure how I was ever seeing players joining stock channels then.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Implementing: Channels
TODO:
Add Alignment for Good, Evil, Neutral to channel restrictions.
Add Alignment for Good, Evil, Neutral to channel restrictions.
You do not have the required permissions to view the files attached to this post.
Who is online
Users browsing this forum: No registered users and 0 guests