Files
2009scape/Server/src/main/content/global/ame/events/drilldemon/SeargentDamienDialogue.kt
T
Zerken 1ab6773910 Random event improvements
Implemented smoke puff sound when random event npcs disappear
Fixed smoke puff repeating
Admins will no longer get random events
Can no longer talk to a random event NPC if they are leaving
Rewrote Drill Demon event:
The event can no longer be avoided and Sergeant Damien automatically teleports you to the event
The player can no longer escape the event by logging out
Sergeant Damien now walks around the area in a circle as he should authentically
Corrected all of Sergeant Damien's dialogue to be authentic
Implemented the authentic item dialogues that show the player the picture of the sign to exercise at
Implemented all the exercise sounds
Evil Bob's Island:
Rewrote all uses of pulses to scripts
Fixed evil bob not teleporting players when in combat
Fixed the reward dialogue
Freaky Forester:
Rewrote the freaky forester teleport to a script instead of a pulse
Fixed an issue where nearby players could talk to the NPC
Genie Event:
Rewrote most of the event
The genie now leaves after completing the dialogue
Implemented the genie appearing sound
Evil Chicken:
Now uses the correct attack sound
Misc:
Added admin command ::barrage [radius] that new barrage command hits all the players in the radius defines with a custom weak ice barrage. It will play the ice barrage sound, display graphics and hit the player for a random 0-3 damage. A fail safe has been added so the command will hit 0 if the player is low on health so this command will not accidentally kill players
2023-09-03 13:33:26 +00:00

54 lines
3.2 KiB
Kotlin

package content.global.ame.events.drilldemon
import core.api.*
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.tools.END_DIALOGUE
import org.rs09.consts.Items
import org.rs09.consts.NPCs
class SeargentDamienDialogue(var isCorrect: Boolean = false, var eventStart: Boolean = false) : DialogueFile() {
override fun handle(componentID: Int, buttonID: Int) {
npc = NPC(NPCs.SERGEANT_DAMIEN_2790)
val correctCounter = player!!.getAttribute(DrillDemonUtils.DD_CORRECT_COUNTER,0)
when(stage) {
0 -> {
if (correctCounter >= 4) {
npcl(FacialExpression.OLD_NORMAL, "Well I'll be, you actually did it private. Now take this and get yourself out of my sight.")
stage = 100
} else if (eventStart) {
npcl(FacialExpression.OLD_NORMAL, "Move yourself private! Follow my orders and you may, just may, leave here in a fit state for my corps!")
DrillDemonUtils.changeSignsAndAssignTask(player!!)
stage = 0
eventStart = false
} else {
npcl(FacialExpression.OLD_NORMAL, when (getAttribute(player!!, DrillDemonUtils.DD_KEY_TASK, -1)) {
DrillDemonUtils.DD_SIGN_JOG -> if (!isCorrect) "Wrong exercise, worm! Get yourself over there and jog on that mat private!" else "Get yourself over there and jog on that mat private!"
DrillDemonUtils.DD_SIGN_JUMP -> if (!isCorrect) "Wrong exercise, worm! I want to see you on that mat doing star jumps private!" else "I want to see you on that mat doing star jumps private!"
DrillDemonUtils.DD_SIGN_PUSHUP -> if (!isCorrect) "Wrong exercise, worm! Drop and give me push ups on that mat private!" else "Drop and give me push ups on that mat private!"
DrillDemonUtils.DD_SIGN_SITUP -> if (!isCorrect) "Wrong exercise, worm! Get on that mat and give me sit ups private!" else "Get on that mat and give me sit ups private!"
else -> "REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
})
stage = 1
unlock(player!!)
}
}
1 -> {
when (getAttribute(player!!, DrillDemonUtils.DD_KEY_TASK, -1)) {
DrillDemonUtils.DD_SIGN_JOG -> sendItemDialogue(player!!, Items.RUN_10947, "Go to this mat and jog on the spot!")
DrillDemonUtils.DD_SIGN_JUMP -> sendItemDialogue(player!!, Items.STARJUMP_10949, "Go to this mat and do some starjumps!")
DrillDemonUtils.DD_SIGN_PUSHUP -> sendItemDialogue(player!!, Items.PUSHUP_10946, "Go to this mat and do some pushups!")
DrillDemonUtils.DD_SIGN_SITUP -> sendItemDialogue(player!!, Items.SITUP_10948, "Go to this mat and do some sit ups!")
}
stage = END_DIALOGUE
}
100 -> {
end()
DrillDemonUtils.cleanup(player!!)
DrillDemonUtils.reward(player!!)
}
}
}
}