Frozen 189 Posted January 21, 2016 Share Posted January 21, 2016 (edited) M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hello, im here today releasing my version of slot effect system. Is not the same as the official looks like but in the future i will update this to look the same. Screenshot to see how it looks like. Spoiler Everything in this system was made by me. Tutorial: Go to UserInterface > PythonPlayer.cpp Search for : void CPythonPlayer::SetItemData(TItemPos Cell, const TItemData & c_rkItemInst) Add in the end of the funcion: PyCallClassMemberFunc(m_ppyGameWindow, "OnNewItem", Py_BuildValue("(i)", Cell.cell)); Compile It. Go to root > constInfo.py Add this somewhere: NEWITEMS = [] Save it. Go to root > game.py Add this function: def OnNewItem(self, cell): if not cell in constInfo.NEWITEMS: constInfo.NEWITEMS.append(cell) Save It. Go to root > uiinventory.py Search for : def RefreshBagSlotWindow(self): Add this before this: (if 0 == itemCount:) : if itemCount == 0 and slotNumber in constInfo.NEWITEMS: constInfo.NEWITEMS.remove(slotNumber) Add this under this: (setItemVNum(i, itemVnum, itemCount)) : self.wndItem.EnableCoverButton(i) if slotNumber in constInfo.NEWITEMS: self.wndItem.SetCoverButton(i, "d:/ymir work/ui/game/quest/slot_button_00.sub",\ "d:/ymir work/ui/game/quest/slot_button_00.sub",\ "d:/ymir work/ui/game/quest/slot_button_00.sub",\ "d:/ymir work/ui/new_icon.tga", FALSE, FALSE) self.wndItem.DisableCoverButton(i) Search for: def OverInItem(self, overSlotPos): Add under: slotPos = overSlotPos Add in the end: if overSlotPos in constInfo.NEWITEMS: self.wndItem.EnableCoverButton(slotPos) constInfo.NEWITEMS.remove(overSlotPos) Save It. Finally go to ymirwork/ui and add this file: This is the hidden content, please Sign In or Sign Up Pack root and etc. Have fun This may not be the most optimized way to do this system, but at least you have a way. In the future i will post more updates such as a more optimized versions and with official effects. If you find any bugs please post it. #UPDATE Spoiler I found a little bug that is if you move the item too quickly the item will count as new. Thats because normally if you do at normal speed you should be with your mouse over in item when it is attach to inventory so the code will remove it. But when you are at a faster sometimes you wont call mouse over in function. Solution: Goto uiinventory.py Search for: self.wndCostume = None Add under: self.movedSlot = -1 search for: itemCount = getItemCount(slotNumber) add under: if self.movedSlot in constInfo.NEWITEMS: constInfo.NEWITEMS.remove(self.movedSlot) search for: def __SendMoveItemPacket(self, srcSlotPos, dstSlotPos, srcItemCount): add under: self.movedSlot = dstSlotPos Kind Regards, Frozen Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 33 1 10 3 37 Link to comment Share on other sites More sharing options...
Active Member enzi 840 Posted January 21, 2016 Active Member Share Posted January 21, 2016 Good Job Thanks Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 21, 2016 Author Share Posted January 21, 2016 Just now, enzi said: Good Job Thanks No problem Link to comment Share on other sites More sharing options...
Silver Sonitex 1438 Posted January 21, 2016 Silver Share Posted January 21, 2016 Amazing, thanks. Link to comment Share on other sites More sharing options...
Premium Galet 509 Posted January 21, 2016 Premium Share Posted January 21, 2016 Nice dude ! Carry on Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 21, 2016 Author Share Posted January 21, 2016 5 minutes ago, Sonitex said: Amazing, thanks. 5 minutes ago, galet said: Nice dude ! Carry on Thanks Link to comment Share on other sites More sharing options...
Faq 2 Posted January 21, 2016 Share Posted January 21, 2016 Can you marry me? I love you mate <3 Link to comment Share on other sites More sharing options...
Premium Mano 22 Posted January 21, 2016 Premium Share Posted January 21, 2016 great job dude waiting for official one thanks for release Link to comment Share on other sites More sharing options...
WhoIsNice 6 Posted January 23, 2016 Share Posted January 23, 2016 Great job! Thank you for sharing I tested and i found a weird bug, when you have more than 2 inventory's, it seems a little bug, because when you move to another slot appear the icon saying "new" again and when you put the mouse under the item the "new" dont disappear, you need to open another inventory and open again the inventory were you have the item and then disappear "new" ... Sorry for my bad english! You have my like for sharing Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4873 Posted January 23, 2016 Bot Share Posted January 23, 2016 13 minutes ago, WhoIsNice said: Great job! Thank you for sharing I tested and i found a weird bug, when you have more than 2 inventory's, it seems a little bug, because when you move to another slot appear the icon saying "new" again and when you put the mouse under the item the "new" dont disappear, you need to open another inventory and open again the inventory were you have the item and then disappear "new" ... Sorry for my bad english! You have my like for sharing He says the truth, i checked it.. can you fix that pls? Link to comment Share on other sites More sharing options...
miguelmig 13 Posted January 23, 2016 Share Posted January 23, 2016 This will work terribly if a player decides to open 2 clients on the same machine at the same time Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 23, 2016 Author Share Posted January 23, 2016 54 minutes ago, WhoIsNice said: Great job! Thank you for sharing I tested and i found a weird bug, when you have more than 2 inventory's, it seems a little bug, because when you move to another slot appear the icon saying "new" again and when you put the mouse under the item the "new" dont disappear, you need to open another inventory and open again the inventory were you have the item and then disappear "new" ... Sorry for my bad english! You have my like for sharing Oh i didnt notice that! Thanks for detecting that bug i will see what i can do. Kind Regards 7 minutes ago, miguelmig said: This will work terribly if a player decides to open 2 clients on the same machine at the same time What?? Why you say that? Link to comment Share on other sites More sharing options...
miguelmig 13 Posted January 23, 2016 Share Posted January 23, 2016 Just now, Frozen said: Oh i didnt notice that! Thanks for detecting that bug i will see what i can do. Kind Regards What?? Why you say that? Well, it's quite common for python systems to use constinfo.py to store data, but that usually causes to things to stop working when a player has multiple clients open, since it appears that the constinfo data is shared between clients, or so it was in the old clients, but I'm pretty sure that it will still happen, give it a try Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 23, 2016 Author Share Posted January 23, 2016 8 minutes ago, miguelmig said: Well, it's quite common for python systems to use constinfo.py to store data, but that usually causes to things to stop working when a player has multiple clients open, since it appears that the constinfo data is shared between clients, or so it was in the old clients, but I'm pretty sure that it will still happen, give it a try Thats incorrect, every time you open client, it gets the constInfo varables and they are set in the client you are in. So you can open as many clients as you want it will have the default constInfo variables and not the ones in the other client open. Every time you set a variable in constInfo is like you are defining in your code, so the storage work like a variable not has a file. I dont know if you understand, sorry for my bad english, Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 23, 2016 Author Share Posted January 23, 2016 #EDIT Bug in second inventory solution: Search for: def OverInItem(self, overSlotPos): add under: slotPos = overSlotPos replace with this in the end of the function: if overSlotPos in constInfo.NEWITEMS: self.wndItem.EnableCoverButton(slotPos) constInfo.NEWITEMS.remove(overSlotPos) 1 Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4873 Posted January 23, 2016 Bot Share Posted January 23, 2016 24 minutes ago, Frozen said: #EDIT Bug in second inventory solution: Search for: def OverInItem(self, overSlotPos): add under: slotPos = overSlotPos replace with this in the end of the function: if overSlotPos in constInfo.NEWITEMS: self.wndItem.EnableCoverButton(slotPos) constInfo.NEWITEMS.remove(overSlotPos) I tried the fix, but when you do that item in the 2./3./4. inventory page, it gets that "New" Tag again :/ Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 23, 2016 Author Share Posted January 23, 2016 Just now, Cyber36 said: I tried the fix, but when you do that item in the 2./3./4. inventory page, it gets that "New" Tag again :/ show me a print of your overInitem function Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4873 Posted January 23, 2016 Bot Share Posted January 23, 2016 (edited) Here: Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 23, 2016 Author Share Posted January 23, 2016 (edited) 6 minutes ago, Cyber36 said: Here: It seems correct, i tested and it works. Give me your skype i will try to see whats wrong. Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4873 Posted January 23, 2016 Bot Share Posted January 23, 2016 2 minutes ago, Frozen said: It seems correct, i tested and it works. Give me your skype i will try to see whats wrong. You have a message and thx ... Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 23, 2016 Author Share Posted January 23, 2016 #Update(Bug Fix) 1 Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4873 Posted January 23, 2016 Bot Share Posted January 23, 2016 He helped me and solved the bug in my client too! Recommend that guy. <3 Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 23, 2016 Author Share Posted January 23, 2016 16 minutes ago, Cyber36 said: He helped me and solved the bug in my client too! Recommend that guy. <3 Thank you very much Link to comment Share on other sites More sharing options...
WhoIsNice 6 Posted January 23, 2016 Share Posted January 23, 2016 Good Job Frozen, the fix works! P.S : Ainda bem que és Português, haja algum Português ajudar a comunidade como deve de ser.. One more like! Link to comment Share on other sites More sharing options...
Frozen 189 Posted January 24, 2016 Author Share Posted January 24, 2016 1 hour ago, WhoIsNice said: Good Job Frozen, the fix works! P.S : Ainda bem que és Português, haja algum Português ajudar a comunidade como deve de ser.. One more like! Thanks! P.S: Obrigado pelo apoio Link to comment Share on other sites More sharing options...
Recommended Posts