Can no longer wear standard, (g), (t), or god rune platebodies or dragonhide bodies without having done dragon slayer
This commit is contained in:
-21
@@ -99,14 +99,6 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
||||
SceneryDefinition.forId(25161).getHandlers().put("option:climb-over", this);
|
||||
NPCDefinition.forId(742).getHandlers().put("option:attack", this);
|
||||
NPCDefinition.forId(745).getHandlers().put("option:attack", this);
|
||||
// reward items
|
||||
ItemDefinition.forId(1127).getHandlers().put("option:wear", this);
|
||||
ItemDefinition.forId(1135).getHandlers().put("option:wear", this);
|
||||
ItemDefinition.forId(2653).getHandlers().put("option:wear", this);
|
||||
ItemDefinition.forId(2669).getHandlers().put("option:wear", this);
|
||||
ItemDefinition.forId(2661).getHandlers().put("option:wear", this);
|
||||
ItemDefinition.forId(2615).getHandlers().put("option:wear", this);
|
||||
ItemDefinition.forId(2623).getHandlers().put("option:wear", this);
|
||||
// guild
|
||||
SceneryDefinition.forId(24357).getHandlers().put("option:climb-up", this);
|
||||
SceneryDefinition.forId(10558).getHandlers().put("option:open", this);
|
||||
@@ -140,19 +132,6 @@ public final class DragonSlayerPlugin extends OptionHandler {
|
||||
ClimbActionHandler.climbLadder(player, (Scenery) node, "climb-up");
|
||||
}
|
||||
break;
|
||||
case 1127:
|
||||
case 1135:
|
||||
case 2653:
|
||||
case 2661:
|
||||
case 2669:
|
||||
case 2615:
|
||||
case 2623:
|
||||
if (player.getQuestRepository().getQuest("Dragon Slayer").getStage(player) != 100) {
|
||||
player.getPacketDispatch().sendMessage("You need to complete the Dragon Slayer Quest in order to wear this.");
|
||||
return true;
|
||||
}
|
||||
InteractionListeners.run(node.getId(),0,"equip",player,node);
|
||||
break;
|
||||
case 742:
|
||||
if (player.getQuestRepository().getQuest("Dragon Slayer").getStage(player) == 40 && (player.getInventory().containsItem(DragonSlayer.ELVARG_HEAD))) {
|
||||
player.getPacketDispatch().sendMessage("You have already slain the dragon. Now you just need to return to Oziach for");
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package rs09.game.content.quest.free.dragonslayer
|
||||
|
||||
import api.ContentAPI
|
||||
import org.rs09.consts.Items
|
||||
import rs09.game.interaction.InteractionListener
|
||||
|
||||
class DSEquipListeners : InteractionListener() {
|
||||
|
||||
private val restrictedItems = intArrayOf(
|
||||
Items.RUNE_PLATEBODY_1127,
|
||||
Items.RUNE_PLATEBODY_G_10798,
|
||||
Items.RUNE_PLATEBODY_G_2615,
|
||||
Items.RUNE_PLATEBODY_G_13800,
|
||||
Items.RUNE_PLATEBODY_T_10800,
|
||||
Items.RUNE_PLATEBODY_T_13805,
|
||||
Items.RUNE_PLATEBODY_T_2623,
|
||||
Items.ZAMORAK_PLATEBODY_2653,
|
||||
Items.SARADOMIN_PLATEBODY_2661,
|
||||
Items.GUTHIX_PLATEBODY_2669,
|
||||
Items.GREEN_DHIDE_BODY_1135,
|
||||
Items.BLUE_DHIDE_BODY_2499,
|
||||
Items.RED_DHIDE_BODY_2501,
|
||||
Items.BLACK_DHIDE_BODY_2503,
|
||||
Items.DHIDE_BODYG_7370,
|
||||
Items.DHIDE_BODY_G_7374,
|
||||
Items.DHIDE_BODY_T_7372,
|
||||
Items.DHIDE_BODY_T_7376
|
||||
)
|
||||
|
||||
override fun defineListeners() {
|
||||
for(id in restrictedItems){
|
||||
onEquip(id){ player, _ ->
|
||||
if(!player.questRepository.isComplete("Dragon Slayer")){
|
||||
ContentAPI.sendMessage(player, "You must have completed Dragon Slayer to equip this.")
|
||||
return@onEquip false
|
||||
}
|
||||
return@onEquip true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user