forked from 2009Scape/Server
Plank Make now automatically recasts on matching logs
This commit is contained in:
parent
86913bf75f
commit
9295c91a7d
1 changed files with 19 additions and 2 deletions
|
|
@ -677,12 +677,28 @@ Max-hit:${npc.getSwingHandler(false).calculateHit(npc, player, 1.0)}""", Compone
|
|||
sendMessage(player, "You need to use this spell on logs.")
|
||||
return
|
||||
}
|
||||
/*
|
||||
player.pulseManager.run(object : Pulse() {
|
||||
var counter = 0
|
||||
override fun pulse(): Boolean {
|
||||
removeAttribute(player, "spell:runes")
|
||||
if (amountInInventory(player, item.id) == 0 )
|
||||
return true
|
||||
requires(player, 86, arrayOf(Item(Items.ASTRAL_RUNE_9075, 2), Item(Items.NATURE_RUNE_561, 1), Item(Items.EARTH_RUNE_557, 15)))
|
||||
if(removeItem(player, item.id) && addItem(player, plankType.plank.id)) {
|
||||
removeRunes(player, false)
|
||||
if (counter % 6 == 0)
|
||||
visualizeSpell(player, Animations.LUNAR_SPELLBOOK_PLANK_MAKE_6298, Graphics.LUNAR_SPELLBOOK_PLANK_MAKE_1063, 120, Sounds.LUNAR_MAKE_PLANK_3617)
|
||||
addXP(player, 90.0)
|
||||
}
|
||||
counter++
|
||||
return false
|
||||
}
|
||||
})
|
||||
/* Vanilla Spell
|
||||
if (amountInInventory(player, Items.COINS_995) < plankType.price || !removeItem(player, Item(Items.COINS_995, plankType.price))) {
|
||||
sendMessage(player, "You need ${plankType.price} coins to convert that log into a plank.")
|
||||
return
|
||||
}
|
||||
*/
|
||||
lock(player, 3)
|
||||
setDelay(player, false)
|
||||
visualizeSpell(player, Animations.LUNAR_SPELLBOOK_PLANK_MAKE_6298, Graphics.LUNAR_SPELLBOOK_PLANK_MAKE_1063, 120, Sounds.LUNAR_MAKE_PLANK_3617)
|
||||
|
|
@ -690,6 +706,7 @@ Max-hit:${npc.getSwingHandler(false).calculateHit(npc, player, 1.0)}""", Compone
|
|||
replaceSlot(player, item.slot, plankType.plank)
|
||||
addXP(player, 90.0)
|
||||
showMagicTab(player)
|
||||
*/
|
||||
}
|
||||
|
||||
// Level 91
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue