Jump to content

Recommended Posts

  • 2 weeks later...
Posted

New version only for H5 chronicle now i go pass exams when i back i will do it for all chronicles.

Temporary DeathManager fix for Frozen:

 

replace java file in my package:

 

/*
* 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.masteriopack.rankpvpsystem;

import javolution.text.TextBuilder;
import javolution.util.FastMap;
import com.l2jfrozen.gameserver.model.Inventory;
import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;

/**
* @author Masterio
*
*/
public class RankPvpSystemDeathMgr
{
//private static Logger _log = Logger.getLogger(CustomPvpSystemDeathMgr.class.getName());

private L2PcInstance _killer = null;
private L2PcInstance _victim = null;

//store killer data, (anti-change target protection).
//data updating on every kill.
private int _killerLevel = 0;
private int _killerClassId = 0;
private int _killerCurrentCP = 0;
private int _killerCurrentHP = 0;
private int _killerCurrentMP = 0;

private int _killerMaxCP = 0;
private int _killerMaxHP = 0;
private int _killerMaxMP = 0;

/** [slot_id, killer_item] */
private FastMap<Integer, KillerItem> _killerItems = new FastMap<>();

/**
 * Always use this constructor as default!
 * @param killer
 * @param victim
 */
public RankPvpSystemDeathMgr(L2PcInstance killer, L2PcInstance victim)
{	

	_killer = killer;
	_victim = victim;

	_killerLevel = killer.getLevel();
	_killerClassId = killer.getClassId().getId();
	_killerCurrentCP = (int) killer.getCurrentCp();
	_killerCurrentHP = (int) killer.getCurrentHp();
	_killerCurrentMP = (int) killer.getCurrentMp();

	_killerMaxCP = killer.getMaxCp();
	_killerMaxHP = killer.getMaxHp();
	_killerMaxMP = killer.getMaxMp();

	// load item killer list:
	if(_killer != null && RankPvpSystemConfig.DEATH_MANAGER_SHOW_ITEMS_ENABLED)
	{
		_killerItems = getKillerItems();
	}

}

/**
 * Send HTML response to dead player (victim).
 */
public void sendVictimResponse()
{
	NpcHtmlMessage n = new NpcHtmlMessage(0);
	n.setHtml(victimHtmlResponse().toString());
	_victim.sendPacket(n);
}

private TextBuilder victimHtmlResponse()
{

	TextBuilder tb = new TextBuilder();
	TextBuilder tb_weapon = new TextBuilder();
	TextBuilder tb_armor = new TextBuilder();
	TextBuilder tb_jewel = new TextBuilder();
	TextBuilder tb_other = new TextBuilder();

	tb.append("<html><title>"+_killer.getName()+" Equipment informations</title><body><center>");

	tb.append("<table width=270 border=0 cellspacing=0 cellpadding=2 bgcolor=000000>");
		tb.append("<tr><td width=270 height=18 align=center><font color=ae9977>Killer Name (lvl):</font> "+getKiller().getName()+" ("+_killerLevel+")</td></tr>");
		tb.append("<tr><td width=270 height=18 align=center><font color=ae9977>Killer Class:</font> "+RankPvpSystemUtil.getClassName(_killerClassId)+"</td></tr>");
		tb.append("<tr><td FIXWIDTH=270 HEIGHT=4><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
	tb.append("</table>");	

	tb.append("<table width=270 border=0 cellspacing=0 cellpadding=2 bgcolor=000000>");
		tb.append("<tr><td width=270 height=18 align=center><font color=ae9977>CP:</font> <font color=FFF000>"+_killerCurrentCP+" / "+_killerMaxCP+"</font></td></tr>");
		tb.append("<tr><td width=270 height=18 align=center><font color=ae9977>HP:</font> <font color=FF0000>"+_killerCurrentHP+" / "+_killerMaxHP+"</font><font color=ae9977>, MP:</font> <font color=2080D0>"+_killerCurrentMP+"/"+_killerMaxMP+"</font></td></tr>");
		tb.append("<tr><td FIXWIDTH=270 HEIGHT=4><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
		tb.append("<tr><td width=270 height=12></td></tr>");
	tb.append("</table>");	

	// show item list:
	if(RankPvpSystemConfig.DEATH_MANAGER_SHOW_ITEMS_ENABLED){

		tb.append("<table width=270 border=0 cellspacing=0 cellpadding=2 bgcolor=000000>");

			if(getKiller() != null)
			{

				// create groups headers:
				tb_weapon.append("<tr><td width=270 height=18 align=center><font color=2080D0>Weapon / Shield</font></td></tr>");
				tb_armor.append("<tr><td width=270 height=18 align=center><font color=2080D0>Armor</font></td></tr>");
				tb_jewel.append("<tr><td width=270 height=18 align=center><font color=2080D0>Jewellery</font></td></tr>");
				tb_other.append("<tr><td width=270 height=18 align=center><font color=2080D0>Other</font></td></tr>");

				// create group separator:
				tb_weapon.append("<tr><td FIXWIDTH=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
				tb_armor.append("<tr><td FIXWIDTH=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
				tb_jewel.append("<tr><td FIXWIDTH=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
				tb_other.append("<tr><td FIXWIDTH=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");


				// add items to groups:
				for (FastMap.Entry<Integer, KillerItem> e = _killerItems.head(), end = _killerItems.tail(); (e = e.getNext()) != end;) 
				{

					if(e.getValue()._group == 1)
					{

						tb_weapon.append("<tr><td width=270 height=16 align=center><font color=808080>"+e.getValue()._itemName+" (</font><font color=FF8000>+"+e.getValue()._itemEnchantLevel+"</font><font color=808080>)</font></td></tr>");
						tb_weapon.append("<tr><td width=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");

					}
					else if(e.getValue()._group == 2)
					{

						tb_armor.append("<tr><td width=270 height=16 align=center><font color=808080>"+e.getValue()._itemName+" (</font><font color=FF8000>+"+e.getValue()._itemEnchantLevel+"</font><font color=808080>)</font></td></tr>");
						tb_armor.append("<tr><td width=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");

					}
					else if(e.getValue()._group == 3)
					{

						tb_jewel.append("<tr><td width=270 height=16 align=center><font color=808080>"+e.getValue()._itemName+" (</font><font color=FF8000>+"+e.getValue()._itemEnchantLevel+"</font><font color=808080>)</font></td></tr>");
						tb_jewel.append("<tr><td width=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");

					}
					else
					{ // group 4

						tb_other.append("<tr><td width=270 height=16 align=center><font color=808080>"+e.getValue()._itemName+" (</font><font color=FF8000>+"+e.getValue()._itemEnchantLevel+"</font><font color=808080>)</font></td></tr>");
						tb_other.append("<tr><td width=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");

					}

				}

				// add to head TB generated TB's:
				tb.append(tb_weapon);
				tb.append(tb_armor);
				tb.append(tb_jewel);
				tb.append(tb_other);

			}
			else
			{
				tb.append("<tr><td>I can't load Killer Data!</td></tr>");
			}

		tb.append("</table>");
	}

	// footer and back button:
	tb.append("<table border=0 cellspacing=0 cellpadding=0>");
		tb.append("<tr><td width=270 height=12 align=center><font color=808080>- killer state in kill moment -</font></td></tr>");
		tb.append("<tr><td width=270 height=12></td></tr>");
		tb.append("<tr><td width=270 align=center><button value=\"Back\" action=\"bypass -h _rps_info\"  width="+RankPvpSystemConfig.BUTTON_W+" height="+RankPvpSystemConfig.BUTTON_H+" back=\""+RankPvpSystemConfig.BUTTON_DOWN+"\" fore=\""+RankPvpSystemConfig.BUTTON_UP+"\"></td></tr>");
	tb.append("</table>");

	tb.append("</center></body></html>");
	return tb;
}

/**
 * @return the _killer
 */
public L2PcInstance getKiller()
{
	return _killer;
}

/**
 * @param killer the killer to set
 */
public void setKiller(L2PcInstance killer)
{
	this._killer = killer;
}

/**
 * Returns killer items.
 * @return
 */
private FastMap<Integer, KillerItem> getKillerItems()
{

	FastMap<Integer, KillerItem> items = new FastMap<>();

	for (int j = 0; j < Inventory.PAPERDOLL_TOTALSLOTS; j++)
	{
		L2ItemInstance item = getKiller().getInventory().getPaperdollItem(j);

		if(item != null && (j == Inventory.PAPERDOLL_LHAND || j == Inventory.PAPERDOLL_RHAND))
		{
			items.put(j, new KillerItem(item, KillerItem.GROUP_WEAPON));
		}
		else if (item != null && (j == Inventory.PAPERDOLL_HEAD || j == Inventory.PAPERDOLL_CHEST || j == Inventory.PAPERDOLL_GLOVES || j == Inventory.PAPERDOLL_LEGS || j == Inventory.PAPERDOLL_FEET))
		{
			items.put(j, new KillerItem(item, KillerItem.GROUP_ARMOR));
		}
		else if (item != null && (j == Inventory.PAPERDOLL_NECK || j == Inventory.PAPERDOLL_REAR || j == Inventory.PAPERDOLL_LEAR || j == Inventory.PAPERDOLL_RFINGER || j == Inventory.PAPERDOLL_LFINGER))
		{
			items.put(j, new KillerItem(item, KillerItem.GROUP_JEWEL));
		}
		else if(item != null)
		{
			items.put(j, new KillerItem(item, KillerItem.GROUP_OTHER));
		}

	}

	return items;

}

class KillerItem
{
	int _itemObjId = 0;
	String _itemName = null;
	int _itemEnchantLevel = 0;
	int _group = GROUP_OTHER;

	/* item groups */
	public static final int GROUP_WEAPON = 1;
	public static final int GROUP_ARMOR= 2;
	public static final int GROUP_JEWEL = 3;
	public static final int GROUP_OTHER = 4;

	public KillerItem(L2ItemInstance itemInstance, int group)
	{
		_itemObjId = itemInstance.getObjectId();
		_itemName = itemInstance.getItemName();
		_itemEnchantLevel = itemInstance.getEnchantLevel();
		_group = group;
	}

}
}

 

this code is universal for all chronicles, just correct imports for your pack.

 

PS. Marlin this path should resolve your problem.

Posted

Hi matthew! Your rank system is the best i ever seen! Thanks for it!

I want to ask you if it's possible to add a function to give to player status when reach "x" pvps..Like hero effect when reach 30 pvp and etc...

I've tried(i'm so noob on java), but your codes are different from the others that use l2pcinstance to control it.

This is easy to do?!

Thanks anyway!

Posted

New version only for H5 chronicle now i go pass exams when i back i will do it for all chronicles.

Temporary DeathManager fix for Frozen:

 

replace java file in my package:

 

/*
* 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.masteriopack.rankpvpsystem;

import javolution.text.TextBuilder;
import javolution.util.FastMap;
import com.l2jfrozen.gameserver.model.Inventory;
import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;

/**
* @author Masterio
*
*/
public class RankPvpSystemDeathMgr
{
//private static Logger _log = Logger.getLogger(CustomPvpSystemDeathMgr.class.getName());

private L2PcInstance _killer = null;
private L2PcInstance _victim = null;

//store killer data, (anti-change target protection).
//data updating on every kill.
private int _killerLevel = 0;
private int _killerClassId = 0;
private int _killerCurrentCP = 0;
private int _killerCurrentHP = 0;
private int _killerCurrentMP = 0;

private int _killerMaxCP = 0;
private int _killerMaxHP = 0;
private int _killerMaxMP = 0;

/** [slot_id, killer_item] */
private FastMap<Integer, KillerItem> _killerItems = new FastMap<>();

/**
 * Always use this constructor as default!
 * @param killer
 * @param victim
 */
public RankPvpSystemDeathMgr(L2PcInstance killer, L2PcInstance victim)
{	

	_killer = killer;
	_victim = victim;

	_killerLevel = killer.getLevel();
	_killerClassId = killer.getClassId().getId();
	_killerCurrentCP = (int) killer.getCurrentCp();
	_killerCurrentHP = (int) killer.getCurrentHp();
	_killerCurrentMP = (int) killer.getCurrentMp();

	_killerMaxCP = killer.getMaxCp();
	_killerMaxHP = killer.getMaxHp();
	_killerMaxMP = killer.getMaxMp();

	// load item killer list:
	if(_killer != null && RankPvpSystemConfig.DEATH_MANAGER_SHOW_ITEMS_ENABLED)
	{
		_killerItems = getKillerItems();
	}

}

/**
 * Send HTML response to dead player (victim).
 */
public void sendVictimResponse()
{
	NpcHtmlMessage n = new NpcHtmlMessage(0);
	n.setHtml(victimHtmlResponse().toString());
	_victim.sendPacket(n);
}

private TextBuilder victimHtmlResponse()
{

	TextBuilder tb = new TextBuilder();
	TextBuilder tb_weapon = new TextBuilder();
	TextBuilder tb_armor = new TextBuilder();
	TextBuilder tb_jewel = new TextBuilder();
	TextBuilder tb_other = new TextBuilder();

	tb.append("<html><title>"+_killer.getName()+" Equipment informations</title><body><center>");

	tb.append("<table width=270 border=0 cellspacing=0 cellpadding=2 bgcolor=000000>");
		tb.append("<tr><td width=270 height=18 align=center><font color=ae9977>Killer Name (lvl):</font> "+getKiller().getName()+" ("+_killerLevel+")</td></tr>");
		tb.append("<tr><td width=270 height=18 align=center><font color=ae9977>Killer Class:</font> "+RankPvpSystemUtil.getClassName(_killerClassId)+"</td></tr>");
		tb.append("<tr><td FIXWIDTH=270 HEIGHT=4><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
	tb.append("</table>");	

	tb.append("<table width=270 border=0 cellspacing=0 cellpadding=2 bgcolor=000000>");
		tb.append("<tr><td width=270 height=18 align=center><font color=ae9977>CP:</font> <font color=FFF000>"+_killerCurrentCP+" / "+_killerMaxCP+"</font></td></tr>");
		tb.append("<tr><td width=270 height=18 align=center><font color=ae9977>HP:</font> <font color=FF0000>"+_killerCurrentHP+" / "+_killerMaxHP+"</font><font color=ae9977>, MP:</font> <font color=2080D0>"+_killerCurrentMP+"/"+_killerMaxMP+"</font></td></tr>");
		tb.append("<tr><td FIXWIDTH=270 HEIGHT=4><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
		tb.append("<tr><td width=270 height=12></td></tr>");
	tb.append("</table>");	

	// show item list:
	if(RankPvpSystemConfig.DEATH_MANAGER_SHOW_ITEMS_ENABLED){

		tb.append("<table width=270 border=0 cellspacing=0 cellpadding=2 bgcolor=000000>");

			if(getKiller() != null)
			{

				// create groups headers:
				tb_weapon.append("<tr><td width=270 height=18 align=center><font color=2080D0>Weapon / Shield</font></td></tr>");
				tb_armor.append("<tr><td width=270 height=18 align=center><font color=2080D0>Armor</font></td></tr>");
				tb_jewel.append("<tr><td width=270 height=18 align=center><font color=2080D0>Jewellery</font></td></tr>");
				tb_other.append("<tr><td width=270 height=18 align=center><font color=2080D0>Other</font></td></tr>");

				// create group separator:
				tb_weapon.append("<tr><td FIXWIDTH=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
				tb_armor.append("<tr><td FIXWIDTH=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
				tb_jewel.append("<tr><td FIXWIDTH=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");
				tb_other.append("<tr><td FIXWIDTH=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");


				// add items to groups:
				for (FastMap.Entry<Integer, KillerItem> e = _killerItems.head(), end = _killerItems.tail(); (e = e.getNext()) != end;) 
				{

					if(e.getValue()._group == 1)
					{

						tb_weapon.append("<tr><td width=270 height=16 align=center><font color=808080>"+e.getValue()._itemName+" (</font><font color=FF8000>+"+e.getValue()._itemEnchantLevel+"</font><font color=808080>)</font></td></tr>");
						tb_weapon.append("<tr><td width=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");

					}
					else if(e.getValue()._group == 2)
					{

						tb_armor.append("<tr><td width=270 height=16 align=center><font color=808080>"+e.getValue()._itemName+" (</font><font color=FF8000>+"+e.getValue()._itemEnchantLevel+"</font><font color=808080>)</font></td></tr>");
						tb_armor.append("<tr><td width=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");

					}
					else if(e.getValue()._group == 3)
					{

						tb_jewel.append("<tr><td width=270 height=16 align=center><font color=808080>"+e.getValue()._itemName+" (</font><font color=FF8000>+"+e.getValue()._itemEnchantLevel+"</font><font color=808080>)</font></td></tr>");
						tb_jewel.append("<tr><td width=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");

					}
					else
					{ // group 4

						tb_other.append("<tr><td width=270 height=16 align=center><font color=808080>"+e.getValue()._itemName+" (</font><font color=FF8000>+"+e.getValue()._itemEnchantLevel+"</font><font color=808080>)</font></td></tr>");
						tb_other.append("<tr><td width=270 HEIGHT=3><img src=\"L2UI.Squaregray\" width=\"270\" height=\"1\"></td></tr>");

					}

				}

				// add to head TB generated TB's:
				tb.append(tb_weapon);
				tb.append(tb_armor);
				tb.append(tb_jewel);
				tb.append(tb_other);

			}
			else
			{
				tb.append("<tr><td>I can't load Killer Data!</td></tr>");
			}

		tb.append("</table>");
	}

	// footer and back button:
	tb.append("<table border=0 cellspacing=0 cellpadding=0>");
		tb.append("<tr><td width=270 height=12 align=center><font color=808080>- killer state in kill moment -</font></td></tr>");
		tb.append("<tr><td width=270 height=12></td></tr>");
		tb.append("<tr><td width=270 align=center><button value=\"Back\" action=\"bypass -h _rps_info\"  width="+RankPvpSystemConfig.BUTTON_W+" height="+RankPvpSystemConfig.BUTTON_H+" back=\""+RankPvpSystemConfig.BUTTON_DOWN+"\" fore=\""+RankPvpSystemConfig.BUTTON_UP+"\"></td></tr>");
	tb.append("</table>");

	tb.append("</center></body></html>");
	return tb;
}

/**
 * @return the _killer
 */
public L2PcInstance getKiller()
{
	return _killer;
}

/**
 * @param killer the killer to set
 */
public void setKiller(L2PcInstance killer)
{
	this._killer = killer;
}

/**
 * Returns killer items.
 * @return
 */
private FastMap<Integer, KillerItem> getKillerItems()
{

	FastMap<Integer, KillerItem> items = new FastMap<>();

	for (int j = 0; j < Inventory.PAPERDOLL_TOTALSLOTS; j++)
	{
		L2ItemInstance item = getKiller().getInventory().getPaperdollItem(j);

		if(item != null && (j == Inventory.PAPERDOLL_LHAND || j == Inventory.PAPERDOLL_RHAND))
		{
			items.put(j, new KillerItem(item, KillerItem.GROUP_WEAPON));
		}
		else if (item != null && (j == Inventory.PAPERDOLL_HEAD || j == Inventory.PAPERDOLL_CHEST || j == Inventory.PAPERDOLL_GLOVES || j == Inventory.PAPERDOLL_LEGS || j == Inventory.PAPERDOLL_FEET))
		{
			items.put(j, new KillerItem(item, KillerItem.GROUP_ARMOR));
		}
		else if (item != null && (j == Inventory.PAPERDOLL_NECK || j == Inventory.PAPERDOLL_REAR || j == Inventory.PAPERDOLL_LEAR || j == Inventory.PAPERDOLL_RFINGER || j == Inventory.PAPERDOLL_LFINGER))
		{
			items.put(j, new KillerItem(item, KillerItem.GROUP_JEWEL));
		}
		else if(item != null)
		{
			items.put(j, new KillerItem(item, KillerItem.GROUP_OTHER));
		}

	}

	return items;

}

class KillerItem
{
	int _itemObjId = 0;
	String _itemName = null;
	int _itemEnchantLevel = 0;
	int _group = GROUP_OTHER;

	/* item groups */
	public static final int GROUP_WEAPON = 1;
	public static final int GROUP_ARMOR= 2;
	public static final int GROUP_JEWEL = 3;
	public static final int GROUP_OTHER = 4;

	public KillerItem(L2ItemInstance itemInstance, int group)
	{
		_itemObjId = itemInstance.getObjectId();
		_itemName = itemInstance.getItemName();
		_itemEnchantLevel = itemInstance.getEnchantLevel();
		_group = group;
	}

}
}

 

this code is universal for all chronicles, just correct imports for your pack.

 

PS. Marlin this path should resolve your problem.

 

this last hotfix need jre 1.7.0 fo be compiled? I am using 1.7.4 jdk and i have a problems in compiling.

  • 2 weeks later...
Posted

dude could you rework it for acis pls? its pretty cool system and the most ppl use acis now

 

Yea , i want it for acis too :-s if someone make it work 100% corectly i pay him 10 euro :> a small motivation :D:D

Guest
This topic is now closed to further replies.



  • Posts

    • 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