there's nothing i missed, c/p the code from the patch and corrected errors.
here:
/*
* 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 2, 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package net.sf.l2j.gameserver.handler.itemhandlers;
import javolution.text.TextBuilder;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.handler.IItemHandler;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
/**
* Beast SoulShot Handler
*
* @author Tempy
*/
public class AllInOne implements IItemHandler
{
public void useItem(L2PlayableInstance playable, L2ItemInstance item) {
if(playable == null) return;
if(!Config.ENABLE_AIO) return;
L2PcInstance player = null;
if(!(playable instanceof L2PcInstance)) {
return;
}
else {
player = (L2PcInstance) playable;
if(player.isInOlympiadMode()) {
player.sendMessage("Cannot use while in Olympiad");
return;
}
else if(player.getKarma() > 0) {
player.sendMessage("Cannot use while hava karma");
return;
}
else if(player.isInJail()) {
player.sendMessage("Cannot use while in Jail");
return;
}
else if(player.isDead()) return;
else if(player.isInCombat()) {
player.sendMessage("Cannot use while in combat");
return;
}
else
showMainHtml(player);
}
}
private static void showMainHtml(L2PcInstance player) {
TextBuilder tb = new TextBuilder();
tb.append("<html><title>AIO Item</title><body><center><br>");
tb.append("Hi <font color=LEVEL>"+player.getName()+"</font>!, i can help you out with<br1>");
tb.append("many useful fuctions, just chose betwen the next<br1>");
tb.append("avaliable fuctions!<br>");
if(Config.ENABLE_GATEKEEPER)
tb.append("<button value=\"Gatekeeper\" action=\"bypass -h Aioitem_showTeleportWindow\" width=150 height=32 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><br1>");
if(Config.ENABLE_GMSHOP)
tb.append("<button value=\"Shop\" action=\"bypass -h Aioitem_showShopWindow\" width=150 height=32 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><br1>");
if(Config.ENABLE_BUFFER)
tb.append("<button value=\"Buffer\" action=\"bypass -h Aioitem_showBuffWindow\" width=150 height=32 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><br1>");
tb.append("</center></body></html>");
NpcHtmlMessage msg = new NpcHtmlMessage(5);
msg.setHtml(tb.toString());
player.sendPacket(msg);
}
}