Geia sas paidia xriazome ena code gia max level 90 (gia l2jfrozen rev 1004).. ego exw ena code max level 99 perasmeno mesa sto com.l2jfrozen.gameserver.datatables kai arxio ExperienceData.java alla to exw rithmismeno na doulevei mexri ta 90.. (sto gameserver.bat leei oti diavazei 99 level opos to exw perasei mesa sta java kai ston server epitrepei mexri 90 level)
afta pou exw perasei ego einai afta edw..
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jfrozen.gameserver.datatables;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jfrozen.Config;
/**
* Based on mrTJO's implementation.
* @author Zoey76
*/
public class ExperienceData
{
public final static long LEVEL[]=
{
// level 0 (unreachable)
0L,
68L,
363L,
1168L,
2884L,
6038L,
11287L,
19423L,
31378L,
48229L, //level 10
71201L,
101676L,
141192L,
191452L,
254327L,
331864L,
426284L,
539995L,
675590L,
835854L, //level 20
1023775L,
1242536L,
1495531L,
1786365L,
2118860L,
2497059L,
2925229L,
3407873L,
3949727L,
4555766L, //level 30
5231213L,
5981539L,
6812472L,
7729999L,
8740372L,
9850111L,
11066012L,
12395149L,
13844879L,
15422851L, //level 40
17137002L,
18995573L,
21007103L,
23180442L,
25524751L,
28049509L,
30764519L,
33679907L,
36806133L,
40153995L, //level 50
45524865L,
51262204L,
57383682L,
63907585L,
70852742L,
80700339L,
91162131L,
102265326L,
114038008L,
126509030L, //level 60
146307211L,
167243291L,
189363788L,
212716741L,
237351413L,
271973532L,
308441375L,
346825235L,
387197529L,
429632402L, //level 70
474205751L,
532692055L,
606319094L,
696376867L,
804219972L,
931269476L,
1151264834L,
1511257834L,
2099246434L,
4199894964L, //level 80
6299894999L,
8399899123L,
10499898678L,
12599897167L,
14699896647L, //level 85
16799895345L,
18899893795L,
20999892567L,
23099891768L,
25199890178L, //level 90
27299899169L,
29399898927L,
31499897283L,
33599896891L,
35699895579L, //level 95
37799894755L,
39899893347L,
41999892825L,
44099891741L, //level 99
};
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(Config.DATAPACK_ROOT, "data/stats/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();
}
}
episis gia na doulepsei xriazete na pas C:\l2jFrozen PvP\gameserver\data\stats ---> experience kai na kaneis paste afto
....... afto to code exw ego perasmeno sta file kai sta java tou server... den doulevei sosta giati otan pernaei enas char ta 81 level arxizei kai ta xanei.. Pernei sxedon kanonika ta level alla to dixnei etsi
3erei kaneis ti mporei na fteei?? i an exei kanenas kanena allo etoimo code na m dosei???
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.
I apologize for my incompetence. The ability to trade is limited only for builder 1. Ordinary characters can trade with each other, and this has nothing to do with auto loot.)
Question
spot55
Geia sas paidia xriazome ena code gia max level 90 (gia l2jfrozen rev 1004).. ego exw ena code max level 99 perasmeno mesa sto com.l2jfrozen.gameserver.datatables kai arxio ExperienceData.java alla to exw rithmismeno na doulevei mexri ta 90.. (sto gameserver.bat leei oti diavazei 99 level opos to exw perasei mesa sta java kai ston server epitrepei mexri 90 level)
afta pou exw perasei ego einai afta edw..
episis gia na doulepsei xriazete na pas C:\l2jFrozen PvP\gameserver\data\stats ---> experience kai na kaneis paste afto
kai stin sinexia C:\l2jFrozen PvP\gameserver\data\xsd ---> experience.xsd kai kanoume paste afto..
....... afto to code exw ego perasmeno sta file kai sta java tou server... den doulevei sosta giati otan pernaei enas char ta 81 level arxizei kai ta xanei.. Pernei sxedon kanonika ta level alla to dixnei etsi
3erei kaneis ti mporei na fteei?? i an exei kanenas kanena allo etoimo code na m dosei???
Edited by spot553 answers to this question
Recommended Posts
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.