Jump to content
  • 0

Change Exp Values


Question

Posted

Hi, I am using L2jHellas project.

I have changed on experience.xml some values to test how lvl up works.

but i set for example

    <experience level="1" tolevel="0" />

    <experience level="2" tolevel="100" />

    <experience level="3" tolevel="150" />

    <experience level="4" tolevel="200" />

    <experience level="5" tolevel="300" />

and i have this problem

fail_Exp.jpg

 

How can i solve that? i normally get lvl with 100 exp points but on exp bar i get that!! (on 134% i go to lvl 2 and my bar has already 10% on it)

6 answers to this question

Recommended Posts

  • 0
Posted

You should take a look at experience.java as well

 

public class ExperienceData
{
    private static Logger _log = Logger.getLogger(ExperienceData.class.getName());

    private byte MAX_LEVEL;
    private byte MAX_PET_LEVEL;

    private final Map<Integer, Long> _expTable = new HashMap<Integer, Long>();

    private ExperienceData()
    {
        loadData();
    }

    private void loadData()
    {
        final File xml = new File(PackRoot.DATAPACK_ROOT, "data/xml/experience.xml");
        if (!xml.exists())
        {
            _log.warning(getClass().getSimpleName() + ": experience.xml not found!");
            return;
        }

        Document doc = null;
        final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setValidating(false);
        factory.setIgnoringComments(true);
        try
        {
            doc = factory.newDocumentBuilder().parse(xml);
        }
        catch (Exception e)
        {
            _log.warning("Could not parse experience.xml: " + e.getMessage());
            return;
        }

        final Node table = doc.getFirstChild();
        final NamedNodeMap tableAttr = table.getAttributes();

        MAX_LEVEL = (byte) (Byte.parseByte(tableAttr.getNamedItem("maxLevel").getNodeValue()) + 1);
        MAX_PET_LEVEL = (byte) (Byte.parseByte(tableAttr.getNamedItem("maxPetLevel").getNodeValue()) + 1);

        _expTable.clear();

        NamedNodeMap attrs;
        Integer level;
        Long exp;
        for (Node experience = table.getFirstChild(); experience != null; experience = experience.getNextSibling())
        {
            if (experience.getNodeName().equals("experience"))
            {
                attrs = experience.getAttributes();
                level = Integer.valueOf(attrs.getNamedItem("level").getNodeValue());
                exp = Long.valueOf(attrs.getNamedItem("tolevel").getNodeValue());
                _expTable.put(level, exp);
            }
        }

        _log.info(getClass().getSimpleName() + ": Loaded " + _expTable.size() + " levels");
        _log.info(getClass().getSimpleName() + ": Max Player Level is: " + (MAX_LEVEL - 1));
        _log.info(getClass().getSimpleName() + ": Max Pet Level is: " + (MAX_PET_LEVEL - 1));
    }

    public long getExpForLevel(int level)
    {
        return _expTable.get(level);
    }

    public byte getMaxLevel()
    {
        return MAX_LEVEL;
    }

    public byte getMaxPetLevel()
    {
        return MAX_PET_LEVEL;
    }

    public static ExperienceData getInstance()
    {
        return SingletonHolder._instance;
    }

    @SuppressWarnings("synthetic-access")
    private static class SingletonHolder
    {
        protected static final ExperienceData _instance = new ExperienceData();
    }

that is what i found ExperienceData.java but i cant find anything helpful here!

  • 0
Posted

I never had this problem on High5.

 

Maybe it's client sided? Which chronicle are you using

Read my first post.. I am using L2jHellas.. it is for C6

Guest
This topic is now closed to further replies.


  • Posts

    • There is a ready-made option and the possibility to work according to "Wishlist"
    • Contact me, Discord: xbaus
    • WTB GRACIA FINAL INTERFACE
    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock