Jump to content
  • 0

HELP Max Lvl in L2JSunrise


Question

Posted (edited)

Hello! How are they ? I need help to increase the lvl max from 85 to 99 in L2jsunrise, I tell you that iread several guides but my datapack is diferent, does not contain the same files, I leave the Core.java example below, what should i edit ?  I dont hav the "Experience.java " !  I have this ExperienceData.class in the Core.java ! 

 

 

*********************************************************

 

package l2r.gameserver.data.xml.impl;

import java.util.HashMap;
import java.util.Map;
import l2r.util.data.xml.IXmlReader.IXmlReader;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;

public final class ExperienceData
implements IXmlReader {
    private final Map<Integer, Long> _expTable = new HashMap<Integer, Long>();
    private byte MAX_LEVEL;
    private byte MAX_PET_LEVEL;

    protected ExperienceData() {
        this.load();
    }

    @Override
    public void load() {
        this._expTable.clear();
        this.parseDatapackFile("data/xml/stats/experience.xml");
        LOGGER.info(this.getClass().getSimpleName() + ": Loaded " + this._expTable.size() + " levels.");
        LOGGER.info(this.getClass().getSimpleName() + ": Max Player Level is: " + (this.MAX_LEVEL - 1));
        LOGGER.info(this.getClass().getSimpleName() + ": Max Pet Level is: " + (this.MAX_PET_LEVEL - 1));
    }

    @Override
    public void parseDocument(Document doc) {
        Node table = doc.getFirstChild();
        NamedNodeMap tableAttr = table.getAttributes();
        this.MAX_LEVEL = (byte)(Byte.parseByte(tableAttr.getNamedItem("maxLevel").getNodeValue()) + 1);
        this.MAX_PET_LEVEL = (byte)(Byte.parseByte(tableAttr.getNamedItem("maxPetLevel").getNodeValue()) + 1);
        for (Node n = table.getFirstChild(); n != null; n = n.getNextSibling()) {
            if (!"experience".equals(n.getNodeName())) continue;
            NamedNodeMap attrs = n.getAttributes();
            this._expTable.put(this.parseInteger(attrs, "level"), this.parseLong(attrs, "tolevel"));
        }
    }

    public long getExpForLevel(int level) {
        try {
            return this._expTable.get(level);
        }
        catch (Exception e) {
            LOGGER.error(this.getClass().getSimpleName() + " incoming level is: " + String.valueOf(level));
            if (this._expTable != null && !this._expTable.isEmpty()) {
                if (this._expTable.get(level) != null) {
                    LOGGER.error(this.getClass().getSimpleName() + " _expTable get(level) is: " + String.valueOf(this._expTable.get(level)));
                } else {
                    LOGGER.error(this.getClass().getSimpleName() + " _expTable.get(level) is NULL");
                }
            } else {
                LOGGER.error(this.getClass().getSimpleName() + " _expTable is NULL");
            }
            return 25314105600L;
        }
    }

    public byte getMaxLevel() {
        return this.MAX_LEVEL;
    }

    public byte getMaxPetLevel() {
        return this.MAX_PET_LEVEL;
    }

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

    private static class SingletonHolder {
        protected static final ExperienceData _instance = new ExperienceData();

        private SingletonHolder() {
        }
    }
}


*****************************************************

 

THX!!!!!

Edited by amarhat

5 answers to this question

Recommended Posts

  • 0
Posted
33 minutes ago, An4rchy said:

Use proper code tags to paste code or pastebin.com

 

You need to edit experience.xml to increase max level.

 

Ty for responde !  I edit the code 👍 ! but if change the "experience.xml"  i get this error in console 

 

Quote

[18:24:35] WARN: ExperienceData: Could not parse file experience.xml at line 2, column 150: cvc-maxInclusive-valid: El valor '90' no es de faceta válida con respecto a maxInclusive '87' para el tipo '#AnonType_maxLeveltable'.

 

This is Experience.xml edit 

 

