#logspawn - near complete, need help
I made a function called #logspawn that takes NPC data and writes it to a file. I want to use this to help create SQL files from inside the emulator to save work from recreating already correct npcs in my new classic db. However, 3 of the data pieces are not logging correctly. Here is a sample output file:
Code:
(25111, Guard_Doolin000, 40, 44, 1, 3776, 0, 0, 0, -1074790400, 1, 0, 0, 4429024, 0, 0, 0, 0, 0, 0, 0, -937796802, 0, 0, 0, 0, 0, 0, 0, 1)
(25110, Guard_Jacsen000, 40, 44, 1, 3776, 0, 0, 0, -1074790400, 1, 0, 0, 4429024, 0, 0, 0, 0, 0, 0, 0, -1159557055, 0, 0, 0, 0, 0, 0, 0, 1)
(25109, Guard_Munden000, 40, 44, 1, 3776, 0, 0, 0, -1074790400, 1, 0, 0, 4429024, 0, 0, 0, 0, 0, 0, 0, -1280860619, 0, 0, 0, 0, 0, 0, 0, 1)
(25102, a_decaying_skeleton002, 1, 60, 1, 17, 2, 0, 0, -1074790400, 0, 0, 0, 4429024, 0, 0, 0, 0, 0, 0, 0, -1161115389, 0, 0, 0, 0, 0, 0, 0, 1)
(25100, a_bat008, 1, 34, 1, 17, 2, 0, 0, 1074266112, 0, 0, 0, 4429024, 0, 0, 0, 0, 0, 0, 0, -2037461023, 0, 0, 0, 0, 0, 0, 0, 1)
(25106, a_large_rat001, 1, 36, 1, 17, 2, 0, 0, 1075576832, 0, 0, 0, 4429024, 0, 0, 0, 0, 0, 0, 0, -2070752937, 0, 0, 0, 0, 0, 0, 0, 1)
And here is the function segment:
Code:
void Mob::LogStats(Client* client) {
client->Message(0, "Logged %s to spawnlog.log", this->GetName());
FilePrint("spawnlog.log", true, true, "(%i, %s, %i, %i, %i, %i, %i, %i, %i, %i, %i, 0, 0, %i, 0, 0, 0, 0, 0, 0, 0, %i, 0, 0, 0, 0, 0, 0, 0, 1)", this->CastToNPC()->GetNPCTypeID(), this->GetName(), this->GetLevel(), this->GetRace(), this->GetClass(), this->GetMaxHP(), this->GetGender(), this->CastToNPC()->GetLoottableID(), this->GetSize(), this->GetTexture(), this->GetHelmTexture, this->CastToNPC()->GetMerchantID(), this->GetFace());
}
My problem is i am getting outrageous numbers for GetTexture( ), GetMerchantID( ) and GetFace( ). They are all int8 too. Get MerchID and Face are 2 that I added but I dont see why they shouldnt work. Let me know if you have any tips for me.
Thanks!
|