Merge branch 'fix-missing-diary-interactions-varrock-v2' into 'master'

Adds 4 Varrock diary tasks and fixes Romily Weaklax pie task

See merge request 2009scape/2009scape!2189
This commit is contained in:
Kennynes 2025-11-28 14:41:09 +00:00
commit 66cfcd05b3
4 changed files with 204 additions and 132 deletions

View file

@ -6,12 +6,15 @@ import core.game.component.ComponentDefinition
import core.game.component.ComponentPlugin
import core.game.container.access.InterfaceContainer
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.diary.DiaryType
import core.game.node.item.Item
import core.game.diary.DiaryLevel
import core.plugin.Initializable
import core.plugin.Plugin
import core.tools.colorize
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import content.region.misthalin.varrock.diary.VarrockAchivementDiary
private const val FUR_CLOTHING_COMPONENT_ID = 477
@ -165,6 +168,11 @@ class FurClothingInterface : ComponentPlugin(){
if (removeItem(player, requiredFur, Container.INVENTORY) &&
removeItem(player, coins, Container.INVENTORY)) {
addItem(player, clothing.product.id, amount)
// Trigger Varrock Hard Diary achievement for buying spottier cape
if (clothing == FUR_CLOTHING.DASH_CAPE) {
player.achievementDiaryManager.finishTask(player, DiaryType.VARROCK, DiaryLevel.HARD.ordinal, VarrockAchivementDiary.Companion.HardTasks.FANCY_DRESS_SELLER_TRADE_FURS)
}
}
}

View file

