Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #31  
Old 07-11-2004, 05:46 AM
Draupner
Hill Giant
 
Join Date: Jul 2004
Location: In my basement
Posts: 131
Default

thanks Melwin
Reply With Quote
  #32  
Old 07-16-2004, 11:22 PM
cofruben
Old-EQEmu Developer
 
Join Date: Oct 2002
Location: Spain
Posts: 323
Default

I'd add the message sent to client in the if,if not,you can't check if there was any error.
Code:
void command_npcrun(Client *c, const Seperator *sep) //Draupner: Set npc speed 
{ 
   if ( strcasecmp( sep->arg[1], "help" ) == 0 ) 
   { 
      c->Message(0, "Walk/Run Speed Chart:  "); 
      c->Message(4, "     (.7) Normal Walk Speed"); 
      c->Message(4, "     (1.05) 9k Mount"); 
      c->Message(4, "     (1.25) Normal Run Speed"); 
      c->Message(4, "     (1.375) Run 1"); 
      c->Message(4, "     (1.50) Run 2"); 
      c->Message(4, "     (1.625) Run 3"); 
      c->Message(4, "     (1.9375) Spirit of Wolf"); 
      c->Message(4, "     (2.675) 100k Mount"); 
      c->Message(4, "     (3.2) Max Bard Speed"); 
   } 
   else if((sep->arg[1][0] == 0 || strcasecmp(sep->arg[1],"*")==0) || ((c->GetTarget()==0) || (c->GetTarget()->IsClient()))) 
   { 
      c->Message(0, "Usage: #npcrun [run] [help]"); 
   } 
   else 
   { 
      char errbuf[MYSQL_ERRMSG_SIZE]; 
      char *query = 0; 
      
      if (database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set runspeed=%i where id=%i",atoi(sep->argplus[1]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf)){
         safe_delete_array(query);
	 c->Message(15,"NPCID %u now runs at %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->argplus[1])); 
	}
   } 

}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:50 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3