mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-11 09:00:23 -07:00
Enabled Lunar Isle and Miscellania coal mine star locations
Fixed requirements checking for some star locations
This commit is contained in:
parent
ca3bc9cd70
commit
80a5c3a85e
2 changed files with 52 additions and 55 deletions
|
|
@ -26,12 +26,12 @@ class ShootingStar(var level: ShootingStarType = ShootingStarType.values().rando
|
|||
"Brimhaven mining site" to Location.create(2743, 3143, 0), // Brimhaven mining site
|
||||
"South Crandor mining site" to Location.create(2822, 3239, 0), // South Crandor mining site (requires Dragon Slayer)
|
||||
"Karamja mining site" to Location.create(2854, 3032, 0), // Karamja mining site
|
||||
"Shilo Village mining site" to Location.create(2826, 2997, 0), // Shilo Village mining site/Gem rocks
|
||||
"Shilo Village mining site" to Location.create(2826, 2997, 0), // Shilo Village mining site/Gem rocks (requires Shilo Village prereqs)
|
||||
"Relleka mining site" to Location.create(2682, 3700, 0), // Rellekka mining site
|
||||
"Jatizso mine" to Location.create(2393, 3815, 0), //Jatiszo mining site (requires Fremennik Trials)
|
||||
//"Lunar Isle mine" to Location.create(2140, 3939, 0), // Lunar Isle mine (requires Lunar Diplomacy?)
|
||||
//"Miscellania coal mine" to Location.create(2529, 3887, 0), // Miscellania coal mine (requires Fremennik Trials)
|
||||
//"Neitiznot runite mine" to Location.create(2376, 3835, 0), // Near the Neitiznot runite mine (requires Fremennik Trials) currently inaccessible as bridge does not work
|
||||
"Jatizso mine" to Location.create(2393, 3815, 0), //Jatiszo mining site (requires Fremennik Isles prereqs)
|
||||
"Lunar Isle mine" to Location.create(2140, 3939, 0), // Lunar Isle mine (requires Lunar Diplomacy prereqs)
|
||||
"Miscellania coal mine" to Location.create(2529, 3887, 0), // Miscellania coal mine (requires Fremennik Trials)
|
||||
//"Neitiznot runite mine" to Location.create(2376, 3835, 0), // Near the Neitiznot runite mine (requires Fremennik Isles prereqs) currently inaccessible as bridge does not work
|
||||
"Ardougne mining site" to Location.create(2600, 3232, 0), // Ardougne mining site (Monastery)
|
||||
"Ardougne eastern mine" to Location.create(2706, 3334, 0), // Ardougne mining site (Legends Guild)
|
||||
"Kandarin Coal trucks" to Location.create(2589, 3485, 0), // Kandarin Coal trucks
|
||||
|
|
@ -48,11 +48,11 @@ class ShootingStar(var level: ShootingStarType = ShootingStarType.values().rando
|
|||
"South-west Varrock mine" to Location.create(3176, 3362, 0), // South-west Varrock mine / Champion's Guild mine
|
||||
"Varrock east bank" to Location.create(3259, 3407, 0), // Varrock east bank / Rune shop
|
||||
"Lumbridge Swamp south-east mine" to Location.create(3227, 3150, 0), // Lumbridge Swamp south-east mine
|
||||
//"Burgh de Rott bank" to Location.create(3500, 3219, 0), // Burgh de Rott bank (requires Quest to enter)
|
||||
//"Burgh de Rott bank" to Location.create(3500, 3219, 0), // Burgh de Rott bank (requires quest to enter)
|
||||
"Canifis Bank" to Location.create(3504, 3487, 0), // Canifis bank
|
||||
"Mos Le'Harmless bank" to Location.create(3687, 2969, 0), // Mos Le'Harmless bank (requires Quest to enter but is currently accessible for Slayer)
|
||||
"Mos Le'Harmless bank" to Location.create(3687, 2969, 0), // Mos Le'Harmless bank (requires quest to enter but is currently accessible for Slayer)
|
||||
"Gnome stronghold Bank" to Location.create(2460, 3432, 0), // Gnome stronghold bank
|
||||
"Lletya bank" to Location.create(2329, 3163, 0), // Lletya bank (requires Roving Elves?)
|
||||
"Lletya bank" to Location.create(2329, 3163, 0), // Lletya bank (requires MEP1 prereqs)
|
||||
"Piscatoris mining site" to Location.create(2336, 3636, 0), // Piscatoris mining site
|
||||
"North Edgeville mining site" to Location.create(3101, 3569, 0), // Wilderness Steel mine / Zamorak mage mine
|
||||
"Southern wilderness mine" to Location.create(3025, 3591, 0), // Wilderness skeleton mine
|
||||
|
|
|
|||
|
|
@ -66,35 +66,52 @@ class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Com
|
|||
return@on true
|
||||
}
|
||||
|
||||
val condition: (Player) -> Boolean = when(star.location.toLowerCase()){
|
||||
"canifis bank" -> { p -> hasRequirement(p, "Priest in Peril") }
|
||||
//"Burgh de Rott bank" -> { p -> p.questRepository.isComplete("Priest in Peril")} // for now, require this as it is in Morytania. remove when appropriate quests added - Crash
|
||||
"crafting guild" -> {p -> hasLevelStat(p, Skills.CRAFTING, 40) }
|
||||
"lletya bank" -> {p -> hasRequirement(p, "Mourning's End Part I") }
|
||||
"jatizso mine" -> {p -> hasRequirement(player, "Fremennik Trials") }
|
||||
"south crandor mining site" -> {p -> hasRequirement(p, "Dragon Slayer") }
|
||||
"shilo village mining site" -> {p -> hasRequirement(p, "Shilo Village") }
|
||||
"mos le'harmless bank" -> {p -> hasRequirement(p, "Cabin Fever") }
|
||||
else -> {_ -> true}
|
||||
class RingDialogue(val star: ShootingStar) : DialogueFile() {
|
||||
val shouldWarn = when (star.location) {
|
||||
"North Edgeville mining site",
|
||||
"Southern wilderness mine",
|
||||
"Wilderness hobgoblin mine",
|
||||
"Pirates' Hideout mine",
|
||||
"Lava Maze mining site",
|
||||
"Mage Arena bank" -> true
|
||||
else -> false
|
||||
}
|
||||
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
fun teleportToStar(player: Player) {
|
||||
val condition: (p: Player) -> Boolean = when (star.location.toLowerCase()) {
|
||||
"canifis bank" -> {p -> requireQuest(p, "Priest in Peril", "to access this.") }
|
||||
//"burgh de rott bank" -> {p -> hasRequirement(p, "In Aid of the Myreque") } //disabled: crash
|
||||
"crafting guild" -> {p -> hasLevelStat(p, Skills.CRAFTING, 40) }
|
||||
"lletya bank" -> {p -> hasRequirement(p, "Mourning's End Part I") }
|
||||
"jatizso mine" -> {p -> hasRequirement(p, "The Fremennik Isles") }
|
||||
"south crandor mining site" -> {p -> hasRequirement(p, "Dragon Slayer") }
|
||||
"shilo village mining site" -> {p -> hasRequirement(p, "Shilo Village") }
|
||||
"mos le'harmless bank" -> {p -> hasRequirement(p, "Cabin Fever") } //needs to be updated to check for completion when the quest releases; https://runescape.wiki/w/Mos_Le%27Harmless?oldid=913025
|
||||
"lunar isle mine" -> {p -> hasRequirement(p, "Lunar Diplomacy") }
|
||||
"miscellania coal mine" -> {p -> requireQuest(p, "The Fremennik Trials", "to access this.") }
|
||||
//"neitiznot runite mine" -> {p -> hasRequirement(p, "The Fremennik Isles") } //disabled: currently not reachable
|
||||
else -> {_ -> true}
|
||||
}
|
||||
if (!condition.invoke(player)) {
|
||||
sendDialogue(player,"Magical forces prevent your teleportation.")
|
||||
} else if (teleport(player, star.crash_locations[star.location]!!.transform(0, -1, 0), TeleportManager.TeleportType.MINIGAME)) {
|
||||
getRingStoreFile()[player.username.toLowerCase()] = true
|
||||
}
|
||||
}
|
||||
when (stage) {
|
||||
0 -> dialogue(if (star.spriteSpawned) "The star sprite has already been freed." else "The star sprite is still trapped.").also { if (shouldWarn) stage++ else stage += 2 }
|
||||
1 -> dialogue("WARNING: The star is located in the wilderness.").also { stage++ }
|
||||
2 -> player.dialogueInterpreter.sendOptions("Teleport to the star?", "Yes", "No").also { stage++ }
|
||||
3 -> when (buttonID) {
|
||||
1 -> end().also { teleportToStar(player) }
|
||||
2 -> end()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!condition.invoke(player)){
|
||||
sendDialogue(player, "Magical forces prevent your teleportation.")
|
||||
return@on true
|
||||
}
|
||||
|
||||
val shouldWarn = when(star.location){
|
||||
"North Edgeville mining site",
|
||||
"Southern wilderness mine",
|
||||
"Wilderness hobgoblin mine",
|
||||
"Pirates' Hideout mine",
|
||||
"Lava Maze mining site",
|
||||
"Mage Arena bank" -> true
|
||||
else -> false
|
||||
}
|
||||
|
||||
openDialogue(player, RingDialogue(shouldWarn, star))
|
||||
|
||||
openDialogue(player, RingDialogue(star))
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
|
|
@ -119,26 +136,6 @@ class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Com
|
|||
|
||||
private data class ScoreboardEntry(val player: String, val time: Int)
|
||||
|
||||
private class RingDialogue(val shouldWarn: Boolean, val star: ShootingStar) : DialogueFile(){
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
0 -> dialogue(if (star.spriteSpawned) "The star sprite has already been freed." else "The star sprite is still trapped.").also { if (shouldWarn) stage++ else stage += 2 }
|
||||
1 -> dialogue("WARNING: The star is located in the wilderness.").also { stage++ }
|
||||
2 -> player!!.dialogueInterpreter.sendOptions("Teleport to the star?", "Yes", "No").also { stage++ }
|
||||
3 -> when (buttonID) {
|
||||
1 -> teleport(player!!, star).also { end() }
|
||||
2 -> end()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun teleport(player: Player, star: ShootingStar){
|
||||
if (teleport(player, star.crash_locations[star.location]!!.transform(0, -1, 0), TeleportManager.TeleportType.MINIGAME)) {
|
||||
getRingStoreFile()[player.username.toLowerCase()] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val star = ShootingStar()
|
||||
private val tickDelay = if(GameWorld.settings?.isDevMode == true) 200 else 25000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue