Fixed the Druidic Ritual quest log rendering
Implemented two bank noticeboards
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package content.region.asgarnia.falador.handlers
|
||||
|
||||
import content.global.handlers.iface.ScrollInterface
|
||||
import content.global.handlers.iface.ScrollLine
|
||||
import core.game.interaction.InteractionListener
|
||||
import org.rs09.consts.Components
|
||||
import org.rs09.consts.Scenery
|
||||
|
||||
class BankNotices : InteractionListener {
|
||||
companion object {
|
||||
val CONTENTS_PIN = arrayOf(
|
||||
ScrollLine("If you're worried about someone stealing items from your",3),
|
||||
ScrollLine("bank, why not protect yourself with a Bank PIN?",4),
|
||||
|
||||
ScrollLine("A Bank PIN is a four-digit number. It's like a password that",6),
|
||||
ScrollLine("protects your bank account. If you set one, you'll be asked to",7),
|
||||
ScrollLine("enter it before you can take items out of the bank.",8),
|
||||
|
||||
ScrollLine("If you're interested, speak to the bankers and ask about Bank",10),
|
||||
ScrollLine("PINs.",11),
|
||||
|
||||
ScrollLine("But remember, KEEP YOUR PIN SECRET!",13),
|
||||
)
|
||||
|
||||
val CONTENTS_PASSWORD = arrayOf(
|
||||
ScrollLine("The Bank of RuneScape would like to remind customers that",4),
|
||||
ScrollLine("they should NEVER tell ANYONE their password.",5),
|
||||
|
||||
ScrollLine("If someone asks you to say your password, please report",7),
|
||||
ScrollLine("them using the 'Report Abuse' button at the bottom of your",8),
|
||||
ScrollLine("screen. ",9),
|
||||
|
||||
ScrollLine("Change your password regularly, and make sure no-one else",11),
|
||||
ScrollLine("could easily guess it!",12),
|
||||
)
|
||||
}
|
||||
|
||||
override fun defineListeners() {
|
||||
on(Scenery.NOTICEBOARD_11755, SCENERY, "read") { player, _ ->
|
||||
ScrollInterface.scrollSetup(player, Components.MESSAGESCROLL_220, CONTENTS_PIN)
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.NOTICEBOARD_11756, SCENERY, "read") { player, _ ->
|
||||
ScrollInterface.scrollSetup(player, Components.MESSAGESCROLL_220, CONTENTS_PASSWORD)
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
package content.region.asgarnia.taverley.quest;
|
||||
|
||||
import core.game.component.CloseEvent;
|
||||
import core.game.component.Component;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
|
||||
/**
|
||||
* The main type for the druidic ritual quest.
|
||||
* @author Vexia
|
||||
*
|
||||
*/
|
||||
@Initializable
|
||||
public class DruidicRitual extends Quest {
|
||||
|
||||
/**
|
||||
* Constructs a new {@code DruidicRitual} {@code Object}.
|
||||
*/
|
||||
public DruidicRitual() {
|
||||
super("Druidic Ritual", 48, 47, 4, 80, 0, 3, 4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawJournal(Player player, int stage) {
|
||||
super.drawJournal(player, stage);
|
||||
player.getPacketDispatch().sendString("<col=08088A>I can start this quest by speaking to the <col=8A0808>Kaqemeex</col> <col=08088A>who is at", 275, 4+ 7);
|
||||
player.getPacketDispatch().sendString("<col=08088A>the </col><col=8A0808>Druids Circle</col> <col=08088A>just <col=8A0808>North</col> <col=08088A>of</col> <col=8A0808>Taverley.<col=8A0808>", 275, 5+ 7);
|
||||
if (stage == 10) {
|
||||
player.getPacketDispatch().sendString("<str>I told Kaqemeex I would help them prepare their ceremony.</str>", 275, 4+ 7);
|
||||
player.getPacketDispatch().sendString("<col=08088A>I should speak to <col=8A0808>Sanfew</col> <col=08088A>in the village to the <col=8A0808>South</col>", 275, 5+ 7);
|
||||
}
|
||||
if (stage == 20) {
|
||||
player.getPacketDispatch().sendString("", 275, 5+ 7);
|
||||
player.getPacketDispatch().sendString("<str>I told Kaqemeex I would help them prepare their ceremony.</str>", 275, 4+ 7);
|
||||
player.getPacketDispatch().sendString("<col=8A0808>Sanfew</col> <col=08088A>told me for the ritual they would need me to place", 275, 6+ 7);
|
||||
player.getPacketDispatch().sendString("<col=8A0808>raw bear meat, raw chicken, raw rat meat, <col=08088A>and <col=8A0808>raw beef <col=08088A>in", 275, 7+ 7);
|
||||
player.getPacketDispatch().sendString("<col=08088A>the <col=8A0808>Cauldron of Thunder in the <col=08088A>dungeon South of <col=8A0808>Taverley", 275, 8+ 7);
|
||||
}
|
||||
if (stage == 99) {
|
||||
player.getPacketDispatch().sendString("<str>I told Kaqemeex I would help them prepare their ceremony.</str>", 275, 4+ 7);
|
||||
player.getPacketDispatch().sendString("<str>The ceremony required various meats being placed in the.</str>", 275, 5+ 7);
|
||||
player.getPacketDispatch().sendString("<str>Cauldron of Thunder. I did this and gave them to Sanfew.</str>", 275, 6+ 7);
|
||||
player.getPacketDispatch().sendString("<col=08088A>I should speak to <col=8A0808>Kaqemeex <col=08088A>again and claim my <col=8A0808>reward", 275, 7+ 7);
|
||||
}
|
||||
if (stage == 100) {
|
||||
player.getPacketDispatch().sendString("<str>I told Kaqemeex I would help them prepare their ceremony.</str>", 275, 4+ 7);
|
||||
player.getPacketDispatch().sendString("<str>The ceremony required various meats being placed in the.</str>", 275, 5+ 7);
|
||||
player.getPacketDispatch().sendString("<str>Cauldron of Thunder. I did this and gave them to Sanfew.</str>", 275, 6+ 7);
|
||||
player.getPacketDispatch().sendString("<str>Kaqemeex then taught me the basics of the skill Herblore</str>", 275, 7+ 7);
|
||||
player.getPacketDispatch().sendString("<col=FF0000>QUEST COMPLETE!", 275, 11+ 7);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish(Player player) {
|
||||
super.finish(player);
|
||||
player.getInterfaceManager().open(new Component(277).setCloseEvent(new CloseEvent() {
|
||||
@Override
|
||||
public boolean close(Player player, Component c) {
|
||||
if (player != null) {
|
||||
player.getDialogueInterpreter().open(455, NPC.create(455, player.getLocation()), true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}));
|
||||
player.getPacketDispatch().sendString("You have completed the Druidic Ritual Quest!", 277, 4);
|
||||
player.getPacketDispatch().sendItemZoomOnInterface(249, 240, 277, 3 + 2);
|
||||
player.getPacketDispatch().sendString("4 Quest Points", 277, 8 + 2);
|
||||
player.getPacketDispatch().sendString("250 Herblore XP", 277, 9 + 2);
|
||||
player.getPacketDispatch().sendString("Access to Herblore skill", 277, 10 + 2);
|
||||
player.getSkills().addExperience(Skills.HERBLORE, 250);
|
||||
player.getInterfaceManager().closeChatbox();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Quest newInstance(Object object) {
|
||||
// TODO Auto-generated method stub
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package content.region.asgarnia.taverley.quest
|
||||
|
||||
import content.region.asgarnia.taverley.dialogue.KaqemeexDialogue
|
||||
import core.api.*
|
||||
import core.game.component.Component
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.quest.Quest
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
/**
|
||||
* Druidic Ritual Quest
|
||||
*/
|
||||
@Initializable
|
||||
class DruidicRitual : Quest("Druidic Ritual", 48, 47, 4, 80, 0, 3, 4) {
|
||||
|
||||
companion object {
|
||||
const val questName = "Druidic Ritual"
|
||||
}
|
||||
override fun drawJournal(player: Player, stage: Int) {
|
||||
super.drawJournal(player, stage)
|
||||
var line = 12
|
||||
var stage = getStage(player)
|
||||
|
||||
var started = getQuestStage(player, questName) > 0
|
||||
|
||||
if (!started) {
|
||||
line(player, "I can start this quest by speaking to !!Kaqemeex?? who is at", line++)
|
||||
line(player, "the !!Druids Circle?? just !!north?? of !!Taverly??.", line++)
|
||||
} else {
|
||||
line(player, "Kaqemeex and the druids are preparing a ceremony to", line++, true)
|
||||
line(player, "purify the Varrock stone circle. I told Kaqemeex I would", line++, true)
|
||||
line(player, "help them.", line++, true)
|
||||
|
||||
if (stage >= 20) {
|
||||
// Line disappears.
|
||||
} else if (stage >= 10) {
|
||||
line++
|
||||
line(player, "I should speak to !!Sanfew?? in the village to the !!south??.", line++)
|
||||
}
|
||||
|
||||
if (stage >= 99) {
|
||||
line(player, "The ceremony required various meats being placed in the", line++, true)
|
||||
line(player, "Cauldron of Thunder. I did this and gave them to Sanfew.", line++, true)
|
||||
} else if (stage >= 20) {
|
||||
line++
|
||||
line(player, "!!Sanfew?? told me for the ritual they would need me to place", line++)
|
||||
line(player, "!!raw bear meat??, !!raw chicken??, !!raw rat meat??, and !!raw beef?? in", line++)
|
||||
line(player, "the !!Cauldron of Thunder?? in the !!dungeon south?? of !!Taverley??.", line++)
|
||||
}
|
||||
|
||||
if (stage >= 100) {
|
||||
line(player, "Kaqemeex then taught me the basics of the Heblore skill.", line++, true)
|
||||
} else if (stage >= 99) {
|
||||
line++
|
||||
line(player, "I should speak to !!Kaqemeex?? again and claim my !!reward??.", line++)
|
||||
}
|
||||
|
||||
if (stage >= 100) {
|
||||
line++
|
||||
line(player,"<col=FF0000>QUEST COMPLETE!</col>", line++)
|
||||
line(player, "I gained !!4 quest points??, !!250 Heblore XP?? and access to", line++)
|
||||
line(player, "the !!Heblore skill??.", line)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun finish(player: Player) {
|
||||
var ln = 10
|
||||
super.finish(player)
|
||||
player.packetDispatch.sendString("You have completed the Druidic Ritual Quest!", 277, 4)
|
||||
player.packetDispatch.sendItemZoomOnInterface(Items.CLEAN_GUAM_249, 230, 277, 5)
|
||||
|
||||
drawReward(player,"4 Quest Points", ln++)
|
||||
drawReward(player,"250 Herblore XP", ln++)
|
||||
drawReward(player,"Access to Herblore skill", ln++)
|
||||
|
||||
rewardXP(player, Skills.HERBLORE, 250.0)
|
||||
|
||||
player.interfaceManager.closeChatbox()
|
||||
}
|
||||
|
||||
override fun questCloseEvent(player: Player?, component: Component?) {
|
||||
queueScript(player!!, 1, QueueStrength.SOFT) {
|
||||
openDialogue(player,455, NPC.create(455, player.location), true)
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
|
||||
override fun newInstance(`object`: Any?): Quest {
|
||||
return this
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package core.game.node.entity.player.link.quest;
|
||||
|
||||
import core.game.component.CloseEvent;
|
||||
import core.game.component.Component;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.plugin.Plugin;
|
||||
@@ -137,7 +138,10 @@ public abstract class Quest implements Plugin<Object> {
|
||||
player.getQuestRepository().setStage(this, 100);
|
||||
player.getQuestRepository().incrementPoints(getQuestPoints());
|
||||
player.getQuestRepository().syncronizeTab(player);
|
||||
player.getInterfaceManager().open(new Component(277));
|
||||
player.getInterfaceManager().open(new Component(277).setCloseEvent((p, c) -> {
|
||||
this.questCloseEvent(p, c);
|
||||
return true;
|
||||
}));
|
||||
player.getPacketDispatch().sendString("" + player.getQuestRepository().getPoints() + "", 277, 7);
|
||||
player.getPacketDispatch().sendString("You have completed the " + getName() + " Quest!", 277, 4);
|
||||
player.getPacketDispatch().sendMessage("Congratulations! Quest complete!");
|
||||
@@ -151,6 +155,12 @@ public abstract class Quest implements Plugin<Object> {
|
||||
*/
|
||||
public void reset(Player player) {}
|
||||
|
||||
/**
|
||||
* Function callback when closing the quest.
|
||||
* Override this to follow up on dialogue after the component closes.
|
||||
*/
|
||||
public void questCloseEvent(Player player, Component component) {}
|
||||
|
||||
/**
|
||||
* Draws a line on the journal component.
|
||||
* @param player The player.
|
||||
|
||||
Reference in New Issue
Block a user