@ -66,10 +66,10 @@ public class RomilyWeaklaxDialogue extends DialoguePlugin {
}
@Override
public void init() {
super.init();
ClassScanner.definePlugin(new RomilyWildPieHandler());
}
public void init() {
super.init();
ClassScanner.definePlugin(new RomilyWildPieHandler());
}
@Override
public boolean open(Object... args) {
@ -78,14 +78,23 @@ public class RomilyWeaklaxDialogue extends DialoguePlugin {
pieAmt = player.getAttribute(keyAmt, 0);
pieReward = PieReward.forId(pieId);
// Check if wild pie was used on NPC or is in inventory; partial source here https://www.youtube.com/watch?v=FjlLZnDxofY
boolean hasWildPie = false;
if (args.length > 1) {
Item usedWith = (Item) args[1];
if (usedWith.getId() == Items.WILD_PIE_7208) {
npc("Is that a wild pie for me?"); // TODO not accurate dialogue, unfortunately offscreen in this video https://www.youtube.com/watch?v=FjlLZnDxofY
stage = 100;
return true;
}
}
Item usedWith = (Item) args[1];
if (usedWith.getId() == Items.WILD_PIE_7208) {
hasWildPie = true;
}
} else if (player.getInventory().contains(Items.WILD_PIE_7208, 1)) {
hasWildPie = true;
}
if (hasWildPie) {
npc("Hello and welcome to my pie shop. My word! That's a nice", "smelling pie you have. Is it for me?");
stage = 100;
return true;
}
npc("Hello and welcome to my pie shop, how can I help you?");
if (pieId != 0 && pieAmt != 0) {
@ -125,10 +134,9 @@ public class RomilyWeaklaxDialogue extends DialoguePlugin {
break;
case 2:
options("I'd like to buy some pies.", "I've got those pies you wanted.", "I'm good thanks.");
stage = 1;
stage = 3;
break;
case 3:
switch (buttonId) {
case 1:
player("I'd like to buy some pies.");
@ -153,7 +161,7 @@ public class RomilyWeaklaxDialogue extends DialoguePlugin {
npc.openShop(player);
break;
case 20:
npc("Actually I could, you see I'm running out of stock and I", "don't have tme to bake any more pies. would you be", "willing to bake me some pies? I'll pay you well for them.");
npc("Actually I could, you see I'm running out of stock and I", "don't have time to bake any more pies. Would you be", "willing to bake me some pies? I'll pay you well for them.");
stage = 21;
break;
case 21:
@ -178,9 +186,12 @@ public class RomilyWeaklaxDialogue extends DialoguePlugin {
break;
case 50:
final int piesInInventory = player.getInventory().getAmount(pieId);
final int deficit = pieAmt - piesInInventory;
final int piesNeeded = pieAmt; // How many he still needs
final int piesToGive = Math.min(piesInInventory, piesNeeded); // Don't give more than needed
final int deficit = piesNeeded - piesToGive;
if (piesInInventory == 0) {
npc("Doesn't look like you have any of the", pieAmt + " " + new Item(pieId).getName() + "s I requested.");
npc("Doesn't look like you have any of the", piesNeeded + " " + new Item(pieId).getName() + "s I requested.");
stage = 999;
break;
} else if (deficit == 0) {
@ -191,37 +202,57 @@ public class RomilyWeaklaxDialogue extends DialoguePlugin {
npc("Thank you, if you could bring me the other " + deficit + " that'd", "be great!");
player.setAttribute("/save:" + keyAmt, deficit);
}
player.getInventory().remove(new Item(pieId, piesInInventory));
player.getInventory().add(new Item(995, pieReward.reward * piesInInventory));
player.getInventory().remove(new Item(pieId, piesToGive)); // Only remove what we need
player.getInventory().add(new Item(995, pieReward.reward * piesToGive)); // Only pay for what we took
stage = 999;
break;
case 60:
pieAmt = RandomFunction.random(1, 28);
pieId = PieReward.values()[RandomFunction.nextInt(PieReward.values().length)].id;
player.setAttribute("/save:" + keyAmt, pieAmt);
player.setAttribute("/save:" + keyId, pieId);
pieAmt = RandomFunction.random(1, 28);
pieId = PieReward.values()[RandomFunction.nextInt(PieReward.values().length)].id;
player.setAttribute("/save:" + keyAmt, pieAmt);
player.setAttribute("/save:" + keyId, pieId);
npc("Great, can you bake me " + pieAmt + " " + new Item(pieId).getName() + "s please.");
stage = 999;
break;
case 100:
player("Yes, it is.");
stage++;
break;
case 101:
npc("Oh, how splendid! Let me take that from you then.");
player.getInventory().remove(new Item(Items.WILD_PIE_7208));
player.getAchievementDiaryManager().finishTask(player, DiaryType.VARROCK, 2, 5);
stage++;
break;
case 102:
npc("Now, was there anything else you needed?");
if (pieId != 0 && pieAmt != 0) {
stage = 2;
} else {
stage = 0;
}
break;
case 100:
options("Yes, it is.", "No, it's for...someone else.");
stage++;
break;
case 101:
switch (buttonId) {
case 1:
player("Yes, it is.");
stage = 102;
break;
case 2:
player("No, it's for...someone else.");
stage = 103;
break;
}
break;
case 102:
npc("Oh, how splendid! Let me take that from you then.");
player.getInventory().remove(new Item(Items.WILD_PIE_7208));
player.getAchievementDiaryManager().finishTask(player, DiaryType.VARROCK, 2, 5);
stage = 104;
break;
case 103:
npc("Oh, I see. Was there something else you needed?");
if (pieId != 0 && pieAmt != 0) {
stage = 2;
} else {
stage = 0;
}
break;
case 104:
npc("Now, was there anything else you needed?");
if (pieId != 0 && pieAmt != 0) {
stage = 2;
} else {
stage = 0;
}
break;
}
return true;
@ -234,23 +265,21 @@ public class RomilyWeaklaxDialogue extends DialoguePlugin {
}
public static final class RomilyWildPieHandler extends UseWithHandler {
public RomilyWildPieHandler() {
super(Items.WILD_PIE_7208);
}
public RomilyWildPieHandler() {
super(Items.WILD_PIE_7208);
}
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
addHandler(3205, NPC_TYPE, this);
return this;
}
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
addHandler(3205, NPC_TYPE, this);
return this;
}
@Override
public boolean handle(NodeUsageEvent event) {
if (!event.getPlayer().getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(2,5)) {
event.getPlayer().getDialogueInterpreter().open(3205, event.getUsedItem());
}
return true;
}
}
@Override
public boolean handle(NodeUsageEvent event) {
event.getPlayer().getDialogueInterpreter().open(3205, event.getUsedWith(), event.getUsedItem());
return true;
}
}
}

View file

@ -3,6 +3,7 @@ package content.region.misthalin.varrock.diary
import content.global.skill.prayer.Bones
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.game.node.entity.player.link.diary.DiaryType
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.Components
@ -36,6 +37,14 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
NPCs.STRAY_DOG_5917, NPCs.STRAY_DOG_5918
)
private val DIGSITE_PENDANTS = arrayOf(
Items.DIGSITE_PENDANT_1_11190,
Items.DIGSITE_PENDANT_2_11191,
Items.DIGSITE_PENDANT_3_11192,
Items.DIGSITE_PENDANT_4_11193,
Items.DIGSITE_PENDANT_5_11194
)
object EasyTasks {
const val THESSALIA_BROWSE_CLOTHES = 0
const val AUBURY_TELEPORT_ESSENCE_MINE = 1
@ -103,19 +112,19 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
AreaDiaryTask(
VARROCK_ROOF_AREA,
DiaryLevel.EASY,
EasyTasks.FIND_HIGHEST_POINT
EasyTasks.FIND_HIGHEST_POINT
),
AreaDiaryTask(
SOS_LEVEL_2_AREA,
DiaryLevel.EASY,
EasyTasks.VISIT_SOS_LEVEL2
EasyTasks.VISIT_SOS_LEVEL2
),
AreaDiaryTask(
CHAMPIONS_GUILD,
DiaryLevel.MEDIUM,
MediumTasks.CHAMPIONS_GUILD_VISIT
MediumTasks.CHAMPIONS_GUILD_VISIT
)
)
@ -125,7 +134,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.EASY,
EasyTasks.BARBARIAN_VILLAGE_CATCH_TROUT
EasyTasks.BARBARIAN_VILLAGE_CATCH_TROUT
)
}
@ -133,7 +142,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.EASY,
EasyTasks.MINE_IRON_SOUTHEAST
EasyTasks.MINE_IRON_SOUTHEAST
)
}
@ -144,7 +153,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.EASY,
EasyTasks.LUMBERYARD_CHOP_DYING_TREE
EasyTasks.LUMBERYARD_CHOP_DYING_TREE
)
}
}
@ -153,7 +162,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.EASY,
EasyTasks.PATERDOMUS_MINE_LIMESTONE
EasyTasks.PATERDOMUS_MINE_LIMESTONE
)
}
}
@ -165,7 +174,14 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.EASY,
EasyTasks.AUBURY_TELEPORT_ESSENCE_MINE
EasyTasks.AUBURY_TELEPORT_ESSENCE_MINE
)
}
is Item -> if (event.source.id in DIGSITE_PENDANTS) {
finishTask(
player,
DiaryLevel.MEDIUM,
MediumTasks.DIGSITE_PENDANT_TELEPORT
)
}
}
@ -177,21 +193,21 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.EASY,
EasyTasks.EDGEVILLE_ENTER_DUNGEON_SOUTH
EasyTasks.EDGEVILLE_ENTER_DUNGEON_SOUTH
)
}
12598 -> if (event.target.id == 9312 && player.skills.getLevel(Skills.AGILITY, true) >= 21) {
finishTask(
player,
DiaryLevel.MEDIUM,
MediumTasks.USE_GE_UNDER_WALL_SHORTCUT
MediumTasks.USE_GE_UNDER_WALL_SHORTCUT
)
}
12698 -> if (event.target.id == 29370 && player.skills.getLevel(Skills.AGILITY, true) >= 51) {
finishTask(
player,
DiaryLevel.HARD,
HardTasks.USE_MOSS_GIANT_PIPE_SHORTCUT
HardTasks.USE_MOSS_GIANT_PIPE_SHORTCUT
)
}
}
@ -200,7 +216,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.MEDIUM,
MediumTasks.PALACE_PICKPOCKET_GUARD
MediumTasks.PALACE_PICKPOCKET_GUARD
)
}
@ -209,7 +225,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.MEDIUM,
MediumTasks.OZIACH_BROWSE_STORE
MediumTasks.OZIACH_BROWSE_STORE
)
}
}
@ -225,7 +241,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.HARD,
HardTasks.EDGEVILLE_MAKE_WAKA_CANOE
HardTasks.EDGEVILLE_MAKE_WAKA_CANOE
)
}
}
@ -239,7 +255,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.EASY,
EasyTasks.ELSIE_TELL_A_STORY
EasyTasks.ELSIE_TELL_A_STORY
)
}
}
@ -251,7 +267,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.EASY,
EasyTasks.GIVE_STRAY_DOG_A_BONE
EasyTasks.GIVE_STRAY_DOG_A_BONE
)
}
}
@ -264,7 +280,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.EASY,
EasyTasks.THESSALIA_BROWSE_CLOTHES
EasyTasks.THESSALIA_BROWSE_CLOTHES
)
}
}
@ -275,7 +291,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.MEDIUM,
MediumTasks.CAST_VARROCK_TELEPORT_SPELL
MediumTasks.CAST_VARROCK_TELEPORT_SPELL
)
}
}
@ -285,7 +301,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) {
finishTask(
player,
DiaryLevel.MEDIUM,
MediumTasks.DIAL_FAIRY_RING_WEST
MediumTasks.DIAL_FAIRY_RING_WEST
)
}
}

