Avatar utilizator
3lteror
Membru Ucenic
Membru Ucenic
  • Mesaje: 15
    Membru din: 04 Noi 2024, 20:15
  • Reacții: 13
  • Mesaje utile: 0
  • Medalii

    *Problemă/Întrebare: am adaugat sistemul renewal affects, iar cand pun skill, de ex aura/iures/ orice buff, nu mi le arata colt stanga sus

    *Resursă folosită (sistem/funcție/modificare): https://just4metin.ro/sursa/renewal-aff ... 07101.html

    *Syserr: https://pastebin.com/wLaqJmGy

    *Fișier(e) cu problema (link pastebin / code): https://pastebin.com/wLaqJmGy

    *Poze / Video: https://gyazo.com/fb98c151b2e01fc8280b8871c2d15df9
    Avatar utilizator
    iShadoW
    Membru Ucenic
    Membru Ucenic
  • Mesaje: 23
    Membru din: 30 Sep 2024, 19:58
  • Reacții: 269
  • Mesaje utile: 1
  • Status: Working...
    Server: Propriu
  • Regat: Jinno
  • [ID Discord]
  • Medalii

    Avatar utilizator
    iShadoW
    Membru Ucenic
    Membru Ucenic

    Mesaj

    extrage de aici ce ai nevoie, Click , nu am sistemul pus dar sigur e un setevent de la clasa button sau ceva de genu
    Avatar utilizator
    SCOOB
    Administrator
    Administrator
  • Mesaje: 4918
    Membru din: 07 Aug 2024, 18:53
  • Reacții: 122284
  • Mesaje utile: 47
  • Status: Pe aici.. 🤠
    Server: Saga2 - Soon
  • Regat: Jinno
  • [ID Discord]
  • Avatar utilizator
    SCOOB
    Administrator
    Administrator

    Mesaj

    iShadoW scrie: ↑04 Noi 2024, 20:59 extrage de aici ce ai nevoie, Click , nu am sistemul pus dar sigur e un setevent de la clasa button sau ceva de genu
    Da, sistemul e incomplet din păcate.

    Si eu a trebuit sa il adaptez, vezi cu ce ti a dat Shadow. :ymdaydream:
    Comunitatea Metin2 Romania este si pe Discord! :ymcowboy:

    2500+ membri • Chat activ zilnic • Support • Cereri & Resurse

    ► discord.gg/jWxeDSf7HP ◄





    See full signature
    Avatar utilizator
    3lteror
    Membru Ucenic
    Membru Ucenic
  • Mesaje: 15
    Membru din: 04 Noi 2024, 20:15
  • Reacții: 13
  • Mesaje utile: 0
  • Medalii

    Avatar utilizator
    3lteror
    Membru Ucenic
    Membru Ucenic

    Mesaj

    a mers, am adaugat din link-ul pe care l am primit de la voi urmatoarele:

    def SAFE_SetEvent(self, func, *args):
    self.eventFunc = __mem_func__(func)
    self.eventArgs = args

    def SetEvent(self, func, *args):
    self.eventFunc = func
    self.eventArgs = args


    Insa acum am urmatoarea problema: https://gyazo.com/1859c53bf76d062dc7e38f7f9b02f618
    skill urile apar un rand mai sus fata de viteza de atac si de miscare si nu pot vedea descrierea lor, iar in sysser am urmatoarele erori: https://pastebin.com/5De72dbD
    Avatar utilizator
    iShadoW
    Membru Ucenic
    Membru Ucenic
  • Mesaje: 23
    Membru din: 30 Sep 2024, 19:58
  • Reacții: 269
  • Mesaje utile: 1
  • Status: Working...
    Server: Propriu
  • Regat: Jinno
  • [ID Discord]
  • Medalii

    Avatar utilizator
    iShadoW
    Membru Ucenic
    Membru Ucenic

    Mesaj

    Sa ajung acasa si dau edit la mesajul asta, iti dau eu functia aia din uitooltip de la skilltooltip class
    Avatar utilizator
    3lteror
    Membru Ucenic
    Membru Ucenic
  • Mesaje: 15
    Membru din: 04 Noi 2024, 20:15
  • Reacții: 13
  • Mesaje utile: 0
  • Medalii

    Avatar utilizator
    3lteror
    Membru Ucenic
    Membru Ucenic

    Mesaj

    update:
    am facut rost de la cienva de pe discord de uitooltip dar problema este urmatoarea, imi apar in colt stanga sus, dar cand apas click pe ele nu se intampla nimic: https://gyazo.com/04acc5b0ac1bc5483b25b1f2922605bf
    sistemul acesta nu trebuia sa arate descrierea buff-urilor? mie imi arata "CLICK FOR REMOVE AFFECT" la toate ! :))
    Avatar utilizator
    iShadoW
    Membru Ucenic
    Membru Ucenic
  • Mesaje: 23
    Membru din: 30 Sep 2024, 19:58
  • Reacții: 269
  • Mesaje utile: 1
  • Status: Working...
    Server: Propriu
  • Regat: Jinno
  • [ID Discord]
  • Medalii

    Avatar utilizator
    iShadoW
    Membru Ucenic
    Membru Ucenic

    Mesaj

    L-am ajutat pe [smention u=382]3lteror[/smention] , s-a rezolvat!

    Edit1. Fix AffectShower has no SetEvent module, sau ceva de genu
    Code:
    class ImageBox(Window):
        def __init__(self, layer = "UI"):
            Window.__init__(self, layer)
     
            self.eventDict={}
            self.eventFunc = {"mouse_click" : None, "mouse_over_in" : None, "mouse_over_out" : None}
            self.eventArgs = {"mouse_click" : 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 GetWidth(self):
            return wndMgr.GetWidth(self.hWnd)
     
        def GetHeight(self):
            return wndMgr.GetHeight(self.hWnd)
     
        def OnMouseOverIn(self):
            try:
                self.eventDict["MOUSE_OVER_IN"]()
            except KeyError:
                pass
     
        def OnMouseOverOut(self):
            try:
                self.eventDict["MOUSE_OVER_OUT"]()
            except KeyError:
                pass
     
        def SAFE_SetStringEvent(self, event, func):
            self.eventDict[event]=__mem_func__(func)
     
        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 OnMouseLeftButtonUp(self) :
            if self.eventFunc["mouse_click"] :
                apply(self.eventFunc["mouse_click"], self.eventArgs["mouse_click"])
     
        def OnMouseOverIn(self) :
            if self.eventFunc["mouse_over_in"] :
                apply(self.eventFunc["mouse_over_in"], self.eventArgs["mouse_over_in"])
            else:
                try:
                    self.eventDict["MOUSE_OVER_IN"]()
                except KeyError:
                    pass
     
        def OnMouseOverOut(self) :
            if self.eventFunc["mouse_over_out"] :
                apply(self.eventFunc["mouse_over_out"], self.eventArgs["mouse_over_out"])
            else :
                try:
                    self.eventDict["MOUSE_OVER_OUT"]()
                except KeyError:
                    pass
     
        def GetLeft(self):
            x, y = self.GetLocalPosition()
            return x
    Avatar utilizator
    SCOOB
    Administrator
    Administrator
  • Mesaje: 4918
    Membru din: 07 Aug 2024, 18:53
  • Reacții: 122284
  • Mesaje utile: 47
  • Status: Pe aici.. 🤠
    Server: Saga2 - Soon
  • Regat: Jinno
  • [ID Discord]
  • Avatar utilizator
    SCOOB
    Administrator
    Administrator

    Mesaj

    iShadoW scrie: ↑05 Noi 2024, 15:41 L-am ajutat pe @3lteror , s-a rezolvat!

    Edit1. Fix AffectShower has no SetEvent module, sau ceva de genu
    Code:
    class ImageBox(Window):
        def __init__(self, layer = "UI"):
            Window.__init__(self, layer)
     
            self.eventDict={}
            self.eventFunc = {"mouse_click" : None, "mouse_over_in" : None, "mouse_over_out" : None}
            self.eventArgs = {"mouse_click" : 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 GetWidth(self):
            return wndMgr.GetWidth(self.hWnd)
     
        def GetHeight(self):
            return wndMgr.GetHeight(self.hWnd)
     
        def OnMouseOverIn(self):
            try:
                self.eventDict["MOUSE_OVER_IN"]()
            except KeyError:
                pass
     
        def OnMouseOverOut(self):
            try:
                self.eventDict["MOUSE_OVER_OUT"]()
            except KeyError:
                pass
     
        def SAFE_SetStringEvent(self, event, func):
            self.eventDict[event]=__mem_func__(func)
     
        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 OnMouseLeftButtonUp(self) :
            if self.eventFunc["mouse_click"] :
                apply(self.eventFunc["mouse_click"], self.eventArgs["mouse_click"])
     
        def OnMouseOverIn(self) :
            if self.eventFunc["mouse_over_in"] :
                apply(self.eventFunc["mouse_over_in"], self.eventArgs["mouse_over_in"])
            else:
                try:
                    self.eventDict["MOUSE_OVER_IN"]()
                except KeyError:
                    pass
     
        def OnMouseOverOut(self) :
            if self.eventFunc["mouse_over_out"] :
                apply(self.eventFunc["mouse_over_out"], self.eventArgs["mouse_over_out"])
            else :
                try:
                    self.eventDict["MOUSE_OVER_OUT"]()
                except KeyError:
                    pass
     
        def GetLeft(self):
            x, y = self.GetLocalPosition()
            return x
    Marcat ca rezolvat, mersi de raspuns
    Comunitatea Metin2 Romania este si pe Discord! :ymcowboy:

    2500+ membri • Chat activ zilnic • Support • Cereri & Resurse

    ► discord.gg/jWxeDSf7HP ◄





    See full signature

    Înapoi la “Probleme rezolvate”

    Discord ID copiat: