Jump to content
  • 0
Sign in to follow this  
Saddler

How can i fix the experience? [SOURCE]

Question

Hi Metin2dev,

 

i'm with a problem about the exp table.

 

When i put my character on level 100 i get negative experience.

 

qxkNf.png

 

 

Mainline default is level 120 with 2100000000 exp 99 to 120 level.

Anyone fix that?

 

Regards.

Share this post


Link to post

12 answers to this question

Recommended Posts

  • 0

There is a fix from ymir for that

def unsigned32(n):
return n & 0xFFFFFFFFL
 
in uicharacter.py
 
and change 
self.GetChild("Exp_Value").SetText(str(player.GetEXP()))
self.GetChild("RestExp_Value").SetText(str(player.GetStatus(player.NEXT_EXP) - player.GetStatus(player.EXP)))
 

to

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))))

 

  • Love 4

Share this post


Link to post
  • 0

does that fix ALL negative XP issues? from players who are leveling up and get negative XP for example?

Share this post


Link to post
  • 0

does that fix ALL negative XP issues? from players who are leveling up and get negative XP for example?

Yes, mathematically it does.

Share this post


Link to post
  • 0

were should I put this? :

 

def unsigned32(n):

return n & 0xFFFFFFFFL

 

Share this post


Link to post
  • 0

oke... I did it like this :

 

uicharacter :

import ui
import uiScriptLocale
import app
import net
import dbg
import snd
import player
import mouseModule
import wndMgr
import skill
import playerSettingModule
import quest
import localeInfo
import uiToolTip
import constInfo
import emotion
import chr

SHOW_ONLY_ACTIVE_SKILL = FALSE
SHOW_LIMIT_SUPPORT_SKILL_LIST = []
HIDE_SUPPORT_SKILL_POINT = TRUE    
SHOW_LIMIT_SUPPORT_SKILL_LIST = [121, 122, 123, 124, 126, 127, 129, 128, 131, 137, 138, 139, 140]

FACE_IMAGE_DICT = {
    playerSettingModule.RACE_WARRIOR_M    : "icon/face/warrior_m.tga",
    playerSettingModule.RACE_WARRIOR_W    : "icon/face/warrior_w.tga",
    playerSettingModule.RACE_ASSASSIN_M    : "icon/face/assassin_m.tga",
    playerSettingModule.RACE_ASSASSIN_W    : "icon/face/assassin_w.tga",
    playerSettingModule.RACE_SURA_M        : "icon/face/sura_m.tga",
    playerSettingModule.RACE_SURA_W        : "icon/face/sura_w.tga",
    playerSettingModule.RACE_SHAMAN_M    : "icon/face/shaman_m.tga",
    playerSettingModule.RACE_SHAMAN_W    : "icon/face/shaman_w.tga",
}

class CharacterWindow(ui.ScriptWindow):

    ACTIVE_PAGE_SLOT_COUNT = 8
    SUPPORT_PAGE_SLOT_COUNT = 12

    PAGE_SLOT_COUNT = 12
    PAGE_HORSE = 2

    SKILL_GROUP_NAME_DICT = {
        playerSettingModule.JOB_WARRIOR    : { 1 : localeInfo.SKILL_GROUP_WARRIOR_1,    2 : localeInfo.SKILL_GROUP_WARRIOR_2, },
        playerSettingModule.JOB_ASSASSIN    : { 1 : localeInfo.SKILL_GROUP_ASSASSIN_1,    2 : localeInfo.SKILL_GROUP_ASSASSIN_2, },
        playerSettingModule.JOB_SURA        : { 1 : localeInfo.SKILL_GROUP_SURA_1,        2 : localeInfo.SKILL_GROUP_SURA_2, },
        playerSettingModule.JOB_SHAMAN        : { 1 : localeInfo.SKILL_GROUP_SHAMAN_1,    2 : localeInfo.SKILL_GROUP_SHAMAN_2, },
    }

    STAT_DESCRIPTION =    {
        "HTH" : localeInfo.STAT_TOOLTIP_CON,
        "INT" : localeInfo.STAT_TOOLTIP_INT,
        "STR" : localeInfo.STAT_TOOLTIP_STR,
        "DEX" : localeInfo.STAT_TOOLTIP_DEX,
    }


    STAT_MINUS_DESCRIPTION = localeInfo.STAT_MINUS_DESCRIPTION
    
    def unsigned32(n):
        return n & 0xFFFFFFFFL

and:

    def RefreshStatus(self):
        if self.isLoaded==0:
            return
    
        try:
            self.GetChild("Level_Value").SetText(str(player.GetStatus(player.LEVEL)))
            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))))
            self.GetChild("HP_Value").SetText(str(player.GetStatus(player.HP)) + '/' + str(player.GetStatus(player.MAX_HP)))
            self.GetChild("SP_Value").SetText(str(player.GetStatus(player.SP)) + '/' + str(player.GetStatus(player.MAX_SP)))
            self.GetChild("STR_Value").SetText(str(player.GetStatus(player.ST)))
            self.GetChild("DEX_Value").SetText(str(player.GetStatus(player.DX)))
            self.GetChild("HTH_Value").SetText(str(player.GetStatus(player.HT)))
            self.GetChild("INT_Value").SetText(str(player.GetStatus(player.IQ)))
            self.GetChild("ATT_Value").SetText(self.__GetTotalAtkText())
            self.GetChild("DEF_Value").SetText(self.__GetTotalDefText())
            self.GetChild("MATT_Value").SetText(self.__GetTotalMagAtkText())
            self.GetChild("MDEF_Value").SetText(str(player.GetStatus(player.MAG_DEF)))
            self.GetChild("ASPD_Value").SetText(str(player.GetStatus(player.ATT_SPEED)))
            self.GetChild("MSPD_Value").SetText(str(player.GetStatus(player.MOVING_SPEED)))
            self.GetChild("CSPD_Value").SetText(str(player.GetStatus(player.CASTING_SPEED)))
            self.GetChild("ER_Value").SetText(str(player.GetStatus(player.EVADE_RATE)))

and I get status : 999 like this:

 

9uoy1s.jpg

 

where is the problem?

Share this post


Link to post
  • 0

after last import

import ui
import uiScriptLocale
import app
import net
import dbg
import snd
import player
import mouseModule
import wndMgr
import skill
import playerSettingModule
import quest
import localeInfo
import uiToolTip
import constInfo
import emotion
import chr

def unsigned32(n):
        return n & 0xFFFFFFFFL
  • Love 1

Share this post


Link to post
  • 0

for me its already there

def unsigned32(n):
        return n & 0xFFFFFFFFL
proper but still exp getting negative when a player break a metin
or i guess whenever i turns exp bonus say 750% it happens why so?

Share this post


Link to post
  • 0

does that fix ALL negative XP issues? from players who are leveling up and get negative XP for example?

Yes, mathematically it does.

actually no ... it's just a client (just interface ) must be fixed from the game itself (server)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Recently Browsing   0 members

    No registered users viewing this page.

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