eqwarrior
07-22-2009, 07:58 PM
Sometimes I would like to make a copy of a NPC from one zone and put it in another zone, which I do with #npcspawn create / add which creates an entirely new NPC ID with same name and stats. Two fields that I notice don't carry over is the lastname and the qglobal fields. This drove me nuts before trying to figure why my global wasn't working in another zone that had the same NPC and same quest code. Just a minor note, might be helpful to include those two fields when doing a create / add
AndMetal
07-22-2009, 11:59 PM
I doubt I'll get to this anytime soon, but here's the query we need to change:
zone/npc.cpp (http://code.google.com/p/projecteqemu/source/browse/trunk/EQEmuServer/zone/npc.cpp?r=815#1003)
if (!RunQuery(query, MakeAnyLenString(&query, "INSERT INTO npc_types (name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed) values(\"%s\",%i,%i,%i,%i,%i,%i,%i,%f,%i,%i,%i,%f)", tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed()), errbuf, 0, 0, &npc_type_id))
eqwarrior
07-23-2009, 11:06 AM
I figured it'd be simple like that. No rush, but hopefully added in the future would be helpful. Thanks much!
trevius
07-23-2009, 02:43 PM
I might try to get that fixed soon, since I have been wanting to get it to save features as well. Now that we have full control over setting NPC features in game after spawning, we might as well be able to save them when creating NPCs. Since both fixes are in the same place, they might as well be done at the same time.
eqwarrior
07-23-2009, 06:24 PM
I might try to get that fixed soon, since I have been wanting to get it to save features as well. Now that we have full control over setting NPC features in game after spawning, we might as well be able to save them when creating NPCs. Since both fixes are in the same place, they might as well be done at the same time.
You da man!
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.