Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: data/html/default/31226.htm
- ===================================================================
- --- data/html/default/31226.htm (revision 545)
- +++ data/html/default/31226.htm (working copy)
- @@ -1,5 +1,7 @@
- <html><body>Arena Director:<br>
- Play the game according to the rules! The loser should be silent! What? Unfair? Then, why don't you hold your tonque and give it another try!<br>
- -<a action="bypass -h npc_%objectId%_CPRecovery">CP Recovery: consumption of 100 adena</a><br>
- +<a action="bypass -h npc_%objectId%_CPRecovery">CP Recovery : 1,000 Adena</a><br>
- +<a action="bypass -h npc_%objectId%_HPRecovery">HP Recovery : 1,000 Adena</a><br><br>
- +<a action="bypass -h npc_%objectId%_ArenaBuffs">Buff for Battle Ground : 1,000 Adena</a><br><br>
- <a action="bypass -h npc_%objectId%_Quest">Quest</a>
- </body></html>
- \ No newline at end of file
- Index: data/html/warehouse/31225.htm
- ===================================================================
- --- data/html/warehouse/31225.htm (revision 545)
- +++ data/html/warehouse/31225.htm (working copy)
- @@ -1,6 +1,9 @@
- <html><body>Arena Manager:<br>
- Way to go! Hooray! Hooray!!!<br>
- -<a action="bypass -h npc_%objectId%_CPRecovery">CP Recovery: consumption of 100 adena</a><br>
- +(Be careful! CP/HP will not get recovered inside the fence.)<br>
- +<a action="bypass -h npc_%objectId%_CPRecovery">CP Recovery : 1,000 Adena</a><br>
- +<a action="bypass -h npc_%objectId%_HPRecovery">HP Recovery : 1,000 Adena</a><br><br>
- +<a action="bypass -h npc_%objectId%_ArenaBuffs">Buff for Battle Ground : 1,000 Adena</a><br><br>
- <a action="bypass -h npc_%objectId%_DepositP">Private Warehouse: Deposit an Item</a><br1>
- <a action="bypass -h npc_%objectId%_WithdrawP">Private Warehouse: Withdraw an Item</a><br>
- <a action="bypass -h npc_%objectId%_Quest">Quest</a>
- Index: data/scripts/handlers/MasterHandler.java
- ===================================================================
- --- data/scripts/handlers/MasterHandler.java (revision 545)
- +++ data/scripts/handlers/MasterHandler.java (working copy)
- @@ -103,7 +103,7 @@
- import handlers.bypasshandlers.Augment;
- import handlers.bypasshandlers.Buy;
- import handlers.bypasshandlers.BuyShadowItem;
- -import handlers.bypasshandlers.CPRecovery;
- +import handlers.bypasshandlers.ArenaManager;
- import handlers.bypasshandlers.ChatLink;
- import handlers.bypasshandlers.ClanWarehouse;
- import handlers.bypasshandlers.DrawHenna;
- @@ -382,7 +382,7 @@
- BypassHandler.getInstance().registerBypassHandler(new BuyShadowItem());
- BypassHandler.getInstance().registerBypassHandler(new ChatLink());
- BypassHandler.getInstance().registerBypassHandler(new ClanWarehouse());
- - BypassHandler.getInstance().registerBypassHandler(new CPRecovery());
- + BypassHandler.getInstance().registerBypassHandler(new ArenaManager());
- BypassHandler.getInstance().registerBypassHandler(new DrawHenna());
- BypassHandler.getInstance().registerBypassHandler(new Festival());
- BypassHandler.getInstance().registerBypassHandler(new FishSkillList());
- Index: data/scripts/handlers/bypasshandlers/CPRecovery.java
- ===================================================================
- --- data/scripts/handlers/bypasshandlers/CPRecovery.java (revision 545)
- +++ data/scripts/handlers/bypasshandlers/CPRecovery.java (working copy)
- @@ -22,13 +22,18 @@
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
- -public class CPRecovery implements IBypassHandler
- +public class ArenaManager implements IBypassHandler
- {
- private static final String[] COMMANDS =
- {
- - "CPRecovery"
- + "CPRecovery",
- + "HPRecovery",
- + "ArenaBuffs",
- };
- + private final int[] _fighterBuffs = {6803, 6809, 6811, 6808, 6804, 6812};
- + private final int[] _mageBuffs = {6806, 6807, 6805, 6804, 6812};
- +
- public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
- {
- if (!(target instanceof L2Npc))
- @@ -46,14 +51,68 @@
- return true;
- }
- - if (!activeChar.reduceAdena("RestoreCP", 100, activeChar.getLastFolkNPC(), true))
- - return false;
- -
- - L2Skill skill = SkillTable.getInstance().getInfo(4380, 1);
- - if (skill != null)
- + if ("CPRecovery".equalsIgnoreCase(command))
- {
- - npc.setTarget(activeChar);
- - npc.doCast(skill);
- + if (!activeChar.reduceAdena("RestoreCP", 1000, activeChar.getLastFolkNPC(), true))
- + return false;
- +
- + // It is verified, the bastard doesnt heal you if you are inside the arena, only takes your money
- + if (activeChar.isInsideZone(L2Character.ZONE_PVP))
- + return false;
- +
- + L2Skill skill = SkillTable.getInstance().getInfo(4380, 1);
- + if (skill != null)
- + {
- + npc.setTarget(activeChar);
- + npc.doCast(skill);
- + }
- + }
- + else if ("HPRecovery".equalsIgnoreCase(command))
- + {
- + if (!activeChar.reduceAdena("RestoreHP", 1000, activeChar.getLastFolkNPC(), true))
- + return false;
- +
- + // It is verified, the bastard doesnt heal you if you are inside the arena, only takes your money
- + if (activeChar.isInsideZone(L2Character.ZONE_PVP))
- + return false;
- +
- + L2Skill skill = SkillTable.getInstance().getInfo(6817, 1);
- + if (skill != null)
- + {
- + npc.setTarget(activeChar);
- + npc.doCast(skill);
- + }
- + }
- + else if ("ArenaBuffs".equalsIgnoreCase(command))
- + {
- + if (!activeChar.reduceAdena("ArenaBuff", 2000, activeChar.getLastFolkNPC(), true))
- + return false;
- +
- + if (activeChar.getClassId().isMage())
- + {
- + for (int skillId : _mageBuffs)
- + {
- + L2Skill skill = SkillTable.getInstance().getInfo(skillId, 1);
- + if (skill != null)
- + {
- + npc.setTarget(activeChar);
- + npc.doCast(skill);
- + }
- +
- + }
- + }
- + else
- + {
- + for (int skillId : _fighterBuffs)
- + {
- + L2Skill skill = SkillTable.getInstance().getInfo(skillId, 1);
- + if (skill != null)
- + {
- + npc.setTarget(activeChar);
- + npc.doCast(skill);
- + }
- + }
- + }
- }
- activeChar.sendPacket(ActionFailed.STATIC_PACKET);
- return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement