Jump to content

How To Fix EXP Bug in 34k Clients


Pisti95

Recommended Posts

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
Link to comment
Share on other sites

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.