Chitra
-
Posts
16 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Chitra
-
-
Update has been made to hide the window when a quest is opened and to close it when you change the character/logout
The update has been uploaded to git
Changes:
Delete from def Close(self): if app.QUICK_SELL_SYSTEM: self.__MakeQuickSell() Search def Close(self) and add: if app.QUICK_SELL_SYSTEM: if self.wndQuickSell: self.wndQuickSell.Hide() Search def HideAllWindows(self) and add: if app.QUICK_SELL_SYSTEM: if self.wndQuickSell: self.wndQuickSell.Hide()
-
Hello,
Thank you for the code posted.
I encountered a few issues with it, including a memory leak, so I've optimized and fixed it. Example:
Code:
ACMD(do_drop) { char arg1[256], arg2[256]; two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2)); if (!*arg1 || !*arg2) { ch->ChatPacket(CHAT_TYPE_INFO, "Syntax: drop_simul <mob vnum> <count>"); return; } DWORD vnum = 0, loopCount = 0; str_to_number(vnum, arg1); str_to_number(loopCount, arg2); std::unordered_map<DWORD, long long> givenItems; LPCHARACTER pkAttacker = CHARACTER_MANAGER::instance().SpawnMobRandomPosition(vnum, ch->GetMapIndex()); if (!pkAttacker) return; for (DWORD count = 0; count < loopCount; ++count) { std::vector<LPITEM> vecItems; if (ITEM_MANAGER::instance().CreateDropItem(pkAttacker, ch, vecItems)) { for (LPITEM item : vecItems) { if (!item) { sys_err("item null in vector"); continue; } givenItems[item->GetVnum()] += item->GetCount(); sys_log(0, "DROP_ITEM_SIMULATE: %s by %s", item->GetName(), ch->GetName()); } } } ch->ChatPacket(CHAT_TYPE_PARTY, "############### |cFF6d8cf2|H|h%dx %s|h|r DROP SIMULATION ###############", loopCount, pkAttacker->GetName()); for (const auto& info : givenItems) { DWORD dwItemVnum = info.first; long long itemCount = info.second; LPITEM pItem = ITEM_MANAGER::instance().CreateItem(dwItemVnum, itemCount, 0, true); if (pItem) { const char* color = (pItem->GetVnum() == quest::CQuestManager::instance().GetEventFlag("high_item")) ? "|cFFf77f77" : "|cFFf5ef78"; ch->ChatPacket(CHAT_TYPE_PARTY, "Simulated item %s|H|h%s|h|r, %d pieces", color, pItem->GetName(), itemCount); M2_DESTROY_ITEM(pItem); } } M2_DESTROY_CHARACTER(pkAttacker); }
- 1
-
Hi,
This quest is responsible for granting basic costumes to players when they reach certain levels in the game.
The quest is triggered when a player logs in or levels up in the game. It checks the player's level and grants various cosmetic items if certain conditions are met.
Basic Costume: Players receive a basic costume based on their gender.
Basic Hairstyle: Players receive a basic hairstyle and an additional cosmetic item.
Basic Pet: Players receive a basic pet at a certain level.
Basic Weapon: Players receive a basic weapon based on their class.
Basic Mount: Players receive a basic mount at a certain level.
- 28
- 7
- 1
- 7
-
20 minutes ago, NvL said:
i used this for emoji and it still doesn't work
You need to adapt the system to the server you have. @tw1x1responded well about your emoji. The okay and close buttons are from the transmutation system. If you don't have them, you can replace them with the classic okay and close buttons. Or you can download them from the internet.
- 1
-
1 hour ago, NvL said:
0309 00:19:18332 :: Traceback (most recent call last):
0309 00:19:18332 :: File "ui.py", line 1905, in OnUnselectItemSlot
0309 00:19:18332 :: File "ui.py", line 88, in __call__
0309 00:19:18332 :: File "ui.py", line 79, in __call__
0309 00:19:18332 :: File "uiInventory.py", line 2013, in UseItemSlot
0309 00:19:18333 :: File "interfaceModule.py", line 1859, in AppendSellSlot
0309 00:19:18333 :: File "interfaceModule.py", line 1849, in UpdateQuickSellPrice
0309 00:19:18333 :: File "uiQuickSell.py", line 117, in UpdatePrice
0309 00:19:18333 :: AttributeError
0309 00:19:18333 :: :
0309 00:19:18333 :: 'module' object has no attribute 'NumberToDecimalStringQuickSell'X(
Sorry, I forgot to attach that function.
The github has been updated with the missing file.
def NumberToDecimalStringQuickSell(n): return "%s" % ('.'.join([i - 3 < 0 and str(n / 5)[:i] or str(n / 5)[i - 3:i] for i in range(len(str(n / 5)) % 3, len(str(n / 5)) + 1, 3) if i]))
-
1 hour ago, NvL said:
sysser
0308 20:29:15244 :: File "uiQuickSell.py", line 75, in BoardInterface0308 20:29:15244 :: AttributeError
0308 20:29:15244 :: :
0308 20:29:15244 :: 'module' object has no attribute 'MakeBoardWithTitleBar'def BoardInterface(self):
self.Board = ui.MakeBoardWithTitleBar(self, "not_pick", localeInfo.QUICK_SELL_TITLE_NAME,ui.__mem_func__(self.Close), 170, 100)
Add in your ui.py before def MakeImageBox
def MakeBoardWithTitleBar(parent, flag, title, closeEvent, width, height): board = BoardWithTitleBar() board.SetParent(parent) board.SetSize(width, height) board.AddFlag(flag) board.SetTitleName(title) board.SetCloseEvent(closeEvent) board.Show() return board
-
1 hour ago, tw1x1 said:
Thank you, but I don't understand
Search self.wndItem.RefreshSlot() in def RefreshBagSlotWindow(self): Add below: if app.QUICK_SELL_SYSTEM: self.RefreshQuickSell() Add at the end: if app.QUICK_SELL_SYSTEM: def RefreshQuickSell(self): for k in xrange(player.INVENTORY_PAGE_SIZE * 5): slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(k) if slotNumber in constInfo.QUICK_SELL_ITEMS: self.wndItem.SetSlotCoverImage(k, "inventory/selected_icon.tga") else: self.wndItem.EnableSlotCoverImage(k, False)
while you could've doneif app.QUICK_SELL_SYSTEM: if slotNumber in constInfo.QUICK_SELL_ITEMS: self.wndItem.SetSlotCoverImage(i, "d:/ymir work/ui/game/inventory/selected_icon.tga") else: self.wndItem.EnableSlotCoverImage(i, False) self.wndItem.RefreshSlot()
Also what can happen if your constInfo.IS_AUTO_POTION effect is active and you'll sell your potion or having growth pet active and selling it. I would suggest this
if app.ENABLE_QUICK_SELL_ITEM: itemVnum = player.GetItemIndex(slotIndex) blackList = [constInfo.IS_AFFECT_PLUS, constInfo.IS_AUTO_POTION, constInfo.IS_GROWTH_PET_ITEM] if app.IsPressed(app.DIK_LCONTROL): for func in blackList: if func(itemVnum): return if slotIndex in constInfo.QUICK_SELL_ITEMS: self.interface.RemoveSellSlot(slotIndex) self.RefreshBagSlotWindow() return elif not slotIndex in constInfo.QUICK_SELL_ITEMS: self.interface.AppendSellSlot(slotIndex) self.RefreshBagSlotWindow() return
Thank you for coming back and sharing your opinion. I developed this system based on the server I have, as on the official server, elixirs cannot be sold and I did not take this probability into account. Additionally, the pet system is not available on my server. Depending on the systems you have, this system will need to be adapted to your needs. I simply shared with you what I needed on my end.
Thank you for coming with an update for those in need.
- 1
-
Hi,
By pressing SHIFT + RIGHT CLICK on the items eligible for sale, an interface will appear showing you how much money you will receive and how many items you have selected. The selected items will have a special icon indicating that they have been selected.
More information can be found in the README.
- 58
- 13
- 26
-
Hi,
I've made a quest for the apprentice quest and I thought I'd leave it here because from what I've seen there are some pretty ugly quests.
I'm attaching a model for a chest. Continue with what you want.
quest apprentice_chest begin state start begin when 50187.use with pc.get_level() >= 1 begin if pc.get_empty_inventory_count() <= 9 then syschat("Your inventory is too full to open the chest.") return end if pc.getqf("apprentice_chest_lv1") == 1 then syschat("You have already opened a chest on this account.") return end local items = {{50188, 1}, {71027, 5}, {71028, 5}, {71029, 5}, {71030, 5}, {71044, 5}, {71045, 5}, {27102, 200}, {27105, 200} } for _, item in ipairs(items) do pc.give_item2(item[1], item[2]) end pc.remove_item(50187, 1) pc.setqf("apprentice_chest_lv1", 1) end end end
- 19
- 5
- 7
-
LINK SITE : https://got2.eu/
LINK DISCORD : https://discord.gg/TpthtWbgFZ
LINK TWICH: https://www.twitch.tv/godsoftanagra
FACEBOOK : https://www.facebook.com/godsoftanagra
-
Hi, I'm looking for a designer and a one person to make some maps. I would like someone who is serious and responsible for what they say.
Discord : Dragos L. George#9853
-
-
Hello,
I made my client a bar that fits energy Illumina taskbar.
Image:
https://metin2.download/picture/jPM4QRXf6NI01Q3sE7zK8bI67W4JZp6B/.png
Download :
Image:
https://metin2.download/picture/M2Z9BGr0Flc3lQ127kil0Kqlrz2AWMSq/.jpg
https://metin2.download/picture/qIkbFSL5PlOaKqIZwmU4NrAkYEqvi1Xp/.png
https://metin2.download/picture/vUWHztTG1Dj5B4aDg7ViF6yX5pMlc2Fd/.pngHP and MP already made you not to stay
This is just to make about an idea.
Sorry for my bad english.
- 11
- 1
- 1
- 7
- 1
- 7
-
Compile database and the horse function 100% !
Sorry for my bad english
-
Can someone help me ? Please
Quick Sell System
in Programming & Development
Posted
The update was made to no longer display text for equipped items.
Changes:
Search in uitooltip.py : self.AppendQuckSellItem() Change with : self.AppendQuckSellItem(slotIndex) Search: if app.QUICK_SELL_SYSTEM: def AppendQuckSellItem(self): Change all with: if app.QUICK_SELL_SYSTEM: def AppendQuckSellItem(self,slotIndex): if player.IsEquipmentSlot(slotIndex): return if item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL): return else: self.AppendSpace(5) self.AppendTextLine(localeInfo.QUICK_SELL_TOOLTIP, self.NORMAL_COLOR)