mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
84ab1ee595
2 changed files with 31 additions and 12 deletions
|
|
@ -1,22 +1,15 @@
|
|||
package rs09.game.content.activity.communityevents
|
||||
|
||||
import core.game.content.global.action.DigAction
|
||||
import core.game.content.global.action.DigSpadeHandler
|
||||
import core.game.content.ttrail.MapClueScroll
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.item.Item
|
||||
import core.game.world.map.*
|
||||
import core.game.world.map.zone.MapZone
|
||||
import core.game.world.map.zone.ZoneBorders
|
||||
import core.game.world.map.zone.ZoneBuilder
|
||||
import core.plugin.Initializable
|
||||
import core.plugin.Plugin
|
||||
import core.game.world.map.Location
|
||||
import org.rs09.consts.Items
|
||||
import rs09.game.interaction.InteractionListener
|
||||
import rs09.game.system.config.GroundSpawnLoader
|
||||
|
||||
class SuperEggEaster2020 : InteractionListener() {
|
||||
override fun defineListeners() {
|
||||
val egg = GroundSpawnLoader.GroundSpawn(-1,Item(14652,1),Location.create(2926, 3480, 0)).init()
|
||||
|
||||
onDig(Location.create(2188, 3281, 0)){player ->
|
||||
val hasKey = player.getAttribute("easter2020:key",false)
|
||||
if(!hasKey){
|
||||
|
|
@ -27,6 +20,32 @@ class SuperEggEaster2020 : InteractionListener() {
|
|||
player.sendMessage("You dig and find nothing.")
|
||||
}
|
||||
}
|
||||
|
||||
on(14652, ITEM,"unlock"){player, node ->
|
||||
val item = node.asItem()
|
||||
|
||||
if(player.inventory.contains(Items.KEY_11039,1)){
|
||||
player.dialogueInterpreter.sendDialogue("As you approach the egg you feel a great sense of unease.","You feel as though some ancient force lurks within the egg.","The key in your pocket begins to pull towards the egg...")
|
||||
player.dialogueInterpreter.addAction { pl, _ ->
|
||||
if(!pl.getAttribute("2020superegg",false)){
|
||||
pl.dialogueInterpreter.sendDialogue("However...","The egg does not recognize your essence.","You have been rejected.")
|
||||
} else {
|
||||
pl.dialogueInterpreter.sendDialogue("The egg recognizes your essence.","Visions of ancient Easterian knowledge fill your mind.","An ancient Easterian relic lurks within the egg.")
|
||||
pl.dialogueInterpreter.addAction { p, _ ->
|
||||
player.inventory.remove(Item(Items.KEY_11039))
|
||||
player.dialogueInterpreter.sendItemMessage(14651,"You pull from within the egg an ancient weapon.")
|
||||
player.inventory.add(Item(14651))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
player.dialogueInterpreter.sendDialogue("You approach the egg but you sense that it rejects you.")
|
||||
}
|
||||
|
||||
return@on true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import rs09.game.node.entity.state.newsys.states.FarmingState
|
|||
import rs09.game.system.SystemLogger
|
||||
import rs09.game.system.command.Command
|
||||
import rs09.game.system.command.CommandMapping
|
||||
import rs09.game.world.GameWorld
|
||||
import rs09.game.world.repository.Repository
|
||||
import rs09.tools.stringtools.colorize
|
||||
import java.awt.Toolkit
|
||||
|
|
@ -505,5 +504,6 @@ class MiscCommandSet : CommandSet(Command.Privilege.ADMIN){
|
|||
|
||||
notify(player,"You buried a ${def.name} at ${player.location}")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue