Lock legends cape behind 40 QP

This commit is contained in:
ceikry
2021-06-29 17:39:21 -05:00
parent 932d64b84f
commit dc4367fd53
8 changed files with 66 additions and 13 deletions
@@ -10,6 +10,7 @@ import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.plugin.Plugin
import core.game.node.entity.skill.crafting.TanningProduct
import org.rs09.consts.NPCs
import rs09.game.interaction.InteractionListener
/**
@@ -31,6 +32,16 @@ class NPCTradePlugin : InteractionListener() {
}
return@on npc.openShop(player)
}
on(NPCs.SIEGFRIED_ERKLE_933, NPC, "trade"){player, node ->
val points = ContentAPI.getQP(player)
if(points < 40){
ContentAPI.sendNPCDialogue(player, NPCs.SIEGFRIED_ERKLE_933, "I'm sorry, adventurer, but you need 40 quest points to buy from me.")
return@on true
}
node.asNpc().openShop(player)
return@on true
}
}
override fun defineDestinationOverrides() {