Jump to content

rawn3cr0

Member
  • Posts

    103
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by rawn3cr0

  1. How i can fix this bug? Item on shop after delete from db. Offlineshop great!
  2. ACMD(do_shop_delete) { char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); if (!*arg1) { ch->ChatPacket(CHAT_TYPE_INFO, "Usage:"); ch->ChatPacket(CHAT_TYPE_INFO, "/delete_shop <type> <arg> "); ch->ChatPacket(CHAT_TYPE_INFO, "Types:"); ch->ChatPacket(CHAT_TYPE_INFO, " id - Delete item from shop using ID"); ch->ChatPacket(CHAT_TYPE_INFO, "Example:"); ch->ChatPacket(CHAT_TYPE_INFO, " /delete_shop id 1"); return; } if (!strcmp(arg1, "id")) { SQLMsg * pkMsg(DBManager::instance().DirectQuery("delete from player_shop_items WHERE id='%s'", arg1)); SQLResult * pRes = pkMsg->Get(); if (pRes->uiNumRows>0) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult)) != NULL) { DWORD id; str_to_number(id, arg1); DBManager::instance().DirectQuery("delete from player_shop_items WHERE id='%s'", id); } } else ch->ChatPacket(CHAT_TYPE_INFO, "Shop %s does exists", arg1); } }
  3. How i can make a in game command in source like: /delete_item 280 where 280 is item id from offlineshop. I try something last night but dont work..
  4. How i can make a command to reload items from offlineshop by great? I try: /update_shop <shop id> - Reload shop items when you edit it in MySQL but don't work
  5. I think best solution is to edit target_pos function to work with global coordinates. But i don't know how..
  6. How i can convert database coord in minimap coord. Character is in same place about 1 hour. I need for a traget system... and i need coords from db but don't work , just with minimap. Or to modifi this to work with database coord: int target_pos(lua_State* L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); int iQuestIndex = CQuestManager::instance().GetCurrentPC()->GetCurrentQuestIndex(); if (!lua_isstring(L, 1) || !lua_isnumber(L, 2) || !lua_isnumber(L, 3)) { sys_err("invalid argument, name: %s, quest_index %d", ch->GetName(), iQuestIndex); return 0; } PIXEL_POSITION pos; if (!SECTREE_MANAGER::instance().GetMapBasePositionByMapIndex(ch->GetMapIndex(), pos)) { sys_err("cannot find base position in this map %d", ch->GetMapIndex()); return 0; } int x = pos.x + (int) lua_tonumber(L, 2) * 100; int y = pos.y + (int) lua_tonumber(L, 3) * 100; CTargetManager::instance().CreateTarget(ch->GetPlayerID(), iQuestIndex, lua_tostring(L, 1), TARGET_TYPE_POS, x, y, (int) lua_tonumber(L, 4), lua_isstring(L, 5) ? lua_tostring(L, 5) : NULL, lua_isnumber(L, 6) ? (int)lua_tonumber(L, 6): 1); return 0; } If i put minimap coord work ex :target.pos("__TARGET__", 382, 687, 41, "Test Titlu") but with database coord not work ex :target.pos("__TARGET__", 959890, 273537, 41, "Test Titlu") How i can modifi this to work with database coord?
  7. I have this quest [Hidden Content] How i can to make to read coordonates x,y from database ?
  8. I have this search system:#link removed 1. How i can add item image to tooltip? 2.Buy function don't work 3. Find item by shop range. (Need to see shop to find items)
  9. Hi How i can make to read with color from locale_string.txt ? ChatPacket(CHAT_TYPE_INFO, "[Info] Ai distrus %s.", item->GetName()); ChatPacket(CHAT_TYPE_INFO, "|cff8ddcab[Info]|r |cffffffffItem-ul|r |cFFFFC700%s|r |cffffffffnu se mai poate recupera.|r", item->GetName());
  10. Hey guys, I use mainline source, and most of the mobs dont attack me. I mean I get the damage, but only 2-3 mobs come to me and do it visually, mostly they're just standing on their own place without doing anything (but I also get their damage too). Why does it happen? Thanks in advance!
  11. I have this problem to in Fliege clean serverfiles. Not saving caracter position after exit. How i can solve this?
  12. After i implement sahs sistem by lent Sash is move to Mount slot. Mount not work and have absortion. gametype.h client #ifdef ENABLE_COSTUME_SYSTEM const DWORD c_Costume_Slot_Start = c_Equipment_Start + 19; // [ÁÖÀÇ] ¼ýÀÚ(19) ÇϵåÄÚµù ÁÖÀÇ. ÇöÀç ¼­¹ö¿¡¼­ ÄÚ½ºÃõ ½½·ÔÀº 19ºÎÅÍÀÓ. ¼­¹ö common/length.h ÆÄÀÏÀÇ EWearPositions ¿­°ÅÇü Âü°í.  const DWORD c_Costume_Slot_Body = c_Costume_Slot_Start + 0; const DWORD c_Costume_Slot_Hair = c_Costume_Slot_Start + 1;  const DWORD c_Costume_Slot_Mount = c_Costume_Slot_Start + 2; const DWORD c_Costume_Slot_Sash = c_Costume_Slot_Start + 3;  const DWORD c_Costume_Slot_Count = 4; const DWORD c_Costume_Slot_End = c_Costume_Slot_Start + c_Costume_Slot_Count;  #endif
  13. For normal shop work good but for offlineshop not... [TestEMPP] isn't shop owner Syserr NOTHING
  14. Relase date 11.04.2016 Now date 27.01/2019 And still waiting for fix this system (ken offlineshop)
  15. How i can modify this code from this: To this: void CInputMain::PrivateSearch(LPCHARACTER ch, const char * data) { struct packet_private_search * pinfo = (struct packet_private_search *) data; const char* Item_Search = pinfo->item_name; //Nombre Recibido int Item_Gold = pinfo->item_gold; if (strlen(Item_Search) == 0){ ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] No ha colocado ninguno nombre."); return; } if (Item_Gold < 0){ ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] Coloque un valor mayor a 0"); return; } if (Item_Gold > 2000000000){ ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] Coloque un valor menos de 2kkk"); return; } int check = 0; int check_0 = 0; char szQuery[1024]; snprintf(szQuery, sizeof(szQuery),"SELECT * FROM player.offline_shop_item WHERE status=0 and mapIndex=%d",ch->GetMapIndex()); std::auto_ptr<SQLMsg> pMsg(DBManager::Instance().DirectQuery(szQuery)); std::auto_ptr<SQLMsg> pMsg1(DBManager::Instance().DirectQuery(szQuery)); if (pMsg->Get()->uiNumRows > 0) { //Check si no existe ningun item con ese nombre while (MYSQL_ROW row_check = mysql_fetch_row(pMsg1->Get()->pSQLResult)) { const char * Item_Totales_0 = row_check[43]; //Nombres Tablas const char * Item_Vnums_0 = row_check[4]; //Vnums Tablas const char * Item_Gold_0 = row_check[41]; //Gold Tablas DWORD Vnum_Item_0 = 0; str_to_number(Vnum_Item_0, Item_Vnums_0); //Convierte el vnum de string a numero entero int Gold_Item_0 = 0; str_to_number(Gold_Item_0, Item_Gold_0); //Convierte el vnum de string a numero entero if (strstr(Item_Totales_0, Item_Search)){ check++; } if (Item_Gold > 0){ if (Gold_Item_0 <= Item_Gold){ check_0++; } } } if(check == 0){ ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] No se encuentra ningun item con ese nombre."); return; } if (Item_Gold > 0){ if(check_0 == 0){ ch->ChatPacket(CHAT_TYPE_INFO,"[Shop Search] No existe ningun item con ese valor."); return; } } while (MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult)) { const char * Item_Totales = row[43]; //Nombres Tablas const char * Item_Vnums = row[4]; //Vnums Tablas const char * Item_Gold_1 = row[41]; //Gold Tablas DWORD Vnum_Item = 0; str_to_number(Vnum_Item, Item_Vnums); //Convierte el vnum de string a numero entero int Gold_Item = 0; str_to_number(Gold_Item, Item_Gold_1); //Convierte el vnum de string a numero entero if (strstr(Item_Totales, Item_Search)){ if (Item_Gold > 0){ if (Gold_Item <= Item_Gold){ ch->ChatPacket(CHAT_TYPE_COMMAND, "PrivateSearch_ItemsSearch %d",Vnum_Item); ch->ChatPacket(CHAT_TYPE_COMMAND, "PrivateSearch_RefreshItems"); } }else{ ch->ChatPacket(CHAT_TYPE_COMMAND, "PrivateSearch_ItemsSearch %d",Vnum_Item); ch->ChatPacket(CHAT_TYPE_COMMAND, "PrivateSearch_RefreshItems"); } } } } } Best regards.
×
×
  • 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.