mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-22 10:55:13 -06:00
structure
This commit is contained in:
parent
acc02e00d3
commit
7860d8a27f
4 changed files with 118 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
package content.region.kandarin.seers.quest.elementalworkshop2
|
||||
|
||||
class BeatenBook {
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package content.region.kandarin.seers.quest.elementalworkshop2
|
||||
|
||||
import content.data.Quests
|
||||
import content.region.kandarin.seers.quest.elementalworkshop2.ElementalWorkshop2.Companion.EW2Varbit
|
||||
import core.api.*
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.node.entity.skill.Skills
|
||||
import org.rs09.consts.*
|
||||
|
||||
class EW2Listeners : InteractionListener {
|
||||
|
||||
override fun defineListeners() {
|
||||
|
||||
// Bookcase at digsite where you start quest.
|
||||
on(Scenery.BOOKCASE_17382, IntType.SCENERY, "search") { player, _ ->
|
||||
if (isQuestComplete(player, Quests.ELEMENTAL_WORKSHOP_I) &&
|
||||
!inInventory(player, Items.BEATEN_BOOK_9717) &&
|
||||
hasLevelStat(player, Skills.MAGIC, 20) &&
|
||||
hasLevelStat(player, Skills.SMITHING, 30)
|
||||
) {
|
||||
sendItemDialogue(player, Items.BEATEN_BOOK_9717, "You find an old-looking book.")
|
||||
addItemOrDrop(player, Items.BEATEN_BOOK_9717)
|
||||
//setQuestStage(player, Quests.ELEMENTAL_WORKSHOP_II, 1)
|
||||
setVarbit(player, EW2Varbit, 1, true)
|
||||
} else {
|
||||
sendMessage(player, "You search the books...")
|
||||
sendMessage(player, "You find nothing of interest.")
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package content.region.kandarin.seers.quest.elementalworkshop2
|
||||
|
||||
import content.data.Quests
|
||||
import core.api.*
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.quest.Quest
|
||||
import core.game.node.entity.skill.Skills
|
||||
import org.rs09.consts.*
|
||||
|
||||
/**
|
||||
* ELEMENTAL WORKSHOP II QUEST
|
||||
*
|
||||
* Requirements: 20 Magic, 30 Smithing, completion of Elemental Workshop I
|
||||
* Primary Sources: https://www.youtube.com/watch?v=YKSWisRgGZk, https://www.youtube.com/watch?v=xoDkqRhus4Y
|
||||
*/
|
||||
|
||||
class ElementalWorkshop2 : Quest(Quests.ELEMENTAL_WORKSHOP_II, 53, 52, 1, EW2Varbit, 0, 1, 11) {
|
||||
|
||||
companion object {
|
||||
const val EW2Varbit = 2639
|
||||
}
|
||||
|
||||
/**
|
||||
* Quest Stages and Varp values:
|
||||
* https://chisel.weirdgloop.org/varbs/display?varbit=2639
|
||||
*
|
||||
* val stage desc.
|
||||
* 0 0 unstarted
|
||||
* 1 1 found book
|
||||
* 2 2 read book
|
||||
* 3 3
|
||||
* 4 4
|
||||
* 5 5
|
||||
* 6 6
|
||||
* 7 7
|
||||
* 8 8
|
||||
* 9 9
|
||||
* 10 10
|
||||
* 11 100 quest complete
|
||||
*/
|
||||
override fun drawJournal(player: Player, stage: Int) {
|
||||
super.drawJournal(player, stage)
|
||||
var line = 12
|
||||
var stage = getStage(player)
|
||||
|
||||
var started = getQuestStage(player, Quests.ELEMENTAL_WORKSHOP_II) > 0
|
||||
|
||||
// journal here
|
||||
}
|
||||
|
||||
override fun reset(player: Player?) {
|
||||
super.reset(player)
|
||||
}
|
||||
|
||||
override fun finish(player: Player) {
|
||||
var ln = 10
|
||||
super.finish(player)
|
||||
player.packetDispatch.sendString("You have completed the Elemental Workshop II quest!", 277, 4)
|
||||
player.packetDispatch.sendItemZoomOnInterface(Items.ELEMENTAL_HELMET_9729, 230, 277, 5)
|
||||
|
||||
drawReward(player, "1 Quest Point", ln++)
|
||||
drawReward(player, "7,500 Smithing XP,", ln++)
|
||||
drawReward(player, "7,500 Crafting XP,", ln++)
|
||||
drawReward(player, "Ability to make and equip", ln++)
|
||||
drawReward(player, "elemental mind equipment", ln)
|
||||
|
||||
setVarbit(player, EW2Varbit, 11, true)
|
||||
rewardXP(player, Skills.SMITHING, 7500.0)
|
||||
rewardXP(player, Skills.CRAFTING, 7500.0)
|
||||
|
||||
// remove attributes
|
||||
}
|
||||
|
||||
override fun newInstance(`object`: Any?): Quest {
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package content.region.kandarin.seers.quest.elementalworkshop2
|
||||
|
||||
class JunctionBoxInterface {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue