Edited #npcedit to include more options and changed a few to be multiple arguments rather than separate commands.

- #npcedit wep1/#npcedit wep2 is now #npcedit weapon [primary] [secondary]
- #npcedit mindmg/#npcedit maxdmg is now #npcedit damage [minimum] [maximum]
- #npcedit meleetype [primary] [secondary]
- #npcedit rangedtype
- #npcedit ammoidfile
- #npcedit trackable
- #npcedit attackcount
- #npcedit avoidance
- #npcedit walkspeed
- #npcedit armtexture
- #npcedit bracertexture
- #npcedit handtexture
- #npcedit legtexture
- #npcedit feettexture
- #npcedit herosforgemodel
- #npcedit slow_mitigation
This commit is contained in:
Kinglykrab 2014-12-24 04:46:00 -05:00
parent c48d2d9888
commit 13a3349614

View File

@ -6103,7 +6103,13 @@ void command_npcedit(Client *c, const Seperator *sep)
c->Message(0, "#npcedit HP - Sets an NPC's hitpoints"); c->Message(0, "#npcedit HP - Sets an NPC's hitpoints");
c->Message(0, "#npcedit Gender - Sets an NPC's gender"); c->Message(0, "#npcedit Gender - Sets an NPC's gender");
c->Message(0, "#npcedit Texture - Sets an NPC's texture"); c->Message(0, "#npcedit Texture - Sets an NPC's texture");
c->Message(0, "#npcedit Helmtexture - Sets an NPC's helmtexture"); c->Message(0, "#npcedit Helmtexture - Sets an NPC's helmet texture");
c->Message(0, "#npcedit Armtexture - Sets an NPC's arm texture");
c->Message(0, "#npcedit Bracertexture - Sets an NPC's bracer texture");
c->Message(0, "#npcedit Handtexture - Sets an NPC's hand texture");
c->Message(0, "#npcedit Legtexture - Sets an NPC's leg texture");
c->Message(0, "#npcedit Feettexture - Sets an NPC's feettexture");
c->Message(0, "#npcedit Herosforgemodel - Sets an NPC's Hero's Forge Model");
c->Message(0, "#npcedit Size - Sets an NPC's size"); c->Message(0, "#npcedit Size - Sets an NPC's size");
c->Message(0, "#npcedit Hpregen - Sets an NPC's hitpoint regen rate per tick"); c->Message(0, "#npcedit Hpregen - Sets an NPC's hitpoint regen rate per tick");
c->Message(0, "#npcedit Manaregen - Sets an NPC's mana regen rate per tick"); c->Message(0, "#npcedit Manaregen - Sets an NPC's mana regen rate per tick");
@ -6116,12 +6122,15 @@ void command_npcedit(Client *c, const Seperator *sep)
c->Message(0, "#npcedit special_abilities - Sets the NPC's Special Abilities"); c->Message(0, "#npcedit special_abilities - Sets the NPC's Special Abilities");
c->Message(0, "#npcedit Spell - Sets the npc spells list ID for an NPC"); c->Message(0, "#npcedit Spell - Sets the npc spells list ID for an NPC");
c->Message(0, "#npcedit Faction - Sets the NPC's faction id"); c->Message(0, "#npcedit Faction - Sets the NPC's faction id");
c->Message(0, "#npcedit Mindmg - Sets an NPC's minimum damage"); c->Message(0, "#npcedit Damage - Sets an NPC's damage");
c->Message(0, "#npcedit Maxdmg - Sets an NPC's maximum damage"); c->Message(0, "#npcedit Meleetype - Sets an NPC's melee types");
c->Message(0, "#npcedit Rangedtype - Sets an NPC's ranged type");
c->Message(0, "#npcedit Ammoidfile - Sets an NPC's ammo id file");
c->Message(0, "#npcedit Aggroradius - Sets an NPC's aggro radius"); c->Message(0, "#npcedit Aggroradius - Sets an NPC's aggro radius");
c->Message(0, "#npcedit Assistradius - Sets an NPC's assist radius"); c->Message(0, "#npcedit Assistradius - Sets an NPC's assist radius");
c->Message(0, "#npcedit Social - Set to 1 if an NPC should assist others on its faction"); c->Message(0, "#npcedit Social - Set to 1 if an NPC should assist others on its faction");
c->Message(0, "#npcedit Runspeed - Sets an NPC's run speed"); c->Message(0, "#npcedit Runspeed - Sets an NPC's run speed");
c->Message(0, "#npcedit Walkspeed - Sets an NPC's walk speed");
c->Message(0, "#npcedit AGI - Sets an NPC's Agility"); c->Message(0, "#npcedit AGI - Sets an NPC's Agility");
c->Message(0, "#npcedit CHA - Sets an NPC's Charisma"); c->Message(0, "#npcedit CHA - Sets an NPC's Charisma");
c->Message(0, "#npcedit DEX - Sets an NPC's Dexterity"); c->Message(0, "#npcedit DEX - Sets an NPC's Dexterity");
@ -6133,7 +6142,7 @@ void command_npcedit(Client *c, const Seperator *sep)
c->Message(0, "#npcedit PR - Sets an NPC's Poison Resistance"); c->Message(0, "#npcedit PR - Sets an NPC's Poison Resistance");
c->Message(0, "#npcedit DR - Sets an NPC's Disease Resistance"); c->Message(0, "#npcedit DR - Sets an NPC's Disease Resistance");
c->Message(0, "#npcedit FR - Sets an NPC's Fire Resistance"); c->Message(0, "#npcedit FR - Sets an NPC's Fire Resistance");
c->Message(0, "#npcedit CR - Sets an NPC's cold resistance"); c->Message(0, "#npcedit CR - Sets an NPC's Cold Resistance");
c->Message(0, "#npcedit Corrup - Sets an NPC's Corruption Resistance"); c->Message(0, "#npcedit Corrup - Sets an NPC's Corruption Resistance");
c->Message(0, "#npcedit PhR - Sets and NPC's Physical Resistance"); c->Message(0, "#npcedit PhR - Sets and NPC's Physical Resistance");
c->Message(0, "#npcedit Seeinvis - Sets an NPC's ability to see invis"); c->Message(0, "#npcedit Seeinvis - Sets an NPC's ability to see invis");
@ -6143,14 +6152,16 @@ void command_npcedit(Client *c, const Seperator *sep)
c->Message(0, "#npcedit AC - Sets an NPC's Armor Class"); c->Message(0, "#npcedit AC - Sets an NPC's Armor Class");
c->Message(0, "#npcedit ATK - Sets an NPC's Attack"); c->Message(0, "#npcedit ATK - Sets an NPC's Attack");
c->Message(0, "#npcedit Accuracy - Sets an NPC's Accuracy"); c->Message(0, "#npcedit Accuracy - Sets an NPC's Accuracy");
c->Message(0, "#npcedit Avoidance - Sets an NPC's Avoidance");
c->Message(0, "#npcedit npcaggro - Sets an NPC's npc_aggro flag"); c->Message(0, "#npcedit npcaggro - Sets an NPC's npc_aggro flag");
c->Message(0, "#npcedit qglobal - Sets an NPC's quest global flag"); c->Message(0, "#npcedit qglobal - Sets an NPC's quest global flag");
c->Message(0, "#npcedit limit - Sets an NPC's spawn limit counter"); c->Message(0, "#npcedit spawn_limit - Sets an NPC's spawn limit counter");
c->Message(0, "#npcedit Attackspeed - Sets an NPC's attack speed modifier"); c->Message(0, "#npcedit Attackspeed - Sets an NPC's attack speed modifier");
c->Message(0, "#npcedit Attackdelay - Sets an NPC's attack delay"); c->Message(0, "#npcedit Attackdelay - Sets an NPC's attack delay");
c->Message(0, "#npcedit Attackcount - Sets an NPC's attack count");
c->Message(0, "#npcedit findable - Sets an NPC's findable flag"); c->Message(0, "#npcedit findable - Sets an NPC's findable flag");
c->Message(0, "#npcedit wep1 - Sets an NPC's primary weapon model"); c->Message(0, "#npcedit trackable - Sets an NPC's trackable flag");
c->Message(0, "#npcedit wep2 - Sets an NPC's secondary weapon model"); c->Message(0, "#npcedit weapon - Sets an NPC's primary and secondary weapon model");
c->Message(0, "#npcedit featuresave - Saves all current facial features to the database"); c->Message(0, "#npcedit featuresave - Saves all current facial features to the database");
c->Message(0, "#npcedit color - Sets an NPC's red, green, and blue armor tint"); c->Message(0, "#npcedit color - Sets an NPC's red, green, and blue armor tint");
c->Message(0, "#npcedit armortint_id - Set an NPC's Armor tint ID"); c->Message(0, "#npcedit armortint_id - Set an NPC's Armor tint ID");
@ -6160,16 +6171,14 @@ void command_npcedit(Client *c, const Seperator *sep)
c->Message(0, "#npcedit spellscale - Set an NPC's spell scaling rate"); c->Message(0, "#npcedit spellscale - Set an NPC's spell scaling rate");
c->Message(0, "#npcedit no_target - Set an NPC's ability to be targeted with the target hotkey"); c->Message(0, "#npcedit no_target - Set an NPC's ability to be targeted with the target hotkey");
c->Message(0, "#npcedit version - Set an NPC's version"); c->Message(0, "#npcedit version - Set an NPC's version");
c->Message(0, "#npcedit slow_mitigation - Set an NPC's slow mitigation");
} }
uint32 npcTypeID = c->GetTarget()->CastToNPC()->GetNPCTypeID(); uint32 npcTypeID = c->GetTarget()->CastToNPC()->GetNPCTypeID();
if (strcasecmp(sep->arg[1], "name") == 0) { if (strcasecmp(sep->arg[1], "name") == 0) {
c->Message(15,"NPCID %u now has the name %s.",npcTypeID, sep->argplus[2]); c->Message(15,"NPCID %u now has the name %s.",npcTypeID, sep->argplus[2]);
std::string query = StringFormat("UPDATE npc_types SET name = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET name = '%s' WHERE id = %i",
sep->argplus[2],npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6177,9 +6186,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "lastname") == 0) { if (strcasecmp(sep->arg[1], "lastname") == 0) {
c->Message(15,"NPCID %u now has the lastname %s.",npcTypeID, sep->argplus[2]); c->Message(15,"NPCID %u now has the lastname %s.",npcTypeID, sep->argplus[2]);
std::string query = StringFormat("UPDATE npc_types SET lastname = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET lastname = '%s' WHERE id = %i",
sep->argplus[2],npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6187,9 +6194,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "race") == 0) { if (strcasecmp(sep->arg[1], "race") == 0) {
c->Message(15,"NPCID %u now has the race %i.",npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has the race %i.",npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET race = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET race = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6197,9 +6202,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "class") == 0) { if (strcasecmp(sep->arg[1], "class") == 0) {
c->Message(15,"NPCID %u is now class %i.",npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u is now class %i.",npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET class = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET class = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6207,9 +6210,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "bodytype") == 0) { if (strcasecmp(sep->arg[1], "bodytype") == 0) {
c->Message(15,"NPCID %u now has type %i bodytype.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has type %i bodytype.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET bodytype = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET bodytype = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6217,9 +6218,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "hp") == 0) { if (strcasecmp(sep->arg[1], "hp") == 0) {
c->Message(15,"NPCID %u now has %i Hitpoints.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Hitpoints.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET hp = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET hp = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6227,9 +6226,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "gender") == 0) { if (strcasecmp(sep->arg[1], "gender") == 0) {
c->Message(15,"NPCID %u is now gender %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u is now gender %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET gender = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET gender = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6237,9 +6234,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "texture") == 0) { if (strcasecmp(sep->arg[1], "texture") == 0) {
c->Message(15,"NPCID %u now uses texture %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now uses texture %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET texture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET texture = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6247,9 +6242,55 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "helmtexture") == 0) { if (strcasecmp(sep->arg[1], "helmtexture") == 0) {
c->Message(15,"NPCID %u now uses helmtexture %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now uses helmtexture %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET helmtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
std::string query = StringFormat("UPDATE npc_types SET helmtexture = %i WHERE id = %i", if (strcasecmp(sep->arg[1], "armtexture") == 0) {
atoi(sep->argplus[2]),npcTypeID); c->Message(15,"NPCID %u now uses armtexture %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET armtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
if (strcasecmp(sep->arg[1], "bracertexture") == 0) {
c->Message(15,"NPCID %u now uses bracertexture %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET bracertexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
if (strcasecmp(sep->arg[1], "handtexture") == 0) {
c->Message(15,"NPCID %u now uses handtexture %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET handtexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
if (strcasecmp(sep->arg[1], "legtexture") == 0) {
c->Message(15,"NPCID %u now uses legtexture %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET legtexture = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
if (strcasecmp(sep->arg[1], "feettexture") == 0) {
c->Message(15,"NPCID %u now uses feettexture %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET feettexture = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
if (strcasecmp(sep->arg[1], "herosforgemodel") == 0) {
c->Message(15,"NPCID %u now uses herosforgemodel %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET herosforgemodel = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6257,9 +6298,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "size") == 0) { if (strcasecmp(sep->arg[1], "size") == 0) {
c->Message(15,"NPCID %u is now size %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u is now size %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET size = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET size = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6267,9 +6306,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "hpregen") == 0) { if (strcasecmp(sep->arg[1], "hpregen") == 0) {
c->Message(15,"NPCID %u now regens %i hitpoints per tick.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now regens %i hitpoints per tick.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET hp_regen_rate = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET hp_regen_rate = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6277,9 +6314,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "manaregen") == 0) { if (strcasecmp(sep->arg[1], "manaregen") == 0) {
c->Message(15,"NPCID %u now regens %i mana per tick.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now regens %i mana per tick.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET mana_regen_rate = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET mana_regen_rate = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6287,9 +6322,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "loottable") == 0) { if (strcasecmp(sep->arg[1], "loottable") == 0) {
c->Message(15,"NPCID %u is now on loottable_id %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u is now on loottable_id %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET loottable_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET loottable_id = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6297,9 +6330,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "merchantid") == 0) { if (strcasecmp(sep->arg[1], "merchantid") == 0) {
c->Message(15,"NPCID %u is now merchant_id %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u is now merchant_id %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET merchant_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET merchant_id = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6307,9 +6338,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "alt_currency_id") == 0) { if (strcasecmp(sep->arg[1], "alt_currency_id") == 0) {
c->Message(15,"NPCID %u now has field 'alt_currency_id' set to %s.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has field 'alt_currency_id' set to %s.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET alt_currency_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET alt_currency_id = '%s' WHERE id = %i",
sep->argplus[2],npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6317,9 +6346,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "npc_spells_effects_id") == 0) { if (strcasecmp(sep->arg[1], "npc_spells_effects_id") == 0) {
c->Message(15,"NPCID %u now has field 'npc_spells_effects_id' set to %s.", npcTypeID, sep->argplus[2]); c->Message(15,"NPCID %u now has field 'npc_spells_effects_id' set to %s.", npcTypeID, sep->argplus[2]);
std::string query = StringFormat("UPDATE npc_types SET npc_spells_effects_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET npc_spells_effects_id = '%s' WHERE id = %i",
sep->argplus[2],npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6327,9 +6354,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "adventure_template_id") == 0) { if (strcasecmp(sep->arg[1], "adventure_template_id") == 0) {
c->Message(15,"NPCID %u now has field 'adventure_template_id' set to %s.", npcTypeID, sep->argplus[2]); c->Message(15,"NPCID %u now has field 'adventure_template_id' set to %s.", npcTypeID, sep->argplus[2]);
std::string query = StringFormat("UPDATE npc_types SET adventure_template_id = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET adventure_template_id = '%s' WHERE id = %i",
sep->argplus[2],npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6337,9 +6362,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "trap_template") == 0) { if (strcasecmp(sep->arg[1], "trap_template") == 0) {
c->Message(15,"NPCID %u now has field 'trap_template' set to %s.", npcTypeID, sep->argplus[2]); c->Message(15,"NPCID %u now has field 'trap_template' set to %s.", npcTypeID, sep->argplus[2]);
std::string query = StringFormat("UPDATE npc_types SET trap_template = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET trap_template = '%s' WHERE id = %i",
sep->argplus[2],npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6347,9 +6370,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "special_abilities") == 0) { if (strcasecmp(sep->arg[1], "special_abilities") == 0) {
c->Message(15,"NPCID %u now has field 'special_abilities' set to %s.", npcTypeID, sep->argplus[2]); c->Message(15,"NPCID %u now has field 'special_abilities' set to %s.", npcTypeID, sep->argplus[2]);
std::string query = StringFormat("UPDATE npc_types SET special_abilities = '%s' WHERE id = %i", sep->argplus[2],npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET special_abilities = '%s' WHERE id = %i",
sep->argplus[2],npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6357,9 +6378,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "spell") == 0) { if (strcasecmp(sep->arg[1], "spell") == 0) {
c->Message(15,"NPCID %u now uses spell list %i", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now uses spell list %i", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET npc_spells_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET npc_spells_id = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6367,29 +6386,39 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "faction") == 0) { if (strcasecmp(sep->arg[1], "faction") == 0) {
c->Message(15,"NPCID %u is now faction %i", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u is now faction %i", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET npc_faction_id = %i WHERE id = %i", atoi(sep->argplus[2]),npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET npc_faction_id = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if ( strcasecmp( sep->arg[1], "mindmg" ) == 0 ) { if (strcasecmp(sep->arg[1], "damage") == 0) {
c->Message(15,"NPCID %u now hits for a min of %i", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now hits from %i to %i", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]));
std::string query = StringFormat("UPDATE npc_types SET mindmg = %i, maxdmg = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET mindmg = %i WHERE id = %i",
atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if ( strcasecmp( sep->arg[1], "maxdmg" ) == 0 ) { if (strcasecmp(sep->arg[1], "meleetype") == 0) {
c->Message(15,"NPCID %u now hits for a max of %i", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a primary melee type of %i and a secondary melee type of %i.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]));
std::string query = StringFormat("UPDATE npc_types SET prim_melee_type = %i, sec_melee_type = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
std::string query = StringFormat("UPDATE npc_types SET maxdmg = %i WHERE id = %i", if (strcasecmp(sep->arg[1], "rangedtype") == 0) {
atoi(sep->argplus[2]),npcTypeID); c->Message(15,"NPCID %u now has a ranged type of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET rangedtype = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
if (strcasecmp(sep->arg[1], "ammoidfile") == 0) {
c->Message(15,"NPCID %u's ammo id file is now %i", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET ammoidfile = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6397,9 +6426,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "aggroradius") == 0) { if (strcasecmp(sep->arg[1], "aggroradius") == 0) {
c->Message(15,"NPCID %u now has an aggro radius of %i", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has an aggro radius of %i", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET aggroradius = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET aggroradius = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6407,9 +6434,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "assistradius") == 0) { if (strcasecmp(sep->arg[1], "assistradius") == 0) {
c->Message(15,"NPCID %u now has an assist radius of %i", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has an assist radius of %i", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET assistradius = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET assistradius = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6417,9 +6442,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "social") == 0) { if (strcasecmp(sep->arg[1], "social") == 0) {
c->Message(15,"NPCID %u social status is now %i", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u social status is now %i", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET social = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET social = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6427,9 +6450,15 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "runspeed") == 0) { if (strcasecmp(sep->arg[1], "runspeed") == 0) {
c->Message(15,"NPCID %u now runs at %f", npcTypeID, atof(sep->argplus[2])); c->Message(15,"NPCID %u now runs at %f", npcTypeID, atof(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET runspeed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
std::string query = StringFormat("UPDATE npc_types SET runspeed = %f WHERE id = %i", if (strcasecmp(sep->arg[1], "walkspeed") == 0) {
atof(sep->argplus[2]), npcTypeID); c->Message(15,"NPCID %u now walks at %f", npcTypeID, atof(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET walkspeed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6437,9 +6466,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "AGI") == 0) { if (strcasecmp(sep->arg[1], "AGI") == 0) {
c->Message(15,"NPCID %u now has %i Agility.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Agility.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET AGI = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET AGI = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6447,9 +6474,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "CHA") == 0) { if (strcasecmp(sep->arg[1], "CHA") == 0) {
c->Message(15,"NPCID %u now has %i Charisma.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Charisma.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET CHA = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET CHA = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6457,9 +6482,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "DEX") == 0) { if (strcasecmp(sep->arg[1], "DEX") == 0) {
c->Message(15,"NPCID %u now has %i Dexterity.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Dexterity.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET DEX = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET DEX = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6467,9 +6490,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "INT") == 0) { if (strcasecmp(sep->arg[1], "INT") == 0) {
c->Message(15,"NPCID %u now has %i Intelligence.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Intelligence.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET _INT = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET _INT = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6477,9 +6498,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "STA") == 0) { if (strcasecmp(sep->arg[1], "STA") == 0) {
c->Message(15,"NPCID %u now has %i Stamina.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Stamina.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET STA = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET STA = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6487,9 +6506,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "STR") == 0) { if (strcasecmp(sep->arg[1], "STR") == 0) {
c->Message(15,"NPCID %u now has %i Strength.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Strength.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET STR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET STR = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6497,9 +6514,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "WIS") == 0) { if (strcasecmp(sep->arg[1], "WIS") == 0) {
c->Message(15,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET WIS = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET WIS = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6507,9 +6522,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "MR") == 0) { if (strcasecmp(sep->arg[1], "MR") == 0) {
c->Message(15,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a Magic Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET MR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET MR = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6517,9 +6530,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "DR") == 0) { if (strcasecmp(sep->arg[1], "DR") == 0) {
c->Message(15,"NPCID %u now has a Disease Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a Disease Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET DR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET DR = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6527,9 +6538,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "CR") == 0) { if (strcasecmp(sep->arg[1], "CR") == 0) {
c->Message(15,"NPCID %u now has a Cold Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a Cold Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET CR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET CR = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6537,9 +6546,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "FR") == 0) { if (strcasecmp(sep->arg[1], "FR") == 0) {
c->Message(15,"NPCID %u now has a Fire Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a Fire Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET FR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET FR = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6547,9 +6554,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "PR") == 0) { if (strcasecmp(sep->arg[1], "PR") == 0) {
c->Message(15,"NPCID %u now has a Poison Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a Poison Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET PR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET PR = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6557,9 +6562,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "Corrup") == 0) { if (strcasecmp(sep->arg[1], "Corrup") == 0) {
c->Message(15,"NPCID %u now has a Corruption Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a Corruption Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET corrup = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET corrup = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6567,9 +6570,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "PhR") == 0) { if (strcasecmp(sep->arg[1], "PhR") == 0) {
c->Message(15,"NPCID %u now has a Physical Resistance of %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a Physical Resistance of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET PhR = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET PhR = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6577,9 +6578,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "seeinvis") == 0) { if (strcasecmp(sep->arg[1], "seeinvis") == 0) {
c->Message(15,"NPCID %u now has seeinvis set to %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has seeinvis set to %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET see_invis = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET see_invis = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6587,9 +6586,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "seeinvisundead") == 0) { if (strcasecmp(sep->arg[1], "seeinvisundead") == 0) {
c->Message(15,"NPCID %u now has seeinvisundead set to %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has seeinvisundead set to %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET see_invis_undead = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET see_invis_undead = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6597,9 +6594,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "seehide") == 0) { if (strcasecmp(sep->arg[1], "seehide") == 0) {
c->Message(15,"NPCID %u now has seehide set to %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has seehide set to %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET see_hide = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET see_hide = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6607,9 +6602,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "seeimprovedhide") == 0) { if (strcasecmp(sep->arg[1], "seeimprovedhide") == 0) {
c->Message(15,"NPCID %u now has seeimprovedhide set to %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has seeimprovedhide set to %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET see_improved_hide = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET see_improved_hide = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6617,9 +6610,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "AC") == 0) { if (strcasecmp(sep->arg[1], "AC") == 0) {
c->Message(15,"NPCID %u now has %i Armor Class.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Armor Class.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET ac = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET ac = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6627,9 +6618,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "ATK") == 0) { if (strcasecmp(sep->arg[1], "ATK") == 0) {
c->Message(15,"NPCID %u now has %i Attack.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Attack.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET atk = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET atk = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6637,9 +6626,15 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "Accuracy") == 0) { if (strcasecmp(sep->arg[1], "Accuracy") == 0) {
c->Message(15,"NPCID %u now has %i Accuracy.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has %i Accuracy.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET accuracy = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
std::string query = StringFormat("UPDATE npc_types SET accuracy = %i WHERE id = %i", if (strcasecmp(sep->arg[1], "Avoidance") == 0) {
atoi(sep->argplus[2]), npcTypeID); c->Message(15,"NPCID %u now has %i Avoidance.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET avoidance = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6647,9 +6642,7 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "level") == 0) { if (strcasecmp(sep->arg[1], "level") == 0) {
c->Message(15,"NPCID %u is now level %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u is now level %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET level = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET level = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6657,53 +6650,39 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "maxlevel") == 0) { if (strcasecmp(sep->arg[1], "maxlevel") == 0) {
c->Message(15,"NPCID %u now has a maximum level of %i.", npcTypeID, atoi(sep->argplus[2])); c->Message(15,"NPCID %u now has a maximum level of %i.", npcTypeID, atoi(sep->argplus[2]));
std::string query = StringFormat("UPDATE npc_types SET maxlevel = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET maxlevel = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "qglobal") == 0) { if (strcasecmp(sep->arg[1], "qglobal") == 0) {
c->Message(15,"Quest globals have been %s for NPCID %u", c->Message(15,"Quest globals have been %s for NPCID %u", atoi(sep->arg[2]) == 0 ? "disabled" : "enabled", npcTypeID);
atoi(sep->arg[2]) == 0 ? "disabled" : "enabled", npcTypeID); std::string query = StringFormat("UPDATE npc_types SET qglobal = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET qglobal = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "npcaggro") == 0) { if (strcasecmp(sep->arg[1], "npcaggro") == 0) {
c->Message(15,"NPCID %u will now %s other NPCs with negative faction npc_value", c->Message(15,"NPCID %u will now %s other NPCs with negative faction npc_value", npcTypeID, atoi(sep->arg[2]) == 0? "not aggro": "aggro");
npcTypeID, atoi(sep->arg[2]) == 0? "not aggro": "aggro"); std::string query = StringFormat("UPDATE npc_types SET npc_aggro = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET npc_aggro = %i WHERE id = %i",
atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if ( strcasecmp( sep->arg[1], "limit" ) == 0 ) { if (strcasecmp(sep->arg[1], "spawn_limit") == 0) {
c->Message(15,"NPCID %u now has a spawn limit of %i", c->Message(15,"NPCID %u now has a spawn limit of %i", npcTypeID, atoi(sep->arg[2]));
npcTypeID, atoi(sep->arg[2])); std::string query = StringFormat("UPDATE npc_types SET spawn_limit = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET limit = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "Attackspeed") == 0) { if (strcasecmp(sep->arg[1], "Attackspeed") == 0) {
c->Message(15,"NPCID %u now has attack_speed set to %f", c->Message(15,"NPCID %u now has attack_speed set to %f", npcTypeID, atof(sep->arg[2]));
npcTypeID, atof(sep->arg[2])); std::string query = StringFormat("UPDATE npc_types SET attack_speed = %f WHERE id = %i", atof(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET attack_speed = %f WHERE id = %i",
atof(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6711,51 +6690,47 @@ void command_npcedit(Client *c, const Seperator *sep)
if (strcasecmp(sep->arg[1], "Attackdelay") == 0) { if (strcasecmp(sep->arg[1], "Attackdelay") == 0) {
c->Message(15,"NPCID %u now has attack_delay set to %i",npcTypeID,atoi(sep->arg[2])); c->Message(15,"NPCID %u now has attack_delay set to %i",npcTypeID,atoi(sep->arg[2]));
std::string query = StringFormat("UPDATE npc_types SET attack_delay = %i WHERE id = %i",atoi(sep->argplus[2]),npcTypeID); std::string query = StringFormat("UPDATE npc_types SET attack_delay = %i WHERE id = %i",atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "Attackcount") == 0) {
c->Message(15,"NPCID %u now has attack_count set to %i",npcTypeID,atoi(sep->arg[2]));
std::string query = StringFormat("UPDATE npc_types SET attack_count = %i WHERE id = %i",atoi(sep->argplus[2]),npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
if (strcasecmp(sep->arg[1], "findable") == 0) { if (strcasecmp(sep->arg[1], "findable") == 0) {
c->Message(15,"NPCID %u is now %s", npcTypeID, atoi(sep->arg[2]) == 0? "not findable": "findable"); c->Message(15,"NPCID %u is now %s", npcTypeID, atoi(sep->arg[2]) == 0? "not findable": "findable");
std::string query = StringFormat("UPDATE npc_types SET findable = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET findable = %i WHERE id = %i",
atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if ( strcasecmp( sep->arg[1], "wep1" ) == 0 ) { if (strcasecmp(sep->arg[1], "trackable") == 0) {
c->Message(15,"NPCID %u will have item graphic %i set to his primary on repop.", c->Message(15,"NPCID %u is now %s", npcTypeID, atoi(sep->arg[2]) == 0? "not trackable": "trackable");
npcTypeID, atoi(sep->arg[2])); std::string query = StringFormat("UPDATE npc_types SET trackable = %i WHERE id = %i", atoi(sep->argplus[2]) == 0? 0: 1, npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET d_melee_texture1 = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if ( strcasecmp( sep->arg[1], "wep2" ) == 0 ) { if (strcasecmp(sep->arg[1], "weapon") == 0) {
c->Message(15,"NPCID %u will have item graphic %i set to his secondary on repop.", c->Message(15,"NPCID %u will have item graphic %i set to his primary and item graphic %i set to his secondary on repop.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]));
npcTypeID, atoi(sep->arg[2])); std::string query = StringFormat("UPDATE npc_types SET d_melee_texture1 = %i, d_melee_texture2 = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET d_melee_texture2 = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "featuresave") == 0) { if (strcasecmp(sep->arg[1], "featuresave") == 0) {
c->Message(15,"NPCID %u saved with all current facial feature settings", c->Message(15,"NPCID %u saved with all current facial feature settings", npcTypeID);
npcTypeID);
Mob* target = c->GetTarget(); Mob* target = c->GetTarget();
std::string query = StringFormat("UPDATE npc_types " std::string query = StringFormat("UPDATE npc_types "
"SET luclin_haircolor = %i, luclin_beardcolor = %i, " "SET luclin_haircolor = %i, luclin_beardcolor = %i, "
"luclin_hairstyle = %i, luclin_beard = %i, " "luclin_hairstyle = %i, luclin_beard = %i, "
@ -6773,24 +6748,16 @@ void command_npcedit(Client *c, const Seperator *sep)
} }
if (strcasecmp(sep->arg[1], "color") == 0) { if (strcasecmp(sep->arg[1], "color") == 0) {
c->Message(15,"NPCID %u now has %i red, %i green, and %i blue tinting on their armor.", c->Message(15,"NPCID %u now has %i red, %i green, and %i blue tinting on their armor.", npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]));
npcTypeID, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); std::string query = StringFormat("UPDATE npc_types SET armortint_red = %i, armortint_green = %i, armortint_blue = %i WHERE id = %i", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types "
"SET armortint_red = %i, armortint_green = %i, armortint_blue = %i "
"WHERE id = %i",
atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "armortint_id") == 0) { if (strcasecmp(sep->arg[1], "armortint_id") == 0) {
c->Message(15,"NPCID %u now has field 'armortint_id' set to %s", c->Message(15,"NPCID %u now has field 'armortint_id' set to %s", npcTypeID, sep->arg[2]);
npcTypeID, sep->arg[2]); std::string query = StringFormat("UPDATE npc_types SET armortint_id = '%s' WHERE id = %i", sep->argplus[2], npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET armortint_id = '%s' WHERE id = %i",
sep->argplus[2], npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
@ -6809,8 +6776,7 @@ void command_npcedit(Client *c, const Seperator *sep)
animation = 3; //Dead animation = 3; //Dead
if((strcasecmp(sep->arg[2], "loot" ) == 0) || atoi(sep->arg[2]) == 4) if((strcasecmp(sep->arg[2], "loot" ) == 0) || atoi(sep->arg[2]) == 4)
animation = 4; //Looting Animation animation = 4; //Looting Animation
} } else {
else {
c->Message(0, "You must specifiy an animation stand, sit, crouch, dead, loot (0-4)"); c->Message(0, "You must specifiy an animation stand, sit, crouch, dead, loot (0-4)");
c->Message(0, "Example: #npcedit setanimation sit"); c->Message(0, "Example: #npcedit setanimation sit");
c->Message(0, "Example: #npcedit setanimation 0"); c->Message(0, "Example: #npcedit setanimation 0");
@ -6818,10 +6784,7 @@ void command_npcedit(Client *c, const Seperator *sep)
} }
c->Message(15,"NPCID %u now has the animation set to %i on spawn with spawngroup %i", npcTypeID, animation, c->GetTarget()->CastToNPC()->GetSp2() ); c->Message(15,"NPCID %u now has the animation set to %i on spawn with spawngroup %i", npcTypeID, animation, c->GetTarget()->CastToNPC()->GetSp2() );
std::string query = StringFormat("UPDATE spawn2 SET animation = %i " "WHERE spawngroupID = %i", animation, c->GetTarget()->CastToNPC()->GetSp2());
std::string query = StringFormat("UPDATE spawn2 SET animation = %i "
"WHERE spawngroupID = %i",
animation, c->GetTarget()->CastToNPC()->GetSp2());
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
@ -6830,55 +6793,48 @@ void command_npcedit(Client *c, const Seperator *sep)
} }
if (strcasecmp(sep->arg[1], "scalerate") == 0) { if (strcasecmp(sep->arg[1], "scalerate") == 0) {
c->Message(15,"NPCID %u now has a scaling rate of %i.", c->Message(15,"NPCID %u now has a scaling rate of %i.", npcTypeID, atoi(sep->arg[2]));
npcTypeID, atoi(sep->arg[2])); std::string query = StringFormat("UPDATE npc_types SET scalerate = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET scalerate = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "healscale") == 0) { if (strcasecmp(sep->arg[1], "healscale") == 0) {
c->Message(15, "NPCID %u now has a heal scaling rate of %i.", c->Message(15, "NPCID %u now has a heal scaling rate of %i.", npcTypeID, atoi(sep->arg[2]));
npcTypeID, atoi(sep->arg[2])); std::string query = StringFormat("UPDATE npc_types SET healscale = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET healscale = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "spellscale") == 0) { if (strcasecmp(sep->arg[1], "spellscale") == 0) {
c->Message(15, "NPCID %u now has a spell scaling rate of %i.", c->Message(15, "NPCID %u now has a spell scaling rate of %i.", npcTypeID, atoi(sep->arg[2]));
npcTypeID, atoi(sep->arg[2])); std::string query = StringFormat("UPDATE npc_types SET spellscale = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET spellscale = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "no_target") == 0) { if (strcasecmp(sep->arg[1], "no_target") == 0) {
c->Message(15, "NPCID %u is now %s.", c->Message(15, "NPCID %u is now %s.", npcTypeID, atoi(sep->arg[2]) == 0? "targetable": "untargetable");
npcTypeID, atoi(sep->arg[2]) == 0? "targetable": "untargetable"); std::string query = StringFormat("UPDATE npc_types SET no_target_hotkey = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
std::string query = StringFormat("UPDATE npc_types SET no_target_hotkey = %i WHERE id = %i",
atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;
} }
if (strcasecmp(sep->arg[1], "version") == 0) { if (strcasecmp(sep->arg[1], "version") == 0) {
c->Message(15, "NPCID %u is now version %i.", c->Message(15, "NPCID %u is now version %i.", npcTypeID, atoi(sep->arg[2]));
npcTypeID, atoi(sep->arg[2])); std::string query = StringFormat("UPDATE npc_types SET version = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query);
c->LogSQL(query.c_str());
return;
}
std::string query = StringFormat("UPDATE npc_types SET version = %i WHERE id = %i", if (strcasecmp(sep->arg[1], "slow_mitigation") == 0) {
atoi(sep->argplus[2]), npcTypeID); c->Message(15, "NPCID %u's slow mitigation limit is now %i.", npcTypeID, atoi(sep->arg[2]));
std::string query = StringFormat("UPDATE npc_types SET slow_mitigation = %i WHERE id = %i", atoi(sep->argplus[2]), npcTypeID);
database.QueryDatabase(query); database.QueryDatabase(query);
c->LogSQL(query.c_str()); c->LogSQL(query.c_str());
return; return;