Jump to content
  • 0

Rebirth System L2J High Five


Question

15 answers to this question

Recommended Posts

  • 0
Posted

Experience in h5 are now in .xml :S

can someone help fix that?

    [javac] Compiling 1644 source files to C:\Users\MrNapz\workspace\L2J_GameServer\GameServer\build\classes
    [javac] C:\Users\MrNapz\workspace\L2J_GameServer\GameServer\java\com\l2jserver\gameserver\model\entity\RebirthManager.java:14: error: cannot find symbol
    [javac] import com.l2jserver.gameserver.model.base.Experience;
    [javac]                                       ^
    [javac]   symbol:   class Experience
    [javac]   location: package com.l2jserver.gameserver.model.base
    [javac] C:\Users\MrNapz\workspace\L2J_GameServer\GameServer\java\com\l2jserver\gameserver\model\entity\RebirthManager.java:174: error: cannot find symbol
    [javac] 			player.removeExpAndSp(player.getExp() - Experience.LEVEL[Config.REBIRTH_AFTER_LEVEL], 0);//Set player to level 1.
    [javac] 			                                        ^
    [javac]   symbol:   variable Experience
    [javac]   location: class RebirthManager
    [javac] C:\Users\MrNapz\workspace\L2J_GameServer\GameServer\java\com\l2jserver\gameserver\model\entity\RebirthManager.java:180: error: method giveAvailableSkills in class L2PcInstance cannot be applied to given types;
    [javac] 			player.giveAvailableSkills();//Give players their eligible skills.
    [javac] 			      ^
    [javac]   required: boolean,boolean
    [javac]   found: no arguments
    [javac]   reason: actual and formal argument lists differ in length

 

 

Experiencetable.java in h5

/*
* 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.l2jserver.gameserver.datatables;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
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.l2jserver.Config;

/**
* @author mrTJO
*
*/
public class ExperienceTable
{
private static Logger _log = Logger.getLogger(ExperienceTable.class.getName());
private byte MAX_LEVEL;
private byte MAX_PET_LEVEL;

private Map<Integer, Long> _expTable;

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

private ExperienceTable()
{
	loadTable();
}

private void loadTable()
{
	File xml = new File(Config.DATAPACK_ROOT, "data/stats/experience.xml");
	Document doc = null;
	DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
	factory.setValidating(false);
	factory.setIgnoringComments(true);
	if (xml.exists())
	{
		try
		{
			doc = factory.newDocumentBuilder().parse(xml);
		}
		catch (IOException e)
		{
			_log.log(Level.WARNING, "Could not read experience.xml table: " + e.getMessage(), e);
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "Could not parse experience.xml table: " + e.getMessage(), e);
		}

		Node table = doc.getFirstChild();
		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 = new HashMap<Integer, Long>(MAX_LEVEL+1);

		for (Node experience = table.getFirstChild(); experience != null; experience = experience.getNextSibling())
		{
			if (experience.getNodeName().equals("experience"))
			{
				NamedNodeMap attrs = experience.getAttributes();
				int level = Integer.parseInt(attrs.getNamedItem("level").getNodeValue());
				long exp = Long.parseLong(attrs.getNamedItem("tolevel").getNodeValue());

				_expTable.put(level, exp);
			}
		}

		_log.info("ExperienceTable: Loaded "+_expTable.size()+" levels");
		_log.info("ExperienceTable: Max Player Level is: "+(MAX_LEVEL-1));
		_log.info("ExperienceTable: Max Pet Level is: "+(MAX_PET_LEVEL-1));
	}
	else
		_log.warning("ExperienceTable: experience.xml not found!");
}

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

public byte getMaxLevel()
{
	return MAX_LEVEL;
}

public byte getMaxPetLevel()
{
	return MAX_PET_LEVEL;
}

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

  • 0
Posted

wrong section, locked until move

 

why before you lock it you dont help? :/ i know you're a good coder you can fix it so easy and if you helped it passed from "request" to a "share" but np. I think "friendship" is better than good code, and some people cant have "friendship" here.

  • 0
Posted

i have a life, and i entered mainly to check for wrong section/title topics. If i have some more time, i answer short question that community dont know to handle (those with 0 replies). But yours would need to go though the code, both diffs and project destination, and i lack the time to do so.

 

But if you like to post crap like that i can tell you as well that noone teached me how to code or answer me a question like that. So, i can easly tell you to learn by your own and fix your problems

  • 0
Posted

i have a life, and i entered mainly to check for wrong section/title topics. If i have some more time, i answer short question that community dont know to handle (those with 0 replies). But yours would need to go though the code, both diffs and project destination, and i lack the time to do so.

 

But if you like to post crap like that i can tell you as well that noone teached me how to code or answer me a question like that. So, i can easly tell you to learn by your own and fix your problems

 

im not telling you or coders like you dont have life, maybe you cant help in "crap" posts like this cause maybe your free time to code you spent only for code for l2j private source, but that's not the question i think in this forum we share and help each other and im learning java by myself too, noone is teaching me, but i do not request if i do not really need it, and i anwered you on that way cause i know have really good coders here and noone help me, and the answer was too others see too. Imagine you on my side, you reallly need one thing and you know here have people who can help you, and all ignore you, how it feels? Good? Remmember this fix is not only for me, its for all who cames to maxcheaters. And im not saying you really have to answer to this request by fixing, cause you are not the only good coder here, and ofc they have life, but in someone life noone have 5 minutes to spent to help me? is that too much time? so someone help me spent 1 minute of life to help me.

 

Thanks and sorry B1ggBoss but its what i feel.

  • 0
Posted

i would learn bymyself, thanks to the lots of guides, tutorial and books shared in the net, so, in my case, there would not be any feeling, cause i would not even made the question.

 

Do the same and you will learn how to find your own answer without depending on the rest

  • 0
Posted

i would learn bymyself, thanks to the lots of guides, tutorial and books shared in the net, so, in my case, there would not be any feeling, cause i would not even made the question.

 

Do the same and you will learn how to find your own answer without depending on the rest

 

I know B1gB0ss thats what i've done all this time i work with l2j and you know java is not so easy to learn, all takes time but i can't re-open my sv with out this mod. :/

  • 0
Posted

I know B1gB0ss thats what i've done all this time i work with l2j and you know java is not so easy to learn, all takes time but i can't re-open my sv with out this mod. :/

Then do not open it. Learn how to control a L2J with some knowledge and then when you are ready you can open your server again
  • 0
Posted

Then do not open it. Learn how to control a L2J with some knowledge and then when you are ready you can open your server again

 

i think thats the best help i ever had, i think with that help i can fix the java code.

 

 

btw, if i fix it by myself i will pwn you all who criticize-me

  • 0
Posted

How would you 'pwn' them, exactly?

 

by fixing it by myself, is that their criticizes, so is that i will show them i will do it by myself and show i will not request more help of people like this. Is that the "pwn" and for other people who need requests and read that topic, please dont request, they will do the same as me only criticizes who is learning java and who need some help too.

 

Any mod please delete this topic, this is not a request anymore, and btw delete the request section it is useless or maybe is only for me. Cause i request a "crap" like someone said in some topic here, maybe its the most "crap" request here on mxc.

 

and btw the best coders here are hNoke and Rizel without any questions cause they have life, have lots of work, and much more, but they when have some time they help without any problems.

 

ps: they are not "certified by oracle" i think.

 

please any mod really delete this topic, cause its will only bring "fight" in forum and i dont want it. so if not closed i will ignore all posts after that.

  • 0
Posted

by fixing it by myself, is that their criticizes, so is that i will show them i will do it by myself and show i will not request more help of people like this. Is that the "pwn" and for other people who need requests and read that topic, please dont request, they will do the same as me only criticizes who is learning java and who need some help too.

 

Any mod please delete this topic, this is not a request anymore, and btw delete the request section it is useless or maybe is only for me. Cause i request a "crap" like someone said in some topic here, maybe its the most "crap" request here on mxc.

 

and btw the best coders here are hNoke and Rizel without any questions cause they have life, have lots of work, and much more, but they when have some time they help without any problems.

 

ps: they are not "certified by oracle" i think.

 

please any mod really delete this topic, cause its will only bring "fight" in forum and i dont want it. so if not closed i will ignore all posts after that.

See? Thats how it feels when you dont need anyone's help.

 

Its better when your fixing something on your own instead of some random dude posting it ready for you, if this happens, then you'll never learn

  • 0
Posted

by fixing it by myself, is that their criticizes, so is that i will show them i will do it by myself and show i will not request more help of people like this. Is that the "pwn" and for other people who need requests and read that topic, please dont request, they will do the same as me only criticizes who is learning java and who need some help too.

 

Any mod please delete this topic, this is not a request anymore, and btw delete the request section it is useless or maybe is only for me. Cause i request a "crap" like someone said in some topic here, maybe its the most "crap" request here on mxc.

 

and btw the best coders here are hNoke and Rizel without any questions cause they have life, have lots of work, and much more, but they when have some time they help without any problems.

 

ps: they are not "certified by oracle" i think.

 

please any mod really delete this topic, cause its will only bring "fight" in forum and i dont want it. so if not closed i will ignore all posts after that.

 

It's not useless. you came on here asking people to make something for you. Not only that but you make a post with what seems like very easy errors to correct if you had any idea what you were doing.

 

First thing, you had a problem about not helping you with your problem before moving your thread. I don't understand why you'd get antzy about that, the post was in the wrong section.

 

Second, nobody here owes you anything so stop acting like people are are obligated to help you with your issues. These errors are simple and if you knew the basics you could probabaly solve them yourself. Nobody is here to help you deal with basic bullshit. You should come here with a basic understanding of the subject before throwing hissy fits about it. Honestly, when I read your posts I imagine an ape throwing shit around a room because he couldn't play with a shinny object.

 