View file

@ -4,6 +4,9 @@ package content.region.misthalin.varrock.quest.familycrest
import core.api.*
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.diary.DiaryType
import core.game.diary.DiaryLevel
import content.region.misthalin.varrock.diary.VarrockAchivementDiary
import core.plugin.Initializable
import org.rs09.consts.Items
import content.data.Quests
@ -11,9 +14,9 @@ import content.data.Quests
@Initializable
/**
* Handles DimintheisDialogue Dialogue
* @author Plex
*/
* Handles DimintheisDialogue Dialogue
* @author Plex
*/
class DimintheisDialogue(player: Player? = null): core.game.dialogue.DialoguePlugin(player) {
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return DimintheisDialogue(player)
@ -33,20 +36,29 @@ class DimintheisDialogue(player: Player? = null): core.game.dialogue.DialoguePlu
if (questComplete && hasGauntlets) {
npc("Thank you for saving our family honour, ",
"We will never forget you")
"We will never forget you.")
stage = 1000
return true
}
if (questComplete && !hasGauntlets) {
player("I've lost the gauntlets you gave me")
// Get the gauntlet type that was lost
val gauntletId = getAttribute(player, "family-crest:gauntlets", Items.FAMILY_GAUNTLETS_778)
val gauntletName = when(gauntletId) {
Items.COOKING_GAUNTLETS_775 -> "cooking"
Items.GOLDSMITH_GAUNTLETS_776 -> "goldsmithing" //https://youtu.be/tpt3dXGydXo?si=AlEYXKQpwr0qvHin&t=422
Items.CHAOS_GAUNTLETS_777 -> "chaos"
else -> "family"
}
npc("Your $gauntletName gauntlets returned to me through ",
"their magic power recently. Would you like them back?")
stage = 6000
return true
}
when(questStage) {
0 -> npc("Hello. My name is Dimintheis, ",
"of the noble family Fitzharmon.").also { stage = 1 }
"of the noble family Fitzharmon.").also { stage = 1 }
10 -> player("Where did you say I could find your son Caleb again?").also { stage = 3000 }
11 -> player("Where did you say I could find your son Caleb again?").also { stage = 3000 }
12 -> npc("Have you found my crest yet?").also{ stage = 4000 }
@ -64,70 +76,70 @@ class DimintheisDialogue(player: Player? = null): core.game.dialogue.DialoguePlu
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
1 -> options(
"Why would a nobleman live in a dump like this?",
"You're rich then? Can i have some money?",
"Hi, i am a bold adventurer.").also { stage++ }
"Why would a nobleman live in a dump like this?",
"You're rich then? Can i have some money?",
"Hi, i am a bold adventurer.").also { stage++ }
2 -> when(buttonId){
1 -> npc("The King has taken my estate from me ",
"until such time as I can show my family crest to him.").also { stage = 3 }
"until such time as I can show my family crest to him.").also { stage = 3 }
2 -> npc("Gah! Lousy beggar! " ,
"Your sort is what's ruining this great land! ",
"Why don't you just go and get a " ,
"job if you need money so badly?").also { stage = 1000}
"Your sort is what's ruining this great land! ",
"Why don't you just go and get a " ,
"job if you need money so badly?").also { stage = 1000}
3 -> npc("An adventurer hmmm? How lucky. I may have an adventure for you. " ,
"I desperately need my family crest returning to me. " ,
"It is of utmost importance.").also { stage = 4 }
"I desperately need my family crest returning to me. " ,
"It is of utmost importance.").also { stage = 4 }
}
3 -> options("Why would he do that?",
"So where is this crest?").also { stage = 5 }
"So where is this crest?").also { stage = 5 }
4 -> options("Why are you so desperate for it?",
"So where is this crest?",
"I'm not interested in that adventure right now").also { stage = 6 }
"So where is this crest?",
"I'm not interested in that adventure right now").also { stage = 6 }
5 -> when(buttonId){
1-> npc("Well, there is a long standing rule of chivalry " ,
"amongst the Varrockian aristocracy,").also{ stage = 2000 }
"amongst the Varrockian aristocracy,").also{ stage = 2000 }
2-> npc("Well, my three sons took it with them " ,
"many years ago when they rode ").also { stage = 2007 }
"many years ago when they rode ").also { stage = 2007 }
}
6 -> when(buttonId){
1 -> npc("Well, there is a long standing rule of chivalry " ,
"amongst the Varrockian aristocracy,").also{ stage = 2000 }
"amongst the Varrockian aristocracy,").also{ stage = 2000 }
2 -> npc("Well, my three sons took it with them " ,
"many years ago when they rode ").also { stage = 2007 }
"many years ago when they rode ").also { stage = 2007 }
3 -> npc("I realise it was a lot to ask of a stranger.").also { stage = 1000}
}
2000 -> npc(
"where each noble family is in possession of a unique crest, ",
"which signifies the honour and lineage of the family. ").also { stage++}
"where each noble family is in possession of a unique crest, ",
"which signifies the honour and lineage of the family. ").also { stage++}
2001 -> npc("More than this however, it also represents the ",
"lawful rights of each family to prove their ownership of ",
"their wealth and lands. If the family crest is lost,").also { stage++ }
"lawful rights of each family to prove their ownership of ",
"their wealth and lands. If the family crest is lost,").also { stage++ }
2002 -> npc( "then the family's estate is handed over to the ",
"current monarch until the crest is restored.").also{ stage++ }
"current monarch until the crest is restored.").also{ stage++ }
2003 -> npc("This dates back to the times when there was much in-fighting " ,
"amongst the noble families and their clans, and ",
"was introduced as a way of reducing the bloodshed that was ",
"devastating the ranks of the ruling classes at that time.").also { stage++ }
"amongst the noble families and their clans, and ",
"was introduced as a way of reducing the bloodshed that was ",
"devastating the ranks of the ruling classes at that time.").also { stage++ }
2004 -> npc("When you captured a rival family's clan, " ,
"you also captured their lands and wealth.").also{ stage++}
"you also captured their lands and wealth.").also{ stage++}
2005 -> options("So where is this crest?", "I'm not interested in an adventure right now").also{stage++}
2006 -> when(buttonId){
1-> npc("Well, my three sons took it ",
"with them many years ago when they rode out ").also { stage++ }
"with them many years ago when they rode out ").also { stage++ }
2 -> npc("I realise it was a lot to ask of a stranger.").also { stage = 1000 }
}
2007 -> npc("to fight in the war against the undead necromancer " ,
"and his army in the battle to save Varrock.").also { stage++ }
"and his army in the battle to save Varrock.").also { stage++ }
2008 -> npc("For many years I had assumed them all dead, " ,
"as I had heard no word from them.").also { stage++ }
"as I had heard no word from them.").also { stage++ }
2009 -> npc("Recently I heard that my son Caleb is alive and well, " ,
"trying to earn his fortune as a great fish chef in Catherby.").also { stage++ }
"trying to earn his fortune as a great fish chef in Catherby.").also { stage++ }
2010 -> options("Ok, I will help you", "I'm not interested in an adventure right now").also { stage++ }
2011 -> when(buttonId){
1 -> npc("I thank you greatly adventurer!").also { stage++ }
@ -141,38 +153,45 @@ class DimintheisDialogue(player: Player? = null): core.game.dialogue.DialoguePlu
}
3000 ->npc("The only thing I have heard of my son Caleb ",
"is that he is trying to earn his fortune as a great fish chef.").also{ stage++ }
"is that he is trying to earn his fortune as a great fish chef.").also{ stage++ }
3001 ->npc("I believe he is staying with a friend ",
"who lives just outside the west gates of Varrock.").also{ stage = 1000 }
"who lives just outside the west gates of Varrock.").also{ stage = 1000 }
4000 -> player("I'm still looking for it").also{ stage = 1000 }
5000 -> npc("Adventurer... I can only thank you for your kindness, " ,
"although the words are insufficient " ,
"to express the gratitude I feel!").also{ stage++ }
"although the words are insufficient " ,
"to express the gratitude I feel!").also{ stage++ }
5001 -> npc("You are truly a hero in every sense, " ,
"and perhaps your efforts can begin to " ,
"patch the wounds that have torn this family apart...").also{ stage++ }
"and perhaps your efforts can begin to " ,
"patch the wounds that have torn this family apart...").also{ stage++ }
5002 -> npc("I know not how I can adequately reward you for your efforts... " ,
"although I do have these mystical gauntlets, " ,
"a family heirloom that through some power unknown to me, " ,
"have always returned to the head of the family whenever lost,").also{ stage++ }
"although I do have these mystical gauntlets, " ,
"a family heirloom that through some power unknown to me, " ,
"have always returned to the head of the family whenever lost,").also{ stage++ }
5003 -> npc(" or if the owner has died. " ,
"I will pledge these to you, " ,
"and if you should lose them return to me, " ,
"and they will be here.").also{ stage++ }
"I will pledge these to you, " ,
"and if you should lose them return to me, " ,
"and they will be here.").also{ stage++ }
5004 -> npc("They can also be granted extra powers. " ,
"Take them to one of my sons, " ,
"they should be able to imbue them with a skill for you.").also {
stage = 1000
if (removeItem(player, Items.FAMILY_CREST_782)) {
finishQuest(player, Quests.FAMILY_CREST)
}
}
6000 -> npc("Not to worry, here they are").also {
"Take them to one of my sons, " ,
"they should be able to imbue them with a skill for you.").also {
stage = 1000
if (removeItem(player, Items.FAMILY_CREST_782)) {
finishQuest(player, Quests.FAMILY_CREST)
}
}
6000 -> options("Yes please.", "Not right now.").also { stage++ }
6001 -> when(buttonId) {
1 -> player("Yes please.").also { stage++ }
2 -> player("Not right now.").also { stage = 1000 }
}
6002 -> npc("Here you go.").also { stage++ }
6003 -> {
addItem(player, getAttribute(player, "family-crest:gauntlets", Items.FAMILY_GAUNTLETS_778))
player.achievementDiaryManager.finishTask(player, DiaryType.VARROCK, DiaryLevel.HARD.ordinal, VarrockAchivementDiary.Companion.HardTasks.OBTAIN_NEW_SET_OF_FAMILY_CREST_GAUNTLETS)
end()
}
1000 -> end()
@ -184,4 +203,4 @@ class DimintheisDialogue(player: Player? = null): core.game.dialogue.DialoguePlu
override fun getIds(): IntArray {
return intArrayOf(8171)
}
}
}