Jump to content

PetePeter

Member
  • Posts

    11
  • Joined

  • Last visited

About PetePeter

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

PetePeter's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Collaborator
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

6

Reputation

  1. tonumber will not remove the dot as it's a correct number (Even if it's a float) Edit: Use math.floor instead math.floor(4.1)) -> 4 math.floor(3.8)`) -> 3
  2. Just kill the game & auth process before the db one, they will send packet to db at exit
  3. I don't think that's a good solution to do a mysql query based on player command, I suggest you to load the gm list at login/warp with quest that's better int pc_register_gamemaster(lua_State * L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (!ch) return 0; std::auto_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery("select `mname` from `common`.`gmlist`")); if (pmsg->Get()->uiNumRows > 0) { for (int i = 0; i < pmsg->Get()->uiNumRows; i++) { mysql_row row = mysql_fetch_row(pmsg->Get()->pSQLresult); ch->ChatPacket(chat_type_command, "addgamemaster %s", row[0]); } } return 0; } { "register_gamemaster", pc_register_gamemaster }, quest register_gamemaster begin state start begin when login begin pc.register_gamemaster() end end end Thanks for the design PS: Why did you convert all to lowercase ? it's unusable like that
  4. Add it on "#define IS_NO_CLEAR_ON_DEATH_AFFECT(type)" inside char_affect.cpp
  5. I think have easiest way if (true && !false && true != false && false != true) { if(item->GetCount() > 0) item->SetCount(item->GetCount()-0); else item->SetCount(item->GetCount()-(1-1)); } else if (true == false) { if(item->GetCount() > 0) item->SetCount(item->GetCount()-0); else item->SetCount(item->GetCount()-(1-1)); } else { item->SetCount(item->GetCount()-1); }
  6. If it's can help you to solve I did some debug point on the function on martysama src: SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx: name(), coinType(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable: dwVnum(3217001856), dwNPCVnum(3), byItemCount(110) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(25456), count(0), pos(65535), price(3825205248), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(3213840136), count(191), pos(65535), price(4058184744), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1342177026), count(143), pos(65535), price(8388607), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(0), count(0), pos(65535), price(0), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(0), count(0), pos(65535), price(17320721), display_pos(142) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1096810537), count(41), pos(65535), price(3706939433), display_pos(40) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1744830855), count(243), pos(65535), price(3693691232), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(4058184745), count(40), pos(65535), price(3213915648), display_pos(40) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(16777215), count(0), pos(65535), price(46120848), display_pos(147) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(4058184704), count(40), pos(65535), price(3935307008), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(3490222634), count(146), pos(65535), price(33554432), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(8), count(0), pos(65535), price(520), display_pos(40) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1136639889), count(67), pos(65535), price(2797584276), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(3935475391), count(40), pos(65535), price(3213999295), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(67108864), count(0), pos(65535), price(67108864), display_pos(4) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(6184), count(0), pos(65535), price(4294967080), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(0), count(0), pos(65535), price(0), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(3214073856), count(191), pos(65535), price(4058184744), display_pos(191) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(3774873346), count(146), pos(65535), price(8388607), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1471), count(0), pos(65535), price(4058184704), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(4227858432), count(226), pos(65535), price(67108864), display_pos(255) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(4060356608), count(40), pos(65535), price(0), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(33554432), count(0), pos(65535), price(0), display_pos(42) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(4043342632), count(40), pos(65535), price(3926887359), display_pos(8) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(0), count(0), pos(65535), price(0), display_pos(15) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(25660200), count(0), pos(65535), price(3706939433), display_pos(191) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1361658290), count(72), pos(65535), price(838860800), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1096932393), count(41), pos(65535), price(256), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1941946259), count(67), pos(65535), price(1476395008), display_pos(226) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(3701782207), count(40), pos(65535), price(40), display_pos(40) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(285212672), count(0), pos(65535), price(2955456347), display_pos(91) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(3214207016), count(191), pos(65535), price(3086714664), display_pos(40) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(146784152), count(150), pos(65535), price(2680143768), display_pos(152) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1014112256), count(43), pos(65535), price(296), display_pos(8) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(4278190080), count(255), pos(65535), price(671088640), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(2177925120), count(43), pos(65535), price(7168), display_pos(114) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(1953653108), count(0), pos(65535), price(12566424), display_pos(149) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(29737), count(0), pos(65535), price(1065), display_pos(40) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(0), count(0), pos(65535), price(2670164), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: (Before convert) TShopTableEx->SShopTable->items: vnum(0), count(0), pos(65535), price(0), display_pos(0) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 0 (size: 2) (Vnum: 40122) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 1 (size: 2) (Vnum: 41148) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 2 (size: 2) (Vnum: 41149) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 3 (size: 2) (Vnum: 41150) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 4 (size: 1) (Vnum: 45081) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 5 (size: 1) (Vnum: 45082) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 6 (size: 1) (Vnum: 45083) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 7 (size: 1) (Vnum: 45262) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 8 (size: 1) (Vnum: 45263) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 9 (size: 1) (Vnum: 45264) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 10 (size: 1) (Vnum: 45265) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 11 (size: 1) (Vnum: 40123) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 12 (size: 1) (Vnum: 70063) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 13 (size: 1) (Vnum: 70064) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 14 (size: 1) (Vnum: 71192) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 15 (size: 2) (Vnum: 40124) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 16 (size: 3) (Vnum: 40125) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 17 (size: 1) (Vnum: 40126) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 18 (size: 1) (Vnum: 40127) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 19 (size: 2) (Vnum: 41145) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 20 (size: 2) (Vnum: 41146) SYSERR: Jan 17 13:48:44 :: ConvertToShopItemTable: grid.Put: 21 (size: 2) (Vnum: 41147) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: map_npcShop.insert 20126 SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: Reading index: 0 SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx: name(X1), coinType(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable: dwVnum(2999), dwNPCVnum(3), byItemCount(22) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(40122), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(41148), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(41149), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(41150), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(45081), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(45082), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(45083), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(45262), count(1), pos(65535), price(75), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(45263), count(1), pos(65535), price(75), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(45264), count(1), pos(65535), price(75), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(45265), count(1), pos(65535), price(75), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(40123), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(70063), count(1), pos(65535), price(10), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(70064), count(1), pos(65535), price(5), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(71192), count(1), pos(65535), price(200), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(40124), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(40125), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(40126), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(40127), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(41145), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(41146), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(41147), count(1), pos(65535), price(50), display_pos(0) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) SYSERR: Jan 17 13:48:44 :: ReadShopTableEx: TShopTableEx->SShopTable->items: vnum(3217001428), count(4), pos(65535), price(1953656691), display_pos(117) All the wierd vnum are the reason to show you all these fake item in shop
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.