And fixing something yourself would 'pwn' them? Nobody gives a shit about it. The only thing you're doing is fixing it yourself. It's not an ego showdown here. The best advice I've seen so far is:

Then do not open it.

 

It's pretty obvious you have no clue what you're doing and you have no interest in learning, therefor solving problems for you is just making you unprepared for the next set of problems you run into.

 

 

  • 0
Posted

Sorry for posting in an old thread.... But... It's incredible, people ask for a little bit of help and you all attack him saying stupid things as "do it by yourself" pfff, so, why the fack did he post the thread? because he could do it? c'mon, if u don't have the freakin' time to help him don't answer things like that and just let others do the job that you couldn't...

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


  • Posts

    • Thank you everyone — we're doing our best to deliver the highest quality experience!   ⏳ Less than 2 days left until the L2Elixir Launch! Our team is working nonstop, polishing every little detail to ensure a smooth and exciting opening. A huge thank you to everyone who participated in the Open Beta — your support and feedback have been invaluable. Get ready… the adventure begins soon! ⚔️✨   Launch: November 28 & 21:00 UTC +2   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs  
    • Do you sell interlude interfaces?
    • in conclusion when somebody who has a project for 10+ years still on development writes an e-say to try until you succeed and then advertises his project, one of the reasons is he needs money, so l2j has once more become pure expensive hobby, you wont make money out of it.   You can still use L2jFrozen and get better results for this, i know some people that done it    keep in mind that C in aCis stands for Crappy, and after all these years its not a cool wordplay anymore, its a fact, prove me wrong.
    • First, don't really follow the "main voice", moreover if you consider it an hobby. Simply do what you want, you got only one life so use it as you want. If you make it an hobby, it's exactly like piano, or velo - only practice makes you better.   Secondly, how do you learn things ? It's actually a really important question, since some can simply be scholar, read books (theory) then practice ; and some simply can't read books. I'm the second type, I hated school, I find it boring - my knowledge in Java comes from try-and-fail. You improve your coding style every year or so, I can myself rewrite my own code (which I already considered top-notched) after a while. You always learn something new - even if Java barely evolves. L2J is a fun way to learn programming, it's a giant sandbox where you can edit anything, and I believe it should be taken as it.   My own way of learning was as follow : Add existing customs, no matter what they are : the point is to know main classes used by L2J / customs. L2J is barely Java knowledge ; the true knowledge is to know WHAT to search in WHICH location (what I call, organization). You have to understand than EVERYTHING you think already exists, in a form on another, in the source code. A custom is only the association of the different mechanisms you found "here and there", glued together in a proper goal. Once you know main classes to edit, and the customs you added are compiling fine, the main point is to know WHAT exactly you DID. Try to understand WHY and WHERE you actually copied the code. Third point would be to MANIPULATE the customs you added in order to fit your wish. First edit little values, then logic conditions ; eventually add a new Config, or a new functionality to the custom. Fourth point would be to begin to craft your own ideas. Once again, EVERYTHING already exists, in a form or another. You want a cycled event ? You got Seven Signs main task as exemple. Npc ? Search any type of Npc and figure out what it does. Fifth point would be to understand Java - mostly containers (WHAT and WHERE to use them), variables types and main Java mechanisms (inheritance, static modifier, etc). You should also begin to cut your code into maintainable classes or methods. Java can actually run without optimization, but bigger your ideas, more optimized and well-thought it should be. It's direct saved time in the future, and you would thank yourself doing so. Main tips : ALWAYS use any type of versioning system - GIT or SVN. It allows to save your work, step by step and eventually revert back anytime you want if you terribly messed up. L2J is 80% organization knowledge, and 20% Java knowledge. Basically, if you know WHAT and WHERE to search, if you aren't dumb, it's easy to replicate and re-use things. Cherry on top is to use a already good coded pack to avoid copy-paste crap and get bad habits. Avoid any type of russian or brazilian packs, for exemple - their best ability is to leak someone's else code. Obviously you need some default sense of logic, but Java and programming in general help you to improve it.   Finally, most of your questions could be solved joining related Discord (at least for aCis, I can't speak for others) - from the moment your question was correctly asked (and you seemed to search for the answer). My community (and myself) welcomes newbies, but got some issues with noobies.   The simpliest is to try, fail and repeat until you succeed - it sounds stupid, but that's basically how life works.   PS : about Java ressources, before ChatGPT, it was mostly about stackoverflow website, and site like Baeldung's one. With ChatGPT and alike, you generally double-cross AI output to avoid fucked up answers. Also, care about AI, they are often hallucinating really hard, even today. They can give you complete wrong answer, you tell them they are wrong, and they say "indeed, I suck, sorry - here's a new fucked up answer". You shouldn't 100% rely over AI answer, even if that can give sometimes legit answers, full code or just skeletons of ideas.   PPS : I don't think there are reliable ressources regarding L2J itself, also most of the proposed code decays pretty fast if the source code is actually maintained (at least for aCis). Still, old coded customs for old aCis sources are actually a good beginner challenge to apply on latest source.
  • 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