mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Implemented carved evil turnip
This commit is contained in:
parent
3e6b156bba
commit
556efda5c1
1 changed files with 21 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
||||||
|
import api.*
|
||||||
|
import org.rs09.consts.Items
|
||||||
|
import rs09.game.interaction.InteractionListener
|
||||||
|
import core.tools.RandomFunction
|
||||||
|
|
||||||
|
class CarvedEvilTurnipListener : InteractionListener {
|
||||||
|
val knife = Items.KNIFE_946
|
||||||
|
val evilTurnip = Items.EVIL_TURNIP_12134
|
||||||
|
val carvedEvilTurnip = Items.CARVED_EVIL_TURNIP_12153
|
||||||
|
|
||||||
|
override fun defineListeners() {
|
||||||
|
onUseWith(ITEM, evilTurnip, knife) { player, used, with ->
|
||||||
|
if(removeItem(player, used.asItem())) {
|
||||||
|
sendMessage(player, "You carve a scary face into the evil turnip.")
|
||||||
|
sendMessage(player, "Wooo! It's enough to give you nightmares.")
|
||||||
|
return@onUseWith addItem(player, carvedEvilTurnip)
|
||||||
|
}
|
||||||
|
return@onUseWith false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue