09-27-2014, 12:02 PM
Помогите с бафером. Хочу с сборки l2jsoftware(если знает кто svn этой сборки скажите плз) скопировать бафера и поставить на l2jfrozen.
Но сам чет не шарю.
Но сам чет не шарю.
1
package net.sf.l2j.gameserver.communitybbs.Manager;
import java.util.Iterator;
import java.util.StringTokenizer;
import javolution.util.FastList;
import javolution.util.FastMap;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.datatables.CharSchemesTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.instancemanager.CustomZoneManager;
import net.sf.l2j.gameserver.model.*;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.TvTEvent;
import net.sf.l2j.gameserver.model.olympiad.Olympiad;
import net.sf.l2j.gameserver.network.serverpackets.*;
// Referenced classes of package net.sf.l2j.gameserver.communitybbs.Manager:
// BaseBBSManager
public class TopBBSBuffManager extends BaseBBSManager
{
public TopBBSBuffManager()
{
TableId = Config.BUFFS_LIST;
TableDialog = Config.BUFFER_TABLE_DIALOG;
}
public void parsecmd(String command, L2PcInstance activeChar)
{
if(command.equals("_bbstop"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/index.htm");
if(content == null)
content = "<html><body><br><br><center>404 :File Not foud: 'data/html/CommunityBoard/index.htm' </center></body></html>";
separateAndSend(content, activeChar);
} else
{
if(command.equals("_bbsbuff_warior3"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_FIGHTER_3)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
activeChar.sendPacket(new ActionFailed());
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_FIGHTER_3, activeChar, false);
SkillTable.getInstance().getInfo(1068, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1086, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1077, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1242, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1268, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1036, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1045, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1388, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1363, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(271, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(275, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(274, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(269, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(264, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(304, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(364, 1).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_warior2"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_FIGHTER_2)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
activeChar.sendPacket(new ActionFailed());
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_FIGHTER_2, activeChar, false);
SkillTable.getInstance().getInfo(1068, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1086, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1077, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1242, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1268, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1036, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(271, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(275, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(274, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(269, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(264, 1).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_warior1"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_FIGHTER_1)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
separateAndSend(content, activeChar);
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_FIGHTER_1, activeChar, false);
SkillTable.getInstance().getInfo(1068, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1086, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1077, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1242, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1268, 4).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_mage3"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_MAGE_3)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
separateAndSend(content, activeChar);
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_MAGE_3, activeChar, false);
SkillTable.getInstance().getInfo(1085, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1059, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1078, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1048, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1397, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1303, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1062, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(273, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(276, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(349, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(363, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(365, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1413, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1036, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1389, 3).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_mage2"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_MAGE_2)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
separateAndSend(content, activeChar);
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_MAGE_2, activeChar, false);
SkillTable.getInstance().getInfo(1085, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1059, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1078, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1048, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1397, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1303, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1062, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(273, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(276, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(349, 1).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_mage1"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_MAGE_1)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
separateAndSend(content, activeChar);
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_MAGE_1, activeChar, false);
SkillTable.getInstance().getInfo(1085, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1059, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1078, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1048, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1397, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1303, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
}
if(command.startsWith("_bbsbuff_buff"))
{
String filename = "data/html/CommunityBoard/buff/4000";
int cmdChoice = Integer.parseInt(command.substring(14, 16).trim());
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_OTHER)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
return;
}
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_OTHER, activeChar, false);
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0431\u0430\u0444\u0444\u0435\u0440\u0430 \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B.");
return;
}
int id = TableId[cmdChoice];
int dialog = TableDialog[cmdChoice];
int level = SkillTable.getInstance().getMaxLevel(id, 0);
if(id == 4554)
level = 4;
if(id == 4553)
level = 4;
if(id == 4551)
level = 4;
if(id == 4552)
level = 4;
String v = Integer.toString(dialog);
activeChar.stopSkillEffects(id);
if(activeChar.getShowAnim())
activeChar.broadcastPacket(new MagicSkillUser(activeChar, activeChar, id, level, 350, 150));
SkillTable.getInstance().getInfo(id, level).getEffects(activeChar, activeChar);
String content = HtmCache.getInstance().getHtm((new StringBuilder()).append(filename).append(v).append(".htm").toString());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
if(command.startsWith("_bbsbuff_save"))
{
int cmdChoice = Integer.parseInt(command.substring(14, 15).trim());
int flag = 0;
String content;
if(cmdChoice > 3)
{
content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/400011.htm");
flag = 1;
} else
{
content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
}
CreateScheme(activeChar, Integer.toString(cmdChoice), flag);
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
if(command.startsWith("_bbsbuff_give"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/400011.htm");
int cmdChoice = Integer.parseInt(command.substring(14, 15).trim());
if(cmdChoice < 1 && cmdChoice > 6)
return;
String key = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/400011");
String sKey = Integer.toString(cmdChoice);
int flag = 0;
NpcHtmlMessage html = new NpcHtmlMessage(1);
if(cmdChoice > 3)
{
flag = 1;
key = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40008");
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
separateAndSend(content, activeChar);
return;
}
if(CharSchemesTable.getInstance().getScheme(activeChar.getObjectId(), sKey) != null)
{
activeChar.stopAllEffects();
if(flag == 0)
{
L2Skill sk;
for(Iterator i$ = CharSchemesTable.getInstance().getScheme(activeChar.getObjectId(), sKey).iterator(); i$.hasNext(); sk.getEffects(activeChar, activeChar))
{
sk = (L2Skill)i$.next();
activeChar.stopSkillEffects(sk.getId());
}
} else
{
Iterator i$ = CharSchemesTable.getInstance().getScheme(activeChar.getObjectId(), sKey).iterator();
do
{
if(!i$.hasNext())
break;
L2Skill sk = (L2Skill)i$.next();
L2Summon pet = activeChar.getPet();
if(pet != null)
{
pet.stopSkillEffects(sk.getId());
sk.getEffects(activeChar, pet);
}
} while(true);
}
content = HtmCache.getInstance().getHtm((new StringBuilder()).append(key).append(".htm").toString());
} else
{
activeChar.sendMessage((new StringBuilder()).append("\u041F\u0440\u043E\u0444\u0438\u043B\u044C ").append(sKey).append(" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D").toString());
return;
}
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
if(command.startsWith("_bbsbuff_regen"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_cancel"))
{
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
activeChar.stopAllEffects();
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff;"))
{
StringTokenizer st = new StringTokenizer(command, ";");
st.nextToken();
int idp = Integer.parseInt(st.nextToken());
String content = HtmCache.getInstance().getHtm((new StringBuilder()).append("data/html/CommunityBoard/buff/").append(idp).append(".htm").toString());
if(content == null)
content = (new StringBuilder()).append("<html><body><br><br><center>404 :File Not foud: 'data/html/CommunityBoard/buff/").append(idp).append(".htm' </center></body></html>").toString();
separateAndSend(content, activeChar);
} else
{
ShowBoard sb = new ShowBoard((new StringBuilder()).append("<html><body><br><br><center>the command: ").append(command).append(" is not implemented yet</center><br><br></body></html>").toString(), "101");
activeChar.sendPacket(sb);
activeChar.sendPacket(new ShowBoard(null, "102"));
activeChar.sendPacket(new ShowBoard(null, "103"));
}
}
public void parsewrite(String s, String s1, String s2, String s3, String s4, L2PcInstance l2pcinstance)
{
}
private void CreateScheme(L2PcInstance player, String name, int flag)
{
if(CharSchemesTable.getInstance().getAllSchemes(player.getObjectId()) != null && CharSchemesTable.getInstance().getAllSchemes(player.getObjectId()).containsKey(name))
CharSchemesTable.getInstance().getAllSchemes(player.getObjectId()).remove(name);
if(CharSchemesTable.getInstance().getAllSchemes(player.getObjectId()) == null)
CharSchemesTable.getInstance().getSchemesTable().put(Integer.valueOf(player.getObjectId()), new FastMap(6));
CharSchemesTable.getInstance().setScheme(player.getObjectId(), name.trim(), new FastList(69));
L2Effect s[];
if(flag == 0)
{
s = player.getAllEffects();
} else
{
L2Summon pet = player.getPet();
s = pet.getAllEffects();
}
Boolean Ok = Boolean.valueOf(false);
for(int i = 0; i < s.length; i++)
{
L2Effect value = s[i];
int Id = value.getSkill().getId();
int k = 0;
do
{
if(k >= TableId.length)
break;
if(Id == TableId[k])
{
Ok = Boolean.valueOf(true);
break;
}
k++;
} while(true);
if(Ok.booleanValue())
CharSchemesTable.getInstance().getScheme(player.getObjectId(), name).add(SkillTable.getInstance().getInfo(Id, value.getSkill().getLevel()));
Ok = Boolean.valueOf(false);
}
if(name.equals(Integer.toString(4)))
player.sendMessage("\u0422\u0435\u043A\u0443\u0449\u0438\u0435 \u0431\u0430\u0444\u0444\u044B \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u044B");
else
player.sendMessage((new StringBuilder()).append("\u041F\u0440\u043E\u0444\u0438\u043B\u044C ").append(name).append(" \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D").toString());
}
public static TopBBSBuffManager getInstance()
{
return _instance;
}
public int TableId[];
public int TableDialog[];
private static TopBBSBuffManager _instance = new TopBBSBuffManager();
}
import java.util.Iterator;
import java.util.StringTokenizer;
import javolution.util.FastList;
import javolution.util.FastMap;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.datatables.CharSchemesTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.instancemanager.CustomZoneManager;
import net.sf.l2j.gameserver.model.*;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.TvTEvent;
import net.sf.l2j.gameserver.model.olympiad.Olympiad;
import net.sf.l2j.gameserver.network.serverpackets.*;
// Referenced classes of package net.sf.l2j.gameserver.communitybbs.Manager:
// BaseBBSManager
public class TopBBSBuffManager extends BaseBBSManager
{
public TopBBSBuffManager()
{
TableId = Config.BUFFS_LIST;
TableDialog = Config.BUFFER_TABLE_DIALOG;
}
public void parsecmd(String command, L2PcInstance activeChar)
{
if(command.equals("_bbstop"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/index.htm");
if(content == null)
content = "<html><body><br><br><center>404 :File Not foud: 'data/html/CommunityBoard/index.htm' </center></body></html>";
separateAndSend(content, activeChar);
} else
{
if(command.equals("_bbsbuff_warior3"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_FIGHTER_3)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
activeChar.sendPacket(new ActionFailed());
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_FIGHTER_3, activeChar, false);
SkillTable.getInstance().getInfo(1068, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1086, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1077, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1242, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1268, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1036, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1045, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1388, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1363, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(271, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(275, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(274, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(269, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(264, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(304, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(364, 1).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_warior2"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_FIGHTER_2)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
activeChar.sendPacket(new ActionFailed());
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_FIGHTER_2, activeChar, false);
SkillTable.getInstance().getInfo(1068, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1086, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1077, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1242, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1268, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1036, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(271, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(275, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(274, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(269, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(264, 1).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_warior1"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_FIGHTER_1)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
separateAndSend(content, activeChar);
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_FIGHTER_1, activeChar, false);
SkillTable.getInstance().getInfo(1068, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1086, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1077, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1242, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1268, 4).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_mage3"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_MAGE_3)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
separateAndSend(content, activeChar);
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_MAGE_3, activeChar, false);
SkillTable.getInstance().getInfo(1085, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1059, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1078, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1048, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1397, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1303, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1062, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(273, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(276, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(349, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(363, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(365, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1413, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1036, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1389, 3).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_mage2"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_MAGE_2)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
separateAndSend(content, activeChar);
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_MAGE_2, activeChar, false);
SkillTable.getInstance().getInfo(1085, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1059, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1078, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1048, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1397, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1303, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1035, 4).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1062, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(273, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(276, 1).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(349, 1).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_mage1"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_MAGE_1)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
separateAndSend(content, activeChar);
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_MAGE_1, activeChar, false);
SkillTable.getInstance().getInfo(1085, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1059, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1078, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1204, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1048, 6).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1397, 3).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1303, 2).getEffects(activeChar, activeChar);
SkillTable.getInstance().getInfo(1040, 3).getEffects(activeChar, activeChar);
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
}
if(command.startsWith("_bbsbuff_buff"))
{
String filename = "data/html/CommunityBoard/buff/4000";
int cmdChoice = Integer.parseInt(command.substring(14, 16).trim());
if(activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID) == null || activeChar.getInventory().getItemByItemId(Config.BUFF_ITEM_ID).getCount() < Config.BUFF_OTHER)
{
activeChar.sendMessage("\u041D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043C\u043E\u043D\u0435\u0442");
return;
}
activeChar.destroyItemByItemId("Consume", Config.BUFF_ITEM_ID, Config.BUFF_OTHER, activeChar, false);
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0431\u0430\u0444\u0444\u0435\u0440\u0430 \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B.");
return;
}
int id = TableId[cmdChoice];
int dialog = TableDialog[cmdChoice];
int level = SkillTable.getInstance().getMaxLevel(id, 0);
if(id == 4554)
level = 4;
if(id == 4553)
level = 4;
if(id == 4551)
level = 4;
if(id == 4552)
level = 4;
String v = Integer.toString(dialog);
activeChar.stopSkillEffects(id);
if(activeChar.getShowAnim())
activeChar.broadcastPacket(new MagicSkillUser(activeChar, activeChar, id, level, 350, 150));
SkillTable.getInstance().getInfo(id, level).getEffects(activeChar, activeChar);
String content = HtmCache.getInstance().getHtm((new StringBuilder()).append(filename).append(v).append(".htm").toString());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
if(command.startsWith("_bbsbuff_save"))
{
int cmdChoice = Integer.parseInt(command.substring(14, 15).trim());
int flag = 0;
String content;
if(cmdChoice > 3)
{
content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/400011.htm");
flag = 1;
} else
{
content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
}
CreateScheme(activeChar, Integer.toString(cmdChoice), flag);
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
if(command.startsWith("_bbsbuff_give"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/400011.htm");
int cmdChoice = Integer.parseInt(command.substring(14, 15).trim());
if(cmdChoice < 1 && cmdChoice > 6)
return;
String key = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/400011");
String sKey = Integer.toString(cmdChoice);
int flag = 0;
NpcHtmlMessage html = new NpcHtmlMessage(1);
if(cmdChoice > 3)
{
flag = 1;
key = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40008");
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
separateAndSend(content, activeChar);
return;
}
if(CharSchemesTable.getInstance().getScheme(activeChar.getObjectId(), sKey) != null)
{
activeChar.stopAllEffects();
if(flag == 0)
{
L2Skill sk;
for(Iterator i$ = CharSchemesTable.getInstance().getScheme(activeChar.getObjectId(), sKey).iterator(); i$.hasNext(); sk.getEffects(activeChar, activeChar))
{
sk = (L2Skill)i$.next();
activeChar.stopSkillEffects(sk.getId());
}
} else
{
Iterator i$ = CharSchemesTable.getInstance().getScheme(activeChar.getObjectId(), sKey).iterator();
do
{
if(!i$.hasNext())
break;
L2Skill sk = (L2Skill)i$.next();
L2Summon pet = activeChar.getPet();
if(pet != null)
{
pet.stopSkillEffects(sk.getId());
sk.getEffects(activeChar, pet);
}
} while(true);
}
content = HtmCache.getInstance().getHtm((new StringBuilder()).append(key).append(".htm").toString());
} else
{
activeChar.sendMessage((new StringBuilder()).append("\u041F\u0440\u043E\u0444\u0438\u043B\u044C ").append(sKey).append(" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D").toString());
return;
}
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
if(command.startsWith("_bbsbuff_regen"))
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
activeChar.setCurrentHpMp(activeChar.getMaxHp(), activeChar.getMaxMp());
activeChar.setCurrentCp(activeChar.getMaxCp());
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff_cancel"))
{
if(activeChar.getPvpFlag() != 0)
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0432 PvP");
return;
}
if(activeChar.isDead())
{
activeChar.sendMessage("\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u0430\u0444\u0430\u0442\u044C\u0441\u044F \u043A\u043E\u0433\u0434\u0430 \u043C\u0435\u0440\u0442\u0432\u044B");
return;
}
if(Olympiad.getInstance().isRegisteredInComp(activeChar) || activeChar.getOlympiadGameId() > 0)
{
activeChar.sendMessage("You cant not buff in olympiad mode");
return;
}
if(activeChar.isMounted() || activeChar.getActiveTradeList() != null || activeChar.isCastingNow() || activeChar.getActiveEnchantItem() != null || TvTEvent.isPlayerParticipant(activeChar.getObjectId()))
{
activeChar.sendPacket(SystemMessage.sendString("\u043D\u0435\u0431\u043B\u0430\u0433\u043E\u043F\u0440\u0438\u044F\u0442\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0431\u0430\u0444\u0435\u0440\u0430"));
return;
}
if(CustomZoneManager.getInstance().checkIfInZone("NoEscape", activeChar))
{
activeChar.sendPacket(SystemMessage.sendString("Not the best place to exit the game"));
activeChar.sendPacket(new ActionFailed());
return;
} else
{
String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/buff/40001.htm");
activeChar.stopAllEffects();
separateAndSend(content, activeChar);
activeChar.sendPacket(new ActionFailed());
return;
}
}
if(command.startsWith("_bbsbuff;"))
{
StringTokenizer st = new StringTokenizer(command, ";");
st.nextToken();
int idp = Integer.parseInt(st.nextToken());
String content = HtmCache.getInstance().getHtm((new StringBuilder()).append("data/html/CommunityBoard/buff/").append(idp).append(".htm").toString());
if(content == null)
content = (new StringBuilder()).append("<html><body><br><br><center>404 :File Not foud: 'data/html/CommunityBoard/buff/").append(idp).append(".htm' </center></body></html>").toString();
separateAndSend(content, activeChar);
} else
{
ShowBoard sb = new ShowBoard((new StringBuilder()).append("<html><body><br><br><center>the command: ").append(command).append(" is not implemented yet</center><br><br></body></html>").toString(), "101");
activeChar.sendPacket(sb);
activeChar.sendPacket(new ShowBoard(null, "102"));
activeChar.sendPacket(new ShowBoard(null, "103"));
}
}
public void parsewrite(String s, String s1, String s2, String s3, String s4, L2PcInstance l2pcinstance)
{
}
private void CreateScheme(L2PcInstance player, String name, int flag)
{
if(CharSchemesTable.getInstance().getAllSchemes(player.getObjectId()) != null && CharSchemesTable.getInstance().getAllSchemes(player.getObjectId()).containsKey(name))
CharSchemesTable.getInstance().getAllSchemes(player.getObjectId()).remove(name);
if(CharSchemesTable.getInstance().getAllSchemes(player.getObjectId()) == null)
CharSchemesTable.getInstance().getSchemesTable().put(Integer.valueOf(player.getObjectId()), new FastMap(6));
CharSchemesTable.getInstance().setScheme(player.getObjectId(), name.trim(), new FastList(69));
L2Effect s[];
if(flag == 0)
{
s = player.getAllEffects();
} else
{
L2Summon pet = player.getPet();
s = pet.getAllEffects();
}
Boolean Ok = Boolean.valueOf(false);
for(int i = 0; i < s.length; i++)
{
L2Effect value = s[i];
int Id = value.getSkill().getId();
int k = 0;
do
{
if(k >= TableId.length)
break;
if(Id == TableId[k])
{
Ok = Boolean.valueOf(true);
break;
}
k++;
} while(true);
if(Ok.booleanValue())
CharSchemesTable.getInstance().getScheme(player.getObjectId(), name).add(SkillTable.getInstance().getInfo(Id, value.getSkill().getLevel()));
Ok = Boolean.valueOf(false);
}
if(name.equals(Integer.toString(4)))
player.sendMessage("\u0422\u0435\u043A\u0443\u0449\u0438\u0435 \u0431\u0430\u0444\u0444\u044B \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u044B");
else
player.sendMessage((new StringBuilder()).append("\u041F\u0440\u043E\u0444\u0438\u043B\u044C ").append(name).append(" \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D").toString());
}
public static TopBBSBuffManager getInstance()
{
return _instance;
}
public int TableId[];
public int TableDialog[];
private static TopBBSBuffManager _instance = new TopBBSBuffManager();
}