Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-01-2010, 05:49 PM
RichardoX
Hill Giant
 
Join Date: Dec 2004
Location: in your closet....
Posts: 169
Default COMMITTED: #npcedit weapon graphics addition

This simply adds two commands which gives you the ability to modify the primary/secondary weapon held in the NPC's hands. The last time I tried to submit this, it was stickied. I am unsure why. :p

#npcedit wep1 graphic_id (primary hand)
#npcedit wep2 graphic_id (secondary hand)

Command.cpp

AFTER
Code:
c->Message(0, "#npcedit findable - Sets an NPC's findable flag");
ADD
Code:
c->Message(0, "#npcedit wep1 - Sets an NPC's primary weapon to a specified graphic id.");
c->Message(0, "#npcedit wep2 - Sets an NPC's secondary weapon to a specified graphic id.");

AFTER
Code:
   else if ( strcasecmp( sep->arg[1], "findable" ) == 0 )
   {
      char errbuf[MYSQL_ERRMSG_SIZE];
      char *query = 0;
      c->Message(15,"NPCID %u is now %s",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2])==0?"not findable":"findable");
      database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set findable=%i where id=%i",atoi(sep->argplus[2])==0?0:1,c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
      c->LogSQL(query);
      safe_delete_array(query);
   }
ADD
Code:
      else if ( strcasecmp( sep->arg[1], "wep1" ) == 0 )
   {
      char errbuf[MYSQL_ERRMSG_SIZE];
      char *query = 0;
      c->Message(15,"NPCID %u will have item graphic %f set to his primary on repop.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atof(sep->arg[2]));
      database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set d_meele_texture1=%f where id=%i",atof(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
      c->LogSQL(query);
      safe_delete_array(query);
   }
         else if ( strcasecmp( sep->arg[1], "wep2" ) == 0 )
   {
      char errbuf[MYSQL_ERRMSG_SIZE];
      char *query = 0;
      c->Message(15,"NPCID %u will have item graphic %f set to his secondary on repop.",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atof(sep->arg[2]));
      database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set d_meele_texture2=%f where id=%i",atof(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
      c->LogSQL(query);
      safe_delete_array(query);
	  }
__________________
a hill giant slashes YOU for 25 points of damage!
You have been slain!
LOADING, PLEASE WAIT...
Reply With Quote
 


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 06:26 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3