Rewrote unpowered orb charging

Added Seers' Village diary tasks for ranging tickets, talking to Thermac about staves and charging orbs
Corrected explorer's ring alchemy graphics
This commit is contained in:
Bonesy
2024-07-13 04:37:24 +00:00
committed by Ryan
parent 0165d373bd
commit 30f1cbf710
6 changed files with 197 additions and 256 deletions
@@ -59,7 +59,7 @@ class ExplorersRingPlugin : InteractionListener {
val item = player.inventory[slot] val item = player.inventory[slot]
if (item == null) if (item == null)
return@sendItemSelect return@sendItemSelect
if (!ModernListeners().alchemize(player, item, false)) if (!ModernListeners().alchemize(player, item, false, explorersRing = true))
return@sendItemSelect return@sendItemSelect
getStoreFile()[player.username.lowercase() + ":alchs"] = remaining - 1 getStoreFile()[player.username.lowercase() + ":alchs"] = remaining - 1
} }
@@ -1,206 +0,0 @@
package content.global.skill.magic.modern;
import core.game.node.entity.combat.spell.Runes;
import core.game.node.entity.combat.spell.MagicSpell;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.node.entity.skill.SkillPulse;
import core.game.node.Node;
import core.game.node.entity.Entity;
import core.game.node.entity.combat.spell.SpellType;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.audio.Audio;
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
import core.game.node.item.Item;
import core.game.node.scenery.Scenery;
import core.game.world.update.flag.context.Animation;
import core.game.world.update.flag.context.Graphics;
import core.plugin.Initializable;
import core.plugin.Plugin;
import org.rs09.consts.Sounds;
/**
* Represents the the charging orb magic spell.
*
* @author Emperor
* @version 1.0
*/
@Initializable
public final class ChargeOrbSpells extends MagicSpell {
/**
* The animation.
*/
private static final Animation ANIMATION = Animation.create(791);
/**
* The unpowered orb item.
*/
private static final Item UNPOWERED_ORB = new Item(567);
/**
* The object id.
*/
private int objectId;
/**
* The item id.
*/
private int itemId;
/**
* The button that was clicked.
*/
private int buttonId;
/**
* Constructs a new {@code ChargeOrbSpells} {@code Object}
*/
public ChargeOrbSpells() {
/*
* empty.
*/
}
/**
* Constructs a new {@code ChargeOrbSpells} {@code Object}.
*
* @param level The level required.
* @param objectId The object id.
* @param itemId The item to add.
* @param buttonId the button clicked
* @param g The graphics.
* @param runes The runes required.
*/
public ChargeOrbSpells(int level, int objectId, int itemId, int buttonId, Graphics g, Audio a, Item... runes) {
super(SpellBook.MODERN, level, level + 10, ANIMATION, g, a, runes);
this.objectId = objectId;
this.itemId = itemId;
this.buttonId = buttonId;
}
@Override
public Plugin<SpellType> newInstance(SpellType arg) throws Throwable {
SpellBook.MODERN.register(35, new ChargeOrbSpells(56, 2151, 571, 35, new Graphics(149, 96), new Audio(Sounds.CHARGE_WATER_ORB_118), Runes.WATER_RUNE.getItem(30), Runes.COSMIC_RUNE.getItem(3), UNPOWERED_ORB));
SpellBook.MODERN.register(39, new ChargeOrbSpells(60, 29415, 575, 39, new Graphics(151, 96), new Audio(Sounds.CHARGE_EARTH_ORB_115), Runes.EARTH_RUNE.getItem(30), Runes.COSMIC_RUNE.getItem(3), UNPOWERED_ORB));
SpellBook.MODERN.register(46, new ChargeOrbSpells(63, 2153, 569, 46, new Graphics(152, 96), new Audio(Sounds.CHARGE_FIRE_ORB_117), Runes.FIRE_RUNE.getItem(30), Runes.COSMIC_RUNE.getItem(3), UNPOWERED_ORB));
SpellBook.MODERN.register(49, new ChargeOrbSpells(66, 2152, 573, 49, new Graphics(150, 96), new Audio(Sounds.CHARGE_AIR_ORB_116), Runes.AIR_RUNE.getItem(30), Runes.COSMIC_RUNE.getItem(3), UNPOWERED_ORB));
return this;
}
@Override
public boolean cast(Entity entity, Node target) {
if (!(target instanceof Scenery)) {
return false;
}
Player p = (Player) entity;
Scenery obj = (Scenery) target;
if (obj == null || obj.getId() != objectId) {
p.getPacketDispatch().sendMessage("You can't cast this spell on this object!");
return false;
}
if (obj.getLocation().getDistance(p.getLocation()) > 3) {
p.getPacketDispatch().sendMessage("You're standing too far from the obelisk's reach.");
return false;
}
if (!p.getAchievementDiaryManager().hasCompletedTask(DiaryType.SEERS_VILLAGE, 2, 9)
&& objectId == 2151
&& p.getInventory().containsItems(Runes.COSMIC_RUNE.getItem(15), Runes.WATER_RUNE.getItem(150), new Item(UNPOWERED_ORB.getId(), 5))) {
p.setAttribute("/save:diary:seers:water-orb-can-earn", true);
p.setAttribute("/save:diary:seers:water-orb", 1);
}
if (!meetsRequirements(entity, true, true)) {
return false;
}
p.faceLocation(obj.getLocation());
visualize(p, target);
if (!p.getPulseManager().hasPulseRunning()) {
p.getPulseManager().run(new ChargeOrbPulse(p, new Item(itemId), target, buttonId));
}
p.getInventory().add(new Item(itemId));
return true;
}
/**
* Represents the pulse for automatically charging orbs on obelisks.
*
* @author Splinter
* @version 1.0
*/
public static class ChargeOrbPulse extends SkillPulse<Item> {
/**
* The item we are going to recieve (always an orb).
*/
public Item item;
/**
* The target of the spell.
*/
public Node target;
/**
* The button (spell) that we clicked.
*/
public int buttonId;
/**
* The unpowered orb item.
*/
private static final Item UNPOWERED_ORB = new Item(567, 1);
/**
* Constructs a new {@code ChargeOrbPulse} {@code Object}.
*
* @param player the player.
* @param target the node.
* @param item the item.
* @param buttonId the clicked button
*/
public ChargeOrbPulse(Player player, Item item, Node target, int buttonId) {
super(player, item);
this.item = item;
this.target = target;
this.buttonId = buttonId;
}
@Override
public boolean checkRequirements() {
if (player.getInventory().contains(UNPOWERED_ORB.getId(), 1)) {
return true;
}
return false;
}
@Override
public void animate() {
player.animate(new Animation(791));
}
@Override
public boolean reward() {
if (getDelay() == 1) {
super.setDelay(4);
return false;
}
if (ChargeOrbSpells.castSpell(player, SpellBook.MODERN, buttonId, target)) {
if (!player.getAchievementDiaryManager().hasCompletedTask(DiaryType.SEERS_VILLAGE, 2, 9)
&& player.getAttribute("diary:seers:water-orb-can-earn", false)) {
player.setAttribute("/save:diary:seers:water-orb", 1 + player.getAttribute("diary:seers:water-orb", 0));
}
if (player.getAttribute("diary:seers:water-orb", 0) >= 5) {
player.getAchievementDiaryManager().finishTask(player, DiaryType.SEERS_VILLAGE, 2, 9);
player.removeAttribute("diary:seers:water-orb-can-earn");
}
return false;
} else {
return true;
}
}
@Override
public void stop() {
player.removeAttribute("diary:seers:water-orb-can-earn");
}
}
}
@@ -0,0 +1,63 @@
package content.global.skill.magic.modern
import core.game.node.item.Item
import core.game.world.update.flag.context.Graphics
import org.rs09.consts.Items
import org.rs09.consts.Scenery
import org.rs09.consts.Sounds
enum class ChargeOrbData(
val obelisk: Int,
val requiredRunes: Array<Item>,
val level: Int,
val experience: Double,
val graphics: Graphics,
val sound: Int,
val chargedOrb: Int
) {
CHARGE_WATER_ORB(
Scenery.OBELISK_OF_WATER_2151,
arrayOf(Item(Items.COSMIC_RUNE_564, 3), Item(Items.WATER_RUNE_555, 30), Item(Items.UNPOWERED_ORB_567)),
56,
66.0,
Graphics(149, 90),
Sounds.CHARGE_WATER_ORB_118,
Items.WATER_ORB_571
),
CHARGE_EARTH_ORB(
Scenery.OBELISK_OF_EARTH_29415,
arrayOf(Item(Items.COSMIC_RUNE_564, 3), Item(Items.EARTH_RUNE_557, 30), Item(Items.UNPOWERED_ORB_567)),
60,
70.0,
Graphics(151, 90),
Sounds.CHARGE_EARTH_ORB_115,
Items.EARTH_ORB_575
),
CHARGE_FIRE_ORB(
Scenery.OBELISK_OF_FIRE_2153,
arrayOf(Item(Items.COSMIC_RUNE_564, 3), Item(Items.FIRE_RUNE_554, 30), Item(Items.UNPOWERED_ORB_567)),
63,
73.0,
Graphics(152, 90),
Sounds.CHARGE_FIRE_ORB_117,
Items.FIRE_ORB_569
),
CHARGE_AIR_ORB(
Scenery.OBELISK_OF_AIR_2152,
arrayOf(Item(Items.COSMIC_RUNE_564, 3), Item(Items.AIR_RUNE_556, 30), Item(Items.UNPOWERED_ORB_567)),
66,
76.0,
Graphics(150, 90),
Sounds.CHARGE_AIR_ORB_116,
Items.AIR_ORB_573
);
companion object{
val spellMap = HashMap<Int, ChargeOrbData>()
init {
for (spell in ChargeOrbData.values()) {
spellMap[spell.obelisk] = spell
}
}
}
}
@@ -1,64 +1,37 @@
package content.global.skill.magic.modern package content.global.skill.magic.modern
import content.global.skill.magic.SpellListener import content.global.skill.magic.SpellListener
import content.global.skill.magic.SpellUtils.hasRune
import content.global.skill.magic.TeleportMethod import content.global.skill.magic.TeleportMethod
import content.global.skill.magic.spellconsts.Modern import content.global.skill.magic.spellconsts.Modern
import core.game.event.ItemAlchemizationEvent
import core.game.event.TeleportEvent
import content.global.skill.prayer.Bones import content.global.skill.prayer.Bones
import content.global.skill.smithing.smelting.Bar
import content.global.skill.smithing.smelting.SmeltingPulse
import core.ServerConstants
import core.api.*
import core.game.event.ItemAlchemizationEvent
import core.game.event.ResourceProducedEvent
import core.game.event.TeleportEvent
import core.game.interaction.MovementPulse import core.game.interaction.MovementPulse
import core.game.node.Node
import core.game.node.entity.Entity import core.game.node.entity.Entity
import core.game.node.entity.combat.spell.MagicStaff
import core.game.node.entity.impl.Animator
import core.game.node.entity.impl.Projectile import core.game.node.entity.impl.Projectile
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.node.entity.player.link.TeleportManager import core.game.node.entity.player.link.TeleportManager
import core.game.node.entity.player.link.audio.Audio
import core.game.node.entity.player.link.diary.DiaryType import core.game.node.entity.player.link.diary.DiaryType
import core.game.node.entity.skill.Skills import core.game.node.entity.skill.Skills
import content.global.skill.smithing.smelting.Bar
import content.global.skill.smithing.smelting.SmeltingPulse
import core.game.node.item.Item import core.game.node.item.Item
import core.game.world.map.Location import core.game.world.map.Location
import core.game.world.update.flag.context.Animation import core.game.world.update.flag.context.Animation
import core.game.world.update.flag.context.Graphics import core.game.world.update.flag.context.Graphics
import org.rs09.consts.Items import org.rs09.consts.Items
import core.ServerConstants import org.rs09.consts.Scenery
import core.api.*
import core.game.node.entity.combat.spell.MagicStaff
import core.game.node.entity.impl.Animator
import org.rs09.consts.Sounds import org.rs09.consts.Sounds
class ModernListeners : SpellListener("modern"){ class ModernListeners : SpellListener("modern"){
private val CONFUSE_START = Graphics(102, 96)
private val CONFUSE_PROJECTILE = Projectile.create(null as Entity?, null, 103, 40, 36, 52, 75, 15, 11)
private val CONFUSE_END = Graphics(104, 96)
private val WEAKEN_START = Graphics(105, 96)
private val WEAKEN_PROJECTILE = Projectile.create(null as Entity?, null, 106, 40, 36, 52, 75, 15, 11)
private val WEAKEN_END = Graphics(107, 96)
private val CURSE_START = Graphics(108, 96)
private val CURSE_PROJECTILE = Projectile.create(null as Entity?, null, 109, 40, 36, 52, 75, 15, 11)
private val CURSE_END = Graphics(110, 96)
private val VULNER_START = Graphics(167, 96)
private val VULNER_PROJECTILE = Projectile.create(null as Entity?, null, 168, 40, 36, 52, 75, 15, 11)
private val VULNER_END = Graphics(169, 96)
private val ENFEEBLE_START = Graphics(170, 96)
private val ENFEEBLE_PROJECTILE = Projectile.create(null as Entity?, null, 171, 40, 36, 52, 75, 15, 11)
private val ENFEEBLE_END = Graphics(172, 96)
private val STUN_START = Graphics(173, 96)
private val STUN_PROJECTILE = Projectile.create(null as Entity?, null, 174, 40, 36, 52, 75, 15, 11)
private val STUN_END = Graphics(107, 96)
private val LOW_ANIMATION = Animation(716, Animator.Priority.HIGH)
private val HIGH_ANIMATION = Animation(729, Animator.Priority.HIGH)
private val LOW_ALCH_ANIM = Animation(712)
private val LOW_ALCH_GFX = Graphics(112,5)
private val HIGH_ALCH_ANIM = Animation(713)
private val HIGH_ALCH_GFX = Graphics(113,5)
private val BONE_CONVERT_GFX = Graphics(141, 96)
private val BONE_CONVERT_ANIM = Animation(722)
override fun defineListeners() { override fun defineListeners() {
onCast(Modern.HOME_TELEPORT, NONE){ player, _ -> onCast(Modern.HOME_TELEPORT, NONE){ player, _ ->
if (!getAttribute(player, "tutorial:complete", false)) { if (!getAttribute(player, "tutorial:complete", false)) {
return@onCast return@onCast
@@ -151,6 +124,11 @@ class ModernListeners : SpellListener("modern"){
requires(player,60, arrayOf(Item(Items.EARTH_RUNE_557,4), Item(Items.WATER_RUNE_555,4), Item(Items.NATURE_RUNE_561,2))) requires(player,60, arrayOf(Item(Items.EARTH_RUNE_557,4), Item(Items.WATER_RUNE_555,4), Item(Items.NATURE_RUNE_561,2)))
boneConvert(player,false) boneConvert(player,false)
} }
onCast(Modern.CHARGE_WATER_ORB, OBJECT, Scenery.OBELISK_OF_WATER_2151, 3, method = ::chargeOrb)
onCast(Modern.CHARGE_EARTH_ORB, OBJECT, Scenery.OBELISK_OF_EARTH_29415, 3, method = ::chargeOrb)
onCast(Modern.CHARGE_FIRE_ORB, OBJECT, Scenery.OBELISK_OF_FIRE_2153, 3, method = ::chargeOrb)
onCast(Modern.CHARGE_AIR_ORB, OBJECT, Scenery.OBELISK_OF_AIR_2152, 3, method = ::chargeOrb)
} }
private fun boneConvert(player: Player,bananas: Boolean){ private fun boneConvert(player: Player,bananas: Boolean){
@@ -194,7 +172,7 @@ class ModernListeners : SpellListener("modern"){
} }
private fun superheat(player: Player,item: Item){ private fun superheat(player: Player,item: Item){
if(!item.name.contains("ore") && !item.name.toLowerCase().equals("coal")){ if(!item.name.contains("ore") && !item.name.equals("coal", true)){
player.sendMessage("You can only cast this spell on ore.") player.sendMessage("You can only cast this spell on ore.")
return return
} }
@@ -229,7 +207,7 @@ class ModernListeners : SpellListener("modern"){
setDelay(player,false) setDelay(player,false)
} }
public fun alchemize(player: Player, item: Item, high: Boolean) : Boolean { fun alchemize(player: Player, item: Item, high: Boolean, explorersRing: Boolean = false): Boolean {
if(item.name == "Coins") player.sendMessage("You can't alchemize something that's already gold!").also { return false } if(item.name == "Coins") player.sendMessage("You can't alchemize something that's already gold!").also { return false }
if((!item.definition.isTradeable) && (!item.definition.isAlchemizable)) player.sendMessage("You can't cast this spell on something like that.").also { return false } if((!item.definition.isTradeable) && (!item.definition.isAlchemizable)) player.sendMessage("You can't cast this spell on something like that.").also { return false }
@@ -248,16 +226,17 @@ class ModernListeners : SpellListener("modern"){
player.pulseManager.clear() player.pulseManager.clear()
} }
val weapon = player.equipment.getItem(getItemFromEquipment(player, EquipmentSlot.WEAPON)) if (explorersRing) {
if (weapon != null && !weapon.equals(MagicStaff.FIRE_RUNE)) { visualize(player, LOW_ALCH_ANIM, EXPLORERS_RING_GFX)
player.animate(Animation(if (high) 9633 else 9625))
player.graphics(Graphics(if (high) 1693 else 1692))
} else { } else {
player.animate(Animation(if (high) 713 else 712)) val weapon = getItemFromEquipment(player, EquipmentSlot.WEAPON)
player.graphics(Graphics(if (high) 113 else 112)) if (weapon != null && weapon.id in MagicStaff.FIRE_RUNE.staves) {
visualize(player, if (high) HIGH_ALCH_STAFF_ANIM else LOW_ALCH_STAFF_ANIM, if (high) HIGH_ALCH_STAFF_GFX else LOW_ALCH_STAFF_GFX)
} else {
visualize(player, if (high) HIGH_ALCH_ANIM else LOW_ALCH_ANIM, if (high) HIGH_ALCH_GFX else LOW_ALCH_GFX)
}
} }
playAudio(player, if (high) Sounds.HIGH_ALCHEMY_97 else Sounds.LOW_ALCHEMY_98) playAudio(player, if (high) Sounds.HIGH_ALCHEMY_97 else Sounds.LOW_ALCHEMY_98)
player.dispatch(ItemAlchemizationEvent(item.id, high)) player.dispatch(ItemAlchemizationEvent(item.id, high))
if (player.inventory.remove(Item(item.id, 1)) && coins.amount > 0) { if (player.inventory.remove(Item(item.id, 1)) && coins.amount > 0) {
player.inventory.add(coins) player.inventory.add(coins)
@@ -308,4 +287,79 @@ class ModernListeners : SpellListener("modern"){
addXP(player,30.0) addXP(player,30.0)
setDelay(player,true) setDelay(player,true)
} }
private fun chargeOrb(player: Player, node: Node?) {
if (node == null) return
val spell = ChargeOrbData.spellMap[node.id] ?: return
requires(player, spell.level, spell.requiredRunes)
removeAttribute(player, "spell:runes")
face(player, node)
sendSkillDialogue(player) {
withItems(spell.chargedOrb)
calculateMaxAmount { return@calculateMaxAmount amountInInventory(player, Items.UNPOWERED_ORB_567) }
create { _, amount ->
var crafted = 0
queueScript(player, 0) {
if (!hasLevelDyn(player, Skills.CRAFTING, spell.level)) {
sendMessage(player, "You need a magic level of ${spell.level} to cast this spell.")
return@queueScript stopExecuting(player)
}
for (rune in spell.requiredRunes) {
if(!hasRune(player,rune)){
sendMessage(player, "You don't have enough ${rune.name.lowercase()}s to cast this spell.")
return@queueScript stopExecuting(player)
}
}
visualizeSpell(player, CHARGE_ORB_ANIM, spell.graphics, spell.sound)
removeRunes(player)
addItem(player, spell.chargedOrb)
addXP(player, spell.experience)
setDelay(player, 3)
crafted++
if (crafted == 5 && spell.chargedOrb == Items.WATER_ORB_571) {
player.dispatch(ResourceProducedEvent(spell.chargedOrb, crafted, node))
}
if (amount == crafted) { return@queueScript stopExecuting(player) }
setCurrentScriptState(player, 0)
return@queueScript delayScript(player, 6)
}
}
}
return
}
companion object {
private val CONFUSE_START = Graphics(102, 96)
private val CONFUSE_PROJECTILE = Projectile.create(null as Entity?, null, 103, 40, 36, 52, 75, 15, 11)
private val CONFUSE_END = Graphics(104, 96)
private val WEAKEN_START = Graphics(105, 96)
private val WEAKEN_PROJECTILE = Projectile.create(null as Entity?, null, 106, 40, 36, 52, 75, 15, 11)
private val WEAKEN_END = Graphics(107, 96)
private val CURSE_START = Graphics(108, 96)
private val CURSE_PROJECTILE = Projectile.create(null as Entity?, null, 109, 40, 36, 52, 75, 15, 11)
private val CURSE_END = Graphics(110, 96)
private val VULNER_START = Graphics(167, 96)
private val VULNER_PROJECTILE = Projectile.create(null as Entity?, null, 168, 40, 36, 52, 75, 15, 11)
private val VULNER_END = Graphics(169, 96)
private val ENFEEBLE_START = Graphics(170, 96)
private val ENFEEBLE_PROJECTILE = Projectile.create(null as Entity?, null, 171, 40, 36, 52, 75, 15, 11)
private val ENFEEBLE_END = Graphics(172, 96)
private val STUN_START = Graphics(173, 96)
private val STUN_PROJECTILE = Projectile.create(null as Entity?, null, 174, 40, 36, 52, 75, 15, 11)
private val STUN_END = Graphics(107, 96)
private val LOW_ANIMATION = Animation(716, Animator.Priority.HIGH)
private val HIGH_ANIMATION = Animation(729, Animator.Priority.HIGH)
private val LOW_ALCH_ANIM = Animation(9623)
private val LOW_ALCH_STAFF_ANIM = Animation(9625)
private val HIGH_ALCH_ANIM = Animation(9631)
private val HIGH_ALCH_STAFF_ANIM = Animation(9633)
private val LOW_ALCH_GFX = Graphics(763)
private val HIGH_ALCH_GFX = Graphics(1691)
private val LOW_ALCH_STAFF_GFX = Graphics(1692)
private val HIGH_ALCH_STAFF_GFX = Graphics(1693)
private val EXPLORERS_RING_GFX = Graphics(1698)
private val BONE_CONVERT_GFX = Graphics(141, 96)
private val BONE_CONVERT_ANIM = Animation(722)
private val CHARGE_ORB_ANIM = Animation(726)
}
} }
@@ -17,10 +17,14 @@ object Modern {
const val SNARE = 30 const val SNARE = 30
const val ARDOUGNE_TELEPORT = 32 const val ARDOUGNE_TELEPORT = 32
const val HIGH_ALCHEMY = 34 const val HIGH_ALCHEMY = 34
const val CHARGE_WATER_ORB = 35
const val WATCHTOWER_TELEPORT = 37 const val WATCHTOWER_TELEPORT = 37
const val CHARGE_EARTH_ORB = 39
const val BONES_TO_PEACHES = 40 const val BONES_TO_PEACHES = 40
const val TROLLHEIM_TELEPORT = 44 const val TROLLHEIM_TELEPORT = 44
const val CHARGE_FIRE_ORB = 46
const val APE_ATOLL_TELEPORT = 47 const val APE_ATOLL_TELEPORT = 47
const val CHARGE_AIR_ORB = 49
const val VULNERABILITY = 50 const val VULNERABILITY = 50
const val ENFEEBLE = 53 const val ENFEEBLE = 53
const val ENTANGLE = 56 const val ENTANGLE = 56
@@ -99,6 +99,14 @@ class SeersVillageAchievementDiary : DiaryEventHookBase(DiaryType.SEERS_VILLAGE)
} }
override fun onResourceProduced(player: Player, event: ResourceProducedEvent) { override fun onResourceProduced(player: Player, event: ResourceProducedEvent) {
if (event.source.id == Scenery.OBELISK_OF_WATER_2151 && event.amount >= 5) {
finishTask(
player,
DiaryLevel.HARD,
HardTasks.CHARGE_5_WATER_ORBS_AT_ONCE
)
}
when (player.viewport.region.id) { when (player.viewport.region.id) {
10805 -> if (event.itemId == Items.FLAX_1779) { 10805 -> if (event.itemId == Items.FLAX_1779) {
progressIncrementalTask( progressIncrementalTask(
@@ -313,6 +321,24 @@ class SeersVillageAchievementDiary : DiaryEventHookBase(DiaryType.SEERS_VILLAGE)
EasyTasks.BUY_CANDLE EasyTasks.BUY_CANDLE
) )
} }
if (event.currency.id == Items.ARCHERY_TICKET_1464) {
finishTask(
player,
DiaryLevel.MEDIUM,
MediumTasks.RANGING_GUILD_BUY_SOMETHING_FOR_TICKETS
)
}
}
override fun onInterfaceOpened(player: Player, event: InterfaceOpenEvent) {
if (event.component.id == 332) {
finishTask(
player,
DiaryLevel.MEDIUM,
MediumTasks.THORMAC_SORCERER_TALK_ABOUT_MYSTIC_STAVES
)
}
} }
override fun onPrayerPointsRecharged(player: Player, event: PrayerPointsRechargeEvent) { override fun onPrayerPointsRecharged(player: Player, event: PrayerPointsRechargeEvent) {