Hades ✔ 52 Posted April 23, 2023 Share Posted April 23, 2023 (edited) Hello, (?) Reffering to this function to remote a shop: [python] ACMD(do_shop_remote) { if (ch->IsDead() || ch->GetExchange() || ch->GetMyShop() || ch->IsOpenSafebox() || ch->IsCubeOpen()) return; char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); if (!*arg1) return; uint16_t vnum; str_to_number(vnum, arg1); LPSHOP shop = CShopManager::instance().Get(vnum); if (!shop) return; ch->SetShopOwner(ch); shop->AddGuest(ch, 0, false); } [/python] (?) It doesn't matter if i put there the right shop vnum, i will always get the first tab of the ShopEX. (?) How i can make the function if the ShopEx "GetTabCount > 1" to get the available tabs buttons there; (?) Or to open the shop window without the tabs buttons, but to get the right shop window by the shop vnum. https://metin2.download/picture/RS9aD8Rr68bCa04oQ1SOtJWu33Y8DDLa/.gif Edited April 24, 2023 by Metin2 Dev International Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Hades ✔ 52 Posted April 30, 2023 Author Share Posted April 30, 2023 Does anyone have any ideea? Link to comment Share on other sites More sharing options...
IGNEEL 24 Posted April 30, 2023 Share Posted April 30, 2023 I think you are talking about this uiShop.py -def open() self.smallRadioButtonGroup.OnClick(0) # 0 is num of default tab. You should make changes so that the default tab number is determined by 'shop_vnum'. Link to comment Share on other sites More sharing options...
Hades ✔ 52 Posted April 30, 2023 Author Share Posted April 30, 2023 14 minutes ago, IGNEEL said: I think you are talking about this uiShop.py -def open() self.smallRadioButtonGroup.OnClick(0) # 0 is num of default tab. You should make changes so that the default tab number is determined by 'shop_vnum'. ACMD(do_shop_remote) { if (ch->IsDead() || ch->GetExchange() || ch->GetMyShop() || ch->IsOpenSafebox() || ch->IsCubeOpen()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT(TRANSLATE_LANGUAGE,"Close the open windows first.")); return; } char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); if (!*arg1) return; uint16_t vnum; str_to_number(vnum, arg1); LPSHOP shop = CShopManager::instance().Get(vnum); if (!shop) return; ch->SetShopOwner(ch); shop->AddGuest(ch, 0, false); } I have this function to open the normal shops. I'm wondering if there is not an function in server source to can open a specific tab, without to use binary or slots.. size_t GetTabCount() { return m_vec_shopTabs.size(); } All i can find about ShopEX tab is this check in Server source.. 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