cb630e7043
Added a new quest requirement system Ensured that all implemented rewards are obtainable, even if all requirements are not implemented Rewards that should have higher requirements than what is currently obtainable will have those requirements automatically increase as more quests are added The requirements for any quest can be viewed at any time by clicking it in the quest list Things that were previously locked/unavailable but are now available (with prereqs) are: - It is now possible to obtain and equip Barrow's Gloves with the Recipe for Disaster prereqs - It is now possible to obtain and equip an Ancient Staff with the Desert Treasure prereqs - It is now possible to enchant your secateurs into Magic Secateurs with the Fairy Tale I - Growing Pains prereqs and 40k gold - It is now possible to equip the Ancient Mace with the Another Slice of H.A.M prereqs - It is now possible to get Suqahs as a task from Duradel with the Lunar Diplomacy prereqs - It is now possible to obtain a Seal of Passage by speaking with Chieftan Brundt after meeting the Lunar Diplomacy prereqs - It is now possible to obtain Ancient Staves by killing the level 96 and 103 mummies in the Ancient Pyramid (1/500) Things that were freely available but are now locked include: - Sophanem now requires/requires the prereqs of Icthlarin's Little Helper - Pharaoh's Sceptre requires the same^ - Equipping god books now requires Horror from the Deep/its prereqs - Neitiznot helmet now requires the Fremennik Isles prereqs rather than just Fremennik Trials - Cape of Legends now correctly requires the full possible prereqs for Legend's Quest rather than just 55 QP - Dragon Scimitar now correctly requires the Monkey Madness prereqs - Ape Atoll teleport now correctly requires the Monkey Madness prereqs - Slayer Helmet and the Slayer Rewards Shop in general now correctly require the Smoking Kills prereqs (not high) - Dragon Halberd now requires the Regicide prereqs - Climbing Boots now require the Death Plateau prereqs - Dragon SQ Shield now requires the Legend's Quest prereqs to equip (source available in sourcecode) - Initiate Armour now requires the Recruitment Drive prereqs - Proselyte Armour now requires the Slug Menace prereqs - Access to Piscatoris now requires the Swan Song prereqs (effectively Quest Cape here.) - The disease-free herb patch in Trollheim now requires the My Arm's Big Adventure prereqs. - Ardougne Teleport now requires the Plague City prereqs - Watchtower Teleport now requires the Watchtower prereqs - Trollheim Teleport now requires the Eadgar's Ruse prereqs - The Lunar spellbook now requires the Lunar Diplomacy prereqs - The Ancient spellbook now requires the Desert Treasure prereqs - Crafting Astral Runes now requires the Lunar Diplomacy prereqs - Crafting Death Runes now requires the Mourning's End Part II prereqs - Crafting Blood Runes now requires the Legacy of Seergaze prereqs - Access to Cave Horrors now requires the Cabin Fever prereqs - Sorceress' Garden now requires Prince Ali Rescue - Access to the Heroes' Guild now requires the Heroes' Quest prereqs - Access to GWD now requires the Troll Stronghold prereqs - Access to Neitiznot and Jatizso now requires Fremennik Trials - Access to Shilo Villa now requires the Shilo Village prereqs - The Keldagrim cart system now requires The Giant Dwarf prereqs - Fairy Rings now require the full Fairy Tale I - Growing Pains prereqs - Ectophial now requires the Ghosts Ahoy prereqs - Access to Tormented Demons now requires the While Guthix Sleeps prereqs - Access to the Halberd Shop and the ability to equip Dragon Halberds now requires the Regicide prereqs - Access to Lletya now requires the Mourning's End Part I prereqs - Access to Corporeal Beast now requires the Summer's End prereqs - Chivalry and Piety prayers now require the King's Ransom prereqs - Ali Morrisane's rune shop now requires the The Feud prereqs - Armoured Zombies now require the Defender of Varrock prereqs - Experiments now require the Creature of Fenkenstrain prereqs - The carpet to Sophanem now requires the Icthlarin's Little Helper prereqs - The carpet to Uzer now requires The Golem - The carpet to Bedabin Camp now requires The Tourist Trap - The bank in Sophanem now requires the Contact! prereqs - The Dragon Battleaxe now requires the prereqs of Heroes' Quest to equip. - The Dragon Mace now requires the prereqs of Heroes' Quest to equip. - Spirit shields of all varieties (improved, blessed, unblessed) now require the prereqs of Summer's End to equip. - Bork access now requires What Lies Below
268 lines
6.8 KiB
Java
268 lines
6.8 KiB
Java
package content.minigame.sorceress;
|
|
|
|
import core.game.dialogue.DialoguePlugin;
|
|
import core.game.dialogue.FacialExpression;
|
|
import core.game.node.entity.impl.Projectile;
|
|
import core.game.node.entity.npc.NPC;
|
|
import core.game.node.entity.player.Player;
|
|
import core.game.system.task.Pulse;
|
|
import core.game.world.GameWorld;
|
|
import core.game.world.map.Location;
|
|
import core.game.world.update.flag.context.Graphics;
|
|
|
|
import static core.api.ContentAPIKt.hasRequirement;
|
|
|
|
/**
|
|
* Dialogue for Sorceress Apprentice
|
|
* @author SonicForce41
|
|
*/
|
|
public class SorceressApprenticeDialogue extends DialoguePlugin {
|
|
|
|
/**
|
|
* Constructs a new {@code SorceressApprenticeDialogue.java} {@code Object}.
|
|
*/
|
|
public SorceressApprenticeDialogue() {
|
|
|
|
}
|
|
|
|
/**
|
|
* Constructs a new {@code SorceressApprenticeDialogue.java} {@code Object}.
|
|
* @param player the Player
|
|
*/
|
|
public SorceressApprenticeDialogue(Player player) {
|
|
super(player);
|
|
}
|
|
|
|
@Override
|
|
public int[] getIds() {
|
|
return new int[] { 5532 };
|
|
}
|
|
|
|
@Override
|
|
public boolean handle(int interfaceId, int buttonId) {
|
|
switch (stage) {
|
|
case 0:
|
|
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Okay, here goes - and remember, to", "return just drink from the fountain.");
|
|
stage = 1;
|
|
break;
|
|
case 1:
|
|
teleport(npc, player);
|
|
end();
|
|
break;
|
|
case 10:
|
|
npc("Cleaning, cleaning, always cleaning. This apprenticeship", "isn't all that it was cracked up to be.");
|
|
stage = 11;
|
|
break;
|
|
case 11:
|
|
player("Whose apprentice are you?");
|
|
stage = 12;
|
|
break;
|
|
case 12:
|
|
npc("Oh, Aadeela, the sorceress upstairs, said she'd teach me", "magic, she did. And here I am scrubbing floors without", "a spell to help me.");
|
|
stage = 13;
|
|
break;
|
|
case 13:
|
|
interpreter.sendOptions("Select an Option", "I could cast a Water Blast or a Wind Blast spell?", "Surely there must be upsides to the task?");
|
|
stage = 14;
|
|
break;
|
|
case 14:
|
|
switch (buttonId) {
|
|
case 1:
|
|
player("I could cast a Water Blast or a Wind Blast spell to", "hurry things along if you'd like?");
|
|
stage = 110;
|
|
break;
|
|
case 2:
|
|
player("Surely there must be upsides to the task?");
|
|
stage = 120;
|
|
break;
|
|
}
|
|
break;
|
|
case 110:
|
|
npc("No, no, she'd kill me or worse if she knew I was using", "Magic to do chores. Her last apprentice - well I'd", "rather not say.");
|
|
stage = 111;
|
|
break;
|
|
case 111:
|
|
player("Oh go on, what happend to them?");
|
|
stage = 112;
|
|
break;
|
|
case 112:
|
|
npc("They say she turned them into little spiders.");
|
|
stage = 113;
|
|
break;
|
|
case 113:
|
|
player("Oh, that's too bad. I had better leave you to it.");
|
|
stage = 114;
|
|
break;
|
|
case 114:
|
|
end();
|
|
break;
|
|
case 120:
|
|
npc("Nope. Clean this, clean that. When I'm finished cleaning", "here I have to go help out in the garden.");
|
|
stage = 121;
|
|
break;
|
|
case 121:
|
|
player("What garden?");
|
|
stage = 122;
|
|
break;
|
|
case 122:
|
|
npc("Oh, I shouldn't have told you.");
|
|
stage = 123;
|
|
break;
|
|
case 123:
|
|
interpreter.sendOptions("Select an Option", "You're right, you shouldn't have.", "Oh, you can talk to me. I can see you're having a bad day.");
|
|
stage = 124;
|
|
break;
|
|
case 124:
|
|
switch (buttonId) {
|
|
case 1:
|
|
player("You're right, you shouldn't have.");
|
|
stage = 125;
|
|
break;
|
|
case 2:
|
|
player("Oh, you can talk to me. I can see you're having a bad", "day.");
|
|
stage = 126;
|
|
break;
|
|
}
|
|
break;
|
|
case 125:
|
|
end();
|
|
break;
|
|
case 126:
|
|
npc("You know you're right. Nobody listens to me.");
|
|
stage = 127;
|
|
break;
|
|
case 127:
|
|
player("A sympathetic ear can do wonders.");
|
|
stage = 128;
|
|
break;
|
|
case 128:
|
|
npc("Yes, if I just let my frustrations out, I'd feel a lot", "better. Now what was I saying?");
|
|
stage = 129;
|
|
break;
|
|
case 129:
|
|
player("You mentioned something about the garden.");
|
|
stage = 130;
|
|
break;
|
|
case 130:
|
|
npc("Oh yeah, the dreadful garden of hers.");
|
|
stage = 131;
|
|
break;
|
|
case 131:
|
|
player("Where is it?");
|
|
stage = 132;
|
|
break;
|
|
case 132:
|
|
npc("Oh, it's nowhere.");
|
|
stage = 133;
|
|
break;
|
|
case 133:
|
|
player("What do you mean?");
|
|
stage = 134;
|
|
break;
|
|
case 134:
|
|
npc("Well it's here, but not really. You see the sorceress is", "trying out some new type of compression magic.");
|
|
stage = 135;
|
|
break;
|
|
case 135:
|
|
player("Oh, that sounds interesting - so how does it work?");
|
|
stage = 136;
|
|
break;
|
|
case 136:
|
|
npc("It would take too long to explain and, to be honest, I", "don't really understand how it works.");
|
|
stage = 137;
|
|
break;
|
|
case 137:
|
|
player("Fair enough, but tell me, how do you get to the", "garden?");
|
|
stage = 138;
|
|
break;
|
|
case 138:
|
|
npc("By magic! The sorceress did teach me one spell.");
|
|
stage = 139;
|
|
break;
|
|
case 139:
|
|
interpreter.sendOptions("Select an Option", "Wow, cast the spell on me. It will be good Magic training for you.", "Oh, that's nice. Well it's been great talking to you.");
|
|
stage = 140;
|
|
break;
|
|
case 140:
|
|
switch (buttonId) {
|
|
case 1:
|
|
player("Wow, cast the spell on me. It will be good Magic", "training for you.");
|
|
stage = 142;
|
|
break;
|
|
case 2:
|
|
player("Oh, that's nice. Well it's been great", "talking to you.");
|
|
stage = 141;
|
|
break;
|
|
}
|
|
break;
|
|
case 141:
|
|
end();
|
|
break;
|
|
case 142:
|
|
npc("You wouldn't mind?");
|
|
stage = 143;
|
|
break;
|
|
case 143:
|
|
player("Of course not. I'd be glad to help.");
|
|
stage = 144;
|
|
break;
|
|
case 144:
|
|
npc("Okay, here goes! Remember, to return, just drink from", "the fountain.");
|
|
stage = 145;
|
|
break;
|
|
case 145:
|
|
player.getSavedData().getGlobalData().setApprentice(true);
|
|
teleport(npc, player);
|
|
end();
|
|
break;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public DialoguePlugin newInstance(Player player) {
|
|
return new SorceressApprenticeDialogue(player);
|
|
}
|
|
|
|
@Override
|
|
public boolean open(Object... args) {
|
|
npc = (NPC) args[0];
|
|
if (player.getSavedData().getGlobalData().hasSpokenToApprentice()) {
|
|
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Hey apprentice, do you want to try out", "your teleport skills again?");
|
|
stage = 0;
|
|
} else {
|
|
player("Hello. What are you doing?");
|
|
stage = 10;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static void teleport(final NPC npc, final Player player) {
|
|
if (!hasRequirement(player, "Prince Ali Rescue"))
|
|
return;
|
|
npc.faceTemporary(player, 4);
|
|
npc.graphics(new Graphics(108));
|
|
player.lock();
|
|
Projectile.create(npc, player, 109).send();
|
|
npc.sendChat("Senventior Disthinte Molesko!");
|
|
GameWorld.getPulser().submit(new Pulse(1) {
|
|
int counter = 0;
|
|
|
|
@Override
|
|
public boolean pulse() {
|
|
switch (counter++) {
|
|
case 2:
|
|
player.getProperties().setTeleportLocation(Location.create(2912, 5474, 0));
|
|
break;
|
|
case 3:
|
|
player.graphics(new Graphics(110));
|
|
player.unlock();
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
});
|
|
}
|
|
|
|
}
|