NexuS 21 Posted September 29, 2015 Share Posted September 29, 2015 Hi! I want disable trading with GMs well its looks like: exchange.cpp (def. line 61) if(strstr(victim->GetName(), "[")) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't trade with admins")); return false; } Yes thats right, but if GM isn't the victim it doesn't works. Modify like this: if(strstr(victim->GetName(), "[") || strstr(pOwner->GetName(), "[")) But the pOwner is not declared yet. How can i solve this? Link to comment Share on other sites More sharing options...
Rideas 167 Posted September 29, 2015 Share Posted September 29, 2015 Open exchange.cppSearch: bool CHARACTER::ExchangeStart(LPCHARACTER victim) { Add: if (GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "Simple text"); return false; } if (victim->GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "Simple text"); return false; } Best Regards Rideas. 3 Link to comment Share on other sites More sharing options...
CloseSource 14 Posted September 29, 2015 Share Posted September 29, 2015 (edited) Open exchange.cppSearch: bool CHARACTER::ExchangeStart(LPCHARACTER victim) { Add: if (GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "Simple text"); return false; } if (victim->GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "Simple text"); return false; } Best Regards Rideas. Could i disabled Trade,drop items,open safebox,open privateshop etc.. but only for low GM.If i am IMPLEMENTOR(FULL_GM_RIGHTS) enabled trade,safebox etc... sorry for my english Edited September 29, 2015 by CloseSource Link to comment Share on other sites More sharing options...
Rideas 167 Posted September 29, 2015 Share Posted September 29, 2015 Open exchange.cppSearch: bool CHARACTER::ExchangeStart(LPCHARACTER victim) { Add: if (GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "Simple text"); return false; } if (victim->GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "Simple text"); return false; } Best Regards Rideas. Could i disabled Trade,drop items,open safebox,open privateshop etc.. but only for low GM.If i am IMPLEMENTOR(FULL_GM_RIGHTS) enabled trade,safebox etc... sorry for my english open input_main.cppSearch: void CInputMain::SafeboxCheckout(LPCHARACTER ch, const char * c_pData, bool bMall) { TPacketCGSafeboxCheckout * p = (TPacketCGSafeboxCheckout *) c_pData; if (!ch->CanHandleItem()) return; CSafebox * pkSafebox; if (bMall) pkSafebox = ch->GetMall(); else pkSafebox = ch->GetSafebox(); if (!pkSafebox) return; LPITEM pkItem = pkSafebox->Get(p->bSafePos); if (!pkItem) return; if (!ch->IsEmptyItemGrid(p->ItemPos, pkItem->GetSize())) return; Add: if (ch->GetGMLevel() > GM_PLAYER) { ch->ChatPacket(CHAT_TYPE_INFO, "Simple text"); return; } open char_item.cppSearch: bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount) { LPITEM item = NULL; Add: if (GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "|cFFff0000|H|h<GameMaster> GameMaster'lar ticaret yapamaz ve yere item atamazlar !"); return false; } Open char.cppSearch: void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE bItemCount) { if (GetPart(PART_MAIN) > 2) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("갑옷을 벗어야 개인 상점을 열 수 있습니다.")); return; } Add: if (GetGMLevel() > GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, "Simple text"); return; } 1 Link to comment Share on other sites More sharing options...
metin2team 766 Posted September 29, 2015 Share Posted September 29, 2015 (edited) creating a new function will be better IsLowGM as an example it will return a boolean value return (GetGMLevel() > GM_PLAYER && GetGMLevel() < GM_IMPLEMENTOR); Edited September 29, 2015 by metin2team Link to comment Share on other sites More sharing options...
Rideas 167 Posted September 29, 2015 Share Posted September 29, 2015 creating a new function will be better IsLowGM as an example it will return a boolean value return (GetGMLevel() > GM_PLAYER && GetGMLevel() < GM_IMPLEMENTOR); What is the point ? Link to comment Share on other sites More sharing options...
CloseSource 14 Posted September 29, 2015 Share Posted September 29, 2015 creating a new function will be better IsLowGM as an example it will return a boolean value return (GetGMLevel() > GM_PLAYER && GetGMLevel() < GM_IMPLEMENTOR); What is the point ? i want LOW_WIZARD - Hight_WIZARD disabled trade,drop,safebox.... and IMPLEMENTOR Enabled Link to comment Share on other sites More sharing options...
metin2team 766 Posted September 29, 2015 Share Posted September 29, 2015 creating a new function will be better IsLowGM as an example it will return a boolean value return (GetGMLevel() > GM_PLAYER && GetGMLevel() < GM_IMPLEMENTOR); What is the point ? DRY. Link to comment Share on other sites More sharing options...
Rideas 167 Posted September 30, 2015 Share Posted September 30, 2015 creating a new function will be better IsLowGM as an example it will return a boolean value return (GetGMLevel() > GM_PLAYER && GetGMLevel() < GM_IMPLEMENTOR); What is the point ? i want LOW_WIZARD - Hight_WIZARD disabled trade,drop,safebox.... and IMPLEMENTOR Enabled if (GetGMLevel() < GM_IMPLEMENTOR & & GetGMLevel() > GM_PLAYER) Link to comment Share on other sites More sharing options...
NexuS 21 Posted September 30, 2015 Author Share Posted September 30, 2015 Thanks. Close. Link to comment Share on other sites More sharing options...
Rideas 167 Posted September 30, 2015 Share Posted September 30, 2015 Thanks. Close. :) Np. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now