mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-22 10:55:13 -06:00
add overrides for setstage and updatevarps so that the journal updates if you cheat your way to the end. modify pin interact destinations.
This commit is contained in:
parent
22f6c5f31d
commit
ca5b1f6ca9
2 changed files with 25 additions and 0 deletions
|
|
@ -1319,5 +1319,10 @@ class EW2Listeners : InteractionListener {
|
|||
setDest(IntType.SCENERY, intArrayOf(Scenery.PIPING_18650), "use") { _, _ ->
|
||||
return@setDest Location.create(1953, 5167, 3)
|
||||
}
|
||||
|
||||
// the double stacked pins and the cogs on them.
|
||||
setDest(IntType.SCENERY, intArrayOf(Scenery.PIN_18665, Scenery.PIN_18666, Scenery.COG_18673, Scenery.COG_18674, Scenery.COG_18675, Scenery.COG_18667, Scenery.COG_18668, Scenery.COG_18669), "use") { _, _ ->
|
||||
return@setDest Location.create(1958, 5157, 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -234,6 +234,12 @@ class ElementalWorkshop2 : Quest(Quests.ELEMENTAL_WORKSHOP_II, 53, 52, 1, EW2Sta
|
|||
line(player, "Creating the elemental mind helm", line++, stage > 11)
|
||||
line(player, "was easy with the book for instruction.", line++, stage > 11)
|
||||
}
|
||||
|
||||
// quest complete
|
||||
if (stage >= 100) {
|
||||
line++
|
||||
line(player,"<col=FF0000>QUEST COMPLETE!</col>", line)
|
||||
}
|
||||
}
|
||||
|
||||
// use ::setqueststage 53 0 to reset quest.
|
||||
|
|
@ -250,6 +256,20 @@ class ElementalWorkshop2 : Quest(Quests.ELEMENTAL_WORKSHOP_II, 53, 52, 1, EW2Sta
|
|||
super.reset(player)
|
||||
}
|
||||
|
||||
override fun setStage(player: Player, stage: Int) {
|
||||
super.setStage(player, stage)
|
||||
this.updateVarps(player)
|
||||
}
|
||||
|
||||
override fun updateVarps(player: Player) {
|
||||
// The quest stages are perfectly aligned with the varp
|
||||
if (getQuestStage(player, Quests.ELEMENTAL_WORKSHOP_II) >= 11) {
|
||||
setVarbit(player, EW2StageVarbit, 11, true) // except for stage 100 which is varp set to 11.
|
||||
} else {
|
||||
setVarbit(player, EW2StageVarbit, getQuestStage(player, Quests.ELEMENTAL_WORKSHOP_II), true)
|
||||
}
|
||||
}
|
||||
|
||||
override fun finish(player: Player) {
|
||||
var ln = 10
|
||||
super.finish(player)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue