mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-26 12:55:11 -06:00
look in egg hopper
This commit is contained in:
parent
5c93a3fa0e
commit
e0e8f63dd4
2 changed files with 11 additions and 6 deletions
|
|
@ -108,13 +108,13 @@ class BarbassaultGameArea : InteractionListener, MapArea {
|
|||
}
|
||||
on(Scenery.EGG_HOPPER_20264, IntType.SCENERY, "Load","Look-in") { player, node ->
|
||||
val loc = player.location
|
||||
player.faceLocation(location(loc.x,loc.y+1,0))
|
||||
//sendMessage(player,"You need to be a Collector to load eggs.")
|
||||
val optionClicked = player.getAttribute<String>("interact:option")?.lowercase() ?: return@on false
|
||||
when(optionClicked){
|
||||
"Load" -> loadEggHopper(player)
|
||||
"Look-in" -> showEggHopperCount(player)
|
||||
"load" -> loadEggHopper(player)
|
||||
"look-in" -> showEggHopperCount(player)
|
||||
}
|
||||
|
||||
player.faceLocation(location(loc.x,loc.y+1,0))
|
||||
return@on true
|
||||
}
|
||||
//wrapperID for hopper
|
||||
|
|
@ -159,8 +159,10 @@ class BarbassaultGameArea : InteractionListener, MapArea {
|
|||
}
|
||||
return@on true
|
||||
}
|
||||
//you healed $heal.count hitpoints.
|
||||
//You've been healed $amount hitpoints and your poison cured.
|
||||
on(Scenery.HEALER_SPRING_20150, IntType.SCENERY, "Drink-from") { player, _ ->
|
||||
//you need to be a healer to drink from spring
|
||||
if (getItemFromEquipment(player, EquipmentSlot.CAPE)?.id == 10559) {
|
||||
player.animate(Animation(5407))
|
||||
player.lock(5)
|
||||
|
|
|
|||
|
|
@ -204,12 +204,15 @@ class EggCannon : ComponentPlugin() {
|
|||
val eggsAdded = session?.eggHopper?.addEggs(greenToAdd = 0, redToAdd = 0, blueToAdd = 0, yellowToAdd = 0)
|
||||
//remove eggs based on eggsAdded from inventory
|
||||
//Load hopper emote, Same as place table??
|
||||
sendMessage(player,"Loading hopper")
|
||||
}
|
||||
fun showEggHopperCount(player: Player?){
|
||||
player ?: return
|
||||
val eggsCount = player.baSession?.eggHopper
|
||||
sendDialogueLines(player,"$eggsCount")
|
||||
sendMessage(player,"$eggsCount")
|
||||
val poison = eggsCount?.green
|
||||
val explosive = eggsCount?.red
|
||||
val stun = eggsCount?.blue
|
||||
sendDialogueLines(player,"The hopper contains:","$poison poison eggs, $explosive explosive eggs","and $stun stun eggs.")
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue