Jump to content

nery

Members
  • Posts

    137
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by nery

  1. SONY95 for for (L2Character character : zone.getCharactersInside()) ok
  2. anyone have this mod for l2jserver # Alternative Enchant System # Default: false UseAltEnchant = false # Alternative Enchant System # In order to work must enable: UseAltEnchant = True # Here you should to set enchant value for every enchant level, last value will be max enchant level. EnchantWeaponFighter = 100,100,100,34,33,25,20,16,14,12,11,10,9,8,8,7,7,6 EnchantWeaponFighterCrystal = 100,100,100,34,33,25,20,16,14,12,11,10,9,8,8,7,7,6 EnchantWeaponFighterBlessed = 100,100,100,100,100,75,70,71,68,62,21,10,9,8,8,7,7,6 EnchantArmor = 100,100,100,34,33,25,20,16,14,12,11,10,9,8,8,7,7,6 EnchantArmorCrystal = 100,100,100,34,33,25,20,16,14,12,11,10,9,8,8,7,7,6 EnchantArmorBlessed = 100,100,100,100,100,75,70,71,68,62,21,10,9,8,8,7,7,6 EnchantJewelry = 100,100,100,34,33,25,20,16,14,12,11,10,9,8,8,7,7,6 EnchantJewelryCrystal = 100,100,100,34,33,25,20,16,14,12,11,10,9,8,8,7,7,6 EnchantJewelryBlessed = 100,100,100,100,100,75,70,71,68,62,21,10,9,8,8,7,7,6
  3. nobody knows help me?
  4. could show an example of how I disable the tab RegionBBSManager in CommunityBoard.java package com.l2jserver.gameserver.communitybbs; import com.l2jserver.Config; import com.l2jserver.gameserver.communitybbs.Manager.ClanBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.PostBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.RegionBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.TopBBSManager; import com.l2jserver.gameserver.communitybbs.Manager.TopicBBSManager; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.L2GameClient; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ShowBoard; public class CommunityBoard { public static CommunityBoard getInstance() { return SingletonHolder._instance; } public void handleCommands(L2GameClient client, String command) { L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) return; switch (Config.COMMUNITY_TYPE) { default: case 0: //disabled activeChar.sendPacket(SystemMessageId.CB_OFFLINE); break; case 1: // old RegionBBSManager.getInstance().parsecmd(command, activeChar); break; case 2: // new if (command.startsWith("_bbsclan")) { ClanBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbsmemo")) { TopicBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbstopics")) { TopicBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbsposts")) { PostBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbstop")) { TopBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbshome")) { TopBBSManager.getInstance().parsecmd(command, activeChar); } else if (command.startsWith("_bbsloc")) { RegionBBSManager.getInstance().parsecmd(command, activeChar); } else { ShowBoard sb = new ShowBoard(" O comando: " + command + " não foi implantado ainda ", "101"); activeChar.sendPacket(sb); activeChar.sendPacket(new ShowBoard(null, "102")); activeChar.sendPacket(new ShowBoard(null, "103")); } break; } } /** * @param client * @param url * @param arg1 * @param arg2 * @param arg3 * @param arg4 * @param arg5 */ public void handleWriteCommands(L2GameClient client, String url, String arg1, String arg2, String arg3, String arg4, String arg5) { L2PcInstance activeChar = client.getActiveChar(); if (activeChar == null) return; switch (Config.COMMUNITY_TYPE) { case 2: if (url.equals("Topic")) { TopicBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); } else if (url.equals("Post")) { PostBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); } else if (url.equals("Region")) { RegionBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); } else if (url.equals("Notice")) { ClanBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); } else { ShowBoard sb = new ShowBoard(" O comando: " + url + " não foi implantado ainda ", "101"); activeChar.sendPacket(sb); activeChar.sendPacket(new ShowBoard(null, "102")); activeChar.sendPacket(new ShowBoard(null, "103")); } break; case 1: RegionBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar); break; default: case 0: ShowBoard sb = new ShowBoard(" A Community board está desativada ", "101"); activeChar.sendPacket(sb); activeChar.sendPacket(new ShowBoard(null, "102")); activeChar.sendPacket(new ShowBoard(null, "103")); break; } } private static class SingletonHolder { protected static final CommunityBoard _instance = new CommunityBoard(); } }
  5. would be cool place to display the names of all players who have a premium account
  6. Can someone tell me how do I disable the tabs: Region Homepage Favorites remove or disable
  7. If I had it in the configs I would not be here asking the mode friend
  8. Someone has welcome.htm mode for H5. I searched the forum but not found.
  9. Resolved ... Thank you again to all who helped me
  10. I'm from Brazil English is not my language discovered .... the error that this cod here http://www.maxcheaters.com/topic/144739-mob-drop-panel-freyah5-l2jserver/ is something here in Dropinfo.java I use H5 L2JServer /* * 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 handlers.bypasshandlers; import java.text.DecimalFormat; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.handler.IBypassHandler; import com.l2jserver.gameserver.model.L2DropCategory; import com.l2jserver.gameserver.model.L2DropData; import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.L2Object.InstanceType; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.items.L2Item; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.util.StringUtil; public class DropInfo implements IBypassHandler { private static final String[] COMMANDS = { "drop", "spoil", "info", "quest" }; @Override public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) { try { final NpcHtmlMessage html = new NpcHtmlMessage(0); L2Object targetmob = activeChar.getTarget(); L2Npc npc = (L2Npc) targetmob; String droptext = ""; if (command.startsWith("drop")) { try { html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobdrop.htm"); if (!(npc.isChampion() || npc.isMinion() || npc.getInstanceType() == InstanceType.L2GrandBossInstance || npc.isRaid() || npc.isRaidMinion() || npc.isMob())) return false; if (npc.getTemplate().getDropData().isEmpty()) { droptext = "WARNING: This Npc has no Drops!"; html.replace("%drops%", droptext); activeChar.sendPacket(html); return false; } String champ = ""; String imgsg = "<img src=\"l2ui.squaregray\" width=\"274\" height=\"1\">"; String ta_op = "<table bgcolor=333333 cellspacing=2 cellpadding=1><tr><td height=38 fixwidth=36><img src=\""; String ta_op2 = "\" height=32 width=32></td><td fixwidth=234><table VALIGN=top valing = top width=234 cellpadding=0 cellspacing=0><tr>"; final StringBuilder droptext1 = StringUtil.startAppend(9000, champ + "<br>" + imgsg); for (L2DropCategory cat : npc.getTemplate().getDropData()) { for (L2DropData drop : cat.getAllDrops()) { final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId()); if (item == null) continue; if (cat.isSweep()) continue; if (drop.isQuestDrop()) continue; String smind = null, drops = null; String name = item.getName(); double chance = (drop.getChance()/10000); if (item.getCrystalType() == 0) { smind = "<img src=\"L2UI_CH3.joypad_shortcut\" width=16 height=16>"; } else if (item.getCrystalType() == 1) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_D\" width=16 height=16>"; } else if (item.getCrystalType() == 2) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_C\" width=16 height=16>"; } else if (item.getCrystalType() == 3) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_B\" width=16 height=16>"; } else if (item.getCrystalType() == 4) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_A\" width=16 height=16>"; } else if (item.getCrystalType() == 5) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_S\" width=16 height=16>"; } else if (item.getCrystalType() == 6) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_80\" width=16 height=16>"; } else if (item.getCrystalType() == 7) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_84\" width=16 height=16>"; } if (chance <= 0.001) { DecimalFormat df = new DecimalFormat("#.####"); drops = df.format(chance); } else if (chance <= 0.01) { DecimalFormat df = new DecimalFormat("#.###"); drops = df.format(chance); } else { DecimalFormat df = new DecimalFormat("##.##"); drops = df.format(chance); } if (name.startsWith("Recipe - Sealed")) name = "<font color=00FF00>(Re)</font><font color=FF00FF>(Sl)</font>" + name.substring(16); if (name.startsWith("Sealed ")) name = "<font color=FF00FF>(Sl)</font>" + name.substring(7); if (name.startsWith("Common Item - ")) name = "<font color=00FFFF>(Ci)</font>" + name.substring(14); if (name.startsWith("Recipe: ")) name = "<font color=00FF00>(Re)</font>" + name.substring(8); if (name.startsWith("Recipe -")) name = "<font color=00FF00>(Re)</font>" + name.substring(8); if (name.startsWith("Mid-Grade Life Stone")) name = "<font color=fff600>Mid-Grade LS</font>" + name.substring(20); if (name.startsWith("High-Grade Life Stone")) name = "<font color=fff600>High-Grade LS</font>" + name.substring(21); if (name.startsWith("Top-Grade Life Stone")) name = "<font color=fff600>Top-Grade LS</font>" + name.substring(20); if (name.startsWith("Forgotten Scroll - ")) name = "<font color=fff600>FS - </font>" + name.substring(19); if (name.startsWith("Greater Dye of ")) name = "<font color=fff600>G Dye of </font>" + name.substring(15); droptext1.append(ta_op + item.getIcon()+ta_op2+"<td align=left width=16>" +smind+ "</td><td align=left width=260><font color=fff600>" +name+ "</font></td></tr><tr><td align=left width=16><img src=\"L2UI_CH3.QuestWndToolTipBtn\" width=16 height=16></td><td align=left width=55><font color=E15656>" +drops+ "%</font></td></tr></table></td></tr></table>" + imgsg); } } droptext = droptext1.toString(); html.replace("%drops%", droptext); activeChar.sendPacket(html); } catch (Exception e) { activeChar.sendMessage("Something went wrong with the drop preview."); } } if (command.startsWith("spoil")) { try { html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobspoil.htm"); if (!(npc.isChampion() || npc.isMinion() || npc.isRaid() || npc.isRaidMinion() || npc.isMob())) return false; if (npc.getTemplate().getDropData().isEmpty()) { droptext = "WARNING: This Npc has no Drops!"; html.replace("%drops%", droptext); activeChar.sendPacket(html); return false; } String champ = ""; String imgsg = "<img src=\"l2ui.squaregray\" width=\"274\" height=\"1\">"; String ta_op = "<table bgcolor=333333 cellspacing=2 cellpadding=1><tr><td height=38 fixwidth=36><img src=\""; String ta_op2 = "\" height=32 width=32></td><td fixwidth=234><table VALIGN=top valing = top width=234 cellpadding=0 cellspacing=1><tr>"; final StringBuilder droptext1 = StringUtil.startAppend(1000, champ + "<br>" + imgsg); for (L2DropCategory cat : npc.getTemplate().getDropData()) { for (L2DropData drop : cat.getAllDrops()) { final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId()); if (item == null) continue; if (!(cat.isSweep())) continue; String smind = null, drops = null; String name = item.getName(); double chance = (drop.getChance()/10000); if (item.getCrystalType() == 0) { smind = "<img src=\"L2UI_CH3.joypad_shortcut\" width=16 height=16>"; } else if (item.getCrystalType() == 1) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_D\" width=16 height=16>"; } else if (item.getCrystalType() == 2) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_C\" width=16 height=16>"; } else if (item.getCrystalType() == 3) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_B\" width=16 height=16>"; } else if (item.getCrystalType() == 4) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_A\" width=16 height=16>"; } else if (item.getCrystalType() == 5) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_S\" width=16 height=16>"; } else if (item.getCrystalType() == 6) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_80\" width=16 height=16>"; } else if (item.getCrystalType() == 7) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_84\" width=16 height=16>"; } if (chance <= 0.001) { DecimalFormat df = new DecimalFormat("#.####"); drops = df.format(chance); } else if (chance <= 0.01) { DecimalFormat df = new DecimalFormat("#.###"); drops = df.format(chance); } else { DecimalFormat df = new DecimalFormat("##.##"); drops = df.format(chance); } if (name.startsWith("Recipe - Sealed")) name = "<font color=00FF00>(Re)</font><font color=FF00FF>(Sl)</font>" + name.substring(16); if (name.startsWith("Sealed ")) name = "<font color=FF00FF>(Sl)</font>" + name.substring(7); if (name.startsWith("Common Item - ")) name = "<font color=00FFFF>(Ci)</font>" + name.substring(14); if (name.startsWith("Recipe: ")) name = "<font color=00FF00>(Re)</font>" + name.substring(8); if (name.startsWith("Recipe -")) name = "<font color=00FF00>(Re)</font>" + name.substring(8); if (name.startsWith("Mid-Grade Life Stone")) name = "<font color=fff600>Mid-Grade LS</font>" + name.substring(20); if (name.startsWith("High-Grade Life Stone")) name = "<font color=fff600>High-Grade LS</font>" + name.substring(21); if (name.startsWith("Top-Grade Life Stone")) name = "<font color=fff600>Top-Grade LS</font>" + name.substring(20); if (name.startsWith("Forgotten Scroll - ")) name = "<font color=fff600>FS - </font>" + name.substring(19); if (name.startsWith("Greater Dye of ")) name = "<font color=fff600>G Dye of </font>" + name.substring(15); droptext1.append(ta_op + item.getIcon()+ta_op2+"<td align=left width=16>" +smind+ "</td><td align=left width=260><font color=fff600>" +name+ "</font></td></tr><tr><td align=left width=16><img src=\"L2UI_CH3.QuestWndToolTipBtn\" width=16 height=16></td><td align=left width=55><font color=E15656>" +drops+ "%</font></td></tr></table></td></tr></table>" + imgsg); } } droptext = droptext1.toString(); html.replace("%drops%", droptext); activeChar.sendPacket(html); } catch (Exception e) { activeChar.sendMessage("Something went wrong with the drop preview."); } } if (command.startsWith("quest")) { try { html.setFile(activeChar.getHtmlPrefix(), "data/html/custom/mobquest.htm"); if (!(npc.isChampion() || npc.isMinion() || npc.isRaid() || npc.isRaidMinion() || npc.isMob())) return false; if (npc.getTemplate().getDropData().isEmpty()) { droptext = "WARNING: This Npc has no Drops!"; html.replace("%drops%", droptext); activeChar.sendPacket(html); return false; } String champ = ""; String imgsg = "<img src=\"l2ui.squaregray\" width=\"274\" height=\"1\">"; String ta_op = "<table bgcolor=333333 cellspacing=2 cellpadding=1><tr><td height=38 fixwidth=36><img src=\""; String ta_op2 = "\" height=32 width=32></td><td fixwidth=234><table VALIGN=top valing = top width=234 cellpadding=0 cellspacing=1><tr>"; final StringBuilder droptext1 = StringUtil.startAppend(1000, champ + "<br>" + imgsg); for (L2DropCategory cat : npc.getTemplate().getDropData()) { for (L2DropData drop : cat.getAllDrops()) { final L2Item item = ItemTable.getInstance().getTemplate(drop.getItemId()); if (item == null) continue; if (!(drop.isQuestDrop())) continue; String smind = null, drops = null; String name = item.getName(); double chance = (drop.getChance()/10000); if (item.getCrystalType() == 0) { smind = "<img src=\"L2UI_CH3.joypad_shortcut\" width=16 height=16>"; } else if (item.getCrystalType() == 1) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_D\" width=16 height=16>"; } else if (item.getCrystalType() == 2) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_C\" width=16 height=16>"; } else if (item.getCrystalType() == 3) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_B\" width=16 height=16>"; } else if (item.getCrystalType() == 4) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_A\" width=16 height=16>"; } else if (item.getCrystalType() == 5) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_S\" width=16 height=16>"; } else if (item.getCrystalType() == 6) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_80\" width=16 height=16>"; } else if (item.getCrystalType() == 7) { smind = "<img src=\"L2UI_CT1.Icon_DF_ItemGrade_84\" width=16 height=16>"; } if (chance <= 0.001) { DecimalFormat df = new DecimalFormat("#.####"); drops = df.format(chance); } else if (chance <= 0.01) { DecimalFormat df = new DecimalFormat("#.###"); drops = df.format(chance); } else { DecimalFormat df = new DecimalFormat("##.##"); drops = df.format(chance); } if (name.startsWith("Recipe - Sealed")) name = "<font color=00FF00>(Re)</font><font color=FF00FF>(Sl)</font>" + name.substring(16); if (name.startsWith("Sealed ")) name = "<font color=FF00FF>(Sl)</font>" + name.substring(7); if (name.startsWith("Common Item - ")) name = "<font color=00FFFF>(Ci)</font>" + name.substring(14); if (name.startsWith("Recipe: ")) name = "<font color=00FF00>(Re)</font>" + name.substring(8); if (name.startsWith("Recipe -")) name = "<font color=00FF00>(Re)</font>" + name.substring(8); if (name.startsWith("Mid-Grade Life Stone")) name = "<font color=fff600>Mid-Grade LS</font>" + name.substring(20); if (name.startsWith("High-Grade Life Stone")) name = "<font color=fff600>High-Grade LS</font>" + name.substring(21); if (name.startsWith("Top-Grade Life Stone")) name = "<font color=fff600>Top-Grade LS</font>" + name.substring(20); if (name.startsWith("Forgotten Scroll - ")) name = "<font color=fff600>FS - </font>" + name.substring(19); if (name.startsWith("Greater Dye of ")) name = "<font color=fff600>G Dye of </font>" + name.substring(15); droptext1.append(ta_op + item.getIcon()+ta_op2+"<td align=left width=16>" +smind+ "</td><td align=left width=260><font color=fff600>" +name+ "</font></td></tr><tr><td align=left width=16><img src=\"L2UI_CH3.QuestWndToolTipBtn\" width=16 height=16></td><td align=left width=55><font color=E15656>" +drops+ "%</font></td></tr></table></td></tr></table>" + imgsg); } } droptext = droptext1.toString(); html.replace("%drops%", droptext); activeChar.sendPacket(html); } catch (Exception e) { activeChar.sendMessage("Something went wrong with the drop preview."); } } } catch (Exception e) { activeChar.sendMessage("You cant use this option with this target."); } return false; } @Override public String[] getBypassList() { return COMMANDS; } }
  11. guys what you are not understanding is that the html did not move the npc then because they stopped working is what I'm trying to figure out <html><body>High Priest Maximilian:<br> Pleased to meet you. I am High Priest Maximilian of this temple, may Einhasad's light comfort your soul's distress. Why have you come here, to the heart of our faith?<br> <a action="bypass -h npc_%objectId%_Quest elven_human_buffers_2">Listen to information about second class transfer.</a><br> <a action="bypass -h npc_%objectId%_Subclass 0">Sub Class.</a><br> <a action="bypass -h npc_%objectId%_Quest Clan">Clan.</a><br> <a action="bypass -h npc_%objectId%_Quest Alliance">Alliance.</a><br> <a action="bypass -h npc_%objectId%_Quest ShadowWeapons">Use Shadow Weapon Exchange Coupon.</a><br> <a action="bypass -h npc_%objectId%_Quest">Quest.</a> </body></html>
  12. not understand
  13. checked the script.cfg is ok and I do not think the error I am already desperate server was ready to go to air
  14. friends need urgent help, I put some code that I'm not managing to create new quest or clans or alliances only the option to subclass that is working the other not I click and nothing happens. anyone know which files responsible for the buttons to see if the npcs put something intruding the code.
  15. I'm working with your code but this command / / remove aio he's the message if you do not have to target player in
  16. Correct? @Override public void onBypassFeedback(L2PcInstance player, String command) { if(player.isAio()) { player.sendMessage("You're not allowed to change your class."); return; } if (command.startsWith("1stClass")) { showHtmlMenu(player, getObjectId(), 1); } else if (command.startsWith("2ndClass")) { showHtmlMenu(player, getObjectId(), 2); } else if (command.startsWith("3rdClass")) { showHtmlMenu(player, getObjectId(), 3); } else if (command.startsWith("change_class")) { int val = Integer.parseInt(command.substring(13)); if (checkAndChangeClass(player, val)) { final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(player.getHtmlPrefix(), "data/html/classmaster/ok.htm"); html.replace("%name%", ClassListData.getInstance().getClass(val).getClientCode()); player.sendPacket(html); } } If your answer is yes, not working still picking sub-classes
  17. just lead me the correct line where I put the code
  18. and that's what I'm using here, but that part is not working L2ClassMasterInstance.java + if(player.isAio()) + { + player.sendMessage("You're not allowed to change your class."); + return; + } + of to take a look in there to see where my wandering to /** * This class ... * @version $Revision: 1.4.2.1.2.7 $ $Date: 2005/03/27 15:29:32 $ */ public final class L2ClassMasterInstance extends L2MerchantInstance { /** * @param objectId * @param template */ public L2ClassMasterInstance(int objectId, L2NpcTemplate template) { super(objectId, template); setInstanceType(InstanceType.L2ClassMasterInstance); } @Override public String getHtmlPath(int npcId, int val) { String pom = ""; if (val == 0) { pom = "" + npcId; } else { pom = npcId + "-" + val; } return "data/html/classmaster/" + pom + ".htm"; } @Override public void onBypassFeedback(L2PcInstance player, String command) { if(player.isAio()) { player.sendMessage("You're not allowed to change your class."); return; } else if (command.startsWith("1stClass")) { showHtmlMenu(player, getObjectId(), 1); } else if (command.startsWith("2ndClass")) { showHtmlMenu(player, getObjectId(), 2); } else if (command.startsWith("3rdClass")) { showHtmlMenu(player, getObjectId(), 3); } else if (command.startsWith("change_class")) { int val = Integer.parseInt(command.substring(13)); if (checkAndChangeClass(player, val)) { final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(player.getHtmlPrefix(), "data/html/classmaster/ok.htm"); html.replace("%name%", ClassListData.getInstance().getClass(val).getClientCode()); player.sendPacket(html); } } else if (command.startsWith("become_noble")) { if (!player.isNoble()) { player.setNoble(true); player.sendPacket(new UserInfo(player)); player.sendPacket(new ExBrExtraUserInfo(player)); NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(player.getHtmlPrefix(), "data/html/classmaster/nobleok.htm"); player.sendPacket(html); } } else if (command.startsWith("learn_skills")) { player.giveAvailableSkills(Config.AUTO_LEARN_FS_SKILLS, true); } else if (command.startsWith("increase_clan_level")) { if (!player.isClanLeader()) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(player.getHtmlPrefix(), "data/html/classmaster/noclanleader.htm"); player.sendPacket(html); } else if (player.getClan().getLevel() >= 5) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(player.getHtmlPrefix(), "data/html/classmaster/noclanlevel.htm"); player.sendPacket(html); } else { player.getClan().changeLevel(5); } } else { super.onBypassFeedback(player, command); } } public static final void onTutorialLink(L2PcInstance player, String request) { if (!Config.ALTERNATE_CLASS_MASTER || (request == null) || !request.startsWith("CO")) { return; } if (!player.getFloodProtectors().getServerBypass().tryPerformAction("changeclass")) { return; } try { int val = Integer.parseInt(request.substring(2)); checkAndChangeClass(player, val); } catch (NumberFormatException e) { } player.sendPacket(TutorialCloseHtml.STATIC_PACKET); } public static final void onTutorialQuestionMark(L2PcInstance player, int number) { if (!Config.ALTERNATE_CLASS_MASTER || (number != 1001)) { return; } showTutorialHtml(player); } public static final void showQuestionMark(L2PcInstance player) { if (!Config.ALTERNATE_CLASS_MASTER) { return; } final ClassId classId = player.getClassId(); if (getMinLevel(classId.level()) > player.getLevel()) { return; } if (!Config.CLASS_MASTER_SETTINGS.isAllowed(classId.level() + 1)) { return; } player.sendPacket(new TutorialShowQuestionMark(1001)); } private static final void showHtmlMenu(L2PcInstance player, int objectId, int level) { NpcHtmlMessage html = new NpcHtmlMessage(objectId); if (!Config.ALLOW_CLASS_MASTERS) { html.setFile(player.getHtmlPrefix(), "data/html/classmaster/disabled.htm"); } else if (!Config.CLASS_MASTER_SETTINGS.isAllowed(level)) { int jobLevel = player.getClassId().level(); final StringBuilder sb = new StringBuilder(100); sb.append("<html><body>"); switch (jobLevel) { case 0: if (Config.CLASS_MASTER_SETTINGS.isAllowed(1)) { sb.append("Come back here when you reached level 20 to change your class.<br>"); } else if (Config.CLASS_MASTER_SETTINGS.isAllowed(2)) { sb.append("Come back after your first occupation change.<br>"); } else if (Config.CLASS_MASTER_SETTINGS.isAllowed(3)) { sb.append("Come back after your second occupation change.<br>"); } else { sb.append("I can't change your occupation.<br>"); } break; case 1: if (Config.CLASS_MASTER_SETTINGS.isAllowed(2)) { sb.append("Come back here when you reached level 40 to change your class.<br>"); } else if (Config.CLASS_MASTER_SETTINGS.isAllowed(3)) { sb.append("Come back after your second occupation change.<br>"); } else { sb.append("I can't change your occupation.<br>"); } break; case 2: if (Config.CLASS_MASTER_SETTINGS.isAllowed(3)) { sb.append("Come back here when you reached level 76 to change your class.<br>"); } else { sb.append("I can't change your occupation.<br>"); } break; case 3: sb.append("There is no class change available for you anymore.<br>"); break; } sb.append("</body></html>"); html.setHtml(sb.toString()); } else { final ClassId currentClassId = player.getClassId(); if (currentClassId.level() >= level) { html.setFile(player.getHtmlPrefix(), "data/html/classmaster/nomore.htm"); } else { final int minLevel = getMinLevel(currentClassId.level()); if ((player.getLevel() >= minLevel) || Config.ALLOW_ENTIRE_TREE) { final StringBuilder menu = new StringBuilder(100); for (ClassId cid : ClassId.values()) { if ((cid == ClassId.inspector) && (player.getTotalSubClasses() < 2)) { continue; } if (validateClassId(currentClassId, cid) && (cid.level() == level)) { StringUtil.append(menu, "<a action=\"bypass -h npc_%objectId%_change_class ", String.valueOf(cid.getId()), "\">", ClassListData.getInstance().getClass(cid).getClientCode(), "</a><br>"); } } if (menu.length() > 0) { html.setFile(player.getHtmlPrefix(), "data/html/classmaster/template.htm"); html.replace("%name%", ClassListData.getInstance().getClass(currentClassId).getClientCode()); html.replace("%menu%", menu.toString()); } else { html.setFile(player.getHtmlPrefix(), "data/html/classmaster/comebacklater.htm"); html.replace("%level%", String.valueOf(getMinLevel(level - 1))); } } else { if (minLevel < Integer.MAX_VALUE) { html.setFile(player.getHtmlPrefix(), "data/html/classmaster/comebacklater.htm"); html.replace("%level%", String.valueOf(minLevel)); } else { html.setFile(player.getHtmlPrefix(), "data/html/classmaster/nomore.htm"); } } } } html.replace("%objectId%", String.valueOf(objectId)); html.replace("%req_items%", getRequiredItems(level)); player.sendPacket(html); } private static final void showTutorialHtml(L2PcInstance player) { final ClassId currentClassId = player.getClassId(); if ((getMinLevel(currentClassId.level()) > player.getLevel()) && !Config.ALLOW_ENTIRE_TREE) { return; } String msg = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/classmaster/tutorialtemplate.htm"); msg = msg.replaceAll("%name%", ClassListData.getInstance().getClass(currentClassId).getEscapedClientCode()); final StringBuilder menu = new StringBuilder(100); for (ClassId cid : ClassId.values()) { if ((cid == ClassId.inspector) && (player.getTotalSubClasses() < 2)) { continue; } if (validateClassId(currentClassId, cid)) { StringUtil.append(menu, "<a action=\"link CO", String.valueOf(cid.getId()), "\">", ClassListData.getInstance().getClass(cid).getEscapedClientCode(), "</a><br>"); } } msg = msg.replaceAll("%menu%", menu.toString()); msg = msg.replace("%req_items%", getRequiredItems(currentClassId.level() + 1)); player.sendPacket(new TutorialShowHtml(msg)); } private static final boolean checkAndChangeClass(L2PcInstance player, int val) { final ClassId currentClassId = player.getClassId(); if ((getMinLevel(currentClassId.level()) > player.getLevel()) && !Config.ALLOW_ENTIRE_TREE) { return false; } if (!validateClassId(currentClassId, val)) { return false; } int newJobLevel = currentClassId.level() + 1; // Weight/Inventory check if (!Config.CLASS_MASTER_SETTINGS.getRewardItems(newJobLevel).isEmpty() && !player.isInventoryUnder90(false)) { player.sendPacket(SystemMessageId.INVENTORY_LESS_THAN_80_PERCENT); return false; } // check if player have all required items for class transfer for (int _itemId : Config.CLASS_MASTER_SETTINGS.getRequireItems(newJobLevel).keySet()) { int _count = Config.CLASS_MASTER_SETTINGS.getRequireItems(newJobLevel).get(_itemId); if (player.getInventory().getInventoryItemCount(_itemId, -1) < _count) { player.sendPacket(SystemMessageId.NOT_ENOUGH_ITEMS); return false; } } // get all required items for class transfer for (int _itemId : Config.CLASS_MASTER_SETTINGS.getRequireItems(newJobLevel).keySet()) { int _count = Config.CLASS_MASTER_SETTINGS.getRequireItems(newJobLevel).get(_itemId); if (!player.destroyItemByItemId("ClassMaster", _itemId, _count, player, true)) { return false; } } // reward player with items for (int _itemId : Config.CLASS_MASTER_SETTINGS.getRewardItems(newJobLevel).keySet()) { int _count = Config.CLASS_MASTER_SETTINGS.getRewardItems(newJobLevel).get(_itemId); player.addItem("ClassMaster", _itemId, _count, player, true); } player.setClassId(val); if (player.isSubClassActive()) { player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClass()); } else { player.setBaseClass(player.getActiveClass()); } player.broadcastUserInfo(); if (Config.CLASS_MASTER_SETTINGS.isAllowed(player.getClassId().level() + 1) && Config.ALTERNATE_CLASS_MASTER && (((player.getClassId().level() == 1) && (player.getLevel() >= 40)) || ((player.getClassId().level() == 2) && (player.getLevel() >= 76)))) { showQuestionMark(player); } return true; } /** * @param level - current skillId level (0 - start, 1 - first, etc) * @return minimum player level required for next class transfer */ private static final int getMinLevel(int level) { switch (level) { case 0: return 20; case 1: return 40; case 2: return 76; default: return Integer.MAX_VALUE; } } /** * Returns true if class change is possible * @param oldCID current player ClassId * @param val new class index * @return */ private static final boolean validateClassId(ClassId oldCID, int val) { try { return validateClassId(oldCID, ClassId.getClassId(val)); } catch (Exception e) { // possible ArrayOutOfBoundsException } return false; } /** * Returns true if class change is possible * @param oldCID current player ClassId * @param newCID new ClassId * @return true if class change is possible */ private static final boolean validateClassId(ClassId oldCID, ClassId newCID) { if ((newCID == null) || (newCID.getRace() == null)) { return false; } if (oldCID.equals(newCID.getParent())) { return true; } if (Config.ALLOW_ENTIRE_TREE && newCID.childOf(oldCID)) { return true; } return false; } private static String getRequiredItems(int level) { if ((Config.CLASS_MASTER_SETTINGS.getRequireItems(level) == null) || Config.CLASS_MASTER_SETTINGS.getRequireItems(level).isEmpty()) { return "<tr><td>none</td></tr>"; } StringBuilder sb = new StringBuilder(); for (int _itemId : Config.CLASS_MASTER_SETTINGS.getRequireItems(level).keySet()) { int _count = Config.CLASS_MASTER_SETTINGS.getRequireItems(level).get(_itemId); sb.append("<tr><td><font color=\"LEVEL\">" + _count + "</font></td><td>" + ItemTable.getInstance().getTemplate(_itemId).getName() + "</td></tr>"); } return sb.toString(); } }
  19. then the mine has something wrong because he can instead use
  20. someone has a cod of a Community Board like this image at low (Cronicle H5 L2jserver)
  21. Anyone have any mod that forbid the AIO out of cities? also AIO not pick sub-classes Cronicle H5
  22. Tranks SweeTs My problem now is this part of the code else if(command.startsWith("admin_removeaio")) { StringTokenizer str = new StringTokenizer(command); L2Object target = activeChar.getTarget(); L2PcInstance player = null; if (target != null && target instanceof L2PcInstance) player = (L2PcInstance)target; else player = activeChar; try { str.nextToken(); if (str.hasMoreTokens()) { String playername = str.nextToken(); player = L2World.getInstance().getPlayer(playername); removeAio(activeChar, player, playername); } else { String playername = player.getName(); removeAio(activeChar, player, playername); } } catch(Exception e) { activeChar.sendMessage("Usage: //removeaio <char_name>"); } player.broadcastUserInfo(); if(!player.isAio()) return true; } return false; } //removeaio when I type it does not appear the phrase: Usage: //removeaio <char_name> and removes my skills
  23. AdminAio.java if (Config.ALLOW_AIO_NCOLOR && _player.isAio()) _player.getAppearance().setNameColor(Config.AIO_NCOLOR); if (Config.ALLOW_AIO_TCOLOR && _player.isAio()) _player.getAppearance().setTitleColor(Config.AIO_TCOLOR); L2JMods.properties # Enable / Disable Name Color AllowAioNameColor = True AioNameColor = 88AA88 # Enable / Disable Title Color AllowAioTitleColor = True AioTitleColor = 88AA88 but when the server restart the names and titles are turning white 3 mods are picking the color name, and where I should change the title to them no longer reset the color and title of the AIO public void increasePvpKills(L2Character target) { // Rank PvP System by Masterio if(!RankPvpSystemConfig.LEGAL_COUNTER_ALTT_ENABLED && target instanceof L2PcInstance && AntiFeedManager.getInstance().check(this, target)) { if (!isInTownWarEvent() || Config.TW_GIVE_PVP_AND_PK_POINTS) { // Add karma to attacker and increase its PK counter setPvpKills(getPvpKills() + 1); L2MultiFunctionZone.givereward(this); PvPColorSystem pvpcolor = new PvPColorSystem(); pvpcolor.updateNameColor(this); pvpcolor.updateTitleColor(this); // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); sendPacket(new ExBrExtraUserInfo(this)); } } } public void setAccessLevel(int level) { _accessLevel = AdminTable.getInstance().getAccessLevel(level); getAppearance().setNameColor(_accessLevel.getNameColor()); getAppearance().setTitleColor(_accessLevel.getTitleColor()); broadcastUserInfo(); CharNameTable.getInstance().addName(this); if (!AdminTable.getInstance().hasAccessLevel(level)) { _log.warning("Tryed to set unregistered access level " + level + " for " + toString() + ". Setting access level without privileges!"); } else if (!Config.ENABLE_SAFE_ADMIN_PROTECTION) { _log.warning(_accessLevel.getName() + " access level set for character " + getName() + "! Just a warning to be careful ;)"); } } player.setDeleteTimer(rset.getLong("deletetime")); player.setTitle(rset.getString("title")); player.getAppearance().setTitleColor(rset.getInt("title_color")); player.setAccessLevel(rset.getInt("accesslevel")); player.setFistsWeaponItem(player.findFistsWeaponItem(activeClassId)); player.setUptime(System.currentTimeMillis());
  24. Perfect not removed more skills, so now removed the color of title and name
×
×
  • 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