mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-24 20:05:13 -06:00
CW spell restrictions
This commit is contained in:
parent
1f505efa26
commit
4650568aa9
2 changed files with 12 additions and 0 deletions
|
|
@ -74,6 +74,10 @@ class LunarListeners : SpellListener("lunar"), Commands {
|
|||
// Level 68
|
||||
onCast(Lunar.CURE_OTHER, PLAYER) { player, node ->
|
||||
requires(player, 68, arrayOf(Item(Items.ASTRAL_RUNE_9075, 1), Item(Items.LAW_RUNE_563), Item(Items.EARTH_RUNE_557, 10)))
|
||||
if (player.zoneMonitor.isInZone("CastleWarsGame")) {
|
||||
player.sendMessage("You can't use Cure Other in Castle Wars!")
|
||||
return@onCast
|
||||
}
|
||||
node?.let { cureOther(player, node) }
|
||||
}
|
||||
|
||||
|
|
@ -134,6 +138,10 @@ class LunarListeners : SpellListener("lunar"), Commands {
|
|||
// Level 74
|
||||
onCast(Lunar.CURE_GROUP, NONE) { player, _ ->
|
||||
requires(player, 74, arrayOf(Item(Items.ASTRAL_RUNE_9075, 2), Item(Items.LAW_RUNE_563, 2), Item(Items.COSMIC_RUNE_564, 2)))
|
||||
if (player.zoneMonitor.isInZone("CastleWarsGame")) {
|
||||
player.sendMessage("You can't use Cure Group in Castle Wars!")
|
||||
return@onCast
|
||||
}
|
||||
cureGroup(player)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -234,6 +234,10 @@ class ModernListeners : SpellListener("modern"){
|
|||
player.sendMessage("You can only alch items from the cupboards!")
|
||||
return false
|
||||
}
|
||||
if (player.zoneMonitor.isInZone("CastleWarsGame")) {
|
||||
player.sendMessage("You can't use alchemy spells in Castle Wars!")
|
||||
return false
|
||||
}
|
||||
|
||||
val coins = Item(995, item.definition.getAlchemyValue(high))
|
||||
if (item.amount > 1 && coins.amount > 0 && !player.inventory.hasSpaceFor(coins)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue