mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Add level check and XP reward for builders tea
This commit is contained in:
parent
a7c1c510d8
commit
8fea59e1cc
1 changed files with 7 additions and 4 deletions
|
|
@ -1,9 +1,6 @@
|
|||
package content.global.skill.cooking
|
||||
|
||||
import core.api.addItem
|
||||
import core.api.getDynLevel
|
||||
import core.api.removeItem
|
||||
import core.api.sendDialogue
|
||||
import core.api.*
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.node.Node
|
||||
import core.game.node.entity.player.Player
|
||||
|
|
@ -124,9 +121,15 @@ class TeaInteraction : InteractionListener {
|
|||
}
|
||||
|
||||
onUseWith(ITEM, leafTeaPot, Items.HOT_KETTLE_7691) { player, used, with ->
|
||||
if (getDynLevel(player, Skills.COOKING) < 20){
|
||||
sendDialogue(player,"You need to be level 20 to make tea.")
|
||||
return@onUseWith false
|
||||
}
|
||||
if (removeItem(player, used) && removeItem(player, with)){
|
||||
addItem(player, Items.KETTLE_7688)
|
||||
addItem(player, used.id - 8)
|
||||
rewardXP(player, Skills.COOKING, 53.0)
|
||||
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue