Merge branch 'master' into 'master'

Fix: Shops, Examines, Objects, misc janitor work

See merge request 2009scape/2009scape!88
This commit is contained in:
Ceikry
2021-07-02 04:32:22 +00:00
7 changed files with 21106 additions and 20997 deletions
+111 -10
View File
@@ -4486,6 +4486,23 @@
"range_level": "1",
"attack_level": "25"
},
{
"examine": "An old motherly witch with a curious smile and a hooked nose.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Hetty",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "307",
"aggressive": "true",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "The man in charge of the fishing guild.",
"melee_animation": "0",
@@ -4502,6 +4519,23 @@
"range_level": "1",
"attack_level": "1"
},
{
"examine": "He has a colourful personality.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Da Vinci",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "336",
"aggressive": "true",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "He's ready for a bet.",
"melee_animation": "0",
@@ -5662,7 +5696,7 @@
"respawn_delay": "60",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"death_animation": "836",
"name": "Jail guard",
"defence_level": "21",
"safespot": null,
@@ -5682,7 +5716,7 @@
"respawn_delay": "60",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"death_animation": "836",
"name": "Jail guard",
"defence_level": "21",
"safespot": null,
@@ -5702,7 +5736,7 @@
"respawn_delay": "60",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"death_animation": "836",
"name": "Jail guard",
"defence_level": "21",
"safespot": null,
@@ -6872,6 +6906,22 @@
"range_level": "1",
"attack_level": "1"
},
{
"examine": "If crafting's your thing, he's your man!",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Rommik",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "574",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "He seems to sell tea.",
"melee_animation": "0",
@@ -9467,7 +9517,7 @@
"respawn_delay": "60",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"death_animation": "836",
"name": "Jail guard",
"defence_level": "21",
"safespot": null,
@@ -12067,6 +12117,7 @@
"melee_animation": "6241",
"range_animation": "6241",
"attack_speed": "4",
"poisonous": "true",
"magic_level": "150",
"respawn_delay": "45",
"defence_animation": "6232",
@@ -19192,6 +19243,22 @@
"range_level": "1",
"attack_level": "1"
},
{
"examine": "He sells ranging equipment.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Brian",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "1866",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "Nemarti looks ready to teach you about ranged combat.",
"melee_animation": "0",
@@ -23082,6 +23149,22 @@
"range_level": "1",
"attack_level": "1"
},
{
"examine": "Perhaps this gardener might look after your crops for you.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Taria",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2336",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "Perhaps this gardener might look after your crops for you.",
"melee_animation": "0",
@@ -24807,19 +24890,37 @@
"attack_level": "1"
},
{
"death_animation": "836",
"examine": "A citizen of Rimmington.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Hengel",
"defence_level": "1",
"safespot": null,
"lifepoints": "7",
"melee_animation": "422",
"lifepoints": "10",
"strength_level": "1",
"id": "2683",
"range_level": "1",
"respawn_delay": "60",
"attack_level": "1",
"defence_animation": "425"
"attack_level": "1"
},
{
"examine": "A citizen of Rimmington.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Anja",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2684",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "An ugly smelly creature.",
"melee_animation": "164",
+1 -1
View File
@@ -1469,7 +1469,7 @@
},
{
"npc_id": "558",
"loc_data": "{3013,3221,0,1,6}"
"loc_data": "{3013,3225,0,1,1}"
},
{
"npc_id": "559",
File diff suppressed because it is too large Load Diff
+31 -31
View File
@@ -357,7 +357,7 @@
"general_store": "true",
"id": "41",
"title": "Trader Stan's Trading Post",
"stock": "{1931,5}-{1935,2}-{1735,2}-{1925,3}-{1923,2}-{1887,2}-{590,2}-{1755,2}-{2347,5}-{550,5}-{9003,5}-{954,2}-{946,2}-{2114,inf}-{1963,15}-{2108,10}-{4286,10}-{1785,15}-{1783,inf}-{401,inf}-{1781,10}-{301,20}-{307,20}-{1941,30}-{9629,25}-{3226,20}-{1025,5}"
"stock": "{1931,5}-{1935,2}-{1735,2}-{1925,3}-{1923,2}-{1887,2}-{590,2}-{1755,2}-{2347,5}-{550,5}-{9003,5}-{954,2}-{946,2}-{2114,0}-{1963,15}-{2108,10}-{4286,10}-{1785,15}-{1783,inf}-{401,inf}-{1781,10}-{301,20}-{307,20}-{1941,30}-{9629,25}-{3226,20}-{1025,5}"
},
{
"npcs": "534",
@@ -397,12 +397,12 @@
},
{
"npcs": "1860",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "46",
"title": "Brian's Archery Supplies",
"stock": "{886,100}-{888,30}-{890,0}-{843,10}-{849,10}-{853,10}"
"stock": "{886,100}-{888,30}-{890,0}-{843,10}-{845,10}-{849,10}-{847,10}-{853,10}-{851,10}"
},
{
"npcs": "550",
@@ -478,12 +478,12 @@
},
{
"npcs": "559",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "55",
"title": "Brian's Battleaxe Bazaar",
"stock": "{1375,10}-{1363,10}-{1365,10}-{1367,10}-{1369,10}-{1371,10}"
"stock": "{1375,4}-{1363,3}-{1365,2}-{1367,1}-{1369,1}-{1371,1}"
},
{
"npcs": "562",
@@ -510,7 +510,7 @@
"general_store": "false",
"id": "58",
"title": "Wayne's Chains",
"stock": "{1103,10}-{1101,10}-{1105,10}-{1107,10}-{1109,10}-{1111,10}"
"stock": "{1103,3}-{1101,2}-{1105,1}-{1107,1}-{1109,1}-{1111,1}"
},
{
"npcs": "554",
@@ -622,7 +622,7 @@
},
{
"npcs": "585",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "71",
@@ -658,12 +658,12 @@
},
{
"npcs": "2304",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "75",
"title": "Sarah's Farming Shop",
"stock": "{5376,10}-{6032,300}-{5418,10}-{5376,10}-{6036,10}-{5354,100}-{5341,10}-{5329,10}-{5343,10}-{952,10}-{5325,10}-{1925,100}-{5331,30}-{12622,10}-{5996,0}-{6006,0}-{1965,0}-{5994,0}-{5931,0}-{6000,0}-{1957,0}-{5504,0}-{5986,0}-{1982,0}-{5982,0}-{6002,0}-{5998,0}"
"stock": "{5376,10}-{6032,300}-{5418,10}-{6036,10}-{5354,100}-{5341,10}-{5329,10}-{5343,10}-{952,10}-{5325,10}-{1925,100}-{5331,30}-{12622,10}-{5996,0}-{6006,0}-{1965,0}-{5994,0}-{5931,0}-{6000,0}-{1957,0}-{5504,0}-{5986,0}-{1982,0}-{5982,0}-{6002,0}-{5998,0}"
},
{
"npcs": "1783",
@@ -676,11 +676,11 @@
},
{
"npcs": "557",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "77",
"title": "Wydin's Consumables Store",
"title": "Wydin's Food Store",
"stock": "{1933,500}-{2132,10}-{2138,10}-{1965,10}-{1963,0}-{1951,0}-{2309,10}-{1973,10}-{1985,10}-{1982,10}-{1550,10}"
},
{
@@ -748,11 +748,11 @@
},
{
"npcs": "4293",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "85",
"title": "Warriors' Guild Consumables Shop",
"title": "Warriors' Guild Food Shop",
"stock": "{333,10}-{365,10}-{2289,10}-{6705,10}-{2003,10}"
},
{
@@ -766,11 +766,11 @@
},
{
"npcs": "584",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "87",
"title": "Herquin's Gem",
"title": "Herquin's Gems",
"stock": "{1623,0}-{1621,0}-{1619,0}-{1617,0}-{1607,0}-{1605,0}-{1603,0}-{1601,0}"
},
{
@@ -932,8 +932,8 @@
"currency": "995",
"general_store": "false",
"id": "106",
"title": "Jewellery Shop",
"stock": "{1635,0}-{1637,0}-{1639,0}-{1641,0}-{1643,0}-{1654,0}-{1656,0}-{1658,0}-{1660,0}-{1662,0}-{1673,0}-{1675,0}-{1696,0}-{1698,0}-{1700,0}-{11069,0}-{11072,0}-{11076,0}-{11085,0}-{11092,0}"
"title": "Grum's Gold Exchange",
"stock": "{1635,0}-{1637,0}-{1639,0}-{1641,0}-{1643,0}-{1654,0}-{1656,0}-{1658,0}-{1660,0}-{1662,0}-{1692,0}-{1694,0}-{1696,0}-{1698,0}-{1700,0}-{11069,0}-{11072,0}-{11076,0}-{11085,0}-{11092,0}"
},
{
"npcs": "1862",
@@ -977,8 +977,8 @@
"currency": "995",
"general_store": "false",
"id": "111",
"title": "Mace Shop",
"stock": "{1422,10}-{1420,10}-{1424,10}-{1428,10}-{1430,10}"
"title": "Flynn's Mace Market",
"stock": "{1422,5}-{1420,4}-{1424,4}-{1428,3}-{1430,2}"
},
{
"npcs": "1862",
@@ -991,12 +991,12 @@
},
{
"npcs": "583",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "113",
"title": "Betty's Magic Emporium",
"stock": "{554,3000}-{555,3000}-{556,3000}-{557,3000}-{558,100}-{559,100}-{562,30}-{560,10}-{221,150}-{579,10}-{1017,10}"
"stock": "{554,300}-{555,300}-{556,300}-{557,300}-{558,100}-{559,100}-{562,30}-{560,10}-{221,100}-{579,10}-{1017,10}"
},
{
"npcs": "553",
@@ -1207,12 +1207,12 @@
},
{
"npcs": "577",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "137",
"title": "Shield Shop",
"stock": "{1171,10}-{1173,10}-{1189,10}-{1175,10}-{1191,10}-{1177,10}-{1193,10}-{1181,10}"
"title": "Cassie's Shield Shop",
"stock": "{1171,5}-{1173,3}-{1189,3}-{1175,2}-{1191,0}-{1177,0}-{1193,0}-{1181,0}"
},
{
"npcs": "209",
@@ -1275,7 +1275,7 @@
"general_store": "false",
"id": "144",
"title": "Gerrant's Fishy Business",
"stock": "{303,10}-{307,10}-{309,10}-{311,1000}-{301,10}-{313,1000}-{314,1000}-{317,0}-{327,10}-{345,0}-{321,0}-{335,0}-{349,0}-{331,0}-{359,0}-{377,0}-{371,0}"
"stock": "{303,10}-{307,10}-{309,10}-{311,30}-{301,10}-{13431,10}-{313,1000}-{314,1000}-{317,0}-{327,10}-{345,0}-{321,0}-{335,0}-{349,0}-{331,0}-{359,0}-{377,0}-{371,0}"
},
{
"npcs": "576",
@@ -1284,7 +1284,7 @@
"general_store": "false",
"id": "145",
"title": "Harry's Fishing Shop",
"stock": "{303,10}-{307,10}-{311,1000}-{301,10}-{313,1000}-{305,10}-{317,0}-{327,0}-{345,0}-{353,0}-{341,0}-{321,0}-{359,0}-{377,0}-{363,0}-{371,0}-{383,0}-{7810,1000}"
"stock": "{303,10}-{307,10}-{311,1000}-{301,10}-{313,100}-{305,10}-{317,0}-{327,0}-{345,0}-{353,0}-{341,0}-{321,0}-{359,0}-{377,0}-{363,0}-{371,0}-{383,0}-{7810,1000}"
},
{
"npcs": "5266",
@@ -1882,12 +1882,12 @@
},
{
"npcs": "4251",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "213",
"title": "The Garden Centre",
"stock": "{8417,1000}-{8419,1000}-{8421,1000}-{8423,1000}-{8425,1000}-{8427,1000}-{8429,1000}-{8431,1000}-{8433,1000}-{8435,1000}-{8451,1000}-{8453,1000}-{8455,1000}-{8457,1000}-{8459,1000}-{8461,1000}-{8437,1000}-{8439,1000}-{8441,1000}-{8443,1000}-{8445,1000}-{8447,1000}-{8449,1000}"
"stock": "{8417,10}-{8419,10}-{8421,10}-{8423,10}-{8425,10}-{8427,10}-{8429,10}-{8431,1000}-{8433,10}-{8435,10}-{8451,10}-{8453,10}-{8455,10}-{8457,10}-{8459,10}-{8461,10}-{8437,10}-{8439,10}-{8441,10}-{8443,10}-{8445,10}-{8447,10}-{8449,10}"
},
{
"npcs": "1972",
@@ -2079,13 +2079,13 @@
"stock": "{1917,10}-{3803,10}-{3711,10}"
},
{
"npcs": "4248",
"npcs": "7420",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "235",
"title": "Keldagrim Stonemason",
"stock": "{3420,500}-{8786,30}-{8784,30}-{8788,30}"
"title": "Gnomic Supplies",
"stock": "{1931,inf}-{1929,inf}-{1937,inf}-{2313,inf}-{1887,inf}-{590,inf}-{1735,inf}-{1951,inf}-{1969,inf}-{1949,inf}"
},
{
"npcs": "4856",
@@ -1,276 +1,276 @@
package core.game.content.dialogue;
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.node.item.GroundItem;
import core.game.node.item.GroundItemManager;
import core.plugin.Initializable;
import core.game.node.item.Item;
/**
* Represents the dialogue plugin used for the apothecary npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class ApothecaryDialogue extends DialoguePlugin {
/**
* Represents the potion requirements.
*/
private static final Item[] POTION_ITEMS = new Item[] { new Item(223), new Item(225), new Item(995, 5) };
/**
* Represents the potion item.
*/
private static final Item POTION = new Item(115);
/**
* Represents the unkown potion.
*/
private static final Item UNKNOWN_POTION = new Item(195, 1);
/**
* Represents the cadava berries item.
*/
private static final Item CADAVA_BERRIES = new Item(753);
/**
* Represents the cadava potion item.
*/
private static final Item CADAVA_POTION = new Item(756);
/**
* Constructs a new {@code ApothecaryDialogue} {@code Object}.
*/
public ApothecaryDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code ApothecaryDialogue} {@code Object}.
* @param player the player.
*/
public ApothecaryDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new ApothecaryDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 40) {
interpreter.sendDialogues(player, null, "Apothecary. Father Lawrence sent me.");
stage = 500;
return true;
}
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 50) {
if (!player.getInventory().contains(753, 1)) {
npc("Keep searching for those Cadavaberries. They're needed", "for the potion.");
stage = 507;
return true;
} else {
npc("Well done. You have the berries.");
stage = 637;
return true;
}
}
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 60) {
if (!player.getInventory().contains(756, 1) && !player.getBank().contains(756, 1)) {
if (player.getInventory().contains(753, 1)) {
npc("Well done. You have the berries.");
stage = 637;
return true;
} else {
npc("Keep searching for those Cadavaberries. They're needed", "for the potion.");
stage = 507;
return true;
}
} else {
npc("I am the Apothecary. I brew potions.", "Do you need anything specific?");
}
}
npc("I am the Apothecary. I brew potions.", "Do you need anything specific?");
stage = 1;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 1:
options("Can you make a strength potion?", "Do you know a potion to mame hair fall out?", "Have you got any good potions to give away?", "Can you make a potion that makes it seem like I'm dead?");
stage = 2;
break;
case 2:
switch (buttonId) {
case 1:
player("Can you make a strength potion?");
stage = 10;
break;
case 2:
player("Do you know a potion to make hair fall out?");
stage = 20;
break;
case 3:
player("Have you got any good potions to give away?");
stage = 140;
break;
case 4:
player("Can you make a potion that makes it seems like I'm dead?");
stage = 40;
break;
}
break;
case 10:
if (player.getInventory().containItems(223, 225)) {
npc("Certainly, just hand over the ingredients and 5 coins.");
stage = 50;
return true;
}
npc("Yes, but the ingredients are a little hard to find. If you", "ever get them I will make it for you, for a fee.");
stage = 11;
break;
case 50:
if (!player.getInventory().contains(995, 5)) {
end();
player.getPacketDispatch().sendMessage("You need 5 gold coins to do that.");
return true;
}
interpreter.sendDialogue("You hand over the ingredients and money.");
stage = 51;
break;
case 51:
if (player.getInventory().remove(POTION_ITEMS)) {
player.getInventory().add(POTION);
end();
player.getAchievementDiaryManager().finishTask(player, DiaryType.VARROCK, 1, 0);
}
break;
case 11:
player("So what are the ingredients?");
stage = 12;
break;
case 12:
npc("You'll need to find the eggs of the deadly red spider and a", "limpwurt root.");
stage = 13;
break;
case 13:
npc("Oh and you'll have to pay me 5 coins.");
stage = 14;
break;
case 14:
player("Ok, I'll look out for them.");
stage = 15;
break;
case 15:
end();
break;
case 20:
npc("I do indeed. I gave it to my mother. That's why I now live", "alone.");
stage = 21;
break;
case 21:
end();
break;
case 30:
npc("Ok then. Try this potion.");
player.getInventory().add(UNKNOWN_POTION);
stage = 31;
break;
case 31:
end();
break;
case 40:
npc("What a strange and morbid request! I can as it happens.", "The berry of the cadava bush, prepared properly, will", "induce a coma so deep that you will seem to be dead. It's", "very dangerous.");
stage = 41;
break;
case 41:
npc("I have the other ingredients, but I'll need you to bring me", "one bunch of cadava berries.");
stage = 42;
break;
case 42:
player("I'll bear that in mind.");
stage = 43;
break;
case 43:
end();
break;
case 140:
npc("Sorry, charity is not my strong point.");
stage = 141;
break;
case 141:
end();
break;
case 500:
interpreter.sendDialogues(player, null, "I need a Cadava potion to help Romeo and Juliet.");
stage = 501;
break;
case 501:
interpreter.sendDialogues(npc, null, "Cadava potion. It's pretty nasty. And hard to make.");
stage = 502;
break;
case 502:
interpreter.sendDialogues(npc, null, "Wing of rat, tail of frog.", "Ear of snake and horn of dog.");
stage = 503;
break;
case 503:
interpreter.sendDialogues(npc, null, "I have all that, but i need some Cadava berries.");
stage = 504;
break;
case 504:
interpreter.sendDialogues(npc, null, "You will have to find them while I get the rest ready.");
stage = 505;
break;
case 505:
interpreter.sendDialogues(npc, null, "Bring them here when you have them. But be careful.", "They are nasty.");
stage = 506;
break;
case 506:
player.getQuestRepository().getQuest("Romeo & Juliet").setStage(player, 50);
interpreter.sendDialogues(player, null, "Ok, thanks.");
stage = 507;
break;
case 507:
end();
break;
case 637:
interpreter.sendItemMessage(753, "You hand over the berries.");
stage = 638;
break;
case 638:
if (player.getInventory().remove(CADAVA_BERRIES)) {
npc("Phew! Here is what you need.");
}
stage = 639;
break;
case 639:
if (!player.getInventory().add(CADAVA_POTION)) {
GroundItemManager.create(new GroundItem(CADAVA_POTION, player.getLocation(), player));
}
interpreter.sendItemMessage(756, "The Apothecary gives you a Cavada potion.");
stage = 640;
break;
case 640:
player.getQuestRepository().getQuest("Romeo & Juliet").setStage(player, 60);
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 638 };
}
}
package core.game.content.dialogue;
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.node.item.GroundItem;
import core.game.node.item.GroundItemManager;
import core.plugin.Initializable;
import core.game.node.item.Item;
/**
* Represents the dialogue plugin used for the apothecary npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class ApothecaryDialogue extends DialoguePlugin {
/**
* Represents the potion requirements.
*/
private static final Item[] POTION_ITEMS = new Item[] { new Item(223), new Item(225), new Item(995, 5) };
/**
* Represents the potion item.
*/
private static final Item POTION = new Item(115);
/**
* Represents the unkown potion.
*/
private static final Item UNKNOWN_POTION = new Item(195, 1);
/**
* Represents the cadava berries item.
*/
private static final Item CADAVA_BERRIES = new Item(753);
/**
* Represents the cadava potion item.
*/
private static final Item CADAVA_POTION = new Item(756);
/**
* Constructs a new {@code ApothecaryDialogue} {@code Object}.
*/
public ApothecaryDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code ApothecaryDialogue} {@code Object}.
* @param player the player.
*/
public ApothecaryDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new ApothecaryDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 40) {
interpreter.sendDialogues(player, null, "Apothecary. Father Lawrence sent me.");
stage = 500;
return true;
}
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 50) {
if (!player.getInventory().contains(753, 1)) {
npc("Keep searching for those Cadava berries. They're needed", "for the potion.");
stage = 507;
return true;
} else {
npc("Well done. You have the berries.");
stage = 637;
return true;
}
}
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 60) {
if (!player.getInventory().contains(756, 1) && !player.getBank().contains(756, 1)) {
if (player.getInventory().contains(753, 1)) {
npc("Well done. You have the berries.");
stage = 637;
return true;
} else {
npc("Keep searching for those Cadava berries. They're needed", "for the potion.");
stage = 507;
return true;
}
} else {
npc("I am the Apothecary. I brew potions.", "Do you need anything specific?");
}
}
npc("I am the Apothecary. I brew potions.", "Do you need anything specific?");
stage = 1;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 1:
options("Can you make a strength potion?", "Do you know a potion to make hair fall out?", "Have you got any good potions to give away?", "Can you make a potion that makes it seem like I'm dead?");
stage = 2;
break;
case 2:
switch (buttonId) {
case 1:
player("Can you make a strength potion?");
stage = 10;
break;
case 2:
player("Do you know a potion to make hair fall out?");
stage = 20;
break;
case 3:
player("Have you got any good potions to give away?");
stage = 140;
break;
case 4:
player("Can you make a potion that makes it seems like I'm dead?");
stage = 40;
break;
}
break;
case 10:
if (player.getInventory().containItems(223, 225)) {
npc("Certainly, just hand over the ingredients and 5 coins.");
stage = 50;
return true;
}
npc("Yes, but the ingredients are a little hard to find. If you", "ever get them I will make it for you, for a fee.");
stage = 11;
break;
case 50:
if (!player.getInventory().contains(995, 5)) {
end();
player.getPacketDispatch().sendMessage("You need 5 gold coins to do that.");
return true;
}
interpreter.sendDialogue("You hand over the ingredients and money.");
stage = 51;
break;
case 51:
if (player.getInventory().remove(POTION_ITEMS)) {
player.getInventory().add(POTION);
end();
player.getAchievementDiaryManager().finishTask(player, DiaryType.VARROCK, 1, 0);
}
break;
case 11:
player("So what are the ingredients?");
stage = 12;
break;
case 12:
npc("You'll need to find the eggs of the deadly red spider and a", "limpwurt root.");
stage = 13;
break;
case 13:
npc("Oh and you'll have to pay me 5 coins.");
stage = 14;
break;
case 14:
player("Ok, I'll look out for them.");
stage = 15;
break;
case 15:
end();
break;
case 20:
npc("I do indeed. I gave it to my mother. That's why I now live", "alone.");
stage = 21;
break;
case 21:
end();
break;
case 30:
npc("Ok then. Try this potion.");
player.getInventory().add(UNKNOWN_POTION);
stage = 31;
break;
case 31:
end();
break;
case 40:
npc("What a strange and morbid request! I can as it happens.", "The berry of the cadava bush, prepared properly, will", "induce a coma so deep that you will seem to be dead. It's", "very dangerous.");
stage = 41;
break;
case 41:
npc("I have the other ingredients, but I'll need you to bring me", "one bunch of cadava berries.");
stage = 42;
break;
case 42:
player("I'll bear that in mind.");
stage = 43;
break;
case 43:
end();
break;
case 140:
npc("Sorry, charity is not my strong point.");
stage = 141;
break;
case 141:
end();
break;
case 500:
interpreter.sendDialogues(player, null, "I need a Cadava potion to help Romeo and Juliet.");
stage = 501;
break;
case 501:
interpreter.sendDialogues(npc, null, "Cadava potion. It's pretty nasty. And hard to make.");
stage = 502;
break;
case 502:
interpreter.sendDialogues(npc, null, "Wing of rat, tail of frog.", "Ear of snake and horn of dog.");
stage = 503;
break;
case 503:
interpreter.sendDialogues(npc, null, "I have all that, but I need some Cadava berries.");
stage = 504;
break;
case 504:
interpreter.sendDialogues(npc, null, "You will have to find them while I get the rest ready.");
stage = 505;
break;
case 505:
interpreter.sendDialogues(npc, null, "Bring them here when you have them. But be careful.", "They are nasty.");
stage = 506;
break;
case 506:
player.getQuestRepository().getQuest("Romeo & Juliet").setStage(player, 50);
interpreter.sendDialogues(player, null, "Ok, thanks.");
stage = 507;
break;
case 507:
end();
break;
case 637:
interpreter.sendItemMessage(753, "You hand over the berries.");
stage = 638;
break;
case 638:
if (player.getInventory().remove(CADAVA_BERRIES)) {
npc("Phew! Here is what you need.");
}
stage = 639;
break;
case 639:
if (!player.getInventory().add(CADAVA_POTION)) {
GroundItemManager.create(new GroundItem(CADAVA_POTION, player.getLocation(), player));
}
interpreter.sendItemMessage(756, "The Apothecary gives you a Cadava potion.");
stage = 640;
break;
case 640:
player.getQuestRepository().getQuest("Romeo & Juliet").setStage(player, 60);
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 638 };
}
}
@@ -1,181 +1,181 @@
package core.game.content.dialogue;
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;
/**
* Represents the father lawrence dialogue plugin.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class FatherLawrenceDialogue extends DialoguePlugin {
/**
* Constructs a new {@code FatherLawrenceDialogue} {@code Object}.
*/
public FatherLawrenceDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code FatherLawrenceDialogu} {@code Object}.
* @param player the player.
*/
public FatherLawrenceDialogue(Player player) {
super(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
final Quest quest = player.getQuestRepository().getQuest("Romeo & Juliet");
if (quest.getStage(player) < 30) {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Oh to be a father in the times of whiskey.");
stage = 0;
}
switch (quest.getStage(player)) {
case 30:
interpreter.sendDialogues(npc, null, "\"...and let Saradomin light the way for you... \"", "Urgh!");
stage = 41;
break;
case 40:
interpreter.sendDialogues(npc, null, "Ah, have you found the Apothecary yet? Remember,", "Cadava potion, for Juliet.");
stage = 30;
break;
case 50:
interpreter.sendDialogues(npc, null, "Did you find the Apothecary?");
stage = 820;
break;
case 60:
case 70:
interpreter.sendDialogues(npc, null, "Did you find the Apothecary?");
stage = 820;
break;
case 100:
player("Hi again!");
stage = 0;
break;
}
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
final Quest quest = player.getQuestRepository().getQuest("Romeo & Juliet");
switch (stage) {
case 0:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I sing and I drink and I wake up in gutters.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Top of the morning to you.");
stage = 2;
break;
case 2:
end();
break;
case 41:
interpreter.sendDialogues(npc, null, "Can't you see that I'm in the middle of a Sermon?!");
stage = 42;
break;
case 42:
interpreter.sendDialogues(player, null, "But Romeo sent me!");
stage = 43;
break;
case 43:
interpreter.sendDialogues(npc, null, "But I'm busy delivering a sermon to my congregation!");
stage = 44;
break;
case 44:
interpreter.sendDialogues(player, null, "Yes well it certainly seems like you have a captive", "audience!");
stage = 45;
break;
case 45:
interpreter.sendDialogues(npc, null, "Ok, ok...what do you want so I can get rid of you and", "continue with my sermon?");
stage = 46;
break;
case 46:
interpreter.sendDialogues(player, null, "Romeo sent me. He says you may be able to help.");
stage = 47;
break;
case 47:
interpreter.sendDialogues(npc, null, "Ah Romeo, yes. A fine lad, but a little bit confused.");
stage = 48;
break;
case 48:
interpreter.sendDialogues(player, null, "Yes, very confused...Anyway, Romeo wishes to be", "married to Juliet! She must be rescued from her", "father's control!");
stage = 49;
break;
case 49:
interpreter.sendDialogues(npc, null, "I agree, and I think I have an idea! A potion to make", "her appear dead...");
stage = 50;
break;
case 50:
interpreter.sendDialogues(player, null, "Dead! Sounds a bit creepy to me...but please, continue.");
stage = 51;
break;
case 51:
interpreter.sendDialogues(npc, null, "The potion will only make Juliet 'appear' dead...then", "she'll be taken to the crypt...");
stage = 52;
break;
case 52:
interpreter.sendDialogues(player, null, "Crypt! Again...very creepy! You must have some", "strange hobbies.");
stage = 53;
break;
case 53:
interpreter.sendDialogues(npc, null, "Then Romeo can collect her from the crypt! Go to the", "Apothercary, tell him I sent you and that you'll need a", "'Cadava' potion.");
stage = 54;
break;
case 54:
interpreter.sendDialogues(player, null, "Apart from the strong overtones of death, this is", "turning out to be a real love story.");
stage = 55;
break;
case 55:
quest.setStage(player, 40);
end();
break;
case 30:
end();
break;
case 820:
interpreter.sendDialogues(player, null, "Yes I did. He's told me I must find some Cadava", "berries.");
stage = 821;
break;
case 821:
interpreter.sendDialogues(npc, null, "Well, good luck with that...they're quite tricky to find.");
stage = 822;
break;
case 822:
interpreter.sendDialogues(player, null, "Any clues where I can start to look?");
stage = 823;
break;
case 823:
interpreter.sendDialogues(npc, null, "I heard some kids saying they saw some the other day.", "They were visiting the mining place to the south east", "Varrock.");
stage = 824;
break;
case 824:
interpreter.sendDialogues(player, null, "Ok, that's as good a place to start looking as any.");
stage = 825;
break;
case 825:
end();
break;
}
return true;
}
@Override
public DialoguePlugin newInstance(Player player) {
return new FatherLawrenceDialogue(player);
}
@Override
public int[] getIds() {
return new int[] { 640 };
}
}
package core.game.content.dialogue;
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;
/**
* Represents the father lawrence dialogue plugin.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class FatherLawrenceDialogue extends DialoguePlugin {
/**
* Constructs a new {@code FatherLawrenceDialogue} {@code Object}.
*/
public FatherLawrenceDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code FatherLawrenceDialogu} {@code Object}.
* @param player the player.
*/
public FatherLawrenceDialogue(Player player) {
super(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
final Quest quest = player.getQuestRepository().getQuest("Romeo & Juliet");
if (quest.getStage(player) < 30) {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Oh to be a father in the times of whiskey.");
stage = 0;
}
switch (quest.getStage(player)) {
case 30:
interpreter.sendDialogues(npc, null, "\"...and let Saradomin light the way for you... \"", "Urgh!");
stage = 41;
break;
case 40:
interpreter.sendDialogues(npc, null, "Ah, have you found the Apothecary yet? Remember,", "Cadava potion, for Juliet.");
stage = 30;
break;
case 50:
interpreter.sendDialogues(npc, null, "Did you find the Apothecary?");
stage = 820;
break;
case 60:
case 70:
interpreter.sendDialogues(npc, null, "Did you find the Apothecary?");
stage = 820;
break;
case 100:
player("Hi again!");
stage = 0;
break;
}
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
final Quest quest = player.getQuestRepository().getQuest("Romeo & Juliet");
switch (stage) {
case 0:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I sing and I drink and I wake up in gutters.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Top of the morning to you.");
stage = 2;
break;
case 2:
end();
break;
case 41:
interpreter.sendDialogues(npc, null, "Can't you see that I'm in the middle of a sermon?!");
stage = 42;
break;
case 42:
interpreter.sendDialogues(player, null, "But Romeo sent me!");
stage = 43;
break;
case 43:
interpreter.sendDialogues(npc, null, "But I'm busy delivering a sermon to my congregation!");
stage = 44;
break;
case 44:
interpreter.sendDialogues(player, null, "Yes well it certainly seems like you have a captive", "audience!");
stage = 45;
break;
case 45:
interpreter.sendDialogues(npc, null, "Ok, ok...what do you want so I can get rid of you and", "continue with my sermon?");
stage = 46;
break;
case 46:
interpreter.sendDialogues(player, null, "Romeo sent me. He says you may be able to help.");
stage = 47;
break;
case 47:
interpreter.sendDialogues(npc, null, "Ah Romeo, yes. A fine lad, but a little bit confused.");
stage = 48;
break;
case 48:
interpreter.sendDialogues(player, null, "Yes, very confused...Anyway, Romeo wishes to be", "married to Juliet! She must be rescued from her", "father's control!");
stage = 49;
break;
case 49:
interpreter.sendDialogues(npc, null, "I agree, and I think I have an idea! A potion to make", "her appear dead...");
stage = 50;
break;
case 50:
interpreter.sendDialogues(player, null, "Dead! Sounds a bit creepy to me...but please, continue.");
stage = 51;
break;
case 51:
interpreter.sendDialogues(npc, null, "The potion will only make Juliet 'appear' dead...then", "she'll be taken to the crypt...");
stage = 52;
break;
case 52:
interpreter.sendDialogues(player, null, "Crypt! Again...very creepy! You must have some", "strange hobbies.");
stage = 53;
break;
case 53:
interpreter.sendDialogues(npc, null, "Then Romeo can collect her from the crypt! Go to the", "Apothercary, tell him I sent you and that you'll need a", "'Cadava' potion.");
stage = 54;
break;
case 54:
interpreter.sendDialogues(player, null, "Apart from the strong overtones of death, this is", "turning out to be a real love story.");
stage = 55;
break;
case 55:
quest.setStage(player, 40);
end();
break;
case 30:
end();
break;
case 820:
interpreter.sendDialogues(player, null, "Yes I did. He's told me I must find some Cadava", "berries.");
stage = 821;
break;
case 821:
interpreter.sendDialogues(npc, null, "Well, good luck with that...they're quite tricky to find.");
stage = 822;
break;
case 822:
interpreter.sendDialogues(player, null, "Any clues where I can start to look?");
stage = 823;
break;
case 823:
interpreter.sendDialogues(npc, null, "I heard some kids saying they saw some the other day.", "They were visiting the mining place to the south east", "Varrock.");
stage = 824;
break;
case 824:
interpreter.sendDialogues(player, null, "Ok, that's as good a place to start looking as any.");
stage = 825;
break;
case 825:
end();
break;
}
return true;
}
@Override
public DialoguePlugin newInstance(Player player) {
return new FatherLawrenceDialogue(player);
}
@Override
public int[] getIds() {
return new int[] { 640 };
}
}
@@ -1,224 +1,224 @@
package core.game.content.dialogue;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.quest.Quest;
import core.plugin.Initializable;
import core.game.node.item.Item;
/**
* Represents the dialogue plugin used for the hetty npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class HettyDialogue extends DialoguePlugin {
/**
* Constructs a new {@code HettyDialogue} {@code Object}.
*/
public HettyDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code HettyDialogue} {@code Object}.
* @param player the player.
*/
public HettyDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new HettyDialogue(player);
}
@Override
public boolean open(Object... args) {
Quest quest = player.getQuestRepository().getQuest("Witch's Potion");
if (quest.isCompleted(player)) {
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "How's your magic coming along?");
stage = 0;
}
switch (quest.getStage(player)) {
case 0:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "What could you want with an old woman like me?");
stage = 11;
break;
case 20:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "So have you found the things for the potion?");
stage = 100;
break;
case 40:
if (args.length == 2) {
interpreter.sendDialogue("You drink from the cauldron, it tastes horrible! You feel yourself", "imbued with power.");
stage = 41;
} else {
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Well are you going to drink the potion or not?");
stage = 500;
}
break;
}
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
Quest quest = player.getQuestRepository().getQuest("Witch's Potion");
switch (stage) {
case 0:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm practicing and slowly getting better.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Good, good.");
stage = 2;
break;
case 2:
end();
break;
case 11:
interpreter.sendOptions("Select an Option", "I am in search of a quest.", "I've heard that you are a witch.");
stage = 12;
break;
case 12:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I am in search of a quest.");
stage = 13;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I've heard that you are a witch.");
stage = 20;
break;
}
break;
case 13:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Hmmm... Maybe I can think of something for you.");
stage = 14;
break;
case 14:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Would you like to become more proficient in the dark", "arts?");
stage = 15;
break;
case 15:
interpreter.sendOptions("Select an Option", "Yes help me become one with my darker side.", "No I have my prinicples and honour.");
stage = 16;
break;
case 16:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes help me become one with my darker side.");
stage = 30;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No I have m principles and honour.");
stage = 17;
break;
}
break;
case 17:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Suit yourself, but you're missing out.");
stage = 18;
break;
case 18:
end();
break;
case 20:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Yes it does seem to be getting fairly common", "knowledge.");
stage = 21;
break;
case 21:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "I fear I may get a visit from the witch hunter of", "Falador before long.");
stage = 22;
break;
case 22:
end();
break;
case 30:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Ok I'm going to make a potion to help bring out your", "darker self.");
stage = 31;
break;
case 31:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "You will need certain ingredients.");
stage = 32;
break;
case 32:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "What do i need?");
stage = 33;
break;
case 33:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "You need an eye of newt, a rat's tail, and onion... Oh", "and a piece of burnt meat.");
stage = 34;
break;
case 34:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Great, I'll go get them.");
stage = 35;
break;
case 35:
quest.start(player);
quest.setStage(player, 20);
end();
break;
case 100:
// Her:Well I can't make the potion without them!
// Remember.../You
// need an eye of newt, a rat's tail, an onion, and a/piece of
// burnt
// meat. Off you go dear! Me:end();
if (!player.getInventory().containItems(1957, 300, 2146, 221)) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm afraid I don't have all of them yet.");
stage = 101;
} else {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes I have everything!");
stage = 110;
}
break;
case 110:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Excellent, can I have them then?");
stage = 111;
break;
case 111:
interpreter.sendDialogue("You pass the ingredients to Hetty and she puts them all into her", "cauldron. Hetty closes her eyes and begins to chant. The cauldron", "bubbles mysteriously.");
stage = 112;
break;
case 112:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Well, is it ready?");
stage = 113;
break;
case 113:
if (player.getInventory().remove(new Item(1957), new Item(300), new Item(2146), new Item(221))) {
quest.setStage(player, 40);
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Ok, now drink from the cauldron.");
stage = 114;
}
break;
case 114:
end();
break;
case 101:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Well I can't make the potion without them! Remember...", "You need an eye of newt, a rat's tail, an onion, and a", "You need an eye of newt, a rat's tail, an onion, and a", "piece of burnt meat. Off you go dear!");
stage = 102;
break;
case 102:
end();
break;
case 500:
end();
break;
case 41:
end();
quest.finish(player);
player.getQuestRepository().syncronizeTab(player);
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 307 };
}
}
package core.game.content.dialogue;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.quest.Quest;
import core.plugin.Initializable;
import core.game.node.item.Item;
/**
* Represents the dialogue plugin used for the hetty npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class HettyDialogue extends DialoguePlugin {
/**
* Constructs a new {@code HettyDialogue} {@code Object}.
*/
public HettyDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code HettyDialogue} {@code Object}.
* @param player the player.
*/
public HettyDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new HettyDialogue(player);
}
@Override
public boolean open(Object... args) {
Quest quest = player.getQuestRepository().getQuest("Witch's Potion");
if (quest.isCompleted(player)) {
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "How's your magic coming along?");
stage = 0;
}
switch (quest.getStage(player)) {
case 0:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "What could you want with an old woman like me?");
stage = 11;
break;
case 20:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "So have you found the things for the potion?");
stage = 100;
break;
case 40:
if (args.length == 2) {
interpreter.sendDialogue("You drink from the cauldron, it tastes horrible! You feel yourself", "imbued with power.");
stage = 41;
} else {
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Well are you going to drink the potion or not?");
stage = 500;
}
break;
}
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
Quest quest = player.getQuestRepository().getQuest("Witch's Potion");
switch (stage) {
case 0:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm practicing and slowly getting better.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Good, good.");
stage = 2;
break;
case 2:
end();
break;
case 11:
interpreter.sendOptions("Select an Option", "I am in search of a quest.", "I've heard that you are a witch.");
stage = 12;
break;
case 12:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I am in search of a quest.");
stage = 13;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I've heard that you are a witch.");
stage = 20;
break;
}
break;
case 13:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Hmmm... Maybe I can think of something for you.");
stage = 14;
break;
case 14:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Would you like to become more proficient in the dark", "arts?");
stage = 15;
break;
case 15:
interpreter.sendOptions("Select an Option", "Yes help me become one with my darker side.", "No I have my prinicples and honour.");
stage = 16;
break;
case 16:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes help me become one with my darker side.");
stage = 30;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No I have m principles and honour.");
stage = 17;
break;
}
break;
case 17:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Suit yourself, but you're missing out.");
stage = 18;
break;
case 18:
end();
break;
case 20:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Yes it does seem to be getting fairly common", "knowledge.");
stage = 21;
break;
case 21:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "I fear I may get a visit from the witch hunter of", "Falador before long.");
stage = 22;
break;
case 22:
end();
break;
case 30:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Ok I'm going to make a potion to help bring out your", "darker self.");
stage = 31;
break;
case 31:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "You will need certain ingredients.");
stage = 32;
break;
case 32:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "What do I need?");
stage = 33;
break;
case 33:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "You need an eye of newt, a rat's tail, and onion... Oh", "and a piece of burnt meat.");
stage = 34;
break;
case 34:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Great, I'll go get them.");
stage = 35;
break;
case 35:
quest.start(player);
quest.setStage(player, 20);
end();
break;
case 100:
// Her:Well I can't make the potion without them!
// Remember.../You
// need an eye of newt, a rat's tail, an onion, and a/piece of
// burnt
// meat. Off you go dear! Me:end();
if (!player.getInventory().containItems(1957, 300, 2146, 221)) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm afraid I don't have all of them yet.");
stage = 101;
} else {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes I have everything!");
stage = 110;
}
break;
case 110:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Excellent, can I have them then?");
stage = 111;
break;
case 111:
interpreter.sendDialogue("You pass the ingredients to Hetty and she puts them all into her", "cauldron. Hetty closes her eyes and begins to chant. The cauldron", "bubbles mysteriously.");
stage = 112;
break;
case 112:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Well, is it ready?");
stage = 113;
break;
case 113:
if (player.getInventory().remove(new Item(1957), new Item(300), new Item(2146), new Item(221))) {
quest.setStage(player, 40);
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Ok, now drink from the cauldron.");
stage = 114;
}
break;
case 114:
end();
break;
case 101:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Well I can't make the potion without them! Remember...", "You need an eye of newt, a rat's tail, an onion, and a", "You need an eye of newt, a rat's tail, an onion, and a", "piece of burnt meat. Off you go dear!");
stage = 102;
break;
case 102:
end();
break;
case 500:
end();
break;
case 41:
end();
quest.finish(player);
player.getQuestRepository().syncronizeTab(player);
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 307 };
}
}