Updates and new commands

Development forum for the EQ2Emulator Database project.

Moderator: Team Members

paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Updates and new commands

Post by paulgh » Fri Jun 12, 2009 9:41 pm

JA or LE,
I have committed my changes to the source. Now the commands table needs updating.

Code: Select all

#
# Dumping data for table 'commands'
#

LOCK TABLES "commands" WRITE;
/*!40000 ALTER TABLE "commands" DISABLE KEYS;*/
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('367',0,'gm_vanish','','168',80);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('366',0,'gm_hide','','167',80);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('331',0,'showranged','','151',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('330',0,'showcloak','','155',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('329',0,'showhoodorhelm','','154',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('328',0,'showhelm','','153',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('323',0,'set_auto_consume','','152',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('262',0,'decline_lon','','165',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('261',0,'decline_raids','','164',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('260',0,'decline_groups','','163',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('259',0,'decline_guilds','','162',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('258',0,'decline_trades','','161',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('257',0,'decline_duels','','160',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('197',0,'toggle_bonus_exp','','166',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('175',0,'stopdrinking','','157',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('174',0,'stopeating','','156',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('167',0,'hide_illusions','','158',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('166',0,'showhood','','159',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('55',0,'anon','','148',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('54',0,'lfw','','149',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('53',0,'lfg','','150',0);
REPLACE INTO "commands" ("id", "type", "command", "subcommand", "handler", "required_status") VALUES
	('6',0,'afk','','147',0);
/*!40000 ALTER TABLE "commands" ENABLE KEYS;*/
UNLOCK TABLES;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE;*/
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;*/
I think I got this right. Let me know if it's not.
Paul

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Updates and new commands

Post by John Adams » Fri Jun 12, 2009 9:50 pm

I will submit these updates now. You can just give insert or update queries if you like, though I think LE's data updates will accept REPLACE INTO. I'll let you know if it doesn't.


Btw, you should create a character on EQ2 DB Project server, new Dev... so we can harass you all live and in person like...

Can't wait to test this out!

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Updates and new commands

Post by John Adams » Fri Jun 12, 2009 9:55 pm

Ok, first suggestion, click on Start->Settings->Control Panel->Add/Remove Programs and get rid of HeidiSQL.

For whatever reason, that hunk of crap software thinks it should surround field names in double-quotes. I hate that software so much ;)

I use SQLYog, but a mysqldump.exe works just as well heh. Anyway, just a thought. I am fixing those SQLs to insert properly.

Code: Select all

REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('367',0,'gm_vanish','','168',80);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('366',0,'gm_hide','','167',80);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('331',0,'showranged','','151',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('330',0,'showcloak','','155',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('329',0,'showhoodorhelm','','154',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('328',0,'showhelm','','153',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('323',0,'set_auto_consume','','152',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('262',0,'decline_lon','','165',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('261',0,'decline_raids','','164',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('260',0,'decline_groups','','163',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('259',0,'decline_guilds','','162',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('258',0,'decline_trades','','161',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('257',0,'decline_duels','','160',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('197',0,'toggle_bonus_exp','','166',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('175',0,'stopdrinking','','157',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('174',0,'stopeating','','156',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('167',0,'hide_illusions','','158',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('166',0,'showhood','','159',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('55',0,'anon','','148',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('54',0,'lfw','','149',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('53',0,'lfg','','150',0);
REPLACE INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES
   ('6',0,'afk','','147',0);

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Updates and new commands

Post by John Adams » Fri Jun 12, 2009 10:27 pm

Once this code his Public SVN, you will find bugs in the new Bug Tracker/Manager - but for tonight, Scat and I are testing this out on Dev.

Only thing I want to point out right away is, feedback. When you go anon, or other toggles, I believe Live echoes something to the console. Simple to add, so no biggie.

The Toggles in Persona, and the display in /who look fantastic. Thank you for this awesome addition!

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: Updates and new commands

Post by Scatman » Fri Jun 12, 2009 10:35 pm

Yep! Very nice job paulgh :)
I just have one thing to point out to ya. Every time a /who query is done, your GetAdminStatus that you defined in world.cpp is hitting the database (slow and bad). There is a function defined in client.h called GetAdminStatus that will return the admin status of the player without hitting the database (client->GetAdminStatus()). We try not to hit the database as much as we can. Plus, having 2 GetAdminStatus functions would be redundant :) Client::GetAdminStatus is the one you want.

Thanks again for the addition! Looks good!

paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Re: Updates and new commands

Post by paulgh » Fri Jun 12, 2009 11:47 pm

Removed the database hits. Thanks for pointing out that function. Note to self: 'grep -i' is your friend.
Also added the flavor text for many of the commands.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: Updates and new commands

Post by Scatman » Fri Jun 12, 2009 11:56 pm

Cool!

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Updates and new commands

Post by John Adams » Sat Jun 13, 2009 4:34 pm

PaulGH, the command and Persona check for Roleplaying does not seem to work.

I know Guilds are not implemented, and Voice Chat never will be, but those options seem Grey - not sure if that is intended.

paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Re: Updates and new commands

Post by paulgh » Sat Jun 13, 2009 7:25 pm

I accidentally left out roleplaying. I'll add it soon. I'll also hook up the voice chat box, even though it won't do anything.
The guild checkbox is always greyed out, even on live, unless you are a guild recruiter.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Updates and new commands

Post by John Adams » Sat Jun 13, 2009 7:34 pm

Ok perfect. Since you added the echoes for things like AFK, I noticed something else you might be interested in.

My character goes AFK, and after a while, the toggle in and out of AFK goes back and forth endlessly. I saw it last night in the Console (command 147 / hex 93) but didn't know what it was doing til you added the text.
(1244940944)[Sat Jun 13 17:55:44 2009] You say out of character, "np afk meanwhile"
(1244940946)[Sat Jun 13 17:55:46 2009] You are now AFK.
(1244940950)[Sat Jun 13 17:55:50 2009] ** ADMIN-MODE **
(1244940950)[Sat Jun 13 17:55:50 2009] /who search results for Outpost of the Overlord:
(1244940950)[Sat Jun 13 17:55:50 2009] ------------------------------------------
(1244940950)[Sat Jun 13 17:55:50 2009] [80 Dirge] Lethal (Wood Elf) Zone: Outpost of the Overlord
(1244940950)[Sat Jun 13 17:55:50 2009] [80 Paladin] Jadams (Barbarian) (AFK) Zone: Outpost of the Overlord
(1244940950)[Sat Jun 13 17:55:50 2009] 2 players found
(1244941517)[Sat Jun 13 18:05:17 2009] You are no longer AFK.
(1244941518)[Sat Jun 13 18:05:18 2009] You are now AFK.
(1244941519)[Sat Jun 13 18:05:19 2009] You are no longer AFK.
(1244941520)[Sat Jun 13 18:05:20 2009] You are now AFK.
(1244941521)[Sat Jun 13 18:05:21 2009] You are no longer AFK.
(1244941522)[Sat Jun 13 18:05:22 2009] You are now AFK.
(1244941523)[Sat Jun 13 18:05:23 2009] You are no longer AFK.
(1244941524)[Sat Jun 13 18:05:24 2009] You are now AFK.
(1244941525)[Sat Jun 13 18:05:25 2009] You are no longer AFK.
(1244941526)[Sat Jun 13 18:05:26 2009] You are now AFK.
(1244941527)[Sat Jun 13 18:05:27 2009] You are no longer AFK.
(1244941528)[Sat Jun 13 18:05:28 2009] You are now AFK.
(1244941529)[Sat Jun 13 18:05:29 2009] You are no longer AFK.
(1244941530)[Sat Jun 13 18:05:30 2009] You are now AFK.
(1244941531)[Sat Jun 13 18:05:31 2009] You are no longer AFK.
(1244941532)[Sat Jun 13 18:05:32 2009] You are now AFK.
(1244941533)[Sat Jun 13 18:05:33 2009] You are no longer AFK.
(1244941534)[Sat Jun 13 18:05:34 2009] You are now AFK.
(1244941535)[Sat Jun 13 18:05:35 2009] You are no longer AFK.
(1244941536)[Sat Jun 13 18:05:36 2009] You are now AFK.
(1244941537)[Sat Jun 13 18:05:37 2009] You are no longer AFK.
(1244941538)[Sat Jun 13 18:05:38 2009] You are now AFK.
(1244941539)[Sat Jun 13 18:05:39 2009] You are no longer AFK.
(1244941540)[Sat Jun 13 18:05:40 2009] You are now AFK.
(1244941541)[Sat Jun 13 18:05:41 2009] You are no longer AFK.
(1244941542)[Sat Jun 13 18:05:42 2009] You are now AFK.
(1244941543)[Sat Jun 13 18:05:43 2009] You are no longer AFK.
(1244941544)[Sat Jun 13 18:05:44 2009] You are now AFK.
(1244941545)[Sat Jun 13 18:05:45 2009] You are no longer AFK.
(1244941547)[Sat Jun 13 18:05:47 2009] You are now AFK.
(1244941547)[Sat Jun 13 18:05:47 2009] You are no longer AFK.
(1244941548)[Sat Jun 13 18:05:48 2009] You are now AFK.
(1244941549)[Sat Jun 13 18:05:49 2009] You are no longer AFK.
(1244941551)[Sat Jun 13 18:05:51 2009] You are now AFK.
(1244941551)[Sat Jun 13 18:05:51 2009] You are no longer AFK.
(1244941552)[Sat Jun 13 18:05:52 2009] You are now AFK.
(1244941554)[Sat Jun 13 18:05:54 2009] You are no longer AFK.
(1244941555)[Sat Jun 13 18:05:55 2009] You are now AFK.
(1244941555)[Sat Jun 13 18:05:55 2009] You are no longer AFK.
(1244941557)[Sat Jun 13 18:05:57 2009] You are now AFK.
(1244941558)[Sat Jun 13 18:05:58 2009] You are no longer AFK.
(1244941559)[Sat Jun 13 18:05:59 2009] You are now AFK.
(1244941560)[Sat Jun 13 18:06:00 2009] You are no longer AFK.
(1244941561)[Sat Jun 13 18:06:01 2009] You are now AFK.
(1244941562)[Sat Jun 13 18:06:02 2009] You are no longer AFK.
(1244941562)[Sat Jun 13 18:06:02 2009] You are now AFK.
(1244941564)[Sat Jun 13 18:06:04 2009] You are no longer AFK.
(1244941565)[Sat Jun 13 18:06:05 2009] You are now AFK.
(1244941566)[Sat Jun 13 18:06:06 2009] You are no longer AFK.
(1244941567)[Sat Jun 13 18:06:07 2009] You are now AFK.
(1244941568)[Sat Jun 13 18:06:08 2009] You are no longer AFK.
(1244941569)[Sat Jun 13 18:06:09 2009] You are now AFK.
(1244941570)[Sat Jun 13 18:06:10 2009] You are no longer AFK.
(1244941571)[Sat Jun 13 18:06:11 2009] You are now AFK.
(1244941572)[Sat Jun 13 18:06:12 2009] You are no longer AFK.
(1244941573)[Sat Jun 13 18:06:13 2009] You are now AFK.
(1244941574)[Sat Jun 13 18:06:14 2009] You are no longer AFK.
(1244941575)[Sat Jun 13 18:06:15 2009] You are now AFK.
(1244941576)[Sat Jun 13 18:06:16 2009] You are no longer AFK.
(1244941577)[Sat Jun 13 18:06:17 2009] You are now AFK.
(1244941578)[Sat Jun 13 18:06:18 2009] You are no longer AFK.
(1244941579)[Sat Jun 13 18:06:19 2009] You are now AFK.
(1244941580)[Sat Jun 13 18:06:20 2009] You are no longer AFK.
(1244941581)[Sat Jun 13 18:06:21 2009] You are now AFK.
(1244941582)[Sat Jun 13 18:06:22 2009] You are no longer AFK.
(1244941583)[Sat Jun 13 18:06:23 2009] You are now AFK.
(1244941584)[Sat Jun 13 18:06:24 2009] You are no longer AFK.
(1244941585)[Sat Jun 13 18:06:25 2009] You are now AFK.
(1244941586)[Sat Jun 13 18:06:26 2009] You are no longer AFK.
(1244941587)[Sat Jun 13 18:06:27 2009] You are now AFK.
(1244941588)[Sat Jun 13 18:06:28 2009] You are no longer AFK.
(1244941589)[Sat Jun 13 18:06:29 2009] You are now AFK.
(1244941590)[Sat Jun 13 18:06:30 2009] You are no longer AFK.
(1244941591)[Sat Jun 13 18:06:31 2009] You are now AFK.
(1244941592)[Sat Jun 13 18:06:32 2009] You are no longer AFK.
(1244941593)[Sat Jun 13 18:06:33 2009] You are now AFK.
(1244941594)[Sat Jun 13 18:06:34 2009] You are no longer AFK.
(1244941595)[Sat Jun 13 18:06:35 2009] You are now AFK.
(1244941596)[Sat Jun 13 18:06:36 2009] You are no longer AFK.
(1244941597)[Sat Jun 13 18:06:37 2009] You are now AFK.
(1244941598)[Sat Jun 13 18:06:38 2009] You are no longer AFK.
(1244941599)[Sat Jun 13 18:06:39 2009] You are now AFK.
(1244941600)[Sat Jun 13 18:06:40 2009] You are no longer AFK.
(1244941601)[Sat Jun 13 18:06:41 2009] You are now AFK.
(1244941602)[Sat Jun 13 18:06:42 2009] You are no longer AFK.
(1244941603)[Sat Jun 13 18:06:43 2009] You are now AFK.
(1244941604)[Sat Jun 13 18:06:44 2009] You are no longer AFK.
(1244941605)[Sat Jun 13 18:06:45 2009] You are now AFK.
(1244941612)[Sat Jun 13 18:06:52 2009] You say out of character, "btw do you see my AFK toggle going insane?"
Not sure if the 10 minutes is a sign? But I believe bumping my toon made it stop.

paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Re: Updates and new commands

Post by paulgh » Sat Jun 13, 2009 8:31 pm

Since moving your character stopped the problem, I'm inclined to think that it is the client's auto-afk feature wreaking havoc with us. Was there anything strange on the console?

On another note, here are the addition command table updates

Code: Select all

/*
SQLyog Community Edition- MySQL GUI
MySQL - 5.0.51a 
*********************************************************************
*/
replace into `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) values('56','0','role','','170','0');
insert into `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) values('369','0','decline_vcinvite','','171','0');
I can use SQLyog as easily as Heidi, I just hate that it always nags me to upgrade to enterprise edition.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Updates and new commands

Post by John Adams » Sat Jun 13, 2009 8:36 pm

Hey as long as I do not have to find/replace quoties, use whatever you are comfy with. I'll post these updates now.

And you are probably right, the auto AFK thing. The console just reports 0: 93 00 00 00... etc every chat box update.

Previously, World did try to auto-flag you AFK if you stood long enough... but "afk" was not implemented until now. Maybe that's the answer.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Updates and new commands

Post by John Adams » Sat Jun 13, 2009 8:59 pm

Those commands do not insert, Paul. Can you check that you have the latest DB updates, and that your command IDs are not duped? Got a dupe key error when I tried submitting them.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Updates and new commands

Post by John Adams » Sat Jun 13, 2009 9:56 pm

There is a UI setting (Controls -> Keyboard Settings -> Auto AFK) that you can use to turn off that annoying auto-afk. Not sure the World cares what we set that to though. I saw this in the console when I removed Auto-AFK checkmark:

Code: Select all

OP_KeymapLoadMsg Received 0x009c
OP_KeymapSaveMsg Received 0x009f
   0: 45 00 00 00 06 00 00 00 - 00 03 00 00 00 00 00 00  | E...............
  16: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  | ................
  32: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  | ................
  48: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 01 00 00  | ................
  64: 00 10 E2 10 6C 00 00 00 - 00                       | ....l....

paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Re: Updates and new commands

Post by paulgh » Sat Jun 13, 2009 9:59 pm

JA,
I've edited the above insert and I think it should go in now. I missed LE's new command.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests