Addressed some exploitable hunter and herblore issues

Temporarily disabled puro puro, grenwalls pending fixes
This commit is contained in:
Ceikry
2023-03-29 23:19:38 +00:00
committed by Ryan
parent 9f85619334
commit 91ec97220b
5 changed files with 126 additions and 16 deletions
@@ -8,7 +8,7 @@ import core.game.node.item.Item;
* Handles the box trap node.
* @author Vexia
*/
public final class BoxTrapNode extends TrapNode {
public class BoxTrapNode extends TrapNode {
/**
* The summoning level required.
@@ -42,7 +42,14 @@ public enum Traps {
new BoxTrapNode(new int[] { 5080 }, 63, 265, new Item[] { new Item(10034, 1) }, 1),
new BoxTrapNode(new int[] { 7012, 7014 }, 66, 400, new Item[] { new Item(12535) }, 1),
new BoxTrapNode(new int[] { 8654 }, 73, 315, new Item[] { new Item(14861) }, 1),
new BoxTrapNode(new int[] { 7010, 7011 }, 77, 726, new Item[] { new Item(12539, 1) }, 1)),
new BoxTrapNode(new int[] { 7010, 7011 }, 77, 0, new Item[] { new Item(12539, 1) }, 1) {
@Override
public boolean canCatch(TrapWrapper wrapper, final NPC npc) {
//old xp: 726
wrapper.getPlayer().sendMessage("Note: Giving 0 xp for grenwalls until this area and its requirements are implemented.");
return super.canCatch(wrapper, npc);
}
}),
RABBIT_SNARE(new TrapSetting(10031, new int[] { 19333 }, new int[] {}, "lay", -1, Animation.create(5208), Animation.create(9726), 27)),
IMP_BOX(new MagicBoxSetting(),
new TrapNode(new int[] { 708, 709, 1531 }, 71, 450, new int[] { -1, 19226 }, new Item[] { new Item(10027) })),
@@ -73,18 +73,16 @@ public final class BNetPulse extends SkillPulse<NPC> {
player.sendMessage("You need a Hunter level of at least " + type.getLevel() + " in order to do that.");
return false;
}
if (!type.isBareHand(player)) {
if (type.hasWeapon(player)) {
player.getPacketDispatch().sendMessage("Your hands need to be free.");
return false;
} else if (!type.hasNet(player)) {
player.sendMessage("You need to be wielding a butterfly net to catch " + (type instanceof ImplingNode ? "implings" : "butterflies") + ".");
return false;
} else if (!type.hasJar(player)) {
player.getPacketDispatch().sendMessage("You need to have a" + (StringUtils.isPlusN(type.getJar().getName()) ? "n" : "") + " " + type.getJar().getName().toLowerCase() + ".");
return false;
}
}
if (type.hasWeapon(player)) {
player.getPacketDispatch().sendMessage("Your hands need to be free.");
return false;
} else if (!type.hasNet(player)) {
player.sendMessage("You need to be wielding a butterfly net to catch " + (type instanceof ImplingNode ? "implings" : "butterflies") + ".");
return false;
} else if (!type.hasJar(player)) {
player.getPacketDispatch().sendMessage("You need to have a" + (StringUtils.isPlusN(type.getJar().getName()) ? "n" : "") + " " + type.getJar().getName().toLowerCase() + ".");
return false;
}
if (node.isInvisible() || DeathTask.isDead(node)) {
return false;
}
@@ -263,7 +263,8 @@ public final class PuroPuroPlugin extends MapZone implements Plugin<Object> {
player.getDialogueInterpreter().sendDialogue("Something prevents you from entering. You think the portal is offended by", "your imp boxes. They are not popular on imp and impling planes.");
break;
}
player.getTeleporter().send(Location.create(2591, 4320, 0), TeleportType.PURO_PURO);
player.sendMessage("Puro Puro is disabled until its rewrite/bugfix update is complete.");
//player.getTeleporter().send(Location.create(2591, 4320, 0), TeleportType.PURO_PURO);
return true;
case 11273:
if (!player.getZoneMonitor().isInZone("puro puro")) {