Jump to content

Recommended Posts

  • Active Member

Hi metin2dev,

Today, I find in my clients python scripts soulution, but I found it.

EXP bug, or negative bug in 34k. I thought, that 34k game file is bug, but no. In the client side is bug.

Unbugged tutorial:

uicharacter.py

Search for:

 

class CharacterWindow(ui.ScriptWindow):

 

Write above this:

 

def unsigned32(n):
    return n & 0xFFFFFFFFL

 

Search for these strings:

 

self.GetChild("Exp_Value").SetText(str(player.GetEXP()))
self.GetChild("RestExp_Value").SetText(str(player.GetStatus(player.NEXT_EXP) - player.GetStatus(player.EXP)))

 

 

Change for these:

 

self.GetChild("Exp_Value").SetText(str(unsigned32(player.GetEXP())))
self.GetChild("RestExp_Value").SetText(str(unsigned32(player.GetStatus(player.NEXT_EXP)) - unsigned32(player.GetStatus(player.EXP))))

 

####################################################################################################

 

uitaskbar.py

Search for:

def LoadMouseButtonSettings():

 

Write under this:

def unsigned32(n):
    return n & 0xFFFFFFFFL

 

You can see this, in default/standard uitaskbar.py

Quote

 

def LoadMouseButtonSettings():
   global MOUSE_SETTINGS
   tokens = open("mouse.cfg", "r").read().split()

   if len(tokens) != 2:
      raise RuntimeError, "MOUSE_SETTINGS_FILE_ERROR"

   MOUSE_SETTINGS[0] = int(tokens[0])
   MOUSE_SETTINGS[1] = int(tokens[1])

def unsigned32(n):
   return n & 0xFFFFFFFFL


class EnergyBar(ui.ScriptWindow):
   class TextToolTip(ui.Window):

 

Search for:

        curEXP = player.GetStatus(player.EXP)
        nextEXP = player.GetStatus(player.NEXT_EXP)

 

Replace these strings:

        curEXP = unsigned32(player.GetStatus(player.EXP))
        nextEXP = unsigned32(player.GetStatus(player.NEXT_EXP))

##########################################################################################################

 

uiguild.py

Search for:

class DeclareGuildWarDialog(ui.ScriptWindow):

 

Write above this:

def unsigned32(n):
    return n & 0xFFFFFFFFL

 

Search for:

 

def __OnClickOfferButton(self):

 

Replace this string:

curEXP = player.GetStatus(player.EXP)

 

With this:

curEXP = unsigned32(player.GetStatus(player.EXP))

 

 

That's all! :D

Best Regards,

Pisti95

  • Love 1

Buy a new system? 
My systems:  https://payhip.com/Pisti95

Link to comment
https://metin2.dev/topic/10218-how-to-fix-exp-bug-in-34k-clients/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.