Jump to content

Remove Buff Affect


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

https://metin2.download/picture/t6KB8d1HhjrG525TU1uJZ89pc2ye2U7J/.gif

This is the hidden content, please

This is the hidden content, please

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 116
  • Eyes 1
  • Confused 2
  • Good 40
  • Love 7
  • Love 71
Link to comment
Share on other sites

  • 3 months later...

update:

https://metin2.download/video/m7bTPN633aOw7g3x3m6qG13qk0UjiA52/.mp4

 

This is the hidden content, please

 

EDIT if you don't have update for class ImageBox

class ImageBox(Window):
    def __init__(self, layer = "UI"):
        Window.__init__(self, layer)
        self.eventDict={}
        self.eventFunc = {
            "MOUSE_LEFT_BUTTON_UP" : None, 
            "MOUSE_LEFT_BUTTON_DOWN" : None, 
            "MOUSE_RIGHT_BUTTON_UP" : None, 
            "MOUSE_RIGHT_BUTTON_DOWN" : None, 
            "MOUSE_OVER_IN" : None, 
            "MOUSE_OVER_OUT" : None
        }
        self.eventArgs = {
            "MOUSE_LEFT_BUTTON_UP" : None, 
            "MOUSE_LEFT_BUTTON_DOWN" : None, 
            "MOUSE_RIGHT_BUTTON_UP" : None, 
            "MOUSE_RIGHT_BUTTON_DOWN" : None, 
            "MOUSE_OVER_IN" : None, 
            "MOUSE_OVER_OUT" : None
        }
    def __del__(self):
        Window.__del__(self)
        self.eventFunc = None
        self.eventArgs = None
    def RegisterWindow(self, layer):
        self.hWnd = wndMgr.RegisterImageBox(self, layer)
    def LoadImage(self, imageName):
        self.name=imageName
        wndMgr.LoadImage(self.hWnd, imageName)
        if len(self.eventDict)!=0:
            print "LOAD IMAGE", self, self.eventDict
    def SetAlpha(self, alpha):
        wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha)
        
    def SetColor(self, r, g, b, a):
        wndMgr.SetDiffuseColor(self.hWnd, r, g, b, a)    
    def GetWidth(self):
        return wndMgr.GetWidth(self.hWnd)
    def GetHeight(self):
        return wndMgr.GetHeight(self.hWnd)
        
    def SetEvent(self, func, *args) :
        result = self.eventFunc.has_key(args[0])        
        if result :
            self.eventFunc[args[0]] = func
            self.eventArgs[args[0]] = args
        else :
            print "[ERROR] ui.py SetEvent, Can`t Find has_key : %s" % args[0]
            
    def SAFE_SetEvent(self, func, *args):
        result = self.eventFunc.has_key(args[0])        
        if result :
            self.eventFunc[args[0]] = __mem_func__(func)
            self.eventArgs[args[0]] = args
        else :
            print "[ERROR] ui.py SAFE_SetEvent, Can`t Find has_key : %s" % args[0]
        
    def OnMouseLeftButtonUp(self):
        if self.eventFunc["MOUSE_LEFT_BUTTON_UP"] :
            apply(self.eventFunc["MOUSE_LEFT_BUTTON_UP"], self.eventArgs["MOUSE_LEFT_BUTTON_UP"])
            
    def OnMouseLeftButtonDown(self):
        if self.eventFunc["MOUSE_LEFT_BUTTON_DOWN"] :
            apply(self.eventFunc["MOUSE_LEFT_BUTTON_DOWN"], self.eventArgs["MOUSE_LEFT_BUTTON_DOWN"])
    def OnMouseRightButtonUp(self):
        if self.eventFunc["MOUSE_RIGHT_BUTTON_UP"] :
            apply(self.eventFunc["MOUSE_RIGHT_BUTTON_UP"], self.eventArgs["MOUSE_RIGHT_BUTTON_UP"])
            
    def OnMouseRightButtonDown(self):
        if self.eventFunc["MOUSE_RIGHT_BUTTON_DOWN"] :
            apply(self.eventFunc["MOUSE_RIGHT_BUTTON_DOWN"], self.eventArgs["MOUSE_RIGHT_BUTTON_DOWN"])
            
    def OnMouseOverIn(self) :
        if self.eventFunc["MOUSE_OVER_IN"] :
            apply(self.eventFunc["MOUSE_OVER_IN"], self.eventArgs["MOUSE_OVER_IN"])
    def OnMouseOverOut(self) :
        if self.eventFunc["MOUSE_OVER_OUT"] :
            apply(self.eventFunc["MOUSE_OVER_OUT"], self.eventArgs["MOUSE_OVER_OUT"])
            
    def SAFE_SetStringEvent(self, event, func,isa=FALSE):
        if not isa:
            self.eventDict[event]=__mem_func__(func)
        else:
            self.eventDict[event]=func
    
    def SetOnMouseLeftButtonUpEvent(self, event, *args):
        self.eventFunc["MOUSE_LEFT_BUTTON_UP"] = event
        self.eventArgs["MOUSE_LEFT_BUTTON_UP"] = args

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 51
  • Dislove 1
  • Sad 2
  • Lmao 1
  • Good 14
  • Love 30
Link to comment
Share on other sites

  • 2 weeks later...
6 hours ago, 2358 said:
  1. The size of the icons does not increase when you click on it with the mouse
  2. How do I make it compatible with the conversion system ?

1 -> Just add self.SetScale(0.8,0.8) in OnMouseOverIn function, and self.SetScale(0.7, 0.7) in OnMouseOverOut function

Edited by IShungite
  • Good 1
Link to comment
Share on other sites

  • 2 months later...
On 11/30/2020 at 7:56 PM, Chriss said:

update:

https://metin2.download/video/m7bTPN633aOw7g3x3m6qG13qk0UjiA52/.mp4

 

This is the hidden content, please

 

EDIT if you don't have update for class ImageBox


class ImageBox(Window):
    def __init__(self, layer = "UI"):
        Window.__init__(self, layer)
        self.eventDict={}
        self.eventFunc = {
            "MOUSE_LEFT_BUTTON_UP" : None, 
            "MOUSE_LEFT_BUTTON_DOWN" : None, 
            "MOUSE_RIGHT_BUTTON_UP" : None, 
            "MOUSE_RIGHT_BUTTON_DOWN" : None, 
            "MOUSE_OVER_IN" : None, 
            "MOUSE_OVER_OUT" : None
        }
        self.eventArgs = {
            "MOUSE_LEFT_BUTTON_UP" : None, 
            "MOUSE_LEFT_BUTTON_DOWN" : None, 
            "MOUSE_RIGHT_BUTTON_UP" : None, 
            "MOUSE_RIGHT_BUTTON_DOWN" : None, 
            "MOUSE_OVER_IN" : None, 
            "MOUSE_OVER_OUT" : None
        }
    def __del__(self):
        Window.__del__(self)
        self.eventFunc = None
        self.eventArgs = None
    def RegisterWindow(self, layer):
        self.hWnd = wndMgr.RegisterImageBox(self, layer)
    def LoadImage(self, imageName):
        self.name=imageName
        wndMgr.LoadImage(self.hWnd, imageName)
        if len(self.eventDict)!=0:
            print "LOAD IMAGE", self, self.eventDict
    def SetAlpha(self, alpha):
        wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha)
        
    def SetColor(self, r, g, b, a):
        wndMgr.SetDiffuseColor(self.hWnd, r, g, b, a)    
    def GetWidth(self):
        return wndMgr.GetWidth(self.hWnd)
    def GetHeight(self):
        return wndMgr.GetHeight(self.hWnd)
        
    def SetEvent(self, func, *args) :
        result = self.eventFunc.has_key(args[0])        
        if result :
            self.eventFunc[args[0]] = func
            self.eventArgs[args[0]] = args
        else :
            print "[ERROR] ui.py SetEvent, Can`t Find has_key : %s" % args[0]
            
    def SAFE_SetEvent(self, func, *args):
        result = self.eventFunc.has_key(args[0])        
        if result :
            self.eventFunc[args[0]] = __mem_func__(func)
            self.eventArgs[args[0]] = args
        else :
            print "[ERROR] ui.py SAFE_SetEvent, Can`t Find has_key : %s" % args[0]
        
    def OnMouseLeftButtonUp(self):
        if self.eventFunc["MOUSE_LEFT_BUTTON_UP"] :
            apply(self.eventFunc["MOUSE_LEFT_BUTTON_UP"], self.eventArgs["MOUSE_LEFT_BUTTON_UP"])
            
    def OnMouseLeftButtonDown(self):
        if self.eventFunc["MOUSE_LEFT_BUTTON_DOWN"] :
            apply(self.eventFunc["MOUSE_LEFT_BUTTON_DOWN"], self.eventArgs["MOUSE_LEFT_BUTTON_DOWN"])
    def OnMouseRightButtonUp(self):
        if self.eventFunc["MOUSE_RIGHT_BUTTON_UP"] :
            apply(self.eventFunc["MOUSE_RIGHT_BUTTON_UP"], self.eventArgs["MOUSE_RIGHT_BUTTON_UP"])
            
    def OnMouseRightButtonDown(self):
        if self.eventFunc["MOUSE_RIGHT_BUTTON_DOWN"] :
            apply(self.eventFunc["MOUSE_RIGHT_BUTTON_DOWN"], self.eventArgs["MOUSE_RIGHT_BUTTON_DOWN"])
            
    def OnMouseOverIn(self) :
        if self.eventFunc["MOUSE_OVER_IN"] :
            apply(self.eventFunc["MOUSE_OVER_IN"], self.eventArgs["MOUSE_OVER_IN"])
    def OnMouseOverOut(self) :
        if self.eventFunc["MOUSE_OVER_OUT"] :
            apply(self.eventFunc["MOUSE_OVER_OUT"], self.eventArgs["MOUSE_OVER_OUT"])
            
    def SAFE_SetStringEvent(self, event, func,isa=FALSE):
        if not isa:
            self.eventDict[event]=__mem_func__(func)
        else:
            self.eventDict[event]=func
    
    def SetOnMouseLeftButtonUpEvent(self, event, *args):
        self.eventFunc["MOUSE_LEFT_BUTTON_UP"] = event
        self.eventArgs["MOUSE_LEFT_BUTTON_UP"] = args

 

Hey there! my problem is that the window does not appear.. Can you please help why it doesn't appear?

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 2
  • Good 2
  • Love 4
Link to comment
Share on other sites

  • 1 year later...
  • 8 months later...

Announcements



×
×
  • 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.