<?xml version="1.0" encoding="UTF-8"?>
<table maxLevel="90" maxPetLevel="85" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/experience.xsd">
	<experience level="1" tolevel="0" />
	<experience level="2" tolevel="68" />
	<experience level="3" tolevel="363" />
	<experience level="4" tolevel="1168" />
	<experience level="5" tolevel="2884" />
	<experience level="6" tolevel="6038" />
	<experience level="7" tolevel="11287" />
	<experience level="8" tolevel="19423" />
	<experience level="9" tolevel="31378" />
	<experience level="10" tolevel="48229" />
	<experience level="11" tolevel="71202" />
	<experience level="12" tolevel="101677" />
	<experience level="13" tolevel="141193" />
	<experience level="14" tolevel="191454" />
	<experience level="15" tolevel="254330" />
	<experience level="16" tolevel="331867" />
	<experience level="17" tolevel="426288" />
	<experience level="18" tolevel="540000" />
	<experience level="19" tolevel="675596" />
	<experience level="20" tolevel="835862" />
	<experience level="21" tolevel="1023784" />
	<experience level="22" tolevel="1242546" />
	<experience level="23" tolevel="1495543" />
	<experience level="24" tolevel="1786379" />
	<experience level="25" tolevel="2118876" />
	<experience level="26" tolevel="2497077" />
	<experience level="27" tolevel="2925250" />
	<experience level="28" tolevel="3407897" />
	<experience level="29" tolevel="3949754" />
	<experience level="30" tolevel="4555796" />
	<experience level="31" tolevel="5231246" />
	<experience level="32" tolevel="5981576" />
	<experience level="33" tolevel="6812513" />
	<experience level="34" tolevel="7730044" />
	<experience level="35" tolevel="8740422" />
	<experience level="36" tolevel="9850166" />
	<experience level="37" tolevel="11066072" />
	<experience level="38" tolevel="12395215" />
	<experience level="39" tolevel="13844951" />
	<experience level="40" tolevel="15422929" />
	<experience level="41" tolevel="17137087" />
	<experience level="42" tolevel="18995665" />
	<experience level="43" tolevel="21007203" />
	<experience level="44" tolevel="23180550" />
	<experience level="45" tolevel="25524868" />
	<experience level="46" tolevel="28049635" />
	<experience level="47" tolevel="30764654" />
	<experience level="48" tolevel="33680052" />
	<experience level="49" tolevel="36806289" />
	<experience level="50" tolevel="40154162" />
	<experience level="51" tolevel="45525133" />
	<experience level="52" tolevel="51262490" />
	<experience level="53" tolevel="57383988" />
	<experience level="54" tolevel="63907911" />
	<experience level="55" tolevel="70853089" />
	<experience level="56" tolevel="80700831" />
	<experience level="57" tolevel="91162654" />
	<experience level="58" tolevel="102265881" />
	<experience level="59" tolevel="114038596" />
	<experience level="60" tolevel="126509653" />
	<experience level="61" tolevel="146308200" />
	<experience level="62" tolevel="167244337" />
	<experience level="63" tolevel="189364894" />
	<experience level="64" tolevel="212717908" />
	<experience level="65" tolevel="237352644" />
	<experience level="66" tolevel="271975263" />
	<experience level="67" tolevel="308443198" />
	<experience level="68" tolevel="346827154" />
	<experience level="69" tolevel="387199547" />
	<experience level="70" tolevel="429634523" />
	<experience level="71" tolevel="474207979" />
	<experience level="72" tolevel="532694979" />
	<experience level="73" tolevel="606322775" />
	<experience level="74" tolevel="696381369" />
	<experience level="75" tolevel="804225364" />
	<experience level="76" tolevel="931275828" />
	<experience level="77" tolevel="1151275834" />
	<experience level="78" tolevel="1511275834" />
	<experience level="79" tolevel="2044287599" />
	<experience level="80" tolevel="3075966164" />
    <experience level="81" tolevel="6299994999" />
	<experience level="82" tolevel="10499905559" />
	<experience level="83" tolevel="16800005559" />
	<experience level="84" tolevel="27299995559" />
	<experience level="85" tolevel="44100005559" />
	<experience level="86" tolevel="71400000000" />
	<experience level="87" tolevel="115500000000" />
	<experience level="88" tolevel="186900000000" />
	<experience level="89" tolevel="302400000000" />
	<experience level="90" tolevel="489300000000" />
	<experience level="91" tolevel="791690000000" />
	<experience level="92" tolevel="1280980000000" />
	<experience level="93" tolevel="2072680000000" />
	<experience level="94" tolevel="3353760000000" />
	<experience level="95" tolevel="5426310000000" />
	<experience level="96" tolevel="8779960000000" />
	<experience level="97" tolevel="14206260000000" />
	<experience level="98" tolevel="22986170000000" />
	<experience level="99" tolevel="37192390000000" />
	<experience level="100" tolevel="99996970000000" />
</table>

 

  • 0
Posted

you need to change the occurrences in xsd file, also make this maxLevel 100

<table maxLevel="90" maxPetLevel="85" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/experience.xsd"
  • Like 1
  • 0
Posted
1 hour ago, Hustman said:

you need to change the occurrences in xsd file, also make this maxLevel 100

<table maxLevel="90" maxPetLevel="85" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/experience.xsd"

 

Hi ! I change the files ( Max Lvl 99 ) and get this error in console ....

 

Quote

[19:46:01] WARN: PlayerTemplateData: Could not parse file AbyssWalker.xml at line 747, column 19: cvc-complex-type.2.4.d: Se ha encontrado contenido no válido a partir del elemento 'level'. No se espera ningún elemento secundario en este punto.

 

Add levels for all races in PlayerTemplateData  Ejem: AbyssWalker.xml in BaseStats folder

 

Quote

        <level val="86">
            <hp>3795.2</hp>
            <mp>1485.1</mp>
            <cp>2132.36</cp>
            <hpRegen>9.9</hpRegen>
            <mpRegen>3.0</mpRegen>
            <cpRegen>8.5</cpRegen>
        </level>
                <level val="87">
            <hp>3895.2</hp>
            <mp>1585.1</mp>
            <cp>2232.36</cp>
            <hpRegen>9.9</hpRegen>
            <mpRegen>3.0</mpRegen>
            <cpRegen>8.5</cpRegen>
        </level>
                <level val="88">
            <hp>3995.2</hp>
            <mp>1685.1</mp>
            <cp>2332.36</cp>
            <hpRegen>9.9</hpRegen>
            <mpRegen>3.0</mpRegen>
            <cpRegen>8.5</cpRegen>
        </level>

 

Experience XSD 

 

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="table">
		<xs:complexType>
			<xs:sequence minOccurs="1" maxOccurs="1">
				<xs:element name="experience" minOccurs="1" maxOccurs="99">
					<xs:complexType>
						<xs:attribute name="level" use="required">
							<xs:simpleType>
								<xs:restriction base="xs:positiveInteger">
									<xs:minInclusive value="1" />
									<xs:maxInclusive value="99" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="tolevel" type="xs:nonNegativeInteger" use="required" />
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="maxLevel" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:positiveInteger">
						<xs:minInclusive value="1" />
						<xs:maxInclusive value="99" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="maxPetLevel" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:positiveInteger">
						<xs:minInclusive value="1" />
						<xs:maxInclusive value="86" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
</xs:schema>

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...