Jump to content

How can i fix the experience? [SOURCE]


Go to solution Solved by Alpha,

Recommended Posts

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.

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

  • Solution

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

  • 2 months later...
  • Premium

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

Yes, mathematically it does.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

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?

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

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

  • 1 year later...
  • 1 year later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 11

      Metin2 Closed Beta Content (2003-2004)

    2. 11

      Metin2 Closed Beta Content (2003-2004)

    3. 0

      Football Ground

    4. 11

      Metin2 Closed Beta Content (2003-2004)

    5. 0

      Error compile binary Zentoria2

    6. 11

      Metin2 Closed Beta Content (2003-2004)

  • Recently Browsing

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