Corrected Sumona's red dragon assignment

Removed inauthentic aviansie assignments
Fixed GWD beacon not being repairable
Surprise exam is no longer optional
Fixed level checks for All Fired Up beacon repair
This commit is contained in:
Player Name
2025-06-18 13:28:21 +00:00
committed by Ryan
parent 5a1c7cb141
commit eebbebe772
7 changed files with 151 additions and 188 deletions
@@ -1,6 +1,6 @@
package content.global.ame package content.global.ame
import content.global.ame.events.MysteriousOldManNPC import content.global.ame.events.surpriseexam.MysteriousOldManNPC
import core.api.playGlobalAudio import core.api.playGlobalAudio
import core.api.poofClear import core.api.poofClear
import core.api.sendMessage import core.api.sendMessage
@@ -1,7 +1,7 @@
package content.global.ame package content.global.ame
import org.rs09.consts.Items import org.rs09.consts.Items
import content.global.ame.events.MysteriousOldManNPC import content.global.ame.events.surpriseexam.MysteriousOldManNPC
import content.global.ame.events.certer.CerterNPC import content.global.ame.events.certer.CerterNPC
import content.global.ame.events.drilldemon.SergeantDamienNPC import content.global.ame.events.drilldemon.SergeantDamienNPC
import content.global.ame.events.drunkendwarf.DrunkenDwarfNPC import content.global.ame.events.drunkendwarf.DrunkenDwarfNPC
@@ -1,41 +0,0 @@
package content.global.ame.events
import core.game.node.entity.player.Player
import content.global.ame.events.surpriseexam.SurpriseExamUtils
import core.game.dialogue.DialogueFile
import core.game.system.timer.impl.AntiMacro
class MysteriousOldManDialogue(val type: String) : DialogueFile() {
val CHOICE_STAGE = 50000
override fun handle(componentID: Int, buttonID: Int) {
if(type == "sexam" && stage < CHOICE_STAGE){
npc("Would you like to come do a surprise exam?")
stage = CHOICE_STAGE
}
else if(stage >= CHOICE_STAGE){
when(stage) {
CHOICE_STAGE -> options("Yeah, sure!", "No, thanks.").also { stage++ }
CHOICE_STAGE.substage(1) -> when(buttonID){
1 -> {
end()
teleport(player!!,type)
AntiMacro.terminateEventNpc(player!!)
}
2 -> {
end()
AntiMacro.terminateEventNpc(player!!)
}
}
}
}
}
fun teleport(player: Player,type: String){
when(type){
"sexam" -> SurpriseExamUtils.teleport(player)
}
}
}
@@ -1,31 +1,40 @@
package content.global.ame.events package content.global.ame.events.surpriseexam
import content.global.ame.RandomEventNPC import content.global.ame.RandomEventNPC
import core.game.node.entity.npc.NPC import content.global.ame.kidnapPlayer
import core.tools.RandomFunction import core.api.*
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
import core.api.utils.WeightBasedTable import core.api.utils.WeightBasedTable
import core.game.interaction.QueueStrength
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.link.TeleportManager
import core.game.world.map.Location
import core.game.world.update.flag.context.Graphics
import org.rs09.consts.Sounds
class MysteriousOldManNPC(var type: String = "", override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.MYSTERIOUS_OLD_MAN_410) { class MysteriousOldManNPC(var type: String = "", override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.MYSTERIOUS_OLD_MAN_410) {
override fun init() { override fun init() {
super.init() super.init()
sayLine() sendChat("Surprise exam, ${player.username}!")
queueScript(player, 4, QueueStrength.SOFT) { stage: Int ->
when (stage) {
0 -> {
lock(player, 6)
sendGraphics(Graphics(1576, 0, 0), player.location)
animate(player,8939)
playAudio(player, Sounds.TELEPORT_ALL_200)
return@queueScript delayScript(player, 3)
} }
1 -> {
override fun tick() { kidnapPlayer(player, Location(1886, 5025, 0), TeleportManager.TeleportType.INSTANT)
super.tick() return@queueScript stopExecuting(player)
if(RandomFunction.random(1,10) == 5) sayLine() }
else -> return@queueScript stopExecuting(player)
} }
fun sayLine() {
when(type){
"sexam" -> sendChat("Surprise exam, ${player.username.capitalize()}!")
} }
} }
override fun talkTo(npc: NPC) { override fun talkTo(npc: NPC) {
when(type){ sendMessage(player, "He isn't interested in talking to you.")
"sexam" -> player.dialogueInterpreter.open(MysteriousOldManDialogue("sexam"),this.asNpc())
}
} }
} }
@@ -26,10 +26,6 @@ object SurpriseExamUtils {
intArrayOf(Items.FLY_FISHING_ROD_309,Items.BARBARIAN_ROD_11323,Items.SMALL_FISHING_NET_303,Items.HARPOON_311) intArrayOf(Items.FLY_FISHING_ROD_309,Items.BARBARIAN_ROD_11323,Items.SMALL_FISHING_NET_303,Items.HARPOON_311)
) )
fun teleport(player: Player) {
kidnapPlayer(player, Location.create(1886, 5025, 0), TeleportManager.TeleportType.INSTANT)
}
fun cleanup(player: Player){ fun cleanup(player: Player){
returnPlayer(player) returnPlayer(player)
removeAttributes(player, SE_KEY_INDEX, SE_KEY_CORRECT) removeAttributes(player, SE_KEY_INDEX, SE_KEY_CORRECT)
@@ -119,7 +119,7 @@ public enum Master {
new Task(Tasks.TROLLS, 7), new Task(Tasks.TROLLS, 7),
new Task(Tasks.TUROTHS, 8), new Task(Tasks.TUROTHS, 8),
new Task(Tasks.VAMPIRES, 7), new Task(Tasks.VAMPIRES, 7),
// new Task(Tasks.WALL_BEASTS,6), // new Task(Tasks.WALL_BEASTS, 6, , new Integer[]{10, 20}),
new Task(Tasks.WEREWOLVES, 7)), new Task(Tasks.WEREWOLVES, 7)),
CHAELDAR(1598, 70, 0, new int[]{110, 170}, new int[]{10, 50, 150}, CHAELDAR(1598, 70, 0, new int[]{110, 170}, new int[]{10, 50, 150},
@@ -174,7 +174,6 @@ public enum Master {
SUMONA(7780, 85, 35, new int[]{120, 185}, new int[]{12, 60, 180}, SUMONA(7780, 85, 35, new int[]{120, 185}, new int[]{12, 60, 180},
new Task(Tasks.ABERRANT_SPECTRES, 15), new Task(Tasks.ABERRANT_SPECTRES, 15),
new Task(Tasks.ABYSSAL_DEMONS, 10), new Task(Tasks.ABYSSAL_DEMONS, 10),
new Task(Tasks.AVIANSIES, 10),
new Task(Tasks.BANSHEE, 15), new Task(Tasks.BANSHEE, 15),
new Task(Tasks.BASILISKS, 15), new Task(Tasks.BASILISKS, 15),
new Task(Tasks.BLACK_DEMONS, 10), new Task(Tasks.BLACK_DEMONS, 10),
@@ -193,7 +192,7 @@ public enum Master {
new Task(Tasks.KALPHITES, 10), new Task(Tasks.KALPHITES, 10),
new Task(Tasks.KURASKS, 15), new Task(Tasks.KURASKS, 15),
new Task(Tasks.NECHRYAELS, 10), new Task(Tasks.NECHRYAELS, 10),
new Task(Tasks.RED_DRAGONS, 5), new Task(Tasks.RED_DRAGONS, 5, new Integer[]{30, 60}),
// new Task(Tasks.SCABARITES, 9, new Integer[]{30, 60}), // new Task(Tasks.SCABARITES, 9, new Integer[]{30, 60}),
new Task(Tasks.SPIRTUAL_MAGES, 10), new Task(Tasks.SPIRTUAL_MAGES, 10),
new Task(Tasks.SPIRTUAL_WARRIORS, 10), new Task(Tasks.SPIRTUAL_WARRIORS, 10),
@@ -205,7 +204,6 @@ public enum Master {
DURADEL(8275, 100, 50, new int[]{130, 200}, new int[]{15, 75, 225}, DURADEL(8275, 100, 50, new int[]{130, 200}, new int[]{15, 75, 225},
new Task(Tasks.ABERRANT_SPECTRES, 7), new Task(Tasks.ABERRANT_SPECTRES, 7),
new Task(Tasks.ABYSSAL_DEMONS, 12), new Task(Tasks.ABYSSAL_DEMONS, 12),
new Task(Tasks.AVIANSIES, 10),
new Task(Tasks.BLACK_DEMONS, 8), new Task(Tasks.BLACK_DEMONS, 8),
new Task(Tasks.BLACK_DRAGONS, 9, new Integer[]{40, 80}), new Task(Tasks.BLACK_DRAGONS, 9, new Integer[]{40, 80}),
new Task(Tasks.BLOODVELDS, 8), new Task(Tasks.BLOODVELDS, 8),
@@ -214,7 +212,7 @@ public enum Master {
new Task(Tasks.DUST_DEVILS, 5), new Task(Tasks.DUST_DEVILS, 5),
new Task(Tasks.FIRE_GIANTS, 7), new Task(Tasks.FIRE_GIANTS, 7),
new Task(Tasks.GARGOYLES, 8), new Task(Tasks.GARGOYLES, 8),
new Task(Tasks.GORAKS,9), new Task(Tasks.GORAKS, 9, new Integer[]{40, 80}),
new Task(Tasks.GREATER_DEMONS, 9), new Task(Tasks.GREATER_DEMONS, 9),
new Task(Tasks.HELLHOUNDS, 10), new Task(Tasks.HELLHOUNDS, 10),
new Task(Tasks.IRON_DRAGONS, 5, new Integer[]{40, 80}), new Task(Tasks.IRON_DRAGONS, 5, new Integer[]{40, 80}),
@@ -49,7 +49,7 @@ class AFURepairClimbHandler : InteractionListener {
ent.destinationUp?.withinDistance(player.location,2) == true){ ent.destinationUp?.withinDistance(player.location,2) == true){
return ent return ent
} }
return null return RepairClimbObject.GWD //the only one that does not have down/up destinations
} }
private fun repair(player: Player,rco: RepairClimbObject){ private fun repair(player: Player,rco: RepairClimbObject){
@@ -95,6 +95,7 @@ class AFURepairClimbHandler : InteractionListener {
val level = rco.levelRequirement?.second ?: 0 val level = rco.levelRequirement?.second ?: 0
if(player.skills.getLevel(skill) < level){ if(player.skills.getLevel(skill) < level){
player.dialogueInterpreter.sendDialogue("You need level $level ${Skills.SKILL_NAME[skill]} for this.") player.dialogueInterpreter.sendDialogue("You need level $level ${Skills.SKILL_NAME[skill]} for this.")
return
} }
var requiresNeedle = false var requiresNeedle = false