The Fremmenik Trials quest has been completed, now accesible in-game
Barrows prayer drain timer standardized to 18 seconds Giant Mole's Burrow mechanic corrected in functionality. Burrow: When the mole's health is between 5-50%, there is a 25% chance for any incoming attack to cause it to burrow away into another location. There is also a chance that the dirt she digs while burrowing to escape can extinguish the player's light source (shown with dirt splatters on the player's screen), though covered light sources will be unaffected by this. Mole Lair's unique music track now correctly plays across the entirety of the Mole Lair region Giant Mole droptable corrected. Egregious RSPS noted secondary drops removed. G. Mole can now correctly drop random Hard Clues, and the 100 Iron Ore (noted) drop has been added. Hostile Random Events return! Tree Spirit, River Troll, Rock Golem, Shade, and Zombie Hostile Random Events rejoin the Evil Chicken in their AFK-anihilation onslaught! Beware! Mounted Glories now have full right-click Teleport options You can now build an Obelisk inside your POH at 41 Construction, as the centrepiece spot inside a standard Garden room Can now trade in Long and Curved bones to Barlak in the Dorgeshuun Mine (temporary location for now) for Construction EXP (after completion of The Lost Tribe) Ridiculous amounts of funky fresh new NPC dialogues by Q in the following areas: LLetya, Isafdar, Ardougne, Witchaven, Ape Atoll, Miscellania, Dorgeshuun, Zanaris and many many many more! Potion decanting note bug should now be fixed and not eat up all your notes when attempting to decant Weapon Poison addition and removal fixes All currently functional Summoning familiars with invisible skills boosts are now correctly added to the game! Pyrelord, Forge Regent, Arctic Bear, Lava Titan, Magpie, Spirit Graahk, Spirit Larupia, Spirit Kyatt, Void Ravager and Wolpertinger now boost skills alongside their other helpful abilities. The Mining Guild can now be entered under 60 Mining via the use of skill boosts The Lady of the Lake will now finally enhance Excalibur for you if you have the prerequisite Seers Hard Diary and Merlin's Crystal completed, and the headband and sword equipped when talking to her. Can now fish slimy eels Restored the removed/regressed/whatever Bot Dialogues! All Ancient Warriors' Equipment (Vesta, Zuriel etc) is now correctly tradeable and droppable in its un-degraded form Some hat clipping fixes Fixed blanket Wilderness aggression forcing even non-aggressive monsters to be aggressive Fremennik helmets (eg: archers, warriors, etc) now locked behind Fremennik Trials Quest Added the following SFX: giant mole combat sfx water elemental combat sfx fire elemental combat sfx earth elemental combat sfx air elemental combat sfx baby blue dragon combat sfx baby red dragon combat sfx + examine baby black dragon combat sfx black demon combat sfx dark beast combat sfx dust devil combat sfx gargoyle combat sfx fire giant combat sfx moss giant combat sfx hill giant combat sfx nechryael combat sfx turoth combat sfx kurask combat sfx wallasalki combat sfx yak combat sfx abyssal demon combat sfx bloodveld combat sfx cave crawler combat sfx Digging with spade SFX added abyssal leech combat sfx abyssal walker combat sfx void brawler combat sfx (pest control) chaos elemental standard combat sfx (NOT spells) cockatrice combat sfx crawling hand combat sfx crocodile combat sfx void defiler combat sfx (pest control) lesser demon champion combat sfx elf warrior combat sfx ghoul combat sfx ghoul champion combat sfx jelly combat sfx pyrefiend combat sfx void ravager combat sfx (pest control) rock lobster combat sfx rockslug combat sfx void shifter combat sfx (pest control) void spinner combat sfx (pest control) void splatter combat sfx (pest control) void torcher combat sfx (pest control) starlight combat sfx (GWD: Saradomin Melee Minion) growler combat sfx (GWD: Saradomin Mage Minion) Picking herb/harvesting crop SFX added Planting a seed with seed dibber SFX added Digging up patch with a Spade SFX added Raking a patch SFX added Watering a farming patch with a Watering can SFX added Using a Plant Cure on a diseased patch SFX added Pouring Compost/Supercompost on a farming patch SFX added Filling Compost Bin SFX added Opening and closing the Compost Bin SFX added Filling buckets with Compost from the Compost Bin SFX added Chaos Elemental's three unique spells (Discord, Madness, and Confusion) now have correct impact sfx when hitting the player Standard Seed Bird's Nest loot pool corrections Ring Bird's Nest loot pool corrected Wyson Bird's Nest loot pool corrected Wyson Bird's Nest loot quantities corrected Fixed tick delay on Fletching bows and crossbows Chaos Elemental Drop Table Overhaul Chaos Elemental's Main drop table has been overhauled to correct items, amounts, and (close-enough) weights Chaos Elemental's Minor drop table added, using Item ID 799 as an item container Chaos Elemental now correctly rolls 1 minor drop and 1 major drop from its minor/major loot tables when it is killed. Restrict Dwarven Multicannon use inside Fremennik Slayer Cave
This commit is contained in:
+16
-11
@@ -34,6 +34,8 @@ import rs09.game.content.activity.barrows.RewardChest;
|
||||
import rs09.game.world.GameWorld;
|
||||
import rs09.plugin.PluginManager;
|
||||
|
||||
import static api.ContentAPIKt.getWorldTicks;
|
||||
|
||||
/**
|
||||
* Handles the barrows activity plugin.
|
||||
* @author Emperor
|
||||
@@ -77,7 +79,7 @@ public final class BarrowsActivityPlugin extends ActivityPlugin {
|
||||
/**
|
||||
* The activity handling pulse.
|
||||
*/
|
||||
private static final Pulse PULSE = new Pulse(3) {
|
||||
private static final Pulse PULSE = new Pulse(0) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
boolean end = true;
|
||||
@@ -89,27 +91,30 @@ public final class BarrowsActivityPlugin extends ActivityPlugin {
|
||||
p.getPacketDispatch().sendItemOnInterface(-1, 1, 24, index);
|
||||
continue;
|
||||
}
|
||||
if (p.getLocation().getZ() == 0 && p.getAttribute("barrow:looted", false)) {
|
||||
if (p.getLocation().getZ() == 0 && p.getAttribute("barrow:looted", false) && getWorldTicks() % 3 == 0) {
|
||||
if (RandomFunction.random(15) == 0) {
|
||||
p.getImpactHandler().manualHit(p, RandomFunction.random(5), HitsplatType.NORMAL);
|
||||
Graphics.send(Graphics.create(405), p.getLocation());
|
||||
}
|
||||
}
|
||||
if (p.getLocks().isLocked("barrow:drain") || RandomFunction.random(100) % 2 == 0) {
|
||||
continue;
|
||||
}
|
||||
int drain = 8;
|
||||
System.out.println(getWorldTicks() % 30);
|
||||
//if (p.getLocks().isLocked("barrow:drain") || RandomFunction.random(100) % 2 == 0) {
|
||||
// continue;
|
||||
//}
|
||||
for (boolean killed : p.getSavedData().getActivityData().getBarrowBrothers()) {
|
||||
if (killed) {
|
||||
drain += 1;
|
||||
}
|
||||
}
|
||||
p.getSkills().decrementPrayerPoints(drain);
|
||||
p.getLocks().lock("barrow:drain", (3 + RandomFunction.random(15)) * 3);
|
||||
index = 1 + RandomFunction.random(6);
|
||||
p.setAttribute("barrow:drain-index", index);
|
||||
p.getPacketDispatch().sendItemZoomOnInterface(4761 + RandomFunction.random(12), 100, 24, index);
|
||||
p.getPacketDispatch().sendAnimationInterface(9810, 24, index);
|
||||
if(getWorldTicks() % 30 == 0){
|
||||
p.getSkills().decrementPrayerPoints(drain);
|
||||
p.getLocks().lock("barrow:drain", (3 + RandomFunction.random(15)) * 3);
|
||||
index = 1 + RandomFunction.random(6);
|
||||
p.setAttribute("barrow:drain-index", index);
|
||||
p.getPacketDispatch().sendItemZoomOnInterface(4761 + RandomFunction.random(12), 100, 24, index);
|
||||
p.getPacketDispatch().sendAnimationInterface(9810, 24, index);
|
||||
}
|
||||
}
|
||||
return end;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package core.game.content.activity.guild;
|
||||
|
||||
import static api.ContentAPIKt.*;
|
||||
import core.cache.def.impl.SceneryDefinition;
|
||||
import core.game.content.global.action.ClimbActionHandler;
|
||||
import core.game.content.global.action.DoorActionHandler;
|
||||
@@ -14,6 +15,8 @@ import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
import static api.ContentAPIKt.getDynLevel;
|
||||
|
||||
/**
|
||||
* Represents the plugin used for the mining guild.
|
||||
* @author 'Vexia
|
||||
@@ -34,7 +37,7 @@ public final class MiningGuildPlugin extends OptionHandler {
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
if (option.equals("climb-down")) {
|
||||
if (player.getLocation().withinDistance(Location.create(3019, 3339, 0), 4)) {
|
||||
if (player.getSkills().getStaticLevel(Skills.MINING) < 60) {
|
||||
if (getDynLevel(player, Skills.MINING) < 60) {
|
||||
player.getDialogueInterpreter().open(382, NPC.create(382, Location.create(0, 0, 0)), 1);
|
||||
return true;
|
||||
}
|
||||
@@ -45,7 +48,7 @@ public final class MiningGuildPlugin extends OptionHandler {
|
||||
return true;
|
||||
}
|
||||
if (option.equals("open")) {
|
||||
if (player.getSkills().getStaticLevel(Skills.MINING) < 60) {
|
||||
if (getDynLevel(player, Skills.MINING) < 60) {
|
||||
player.getDialogueInterpreter().open(382, NPC.create(382, Location.create(0, 0, 0)), 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ public enum Consumables {
|
||||
TRIANGLE_SANDWICH(new Food(new int[] {6962}, new HealingEffect(6))),
|
||||
SQUARE_SANDWICH(new Food(new int[] {6965}, new HealingEffect(6))),
|
||||
SEAWEED_SANDWICH(new FakeConsumable(3168, new String[] {"You really, really do not want to eat that."})),
|
||||
FROGBURGER(new Food(new int[] {10962}, new HealingEffect(2))),
|
||||
|
||||
/** Kebabs */
|
||||
UGTHANKI_KEBAB(new Food(new int[] {1883}, new UgthankiKebabEffect())),
|
||||
@@ -86,7 +87,7 @@ public enum Consumables {
|
||||
STEW(new Food(new int[] {2003, 1923}, new HealingEffect(11))),
|
||||
SPICY_STEW(new Food(new int[] {7479, 1923}, new HealingEffect(11))),
|
||||
CURRY(new Food(new int[] {2011, 1923}, new HealingEffect(19))),
|
||||
BANANA_STEW(new Food(new int[] {4016}, new HealingEffect(11))),
|
||||
BANANA_STEW(new Food(new int[] {4016, 1923}, new HealingEffect(11))),
|
||||
|
||||
/** Pizzas */
|
||||
PLAIN_PIZZA(new HalfableFood(new int[] {2289, 2291}, new HealingEffect(7))),
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
package core.game.content.dialogue;
|
||||
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.player.Player;
|
||||
|
||||
/**
|
||||
* Handles the archaeologicals expert dialogue.
|
||||
* @author Aero
|
||||
* @version 1.0
|
||||
*/
|
||||
@Initializable
|
||||
public class ArchaeologicalExpertDialogue extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* Constructs a new {@code ArchaeologicalExpertDialogue} {@code Object}.
|
||||
*/
|
||||
public ArchaeologicalExpertDialogue() {
|
||||
/**
|
||||
* Empty to stop instantiation.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@code ArchaeologicalExpertDialogue} {@code Object}.
|
||||
* @param player The player to construct the class for.
|
||||
*/
|
||||
public ArchaeologicalExpertDialogue(final Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
return new ArchaeologicalExpertDialogue(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { 619 };
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,33 +45,38 @@ public final class BarkerDialogue extends DialoguePlugin {
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
switch (stage) {
|
||||
case 0:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You are looking for clothes, yes? You look at my", "products! I have very many nice clothes, yes?");
|
||||
stage = 1;
|
||||
break;
|
||||
case 1:
|
||||
interpreter.sendOptions("Select an Option", "Yes, please.", "No, thanks.");
|
||||
stage = 2;
|
||||
break;
|
||||
case 2:
|
||||
switch (buttonId) {
|
||||
case 0:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You are looking for clothes, yes? You look at my", "products! I have very many nice clothes, yes?");
|
||||
stage = 1;
|
||||
break;
|
||||
case 1:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes, please.");
|
||||
stage = 10;
|
||||
interpreter.sendOptions("Select an Option", "Yes, please.", "No, thanks.");
|
||||
stage = 2;
|
||||
break;
|
||||
case 2:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No thanks.");
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes, please.");
|
||||
stage = 10;
|
||||
break;
|
||||
case 2:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No thanks.");
|
||||
stage = 15;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 15:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Unfortunate for you, yes?", "Many bargains, won't find elsewhere!");
|
||||
stage = 20;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
end();
|
||||
break;
|
||||
case 10:
|
||||
end();
|
||||
npc.openShop(player);
|
||||
break;
|
||||
case 20:
|
||||
end();
|
||||
break;
|
||||
case 10:
|
||||
end();
|
||||
npc.openShop(player);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class CabinBoyJenkins extends DialoguePlugin {
|
||||
quest = player.getQuestRepository().getQuest("Dragon Slayer");
|
||||
switch (quest.getStage(player)) {
|
||||
case 20:
|
||||
npc("Ahoy ! Whay d'ye think of yer ship then?");
|
||||
npc("Ahoy! Whay d'ye think of yer ship then?");
|
||||
stage = 0;
|
||||
break;
|
||||
case 40:
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
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.quest.Quest;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.item.Item;
|
||||
|
||||
/**
|
||||
* Represents the charlie the tramp dialogue.
|
||||
* @author 'Vexia
|
||||
* @dtae 3/1/14
|
||||
*/
|
||||
@Initializable
|
||||
public class CharlieTheTrampDialogue extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* Represents the quest.
|
||||
*/
|
||||
private Quest quest;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code CharlieTheTrampDialogue} {@code Object}.
|
||||
*/
|
||||
public CharlieTheTrampDialogue() {
|
||||
/**
|
||||
* empty.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@code CharlieTheTrampDialogue} {@code Object}.
|
||||
* @param player the player.
|
||||
*/
|
||||
public CharlieTheTrampDialogue(Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
return new CharlieTheTrampDialogue(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
quest = player.getQuestRepository().getQuest("Shield of Arrav");
|
||||
switch (quest.getStage(player)) {
|
||||
default:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Spare some change guv?");
|
||||
stage = 0;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
switch (quest.getStage(player)) {
|
||||
default:
|
||||
regular(buttonId);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used to handle the regular dial.
|
||||
* @param buttonId the buttonid.
|
||||
*/
|
||||
public void regular(int buttonId) {
|
||||
switch (stage) {
|
||||
case 0:
|
||||
interpreter.sendOptions("Select an Option", "Who are you?", "Sorry, I haven't got any.", "Go get a job!", "Ok. Here you go.", "Is there anything down this alleyway?");
|
||||
stage = 1;
|
||||
break;
|
||||
case 1:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Who are you?");
|
||||
stage = 10;
|
||||
break;
|
||||
case 2:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Sorry, I haven't got any.");
|
||||
stage = 20;
|
||||
break;
|
||||
case 3:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Go get a job!");
|
||||
stage = 30;
|
||||
break;
|
||||
case 4:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Ok. Here you go.");
|
||||
stage = 40;
|
||||
break;
|
||||
case 5:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Is there anything down this alleyway?");
|
||||
stage = 50;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Charles. Charles E. Trampin' at your service. Now, about", "that change you were going to give me...");
|
||||
stage = 0;
|
||||
break;
|
||||
case 20:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Thanks anyways!");
|
||||
stage = 21;
|
||||
break;
|
||||
case 21:
|
||||
end();
|
||||
break;
|
||||
case 30:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You startin? I hope your nose falls off!");
|
||||
stage = 21;
|
||||
break;
|
||||
case 40:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hey, thanks alot!");
|
||||
stage = 41;
|
||||
break;
|
||||
case 41:
|
||||
interpreter.sendOptions("Select an Option", "No problem.", "Don't I get some sort of quest hint or something now?");
|
||||
stage = 42;
|
||||
break;
|
||||
case 42:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No problem.");
|
||||
stage = 180;
|
||||
break;
|
||||
case 2:
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "So...don't I get some sort of quest hint or something now?");
|
||||
stage = 190;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 180:
|
||||
end();
|
||||
if (player.getInventory().contains(995, 1))
|
||||
player.getInventory().remove(new Item(995, 1));
|
||||
else
|
||||
player.getPacketDispatch().sendMessage("You need one coin to give away.");
|
||||
break;
|
||||
case 190:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Huh? What do you mean? That wasn't why", " I asked you for money.");
|
||||
stage = 191;
|
||||
break;
|
||||
case 191:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I just need to eat...");
|
||||
stage = 192;
|
||||
break;
|
||||
case 192:
|
||||
end();
|
||||
break;
|
||||
case 800:
|
||||
npc("The ruthless and notorious criminal gang known as the", "Black Arm Gang have their headquarters down there.");
|
||||
stage = 801;
|
||||
break;
|
||||
case 801:
|
||||
options("Thank you for the warning!", "Do you think they would let me join?");
|
||||
stage = 802;
|
||||
break;
|
||||
case 802:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
player("Thanks for the warning!");
|
||||
stage = 803;
|
||||
break;
|
||||
case 2:
|
||||
player("Do you think they would let me join?");
|
||||
stage = 804;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 803:
|
||||
npc("Don't worry about it.");
|
||||
stage = 806;
|
||||
break;
|
||||
case 804:
|
||||
npc("You never know. You'll find a lady down there called", "Katrine. Speak to her.");
|
||||
stage = 807;
|
||||
break;
|
||||
case 807:
|
||||
npc("But don't upset her, she's pretty dangerous.");
|
||||
stage = 808;
|
||||
break;
|
||||
case 808:
|
||||
npc("I also heard that Reldo the librarian", "knows more about them, go talk to him.");
|
||||
stage = 809;
|
||||
break;
|
||||
case 809:
|
||||
end();
|
||||
break;
|
||||
case 806:
|
||||
player("Do you think they would let me join?");
|
||||
stage = 804;
|
||||
break;
|
||||
case 50:
|
||||
if (quest.getStage(player) == 0) {
|
||||
npc("Funny you should mention that...there is actually.");
|
||||
stage = 800;
|
||||
break;
|
||||
}
|
||||
if (quest.getStage(player) == 30 || quest.getStage(player) == 40 || quest.getStage(player) == 50) {
|
||||
npc("Funny you should mention that...there is actually.");
|
||||
stage = 51;
|
||||
break;
|
||||
}
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Nope, nothing at all.");
|
||||
stage = 192;
|
||||
break;
|
||||
case 51:
|
||||
npc("The ruthless and notorious criminal gang known as the", "Black Arm Gang have their headquarters down there.");
|
||||
stage = 52;
|
||||
break;
|
||||
case 52:
|
||||
options("Thank you for the warning!", "Do you think they would let me join?");
|
||||
stage = 53;
|
||||
break;
|
||||
case 53:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
player("Thanks for the warning!");
|
||||
stage = 54;
|
||||
break;
|
||||
case 2:
|
||||
player("Do you think they would let me join?");
|
||||
stage = 55;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 54:
|
||||
npc("Don't worry about it.");
|
||||
stage = 56;
|
||||
break;
|
||||
case 55:
|
||||
npc("You never know. You'll find a lady down there called", "Katrine. Speak to her.");
|
||||
stage = 57;
|
||||
break;
|
||||
case 57:
|
||||
npc("But don't upset her, she's pretty dangerous.");
|
||||
stage = 58;
|
||||
break;
|
||||
case 58:
|
||||
quest.setStage(player, 50);
|
||||
end();
|
||||
break;
|
||||
case 56:
|
||||
player("Do you think they would let me join?");
|
||||
stage = 55;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { 641 };
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import core.game.node.entity.player.Player;
|
||||
* Represents the dialogue plugin used for the cuffs npc.
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
* Fixed a typo -Nuggles
|
||||
*/
|
||||
@Initializable
|
||||
public final class CuffsDialogue extends DialoguePlugin {
|
||||
@@ -54,7 +55,7 @@ public final class CuffsDialogue extends DialoguePlugin {
|
||||
stage = 2;
|
||||
break;
|
||||
case 2:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Nope, we'd never do anuthing like that.", "Just a band of innocent walkers, that's us.");
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Nope, we'd never do anything like that.", "Just a band of innocent walkers, that's us.");
|
||||
stage = 3;
|
||||
break;
|
||||
case 3:
|
||||
|
||||
@@ -7,6 +7,7 @@ import core.plugin.Initializable;
|
||||
/**
|
||||
* Represents the dialogue plugin used for the goblin village guard npc.
|
||||
* @author jamix77
|
||||
* Fixed a typo -Nuggles
|
||||
*/
|
||||
@Initializable
|
||||
public final class GoblinVillageGuardDialogue extends DialoguePlugin {
|
||||
@@ -47,7 +48,7 @@ public final class GoblinVillageGuardDialogue extends DialoguePlugin {
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
switch (stage) {
|
||||
case 0:
|
||||
npc("I know. We guards uaully stay by banks and shops,", "but I got sent all the way out here to keep an eye on","the brigands loitering just south of here.");
|
||||
npc("I know. We guards usually stay by banks and shops,", "but I got sent all the way out here to keep an eye on","the brigands loitering just south of here.");
|
||||
stage = 1;
|
||||
break;
|
||||
case 1:
|
||||
@@ -59,7 +60,7 @@ public final class GoblinVillageGuardDialogue extends DialoguePlugin {
|
||||
stage++;
|
||||
break;
|
||||
case 3:
|
||||
player("Honestly people these days just don't know how to behave!");
|
||||
player("Honestly, people these days just don't know how to behave!");
|
||||
stage++;
|
||||
break;
|
||||
case 4:
|
||||
|
||||
@@ -180,7 +180,7 @@ public final class HansDialoguePlugin extends DialoguePlugin {
|
||||
} else {
|
||||
stage = 15;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
npc("One moment, please...");
|
||||
break;
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
package core.game.content.dialogue;
|
||||
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.player.Player;
|
||||
|
||||
/**
|
||||
* Represents the high priest dialogue plugin.
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
@Initializable
|
||||
public final class HighPriestDialogue extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* Constructs a new {@code HighPriestDialogue} {@code Object}.
|
||||
*/
|
||||
public HighPriestDialogue() {
|
||||
/**
|
||||
* empty.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@code HighPriestDialogue} {@code Object}.
|
||||
* @param player the player.
|
||||
*/
|
||||
public HighPriestDialogue(Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
return new HighPriestDialogue(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Many greetings. Welcome to our fair island.");
|
||||
stage = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
switch (stage) {
|
||||
case 0:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Enjoy our stay here. May it be spiritually uplifting!");
|
||||
stage = 1;
|
||||
break;
|
||||
case 1:
|
||||
end();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { 216 };
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public final class LongbowBenDialogue extends DialoguePlugin {
|
||||
case 1:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Why are you called Longbow Ben?");
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Why are you called Longbow Ben?");
|
||||
stage = 100;
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
package core.game.content.dialogue;
|
||||
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.player.Player;
|
||||
|
||||
/**
|
||||
* Represents the dialogue used for the mazion npc.
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
@Initializable
|
||||
public final class MazionDialogue extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* Constructs a new {@code MazionDialogue} {@code Object}.
|
||||
*/
|
||||
public MazionDialogue() {
|
||||
/**
|
||||
* empty.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@code MazionDialogue} {@code Object}.
|
||||
* @param player the player.
|
||||
*/
|
||||
public MazionDialogue(Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
return new MazionDialogue(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Please leave me along, a parrot stole my banana.");
|
||||
stage = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
switch (stage) {
|
||||
case 0:
|
||||
end();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { 3114 };
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public final class MissSchismDialogue extends DialoguePlugin {
|
||||
stage = 112;
|
||||
break;
|
||||
case 112:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I'm sure I could, but I don't see why. The vampie wasn't", "bothering me.");
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I'm sure I could, but I don't see why. The vampire wasn't", "bothering me.");
|
||||
stage = 113;
|
||||
break;
|
||||
case 113:
|
||||
@@ -127,7 +127,7 @@ public final class MissSchismDialogue extends DialoguePlugin {
|
||||
stage = 212;
|
||||
break;
|
||||
case 212:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "And who'd have ever thought such a sweet old genleman", "would do such a thing?");
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "And who'd have ever thought such a sweet old gentleman", "would do such a thing?");
|
||||
stage = 213;
|
||||
break;
|
||||
case 213:
|
||||
@@ -150,12 +150,12 @@ public final class MissSchismDialogue extends DialoguePlugin {
|
||||
stage = 22;
|
||||
break;
|
||||
case 22:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I also do voluntary work for the Draynor Manor", "Restoration Fund. We're campagning to have", "Draynor manor turned into a museum before the wet-rot", "destroys it completely.");
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I also do voluntary work for the Draynor Manor", "Restoration Fund. We're campaigning to have", "Draynor manor turned into a museum before the wet-rot", "destroys it completely.");
|
||||
stage = 23;
|
||||
break;
|
||||
case 23:
|
||||
if(player.getQuestRepository().isComplete("Vampire Slayer")) {
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Well, now that I've cleared the vampire out of the manor,", "I guess you won't have to mutch trouble turning it into a", "museum.");
|
||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Well, now that I've cleared the vampire out of the manor,", "I guess you won't have too much trouble turning it into a", "museum.");
|
||||
stage = 24;
|
||||
} else {
|
||||
end();
|
||||
@@ -185,3 +185,6 @@ public final class MissSchismDialogue extends DialoguePlugin {
|
||||
return new int[] { 2634 };
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Fixed Vexia's crappy English in some sentences
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ public final class MonkeyDialogue extends DialoguePlugin {
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
player("Who's a cute little monkey?");
|
||||
player("Hey little man, how's it goin'?");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,15 +46,18 @@ public final class MonkeyDialogue extends DialoguePlugin {
|
||||
stage++;
|
||||
break;
|
||||
case 1:
|
||||
player(FacialExpression.HALF_GUILTY,"Yeah.");
|
||||
stage = 5;
|
||||
break;
|
||||
case 5:
|
||||
end();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { 2301 };
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package core.game.content.dialogue;
|
||||
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.player.Player;
|
||||
|
||||
/**
|
||||
* Handles the NurmofDialogue dialogue.
|
||||
* @author 'Vexia
|
||||
*/
|
||||
@Initializable
|
||||
public class NurmofDialogue extends DialoguePlugin {
|
||||
|
||||
public NurmofDialogue() {
|
||||
|
||||
}
|
||||
|
||||
public NurmofDialogue(Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
|
||||
return new NurmofDialogue(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Greetings and welcome to my pickaxe shop. Do you", "want to buy my premium quality pickaxes?");
|
||||
stage = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
switch (stage) {
|
||||
case 0:
|
||||
interpreter.sendOptions("Select an Option", "Yes, please.", "No, thank you.");
|
||||
stage = 1;
|
||||
break;
|
||||
case 1:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
end();
|
||||
npc.openShop(player);
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { 594 };
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import core.game.node.item.Item;
|
||||
* @notice Modified March 2nd, 2015 to allow the bulk buying of shards.
|
||||
* @notice The previous notice is dubious
|
||||
* @notice Spirit shard packs were released 9 September 2009, outside of 530. Option removed.
|
||||
* Fixed multiple typos -Nuggles
|
||||
*/
|
||||
@Initializable
|
||||
public final class PikkupstixDialogue extends DialoguePlugin {
|
||||
@@ -438,7 +439,7 @@ public final class PikkupstixDialogue extends DialoguePlugin {
|
||||
stage = 6;
|
||||
break;
|
||||
case 6:
|
||||
npc("Well, for a start, it has the ability to perform a", "Summoning scroll that forces the oppnents to flee. That is", "what it will use on the giant wolpertinger, with the", "difference being that the giant wolpertinger will be so");
|
||||
npc("Well, for a start, it has the ability to perform a", "Summoning scroll that forces the opponents to flee. That is", "what it will use on the giant wolpertinger, with the", "difference being that the giant wolpertinger will be so");
|
||||
stage = 7;
|
||||
break;
|
||||
case 7:
|
||||
@@ -624,10 +625,10 @@ public final class PikkupstixDialogue extends DialoguePlugin {
|
||||
switch (stage) {
|
||||
case 0:
|
||||
if (player.getSkills().getStaticLevel(Skills.SUMMONING) == 99) {
|
||||
options("So, what's Summmoning all about, then?", "Can I buy some Summoning supplies?", "Can I buy a Summoning skillcape?");
|
||||
options("So, what's Summoning all about, then?", "Can I buy some Summoning supplies?", "Can I buy a Summoning skillcape?");
|
||||
stage = 600;
|
||||
} else {
|
||||
options("So, what's Summmoning all about, then?", "Can I buy some Summoning supplies?", "Please tell me about skillcapes.");
|
||||
options("So, what's Summoning all about, then?", "Can I buy some Summoning supplies?", "Please tell me about skillcapes.");
|
||||
stage = 1;
|
||||
}
|
||||
break;
|
||||
@@ -685,7 +686,7 @@ public final class PikkupstixDialogue extends DialoguePlugin {
|
||||
stage = 102;
|
||||
break;
|
||||
case 102:
|
||||
npc("These animals can also perform a special move, wich is", "specific to the species. For example, a spirit wolf can", "perform the Howl special move if you are holding the", "correct Howl scroll.");
|
||||
npc("These animals can also perform a special move, which is", "specific to the species. For example, a spirit wolf can", "perform the Howl special move if you are holding the", "correct Howl scroll.");
|
||||
stage = 103;
|
||||
break;
|
||||
case 103:
|
||||
@@ -743,7 +744,7 @@ public final class PikkupstixDialogue extends DialoguePlugin {
|
||||
stage = 401;
|
||||
break;
|
||||
case 401:
|
||||
interpreter.sendOptions("Choose an option:", "So, what's Summmoning all about, then?", "Can I buy some Summoning supplies?", "Please tell me about skillcapes.");
|
||||
interpreter.sendOptions("Choose an option:", "So, what's Summoning all about, then?", "Can I buy some Summoning supplies?", "Please tell me about skillcapes.");
|
||||
stage = 1;
|
||||
break;
|
||||
case 600:
|
||||
|
||||
@@ -17,43 +17,45 @@ public enum BirdNest {
|
||||
SEED(new ChanceItem(5073, 1, 65),
|
||||
new ChanceItem(Items.ACORN_5312, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.APPLE_TREE_SEED_5283, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.WILLOW_SEED_5313, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.BANANA_TREE_SEED_5284, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.ORANGE_TREE_SEED_5285, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.WILLOW_SEED_5313, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.CURRY_TREE_SEED_5286, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.MAPLE_SEED_5314, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.PINEAPPLE_SEED_5287, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.PAPAYA_TREE_SEED_5288, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.ORANGE_TREE_SEED_5285, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.CURRY_TREE_SEED_5286, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.MAPLE_SEED_5314, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.PINEAPPLE_SEED_5287, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.PAPAYA_TREE_SEED_5288, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.YEW_SEED_5315, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.PALM_TREE_SEED_5289, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.CALQUAT_TREE_SEED_5290, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.YEW_SEED_5315, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.MAGIC_SEED_5316, 1, NPCDropTables.DROP_RATES[3]),
|
||||
new ChanceItem(Items.SPIRIT_SEED_5317, 1, NPCDropTables.DROP_RATES[3])),
|
||||
new ChanceItem(Items.SPIRIT_SEED_5317, 1, NPCDropTables.DROP_RATES[3]),
|
||||
new ChanceItem(Items.MAGIC_SEED_5316, 1, NPCDropTables.DROP_RATES[3])),
|
||||
RING(new ChanceItem(5074, 1, 30),
|
||||
new ChanceItem(Items.GOLD_RING_1635, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.SAPPHIRE_RING_1637, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.EMERALD_RING_1639, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.RUBY_RING_1641, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.DIAMOND_RING_1643, 1, NPCDropTables.DROP_RATES[3])),
|
||||
new ChanceItem(Items.EMERALD_RING_1639, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.RUBY_RING_1641, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.DIAMOND_RING_1643, 1, NPCDropTables.DROP_RATES[2])),
|
||||
RED(new ChanceItem(5070, 1, 5), new ChanceItem(5076)),
|
||||
GREEN(new ChanceItem(5071, 1, 5), new ChanceItem(5078)),
|
||||
BLUE(new ChanceItem(5072, 1, 5), new ChanceItem(5077)),
|
||||
RAVEN(new ChanceItem(11966, 1, 5), new ChanceItem(11964)),
|
||||
|
||||
WYSON(new ChanceItem(7413, 1, 1),
|
||||
new ChanceItem(Items.CABBAGE_SEED_5324, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.SWEETCORN_SEED_5320, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.TOMATO_SEED_5322, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.ONION_SEED_5319, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.POTATO_SEED_5318, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.LIMPWURT_SEED_5100, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.STRAWBERRY_SEED_5323, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.TOADFLAX_SEED_5296, 1, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.WATERMELON_SEED_5321, 1, NPCDropTables.DROP_RATES[1]),
|
||||
new ChanceItem(Items.POTATO_SEED_5318, 14, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.SWEETCORN_SEED_5320, 3, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.TOMATO_SEED_5322, 6, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.CABBAGE_SEED_5324, 9, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.LIMPWURT_SEED_5100, 2, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.ONION_SEED_5319, 11, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.STRAWBERRY_SEED_5323, 3, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.WATERMELON_SEED_5321, 2, NPCDropTables.DROP_RATES[0]),
|
||||
new ChanceItem(Items.ACORN_5312, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.RANARR_SEED_5295, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.WILLOW_SEED_5313, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.MAPLE_SEED_5314, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.YEW_SEED_5315, 1, NPCDropTables.DROP_RATES[3]),
|
||||
new ChanceItem(Items.MAGIC_SEED_5316, 1, NPCDropTables.DROP_RATES[3]));
|
||||
new ChanceItem(Items.YEW_SEED_5315, 1, NPCDropTables.DROP_RATES[2]),
|
||||
new ChanceItem(Items.MAGIC_SEED_5316, 1, NPCDropTables.DROP_RATES[3]),
|
||||
new ChanceItem(Items.SPIRIT_SEED_5317, 1, NPCDropTables.DROP_RATES[3]));
|
||||
|
||||
/**
|
||||
* The random nest items.
|
||||
|
||||
@@ -12,7 +12,7 @@ import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Initializable;
|
||||
import rs09.game.content.dialogue.DukeHoracioDialogue;
|
||||
import rs09.game.content.dialogue.region.lumbridge.DukeHoracioDialogue;
|
||||
import rs09.game.content.quest.free.dragonslayer.NedDialogue;
|
||||
import rs09.game.world.GameWorld;
|
||||
import rs09.plugin.PluginManager;
|
||||
|
||||
@@ -4,7 +4,7 @@ import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.game.node.item.Item;
|
||||
import core.plugin.Initializable;
|
||||
import rs09.game.content.dialogue.KingRoaldDialogue;
|
||||
import rs09.game.content.dialogue.region.varrock.KingRoaldDialogue;
|
||||
import rs09.plugin.PluginManager;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import core.game.node.entity.skill.Skills;
|
||||
|
||||
@Initializable
|
||||
public class FishingContest extends Quest {
|
||||
public FishingContest(){super("Fishing Contest",62,61,1,11,0,1,5);}
|
||||
public FishingContest(){super("Fishing Contest",26,61,1,11,0,1,5);}
|
||||
public static final Item FISHING_ROD = new Item(307);
|
||||
public static final Item FISHING_PASS = new Item(27);
|
||||
public static final Item RED_VINE_WORM = new Item(25);
|
||||
|
||||
@@ -3,6 +3,7 @@ package core.game.content.quest.members.merlinscrystal;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.quest.Quest;
|
||||
import core.plugin.Initializable;
|
||||
import rs09.game.content.quest.members.merlinsquest.TheLadyOfTheLake;
|
||||
import rs09.plugin.PluginManager;
|
||||
|
||||
/**
|
||||
|
||||
-264
@@ -1,264 +0,0 @@
|
||||
package core.game.content.quest.members.merlinscrystal;
|
||||
|
||||
import core.game.container.impl.EquipmentContainer;
|
||||
import org.rs09.consts.Items;
|
||||
import core.game.node.entity.player.link.diary.DiaryType;
|
||||
import core.game.content.dialogue.DialoguePlugin;
|
||||
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.item.Item;
|
||||
|
||||
import static rs09.tools.DialogueConstKt.END_DIALOGUE;
|
||||
|
||||
/**
|
||||
* Handles the LadyOfTheLake dialogue.
|
||||
*
|
||||
* @author Vexia
|
||||
* @author Splinter
|
||||
*/
|
||||
public class TheLadyOfTheLake extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* Constructs a new {@code TheLadyOfTheLake} {@code Object}
|
||||
*/
|
||||
public TheLadyOfTheLake() {
|
||||
/*
|
||||
* empty.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@code TheLadyOfTheLake} {@code Object}
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public TheLadyOfTheLake(Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
if (!player.hasItem(new Item(35, 1))) {
|
||||
npc("Good day to you, " + (player.isMale() ? "sir" : "madam") + ".");
|
||||
stage = 0;
|
||||
} else {
|
||||
npc("Good day to you, " + (player.isMale() ? "sir" : "madam") + ".");
|
||||
stage = 699;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
final Quest quest = player.getQuestRepository().getQuest("Merlin's Crystal");
|
||||
switch (stage) {
|
||||
case END_DIALOGUE:
|
||||
end();
|
||||
break;
|
||||
case 0:
|
||||
options("Who are you?", "I seek the sword Excalibur.", "Good day.");
|
||||
stage = 1;
|
||||
break;
|
||||
case 1:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
player("Who are you?");
|
||||
stage = 100;
|
||||
break;
|
||||
case 2:
|
||||
player("I seek the sword Excalibur.");
|
||||
if (quest.getStage(player) < 50) {
|
||||
stage = 250;
|
||||
} else {
|
||||
stage = 161;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
player("Good day.");
|
||||
stage = END_DIALOGUE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 250:
|
||||
npc("I am afraid I do not know what you are talking about.");
|
||||
stage = END_DIALOGUE;
|
||||
break;
|
||||
case 100:
|
||||
npc("I am the Lady of the Lake.");
|
||||
if (player.getAchievementDiaryManager().getDiary(DiaryType.SEERS_VILLAGE).isComplete(2)
|
||||
&& player.getEquipment().get(EquipmentContainer.SLOT_HAT) != null
|
||||
&& player.getEquipment().get(EquipmentContainer.SLOT_HAT).getId() == 14631
|
||||
&& (player.getInventory().containsAtLeastOneItem(Items.EXCALIBUR_35) || player.getEquipment().containsAtLeastOneItem(Items.EXCALIBUR_35))) {
|
||||
stage = 110;
|
||||
} else {
|
||||
stage = 145;
|
||||
}
|
||||
break;
|
||||
case 110:
|
||||
player("And I'm-");
|
||||
stage++;
|
||||
break;
|
||||
case 111:
|
||||
npc("You're " + player.getName() + ". And I see from the sign you", "wear that you have earned the trust of Sir Kay.");
|
||||
stage++;
|
||||
break;
|
||||
case 112:
|
||||
player("It was nothing.. really...");
|
||||
stage++;
|
||||
break;
|
||||
case 113:
|
||||
npc("You shall be rewarded handsomely!");
|
||||
stage++;
|
||||
break;
|
||||
case 114:
|
||||
interpreter.sendItemMessage(Items.EXCALIBUR_35, "The Lady of the Lake reaches out and touches the", "blade Excalibur which seems to vibrate with new power.");
|
||||
if (player.getInventory().containsAtLeastOneItem(Items.EXCALIBUR_35)) {
|
||||
player.getInventory().remove(new Item(Items.EXCALIBUR_35));
|
||||
player.getInventory().add(new Item(14632));
|
||||
} else if (player.getEquipment().containsAtLeastOneItem(Items.EXCALIBUR_35)) {
|
||||
player.getEquipment().remove(new Item(Items.EXCALIBUR_35));
|
||||
player.getEquipment().add(new Item(14632), true, false);
|
||||
}
|
||||
stage++;
|
||||
break;
|
||||
case 115:
|
||||
player("What does this do then?");
|
||||
stage++;
|
||||
break;
|
||||
case 116:
|
||||
npc("I made the blade more powerful, and also gave it a", "rather healthy effect when you use the special.");
|
||||
stage++;
|
||||
break;
|
||||
case 117:
|
||||
player("Thanks!");
|
||||
stage = END_DIALOGUE;
|
||||
break;
|
||||
case 145:
|
||||
options("I seek the sword Excalibur.", "Good day.");
|
||||
stage = 150;
|
||||
break;
|
||||
case 150:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
player("I seek the sword Excalibur.");
|
||||
stage = 161;
|
||||
break;
|
||||
case 2:
|
||||
player("Good day.");
|
||||
stage = END_DIALOGUE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 161:
|
||||
if (quest.getStage(player) == 50 || quest.getStage(player) == 60) {// they haven't proven themselves yet
|
||||
npc("Aye, I have that artefact in my possession.");
|
||||
stage = 300;
|
||||
} else if (quest.getStage(player) >= 70) {
|
||||
npc("... But you have already proved thyself to be worthy", "of wielding it once already. I shall return it to you", "if you can prove yourself to still be worthy.");
|
||||
stage = 162;
|
||||
}
|
||||
break;
|
||||
case 162:
|
||||
player("... And how can I do that?");
|
||||
stage = 163;
|
||||
break;
|
||||
case 163:
|
||||
npc("Why, by proving yourself to be above material goods.");
|
||||
stage = 164;
|
||||
break;
|
||||
case 164:
|
||||
npc("500 coins ought to do it.");
|
||||
stage = 166;
|
||||
break;
|
||||
case 166:
|
||||
if (player.getInventory().contains(995, 500)) {
|
||||
player("Ok, here you go.");
|
||||
stage = 168;
|
||||
} else {
|
||||
player("I don't have that kind of money...");
|
||||
stage = 167;
|
||||
}
|
||||
break;
|
||||
case 167:
|
||||
npc("Well, come back when you do.");
|
||||
stage = END_DIALOGUE;
|
||||
break;
|
||||
case 168:
|
||||
if (player.getInventory().freeSlots() == 0) {
|
||||
player("Sorry, I don't seem to have enough inventory space.");
|
||||
stage = END_DIALOGUE;
|
||||
} else if (player.getInventory().contains(995, 500)) {
|
||||
player.getInventory().remove(new Item(995, 500));
|
||||
player.getInventory().add(new Item(35, 1));
|
||||
npc("You are still worthy to wield Excalibur! And thanks", "for the cash! I felt like getting a new haircut!");
|
||||
stage = 170;
|
||||
} else {
|
||||
player("I don't have that kind of money...");
|
||||
stage = 167;
|
||||
}
|
||||
break;
|
||||
case 170:
|
||||
interpreter.sendDialogue("The lady of the Lake hands you Excalibur.");
|
||||
stage = END_DIALOGUE;
|
||||
break;
|
||||
case 300:
|
||||
npc("'Tis very valuable, and not an artefact to be given", "away lightly.");
|
||||
stage = 301;
|
||||
break;
|
||||
case 301:
|
||||
npc("I would want to give it away only to one who is worthy", "and good.");
|
||||
stage = 302;
|
||||
break;
|
||||
case 302:
|
||||
player("And how am I meant to prove that?");
|
||||
stage = 303;
|
||||
break;
|
||||
case 303:
|
||||
npc("I shall set a test for you.");
|
||||
stage = 304;
|
||||
break;
|
||||
case 304:
|
||||
npc("First I need you to travel to Port Sarim. Then go to", "the upstairs room of the jeweller's shop there.");
|
||||
stage = 305;
|
||||
break;
|
||||
case 305:
|
||||
player("Ok. That seems easy enough.");
|
||||
quest.setStage(player, 60);
|
||||
stage = END_DIALOGUE;
|
||||
break;
|
||||
case 699:
|
||||
options("Who are you?", "Good day.");
|
||||
stage = 700;
|
||||
break;
|
||||
case 700:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
player("Who are you?");
|
||||
stage = 720;
|
||||
break;
|
||||
case 2:
|
||||
player("Good day.");
|
||||
stage = END_DIALOGUE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 720:
|
||||
npc("I am the Lady of the Lake.");
|
||||
stage = END_DIALOGUE;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
return new TheLadyOfTheLake(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[]{250};
|
||||
}
|
||||
}
|
||||
+9
-7
@@ -10,6 +10,8 @@ import core.game.world.update.flag.context.Animation;
|
||||
/**
|
||||
* Handles the surok magis dialogue.
|
||||
* @author Vexia
|
||||
* @editor Nuggles
|
||||
* fixed the default dialogue, the NPC and Player tags were swapped.
|
||||
*/
|
||||
public class SurokMagisDialogue extends DialoguePlugin {
|
||||
|
||||
@@ -105,31 +107,31 @@ public class SurokMagisDialogue extends DialoguePlugin {
|
||||
default:
|
||||
switch (stage) {
|
||||
case 0:
|
||||
player("What do you want? ...Oh, wait. I know! You're", "probably just like all the others, aren't you? After some", "fancy spell or potion from me, I bet!");
|
||||
npc("What do you want? ...Oh, wait. I know! You're", "probably just like all the others, aren't you? After some", "fancy spell or potion from me, I bet!");
|
||||
stage = 1;
|
||||
break;
|
||||
case 1:
|
||||
npc("No! at least, I don't think so. What sort of spells", "do you have?");
|
||||
player("No! at least, I don't think so. What sort of spells", "do you have?");
|
||||
stage = 2;
|
||||
break;
|
||||
case 2:
|
||||
player("Hah! I knew it! I expect you want my Aphro-Dizzy-", "Yak spell! Want someone to fall madly in love with you,", "eh?");
|
||||
npc("Hah! I knew it! I expect you want my Aphro-Dizzy-", "Yak spell! Want someone to fall madly in love with you,", "eh?");
|
||||
stage = 3;
|
||||
break;
|
||||
case 3:
|
||||
npc("That spell sounds very interesting, but I didn't mean to", "disturb you!");
|
||||
player("That spell sounds very interesting, but I didn't mean to", "disturb you!");
|
||||
stage = 4;
|
||||
break;
|
||||
case 4:
|
||||
player("Well, I see that you do have some manners. I'm glad", "to see that you use them.");
|
||||
npc("Well, I see that you do have some manners. I'm glad", "to see that you use them.");
|
||||
stage = 5;
|
||||
break;
|
||||
case 5:
|
||||
player("Now, if it's all the same, I am very bust at the", "moment. Come back another time", "please and thank you.");
|
||||
npc("Now, if it's all the same, I am very busy at the", "moment. Come back another time", "please and thank you.");
|
||||
stage = 6;
|
||||
break;
|
||||
case 6:
|
||||
npc("Yes, of course!");
|
||||
player("Yes, of course!");
|
||||
stage = 7;
|
||||
break;
|
||||
case 7:
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package core.game.content.zone.rellekka;
|
||||
|
||||
import core.cache.def.impl.SceneryDefinition;
|
||||
import core.game.system.task.LocationLogoutTask;
|
||||
import core.game.system.task.LogoutTask;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.skill.agility.AgilityHandler;
|
||||
import core.game.interaction.Option;
|
||||
import core.game.interaction.OptionHandler;
|
||||
import core.game.component.Component;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.Entity;
|
||||
import core.game.node.entity.impl.ForceMovement;
|
||||
@@ -17,6 +21,7 @@ import core.game.world.map.zone.ZoneBorders;
|
||||
import core.game.world.map.zone.ZoneBuilder;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Plugin;
|
||||
import rs09.game.world.GameWorld;
|
||||
import rs09.plugin.PluginManager;
|
||||
|
||||
/**
|
||||
@@ -36,7 +41,6 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
ZoneBuilder.configure(this);
|
||||
PluginManager.definePlugin(new SailorDialogue());
|
||||
PluginManager.definePlugin(new JarvaldDialogue());
|
||||
PluginManager.definePlugins(new RellekaOptionHandler(), new MariaGunnarsDialogue());
|
||||
PluginManager.definePlugin(new OptionHandler() {
|
||||
@@ -72,21 +76,9 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
|
||||
* (option.equals("Trade") ? "buy clothes here" :
|
||||
* "change their shoes here") + "."); return true;
|
||||
*/
|
||||
case 4165:
|
||||
player.getDialogueInterpreter().open(1288);
|
||||
return true;
|
||||
case 4166:
|
||||
player.sendMessage("This door is locked tightly shut.");
|
||||
return true;
|
||||
case 1288:
|
||||
player.getDialogueInterpreter().sendDialogues((NPC) target, null, "I have no interest in talking to you just now", "outerlander.");
|
||||
return true;
|
||||
case 34286:
|
||||
player.getDialogueInterpreter().sendDialogues(1289, null, "Outerlander... do not test my patience. I do not take", "kindly to people wandering in here and acting as though", "they own the place.");
|
||||
return true;
|
||||
case 4148:
|
||||
player.getDialogueInterpreter().sendDialogues(1278, null, "Hey, outerlander. You can't go through there. Talent", "only, backstage.");
|
||||
return true;
|
||||
//case 4148:
|
||||
// player.getDialogueInterpreter().sendDialogues(1278, null, "Hey, outerlander. You can't go through there. Talent", "only, backstage.");
|
||||
// return true;
|
||||
case 100:
|
||||
player.getDialogueInterpreter().sendDialogue("You try to open the trapdoor but it won't budge! It looks like the", "trapdoor can only be opened from the other side.");
|
||||
return true;
|
||||
@@ -114,6 +106,35 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
|
||||
register(new ZoneBorders(2602, 3639, 2739, 3741));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sails a player using the relleka ships.
|
||||
* @param player the player.
|
||||
* @param name the name.
|
||||
* @param destination the destination.
|
||||
*/
|
||||
public static void sail(final Player player, final String name, final Location destination) {
|
||||
player.lock();
|
||||
player.getInterfaceManager().open(new Component(224));
|
||||
player.addExtension(LogoutTask.class, new LocationLogoutTask(5, destination));
|
||||
GameWorld.getPulser().submit(new Pulse(1, player) {
|
||||
int count;
|
||||
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
switch (++count) {
|
||||
case 5:
|
||||
player.unlock();
|
||||
player.getInterfaceManager().close();
|
||||
player.getProperties().setTeleportLocation(destination);
|
||||
player.getDialogueInterpreter().sendDialogue("The ship arrives at " + name + ".");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles options related to relleka.
|
||||
* @author Vexia
|
||||
@@ -126,6 +147,7 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
|
||||
SceneryDefinition.forId(4615).getHandlers().put("option:cross", this);
|
||||
SceneryDefinition.forId(5847).getHandlers().put("option:climb-over", this);
|
||||
SceneryDefinition.forId(5008).getHandlers().put("option:enter",this);
|
||||
SceneryDefinition.forId(15116).getHandlers().put("option:climb-down", this);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -154,6 +176,13 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "climb-down":
|
||||
switch(node.getId()){
|
||||
case 15116:
|
||||
player.getProperties().setTeleportLocation(Location.create(2509, 10245, 0));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
package core.game.content.zone.rellekka;
|
||||
|
||||
import core.game.content.dialogue.DialoguePlugin;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.world.map.Location;
|
||||
|
||||
import static rs09.tools.DialogueConstKt.END_DIALOGUE;
|
||||
|
||||
/**
|
||||
* Handles the sailor dialogue.
|
||||
* @author Vexia
|
||||
*/
|
||||
public final class SailorDialogue extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* If its the relleka npc.
|
||||
*/
|
||||
private boolean rellekaNpc;
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code SailorDialogue} {@Code Object}
|
||||
*/
|
||||
public SailorDialogue() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code SailorDialogue} {@Code Object}
|
||||
* @param player the player.
|
||||
*/
|
||||
public SailorDialogue(Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
return new SailorDialogue(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
rellekaNpc = npc.getId() == 1385;
|
||||
player("Ship's closed due to stingrays?");
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
switch (stage) {
|
||||
case 0:
|
||||
npc("Yes.");
|
||||
stage = END_DIALOGUE;
|
||||
//npc("Hello again, brother " + player.getUsername() + ". If you're ready to jump", "aboard, we're all ready to set sail with the tide!");
|
||||
//stage++;
|
||||
break;
|
||||
case 1:
|
||||
player("Let's go!");
|
||||
stage++;
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
player.lock();
|
||||
player.sendMessage("You board the longship...");
|
||||
//RellekkaZone.sail(player, rellekaNpc ? "Miscellania" : "Rellekka", rellekaNpc ? Location.create(2581, 3845, 0) : Location.create(2629, 3693, 0));
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { 1304 };
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,6 +45,7 @@ public final class EmptyOptionPlugin extends OptionHandler {
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
ItemDefinition.setOptionHandler("empty", this);
|
||||
ItemDefinition.setOptionHandler("empty dish", this);
|
||||
ItemDefinition.setOptionHandler("empty bowl", this);
|
||||
return this;
|
||||
}
|
||||
public enum EmptyItem{
|
||||
@@ -57,10 +58,19 @@ public final class EmptyOptionPlugin extends OptionHandler {
|
||||
BUCKET_OF_SUPERCOMPOST(6034, BUCKET, "You empty the bucket of supercompost."),
|
||||
BUCKET_OF_SLIME(4286, BUCKET, "You empty the contents of the bucket on the floor."),
|
||||
VIAL_OF_WATER(227, VIAL, "You empty the vial."),
|
||||
BOWL_OF_SAND(1921, 1923, "You empty the contents of the bowl onto the floor."),
|
||||
BOWL_OF_WATER(1921, 1923, "You empty the contents of the bowl onto the floor."),
|
||||
JUG_OF_WATER(1937, 1935, "You empty the contents of the jug onto the floor."),
|
||||
BURNT_PIE(2329, 2313, "You empty the pie dish."),
|
||||
POTION(91, VIAL,null);
|
||||
POTION(91, VIAL,null),
|
||||
BURNT_STEW(2005, 1923, "You empty the contents of the bowl onto the floor."),
|
||||
NETTLE_TEA(4239, 1923, "You empty the contents of the bowl onto the floor."),
|
||||
NETTLE_WATER(4237, 1923, "You empty the contents of the bowl onto the floor."),
|
||||
NETTLE_TEA_MILKY(4240, 1923, "You empty the contents of the bowl onto the floor."),
|
||||
BURNT_CURRY(2013, 1923, "You empty the contents of the bowl onto the floor."),
|
||||
BURNT_GNOMEBOWL(2175, 2166, "You empty the contents of the gnomebowl onto the floor."),
|
||||
BURNT_EGG(7090, 1923, "You empty the contents of the bowl onto the floor."),
|
||||
BURNT_ONION(7092, 1923, "You empty the contents of the bowl onto the floor."),
|
||||
BURNT_MUSHROOM(7094, 1923, "You empty the contents of the bowl onto the floor.");
|
||||
|
||||
int fullId, emptyId;
|
||||
String emptyMessage;
|
||||
|
||||
@@ -24,6 +24,7 @@ public class SpadeDigOptionPlugin extends OptionHandler {
|
||||
|
||||
@Override
|
||||
public boolean handle(final Player player, Node node, String option) {
|
||||
player.getAudioManager().send(1470,1,1);
|
||||
if (!DigSpadeHandler.dig(player)) {
|
||||
player.sendMessage("You dig but find nothing.");
|
||||
}
|
||||
|
||||
@@ -1,304 +0,0 @@
|
||||
package core.game.interaction.item.withitem;
|
||||
|
||||
import core.game.interaction.NodeUsageEvent;
|
||||
import core.game.interaction.UseWithHandler;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Represents the plugin used to remove poision from a weapon.
|
||||
* @author 'Vexia
|
||||
* @date 29/11/2013
|
||||
*/
|
||||
@Initializable
|
||||
public class PoisonRemovePlugin extends UseWithHandler {
|
||||
|
||||
/**
|
||||
* Constructs a new {@code PoisonRemovePlugin} {@code Object}.
|
||||
*/
|
||||
public PoisonRemovePlugin() {
|
||||
super(883, 5616, 883, 885, 5617, 885, 887, 5618, 887, 889, 5619, 889, 891, 5620, 891, 893, 5621, 893, 871, 5655, 5662, 870, 5654, 5661, 872, 5656, 5663, 873, 5657, 5664, 875, 5659, 5666, 876, 5660, 5667, 874, 5658, 5665, 812, 5628, 5635, 813, 5629, 5636, 814, 5630, 5637, 3094, 5631, 5638, 815, 5632, 5639, 816, 5633, 5640, 817, 5634, 5641, 831, 5641, 5648, 832, 5642, 5649, 833, 5643, 5650, 834, 5644, 5651, 835, 5645, 5652, 836, 5646, 5653, 1219, 5668, 5686, 1221, 5670, 5688, 1223, 5672, 5690, 1225, 5674, 5692, 1227, 5676, 5694, 1229, 5678, 5696, 1231, 5680, 5698, 1233, 5682, 5700, 1251, 5704, 5618, 1253, 5706, 5620, 1255, 5708, 5622, 1257, 5710, 5624, 1259, 5712, 5626, 1261, 5714, 5628, 1263, 5716, 5630, 4582, 5734, 5636);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
addHandler(3188, ITEM_TYPE, this);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(NodeUsageEvent event) {
|
||||
final Player player = event.getPlayer();
|
||||
final PoisonedWeapon weapon = PoisonedWeapon.forItem(event.getBaseItem().getName().contains("Cleaning") ? event.getUsedItem() : event.getBaseItem());
|
||||
if (weapon == null) {
|
||||
return true;
|
||||
}
|
||||
if (player.getInventory().remove(event.getBaseItem().getName().contains("Cleaning") ? event.getUsedItem() : event.getBaseItem())) {
|
||||
player.getInventory().add(new Item(weapon.getItem(), 1));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the poisioning of a weapon.
|
||||
* @author 'Vexia
|
||||
*/
|
||||
public enum PoisonedWeapon {
|
||||
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_ARROW(882, 883, 5616, 883),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_ARROW(884, 885, 5617, 885),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_ARROW(886, 887, 5618, 887),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_ARROW(888, 889, 5619, 889),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_ARROW(890, 891, 5620, 891),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_ARROW(892, 893, 5621, 893),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_KNIFE(863, 871, 5655, 5662),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RONZE_KNIFE(864, 870, 5654, 5661),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_KNIFE(865, 872, 5656, 5663),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_KNIFE(866, 873, 5657, 5664),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_KNIFE(867, 875, 5659, 5666),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_KNIFE(868, 876, 5660, 5667),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BLACK_KNIFE(869, 874, 5658, 5665),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_DART(806, 812, 5628, 5635),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_DART(807, 813, 5629, 5636),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_DART(808, 814, 5630, 5637),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BLACK_DART(3093, 3094, 5631, 5638),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_DART(809, 815, 5632, 5639),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_DART(810, 816, 5633, 5640),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_DART(811, 817, 5634, 5641),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_JAVELIN(825, 831, 5641, 5648),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_JAVELIN(826, 832, 5642, 5649),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_JAVELIN(827, 833, 5643, 5650),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_JAVELIN(828, 834, 5644, 5651),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_JAVELIN(829, 835, 5645, 5652),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_JAVELIN(830, 836, 5646, 5653),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_DAGGER(1203, 1219, 5668, 5686),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_DAGGER(1205, 1221, 5670, 5688),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_DAGGER(1207, 1223, 5672, 5690),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_DAGGER(1209, 1225, 5674, 5692),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_DAGGER(1211, 1227, 5676, 5694),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_DAGGER(1213, 1229, 5678, 5696),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
DRAGON_DAGGER(1215, 1231, 5680, 5698),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BLACK_DAGGER(1217, 1233, 5682, 5700),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_SPEAR(1237, 1251, 5704, 5618),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_SPEAR(1239, 1253, 5706, 5620),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_SPEAR(1241, 1255, 5708, 5622),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_SPEAR(1243, 1257, 5710, 5624),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_SPEAR(1245, 1259, 5712, 5626),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_SPEAR(1247, 1261, 5714, 5628),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
DRAGON_SPEAR(1249, 1263, 5716, 5630),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BLACK_SPEAR(4580, 4582, 5734, 5636);
|
||||
|
||||
/**
|
||||
* @param id the id.
|
||||
* @return the value.
|
||||
*/
|
||||
public static PoisonedWeapon forId(int id) {
|
||||
for (PoisonedWeapon weapon : PoisonedWeapon.values()) {
|
||||
if (weapon.getItem() == id) {
|
||||
return weapon;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The item.
|
||||
*/
|
||||
private int item;
|
||||
|
||||
/**
|
||||
* The first stage.
|
||||
*/
|
||||
private int first;
|
||||
|
||||
/**
|
||||
* The second stage.
|
||||
*/
|
||||
private int second;
|
||||
|
||||
/**
|
||||
* The third stage.
|
||||
*/
|
||||
private int third;
|
||||
|
||||
/**
|
||||
* Constructs a new </code>PoisionWeapon</code>.
|
||||
*/
|
||||
PoisonedWeapon(int item, int first, int second, int third) {
|
||||
this.item = item;
|
||||
this.first = first;
|
||||
this.second = second;
|
||||
this.third = third;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the first.
|
||||
*/
|
||||
public int getFirst() {
|
||||
return first;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the item.
|
||||
*/
|
||||
public int getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the second.
|
||||
*/
|
||||
public int getSecond() {
|
||||
return second;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the third.
|
||||
*/
|
||||
public int getThird() {
|
||||
return third;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used to get the poisioned weapon for the id.
|
||||
* @param i the id.
|
||||
* @return the weapon.
|
||||
*/
|
||||
public static PoisonedWeapon forItem(final Item i) {
|
||||
for (PoisonedWeapon weapon : values()) {
|
||||
if (weapon.getFirst() == i.getId() || weapon.getSecond() == i.getId() || weapon.getThird() == i.getId()) {
|
||||
return weapon;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,348 +0,0 @@
|
||||
package core.game.interaction.item.withitem;
|
||||
|
||||
import static api.ContentAPIKt.*;
|
||||
import core.game.interaction.NodeUsageEvent;
|
||||
import core.game.interaction.UseWithHandler;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
/**
|
||||
* Handles weapon poisiong.
|
||||
* @author 'Vexia
|
||||
*/
|
||||
@Initializable
|
||||
public class PoisonWeaponPlugin extends UseWithHandler {
|
||||
|
||||
/**
|
||||
* Represents the poisioning of a weapon.
|
||||
* @author 'Vexia
|
||||
*/
|
||||
public enum PoisonedWeapon {
|
||||
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_ARROW(882, 883, 5616, 883),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_ARROW(884, 885, 5617, 885),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_ARROW(886, 887, 5618, 887),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_ARROW(888, 889, 5619, 889),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_ARROW(890, 891, 5620, 891),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_ARROW(892, 893, 5621, 893),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_KNIFE(863, 871, 5655, 5662),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RONZE_KNIFE(864, 870, 5654, 5661),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_KNIFE(865, 872, 5656, 5663),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_KNIFE(866, 873, 5657, 5664),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_KNIFE(867, 875, 5659, 5666),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_KNIFE(868, 876, 5660, 5667),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BLACK_KNIFE(869, 874, 5658, 5665),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_DART(806, 812, 5628, 5635),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_DART(807, 813, 5629, 5636),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_DART(808, 814, 5630, 5637),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BLACK_DART(3093, 3094, 5631, 5638),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_DART(809, 815, 5632, 5639),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_DART(810, 816, 5633, 5640),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_DART(811, 817, 5634, 5641),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_JAVELIN(825, 831, 5641, 5648),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_JAVELIN(826, 832, 5642, 5649),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_JAVELIN(827, 833, 5643, 5650),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_JAVELIN(828, 834, 5644, 5651),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_JAVELIN(829, 835, 5645, 5652),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_JAVELIN(830, 836, 5646, 5653),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_DAGGER(1203, 1219, 5668, 5686),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_DAGGER(1205, 1221, 5670, 5688),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_DAGGER(1207, 1223, 5672, 5690),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_DAGGER(1209, 1225, 5674, 5692),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_DAGGER(1211, 1227, 5676, 5694),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_DAGGER(1213, 1229, 5678, 5696),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
DRAGON_DAGGER(1215, 1231, 5680, 5698),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BLACK_DAGGER(1217, 1233, 5682, 5700),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BRONZE_SPEAR(1237, 1251, 5704, 5618),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
IRON_SPEAR(1239, 1253, 5706, 5620),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
STEEL_SPEAR(1241, 1255, 5708, 5622),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
MITHRIL_SPEAR(1243, 1257, 5710, 5624),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
ADAMANT_SPEAR(1245, 1259, 5712, 5626),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
RUNE_SPEAR(1247, 1261, 5714, 5628),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
DRAGON_SPEAR(1249, 1263, 5716, 5730),
|
||||
/**
|
||||
* Represents a poisioned weapon.
|
||||
*/
|
||||
BLACK_SPEAR(4580, 4582, 5734, 5636);
|
||||
|
||||
/**
|
||||
* @param id the id.
|
||||
* @return the value.
|
||||
*/
|
||||
public static PoisonedWeapon forId(int id) {
|
||||
for (PoisonedWeapon weapon : PoisonedWeapon.values()) {
|
||||
if (weapon.getItem() == id) {
|
||||
return weapon;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The item.
|
||||
*/
|
||||
private int item;
|
||||
|
||||
/**
|
||||
* The first stage.
|
||||
*/
|
||||
private int first;
|
||||
|
||||
/**
|
||||
* The second stage.
|
||||
*/
|
||||
private int second;
|
||||
|
||||
/**
|
||||
* The third stage.
|
||||
*/
|
||||
private int third;
|
||||
|
||||
/**
|
||||
* Constructs a new </code>PoisionWeapon</code>.
|
||||
*/
|
||||
PoisonedWeapon(int item, int first, int second, int third) {
|
||||
this.item = item;
|
||||
this.first = first;
|
||||
this.second = second;
|
||||
this.third = third;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the first.
|
||||
*/
|
||||
public int getFirst() {
|
||||
return first;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the item.
|
||||
*/
|
||||
public int getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the second.
|
||||
*/
|
||||
public int getSecond() {
|
||||
return second;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the third.
|
||||
*/
|
||||
public int getThird() {
|
||||
return third;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used to get the poisioned weapon for the id.
|
||||
* @param i the id.
|
||||
* @return the weapon.
|
||||
*/
|
||||
public static PoisonedWeapon forItem(final Item i) {
|
||||
for (PoisonedWeapon weapon : values()) {
|
||||
if (weapon.getFirst() == i.getId() || weapon.getSecond() == i.getId() || weapon.getThird() == i.getId()) {
|
||||
return weapon;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void poison(Player player, int type, int item, final Item weaponItem, PoisonedWeapon weapon) {
|
||||
int product = -1;
|
||||
player.animate(new Animation(1652));
|
||||
switch (item) {
|
||||
case 187:// normal.
|
||||
product = weapon.getFirst();
|
||||
player.getInventory().remove(new Item(187, 1));
|
||||
break;
|
||||
case 5937:// second
|
||||
product = weapon.getSecond();
|
||||
player.getInventory().remove(new Item(5937, 1));
|
||||
break;
|
||||
case 5940:// third.
|
||||
product = weapon.getThird();
|
||||
player.getInventory().remove(new Item(5940, 1));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
int amt = Math.min(weaponItem.getAmount(), 5);
|
||||
player.getInventory().remove(new Item(weaponItem.getId(), amt));
|
||||
addItemOrDrop(player, product, amt);
|
||||
addItemOrDrop(player, Items.VIAL_229, 1);
|
||||
player.getPacketDispatch().sendMessage("You poison the " + weaponItem.getName().toLowerCase() + ".");
|
||||
}
|
||||
|
||||
public PoisonWeaponPlugin() {
|
||||
super(882, 884, 886, 888, 890, 892, 863, 864, 865, 866, 867, 868, 869, 806, 807, 808, 3093, 809, 810, 811, 825, 826, 827, 828, 829, 830, 1203, 1205, 1207, 1209, 1211, 1213, 1215, 1217, 1237, 1239, 1241, 1243, 1245, 1247, 1249, 4580);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(NodeUsageEvent event) {
|
||||
final Player player = event.getPlayer();
|
||||
final Item second = (Item) event.getUsedWith();
|
||||
if (event.getUsedItem().getId() == 187 || second.getId() == 187) {
|
||||
|
||||
if (event.getUsedItem().getId() != 187) {
|
||||
poison(player, 1, second.getId(), event.getUsedItem(), PoisonedWeapon.forId(event.getUsedItem().getId()));
|
||||
} else if (second.getId() != 187) {
|
||||
poison(player, 1, event.getUsedItem().getId(), second, PoisonedWeapon.forId(second.getId()));
|
||||
}
|
||||
}
|
||||
if (event.getUsedItem().getId() == 5937 || second.getId() == 5937) {
|
||||
if (event.getUsedItem().getId() != 5937) {
|
||||
poison(player, 2, second.getId(), event.getUsedItem(), PoisonedWeapon.forId(event.getUsedItem().getId()));
|
||||
} else if (second.getId() != 5937) {
|
||||
poison(player, 2, event.getUsedItem().getId(), second, PoisonedWeapon.forId(second.getId()));
|
||||
}
|
||||
}
|
||||
if (event.getUsedItem().getId() == 5940 || second.getId() == 5940) {
|
||||
if (event.getUsedItem().getId() != 5940) {
|
||||
poison(player, 3, second.getId(), event.getUsedItem(), PoisonedWeapon.forId(event.getUsedItem().getId()));
|
||||
} else if (second.getId() != 5940) {
|
||||
poison(player, 3, event.getUsedItem().getId(), second, PoisonedWeapon.forId(second.getId()));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
addHandler(187, ITEM_TYPE, this);
|
||||
addHandler(5937, ITEM_TYPE, this);
|
||||
addHandler(5940, ITEM_TYPE, this);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public final class BankingPlugin extends OptionHandler {
|
||||
/**
|
||||
* Represents the banker npc ids.
|
||||
*/
|
||||
private static final int[] NPC_IDS = {44, 45, 166, 494, 495, 496, 497, 498, 499, 902, 1036, 1360, 1702, 2163, 2164, 2354, 2355, 2568, 2569, 2570, 2619, 3046, 3198, 3199, 3824, 4296, 4519, 5257, 5258, 5259, 5260, 5383, 5488, 5776, 5777, 5898, 5912, 5913, 6200, 6362, 6532, 6533, 6534, 6535, 6538, 7049, 7050, 7445, 7446, 7605};
|
||||
private static final int[] NPC_IDS = {44, 45, 166, 494, 495, 496, 497, 498, 499, 902, 1036, 1360, 1702, 2163, 2164, 2354, 2355, 2568, 2569, 2570, 2619, 3046, 3198, 3199, 3824, 4296, 5257, 5258, 5259, 5260, 5383, 5488, 5776, 5777, 5898, 5912, 5913, 6200, 6362, 6532, 6533, 6534, 6535, 6538, 7049, 7050, 7445, 7446, 7605};
|
||||
|
||||
/**
|
||||
* Represents the id to use.
|
||||
|
||||
+26
@@ -4,6 +4,7 @@ import core.game.component.Component;
|
||||
import core.game.component.ComponentDefinition;
|
||||
import core.game.component.ComponentPlugin;
|
||||
import core.game.content.global.action.DoorActionHandler;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.impl.ForceMovement;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.audio.Audio;
|
||||
@@ -72,6 +73,31 @@ public final class WildernessInterfacePlugin extends ComponentPlugin {
|
||||
ActivityManager.register(new BountyHunterActivity(CraterType.HIGH_LEVEL));
|
||||
}*/
|
||||
}
|
||||
public static void handleBotDitch(final Player player, Node node) {
|
||||
Scenery ditch = node.asScenery();
|
||||
player.removeAttribute("wildy_ditch");
|
||||
Location l = ditch.getLocation();
|
||||
int x = player.getLocation().getX();
|
||||
int y = player.getLocation().getY();
|
||||
if (ditch.getRotation() % 2 == 0) {
|
||||
if (y <= l.getY()) {
|
||||
ForceMovement.run(player, Location.create(x, l.getY() - 1, 0), Location.create(x, l.getY() + 2, 0), ANIMATION, 20).setEndAnimation(null);
|
||||
} else {
|
||||
ForceMovement.run(player, Location.create(x, l.getY() + 2, 0), Location.create(x, l.getY() - 1, 0), ANIMATION, 20).setEndAnimation(null);
|
||||
}
|
||||
} else {
|
||||
if (x > l.getX()) {
|
||||
ForceMovement.run(player, Location.create(l.getX() + 2, y, 0), Location.create(l.getX() - 1, y, 0), ANIMATION, 20).setEndAnimation(null);
|
||||
} else {
|
||||
ForceMovement.run(player, Location.create(l.getX() - 1, y, 0), Location.create(l.getX() + 2, y, 0), ANIMATION, 20).setEndAnimation(null);
|
||||
}
|
||||
}
|
||||
player.getAudioManager().send(new Audio(2462, 10, 30));
|
||||
/*if (GameWorld.getSettings().isPvp()) {
|
||||
ActivityManager.register(new BountyHunterActivity(CraterType.MID_LEVEL));
|
||||
ActivityManager.register(new BountyHunterActivity(CraterType.HIGH_LEVEL));
|
||||
}*/
|
||||
}
|
||||
public static void handleGate(final Player player){
|
||||
Scenery gate = player.getAttribute("wildy_gate");
|
||||
// Cleanup
|
||||
|
||||
@@ -211,11 +211,7 @@ public final class GiantMoleNPC extends AbstractNPC {
|
||||
@Override
|
||||
public void onImpact(final Entity entity, BattleState state) {
|
||||
if (!getLocks().isInteractionLocked()) {
|
||||
int chance = 15;
|
||||
if (getSkills().getLifepoints() < getSkills().getMaximumLifepoints() >> 1) {
|
||||
chance *= 3;
|
||||
}
|
||||
if (RandomFunction.randomize(100) < chance && inCombat()) {
|
||||
if (RandomFunction.randomize(100) < 24 && inCombat() && getSkills().getLifepoints() < 100 && getSkills().getLifepoints() > 5){
|
||||
dig();
|
||||
return;
|
||||
}
|
||||
@@ -243,6 +239,7 @@ public final class GiantMoleNPC extends AbstractNPC {
|
||||
public boolean handle(Player player, Component component, int opcode, int button, int slot, int itemId) {
|
||||
if (button == 17) {
|
||||
player.getProperties().setTeleportLocation(Location.create(1752, 5237, 0));
|
||||
player.getAudioManager().send(1384);
|
||||
player.getPacketDispatch().sendMessage("You seem to have dropped down into a network of mole tunnels.");
|
||||
|
||||
if (!player.getAchievementDiaryManager().getDiary(DiaryType.FALADOR).isComplete(0, 5)) {
|
||||
|
||||
+8
-2
@@ -8,6 +8,7 @@ import core.game.node.entity.combat.equipment.SwitchAttack;
|
||||
import core.game.node.entity.impl.Projectile;
|
||||
import core.game.node.entity.npc.AbstractNPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.audio.Audio;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.map.RegionManager;
|
||||
@@ -62,7 +63,7 @@ public class ChaosElementalNPC extends AbstractNPC {
|
||||
@Override
|
||||
public void sendImpact(BattleState state) {
|
||||
if (state.getEstimatedHit() > 28) {
|
||||
state.setEstimatedHit(RandomFunction.random(20, 28));
|
||||
state.setEstimatedHit(RandomFunction.random(20, 28)); //possibly absolutely mental "haha random" damage adjustment. not sure. - crash
|
||||
}
|
||||
super.sendImpact(state);
|
||||
}
|
||||
@@ -135,7 +136,11 @@ public class ChaosElementalNPC extends AbstractNPC {
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
if (attack.getProjectile().getProjectileId() == 554) {
|
||||
if (attack.getProjectile().getProjectileId() == 557) {
|
||||
player.getAudioManager().send(new Audio(350), true); // C. Elemental Discord Impact SFX
|
||||
}
|
||||
else if (attack.getProjectile().getProjectileId() == 554) {
|
||||
player.getAudioManager().send(new Audio(346), true); // C. Elemental Confusion Impact SFX
|
||||
Location loc = getRandomLoc(entity);
|
||||
while (!RegionManager.isTeleportPermitted(loc) || RegionManager.getObject(loc) != null) {
|
||||
loc = getRandomLoc(entity);
|
||||
@@ -145,6 +150,7 @@ public class ChaosElementalNPC extends AbstractNPC {
|
||||
}
|
||||
player.teleport(loc);
|
||||
} else if (attack.getProjectile().getProjectileId() == 551) {
|
||||
player.getAudioManager().send(new Audio(353), true); // C. Elemental Madness Impact SFX
|
||||
if (player.getInventory().freeSlots() < 1 || player.getEquipment().itemCount() < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
package core.game.node.entity.npc.drop;
|
||||
|
||||
import rs09.ServerConstants;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.item.WeightedChanceItem;
|
||||
import rs09.game.system.SystemLogger;
|
||||
import core.tools.RandomFunction;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Handles the Chaos Elemental's minor drop table. It is supposed to roll this table alongside its standard major drops on the main table.
|
||||
* @author Crash
|
||||
*/
|
||||
public final class CELEMinorTable {
|
||||
|
||||
/**
|
||||
* The item id of the item representing the C. Ele minor drop table slot in a drop
|
||||
* table.
|
||||
*/
|
||||
public static final int SLOT_ITEM_ID = 799; // Crash: Item ID 799 is currently a null, blank paper note object. Unsure if used for cutscene/cutscene items, but hijacking this as C.Ele's item container as it'll never be dropped or obtained in normal gameplay.
|
||||
|
||||
/**
|
||||
* The rare drop table.
|
||||
*/
|
||||
private static final List<WeightedChanceItem> TABLE = new ArrayList<>(20);
|
||||
|
||||
|
||||
/**
|
||||
* Initialize needed objects for xml reading/writing
|
||||
*/
|
||||
static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
static DocumentBuilder builder;
|
||||
|
||||
static {
|
||||
try {
|
||||
builder = factory.newDocumentBuilder();
|
||||
} catch (ParserConfigurationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public CELEMinorTable() throws ParserConfigurationException {}
|
||||
|
||||
/**
|
||||
* Initializes the C. Ele minor table.
|
||||
*/
|
||||
public static void init(){
|
||||
if(ServerConstants.CELEDT_DATA_PATH != null && !new File(ServerConstants.CELEDT_DATA_PATH).exists()){
|
||||
SystemLogger.logErr("Can't locate CELEDT file at " + ServerConstants.CELEDT_DATA_PATH);
|
||||
return;
|
||||
}
|
||||
parse(ServerConstants.CELEDT_DATA_PATH);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the xml file for the CELEDT.
|
||||
* @param file the .xml file containing the CELEDT.
|
||||
*/
|
||||
public static void parse(String file){
|
||||
try {
|
||||
Document doc = builder.parse(file);
|
||||
|
||||
NodeList itemNodes = doc.getElementsByTagName("item");
|
||||
for(int i = 0; i < itemNodes.getLength(); i++){
|
||||
Node itemNode = itemNodes.item(i);
|
||||
if(itemNode.getNodeType() == Node.ELEMENT_NODE){
|
||||
Element item = (Element) itemNode;
|
||||
int itemId = Integer.parseInt(item.getAttribute("id"));
|
||||
int minAmt = Integer.parseInt(item.getAttribute("minAmt"));
|
||||
int maxAmt = Integer.parseInt(item.getAttribute("maxAmt"));
|
||||
int weight = Integer.parseInt(item.getAttribute("weight"));
|
||||
|
||||
TABLE.add(new WeightedChanceItem(itemId,minAmt,maxAmt,weight));
|
||||
}
|
||||
}
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static Item retrieve(){
|
||||
return RandomFunction.rollWeightedChanceTable(TABLE);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package core.game.node.entity.npc.familiar;
|
||||
|
||||
import core.game.node.entity.skill.SkillBonus;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
||||
import core.game.node.entity.skill.summoning.familiar.FamiliarSpecial;
|
||||
import core.game.node.entity.Entity;
|
||||
@@ -31,6 +33,7 @@ public class ArcticBearNPC extends Familiar {
|
||||
*/
|
||||
public ArcticBearNPC(Player owner, int id) {
|
||||
super(owner, id, 2800, 12057, 6, WeaponInterface.STYLE_CONTROLLED);
|
||||
boosts.add(new SkillBonus(Skills.HUNTER, 7));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,7 @@ import core.game.world.update.flag.player.FaceLocationFlag;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import rs09.plugin.PluginManager;
|
||||
import core.game.node.entity.skill.SkillBonus;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.firemaking.FireMakingPulse;
|
||||
import core.game.node.entity.skill.firemaking.Log;
|
||||
@@ -53,6 +54,7 @@ public class ForgeRegentNPC extends Familiar {
|
||||
*/
|
||||
public ForgeRegentNPC(Player owner, int id) {
|
||||
super(owner, id, 4500, 12782, 6, WeaponInterface.STYLE_RANGE_ACCURATE);
|
||||
boosts.add(new SkillBonus(Skills.FIREMAKING, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,6 +30,7 @@ public class LavaTitanNPC extends Familiar {
|
||||
public LavaTitanNPC(Player owner, int id) {
|
||||
super(owner, id, 6100, 12788, 4, WeaponInterface.STYLE_AGGRESSIVE);
|
||||
boosts.add(new SkillBonus(Skills.MINING, 10));
|
||||
boosts.add(new SkillBonus(Skills.FIREMAKING, 10));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package core.game.node.entity.npc.familiar;
|
||||
|
||||
import core.game.node.entity.skill.SkillBonus;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.crafting.gem.Gems;
|
||||
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
||||
@@ -38,6 +39,7 @@ public class MagpieNPC extends Forager {
|
||||
*/
|
||||
public MagpieNPC(Player owner, int id) {
|
||||
super(owner, id, 3400, 12041, 3, ITEMS);
|
||||
boosts.add(new SkillBonus(Skills.THIEVING, 3));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package core.game.node.entity.npc.familiar;
|
||||
|
||||
import core.game.node.entity.player.link.diary.DiaryType;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.skill.SkillBonus;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.crafting.jewellery.JewelleryCrafting;
|
||||
import core.game.node.entity.skill.firemaking.FireMakingPulse;
|
||||
@@ -53,6 +54,7 @@ public class PyreLordNPC extends Familiar {
|
||||
*/
|
||||
public PyreLordNPC(Player owner, int id) {
|
||||
super(owner, id, 3200, 12816, 6, WeaponInterface.STYLE_AGGRESSIVE);
|
||||
boosts.add(new SkillBonus(Skills.FIREMAKING, 3));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package core.game.node.entity.npc.familiar;
|
||||
|
||||
import core.game.node.entity.skill.SkillBonus;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
||||
import core.game.node.entity.skill.summoning.familiar.FamiliarSpecial;
|
||||
import core.game.node.entity.combat.equipment.WeaponInterface;
|
||||
@@ -27,6 +29,7 @@ public class SpiritGraahkNPC extends Familiar {
|
||||
*/
|
||||
public SpiritGraahkNPC(Player owner, int id) {
|
||||
super(owner, id, 4900, 12810, 3, WeaponInterface.STYLE_AGGRESSIVE);
|
||||
boosts.add(new SkillBonus(Skills.HUNTER, 5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package core.game.node.entity.npc.familiar;
|
||||
|
||||
import core.game.node.entity.skill.SkillBonus;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
||||
import core.game.node.entity.skill.summoning.familiar.FamiliarSpecial;
|
||||
import core.game.node.entity.combat.equipment.WeaponInterface;
|
||||
@@ -27,6 +29,7 @@ public class SpiritKyattNPC extends Familiar {
|
||||
*/
|
||||
public SpiritKyattNPC(Player owner, int id) {
|
||||
super(owner, id, 4900, 12812, 3, WeaponInterface.STYLE_ACCURATE);
|
||||
boosts.add(new SkillBonus(Skills.HUNTER, 5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package core.game.node.entity.npc.familiar;
|
||||
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.skill.SkillBonus;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
||||
import core.game.node.entity.skill.summoning.familiar.FamiliarSpecial;
|
||||
@@ -31,6 +32,7 @@ public class SpiritLarupiaNPC extends Familiar {
|
||||
*/
|
||||
public SpiritLarupiaNPC(Player owner, int id) {
|
||||
super(owner, id, 4900, 12784, 6, WeaponInterface.STYLE_CONTROLLED);
|
||||
boosts.add(new SkillBonus(Skills.HUNTER, 5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package core.game.node.entity.npc.familiar;
|
||||
|
||||
import core.cache.def.impl.NPCDefinition;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.skill.SkillBonus;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
||||
import core.game.node.entity.skill.summoning.familiar.FamiliarSpecial;
|
||||
@@ -97,6 +98,7 @@ public final class VoidFamiliarNPC implements Plugin<Object> {
|
||||
*/
|
||||
public VoidRavagerNPC(Player owner, int id) {
|
||||
super(owner, id, 2700, 12818, 3, WeaponInterface.STYLE_AGGRESSIVE, ITEMS);
|
||||
boosts.add(new SkillBonus(Skills.MINING, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package core.game.node.entity.npc.familiar;
|
||||
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.skill.SkillBonus;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
||||
import core.game.node.entity.skill.summoning.familiar.FamiliarSpecial;
|
||||
@@ -30,6 +31,7 @@ public class WolpertingerNPC extends Familiar {
|
||||
*/
|
||||
public WolpertingerNPC(Player owner, int id) {
|
||||
super(owner, id, 6200, 12089, 1, WeaponInterface.STYLE_CAST);
|
||||
boosts.add(new SkillBonus(Skills.HUNTER, 5));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,7 +16,7 @@ public enum BuildHotspot {
|
||||
/**
|
||||
* Low level garden hotspots.
|
||||
*/
|
||||
CENTREPIECE_1(15361, BuildHotspotType.INDIVIDUAL, BuildingUtils.BUILD_MID_ANIM, Decoration.PORTAL, Decoration.ROCK, Decoration.POND, Decoration.IMP_STATUE, Decoration.DUNGEON_ENTRANCE),
|
||||
CENTREPIECE_1(15361, BuildHotspotType.INDIVIDUAL, BuildingUtils.BUILD_MID_ANIM, Decoration.PORTAL, Decoration.ROCK, Decoration.POND, Decoration.IMP_STATUE, Decoration.SMALL_OBELISK, Decoration.DUNGEON_ENTRANCE),
|
||||
BIG_TREE_1(15362, BuildHotspotType.INDIVIDUAL, BuildingUtils.PLANT_ANIM, Decoration.BIG_DEAD_TREE, Decoration.BIG_TREE, Decoration.BIG_OAK_TREE, Decoration.BIG_WILLOW_TREE, Decoration.BIG_MAPLE_TREE, Decoration.BIG_YEW_TREE, Decoration.BIG_MAGIC_TREE),
|
||||
TREE_1(15363, BuildHotspotType.INDIVIDUAL, BuildingUtils.PLANT_ANIM, Decoration.DEAD_TREE, Decoration.TREE, Decoration.OAK_TREE, Decoration.WILLOW_TREE, Decoration.MAPLE_TREE, Decoration.YEW_TREE, Decoration.MAGIC_TREE),
|
||||
BIG_PLANT_1(15364, BuildHotspotType.INDIVIDUAL, BuildingUtils.PLANT_ANIM, Decoration.FERN, Decoration.BUSH, Decoration.TALL_PLANT),
|
||||
|
||||
@@ -85,21 +85,21 @@ public final class BuildingUtils {
|
||||
|
||||
int c261Value = 0;
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
int itemsStringOffset = 97 + (i * 5);
|
||||
for (int menuIndex = 0; menuIndex < 7; menuIndex++) {
|
||||
int itemsStringOffset = 97 + (menuIndex * 5);
|
||||
|
||||
//97 +
|
||||
if (i >= hotspot.getDecorations().length || (hotspot.getDecorations()[i] != null && hotspot.getDecorations()[i].isInvisibleNode())) {
|
||||
if (menuIndex >= hotspot.getDecorations().length || (hotspot.getDecorations()[menuIndex] != null && hotspot.getDecorations()[menuIndex].isInvisibleNode())) {
|
||||
for (int j = 0; j < 5; j++) {
|
||||
player.getPacketDispatch().sendString("", 396, itemsStringOffset + j);
|
||||
}
|
||||
player.getPacketDispatch().sendString("", 396, 140 + i);
|
||||
c261Value += (1 << (i + 1));
|
||||
player.getPacketDispatch().sendString("", 396, 140 + menuIndex);
|
||||
c261Value += (1 << (menuIndex + 1));
|
||||
continue;
|
||||
}
|
||||
|
||||
Decoration decoration = hotspot.getDecorations()[i];
|
||||
items[BUILD_INDEXES[i]] = new Item(decoration.getInterfaceItem());
|
||||
Decoration decoration = hotspot.getDecorations()[menuIndex];
|
||||
items[BUILD_INDEXES[menuIndex]] = new Item(decoration.getInterfaceItem());
|
||||
player.getPacketDispatch().sendString(ItemDefinition.forId(decoration.getInterfaceItem()).getName(), 396, itemsStringOffset);
|
||||
boolean hasRequirements = player.getSkills().getLevel(Skills.CONSTRUCTION) >= decoration.getLevel();
|
||||
for (int j = 0; j < 4; j++) {
|
||||
@@ -127,14 +127,16 @@ public final class BuildingUtils {
|
||||
continue;
|
||||
}*/
|
||||
player.getPacketDispatch().sendString(s, 396, (itemsStringOffset + 1) + j);
|
||||
if (hasRequirements)
|
||||
c261Value += (1 << (i + 1));
|
||||
}
|
||||
}
|
||||
player.getConfigManager().set(1485 + i, hasRequirements || player.isStaff() ? 1 : 0);
|
||||
player.getPacketDispatch().sendString("Lvl " + decoration.getLevel(), 396, 140 + i);
|
||||
if (hasRequirements) {
|
||||
c261Value += (1 << (menuIndex + 1));
|
||||
}
|
||||
player.getConfigManager().set(1485 + menuIndex, hasRequirements || player.isStaff() ? 1 : 0);
|
||||
player.getPacketDispatch().sendString("Level " + decoration.getLevel(), 396, 140 + menuIndex);
|
||||
//player.getPacketDispatch().sendItemZoomOnInterface(items[i].protocol(), 50000, 396, 49 + i);
|
||||
}
|
||||
System.out.println(c261Value);
|
||||
player.getConfigManager().set(261, c261Value);
|
||||
PacketRepository.send(ContainerPacket.class, new ContainerContext(player, 396, 132, 8, items, false));
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public enum Decoration {
|
||||
ROCK(13406, 8169, 5, 100.0, new Item(3420, 5)),
|
||||
POND(13407, 8170, 10, 100.0, new Item(1761, 10)),
|
||||
IMP_STATUE(13408, 8171, 15, 150.0, new Item(3420, 5), new Item(1761, 5)),
|
||||
SMALL_OBELISK(42004, 14657, 41, 676, new Item(8786, 1), new Item(12183, 1000), new Item(12160, 10), new Item(12163, 10)),
|
||||
DUNGEON_ENTRANCE(13409, 8172, 70, 500.0, new Item(8786)),
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public enum FishingOption {
|
||||
|
||||
CRAYFISH_CAGE(new Item(13431), 1, Animation.create(619), null, "cage", Fish.CRAYFISH),
|
||||
SMALL_NET(new Item(303), 1, Animation.create(621), null, "net", Fish.SHRIMP, Fish.ANCHOVIE),
|
||||
BAIT(new Item(307), 5, Animation.create(622), new Item[]{new Item(313)}, "bait", Fish.SARDINE, Fish.HERRING),
|
||||
BAIT(new Item(307), 5, Animation.create(622), new Item[]{new Item(313)}, "bait", Fish.SARDINE, Fish.HERRING),
|
||||
LURE(new Item(309), 20, new Animation(622), new Item[]{new Item(Items.FEATHER_314), new Item(Items.STRIPY_FEATHER_10087)}, "lure", Fish.TROUT, Fish.SALMON, Fish.RAINBOW_FISH),
|
||||
L_BAIT(new Item(307), 25, Animation.create(622), new Item[]{new Item(313)}, "bait", Fish.PIKE),
|
||||
CAGE(new Item(301), 40, Animation.create(619), null, "cage", Fish.LOBSTER),
|
||||
@@ -29,10 +29,13 @@ public enum FishingOption {
|
||||
BIG_NET(new Item(305), 16, Animation.create(620), null, "net", Fish.MACKEREL, Fish.COD, Fish.BASS, Fish.SEAWEED),
|
||||
N_HARPOON(new Item(311), 76, Animation.create(618), null, "harpoon", Fish.SHARK),
|
||||
H_NET(new Item(303), 62, Animation.create(621), null, "net", Fish.MONKFISH),
|
||||
MORTMYRE_ROD(new Item(307), 5, Animation.create(622), new Item[]{new Item(313)},"bait", Fish.SLIMY_EEL),
|
||||
LUMBDSWAMP_ROD(new Item(307), 5, Animation.create(622), new Item[]{new Item(313)}, "bait", Fish.SLIMY_EEL, Fish.FROG_SPAWN),
|
||||
KBWANJI_NET(new Item(Items.SMALL_FISHING_NET_303), 5, Animation.create(621), null, "net", Fish.KARAMBWANJI),
|
||||
KARAMBWAN_VES(new Item(Items.KARAMBWAN_VESSEL_3157), 65, Animation.create(1193), new Item[]{new Item(Items.RAW_KARAMBWANJI_3150)}, "fish", Fish.KARAMBWAN);
|
||||
KARAMBWAN_VES(new Item(Items.KARAMBWAN_VESSEL_3157), 65, Animation.create(1193), new Item[]{new Item(Items.RAW_KARAMBWANJI_3150)}, "fish", Fish.KARAMBWAN),
|
||||
OILY_FISHING_ROD(new Item(Items.OILY_FISHING_ROD_1585), 53, Animation.create(622), new Item[]{new Item(313)}, "bait", Fish.LAVA_EEL);
|
||||
|
||||
public static HashMap<String,FishingOption> nameMap = new HashMap<>();
|
||||
public static final HashMap<String,FishingOption> nameMap = new HashMap<>();
|
||||
static{
|
||||
for(FishingOption option : FishingOption.values()){
|
||||
nameMap.putIfAbsent(option.name,option);
|
||||
@@ -79,18 +82,13 @@ public enum FishingOption {
|
||||
* @param animation The animation.
|
||||
* @param fish The fish to catch.
|
||||
*/
|
||||
private FishingOption(Item tool, int level, Animation animation, Item[] bait, String name, Fish... fish) {
|
||||
FishingOption(Item tool, int level, Animation animation, Item[] bait, String name, Fish... fish) {
|
||||
this.tool = tool;
|
||||
this.level = level;
|
||||
this.animation = animation;
|
||||
this.bait = bait;
|
||||
this.name = name;
|
||||
Arrays.sort(fish, new Comparator<Fish>() {
|
||||
@Override
|
||||
public int compare(Fish x, Fish y) {
|
||||
return y.getLevel() - x.getLevel();
|
||||
}
|
||||
});
|
||||
Arrays.sort(fish, (x, y) -> y.getLevel() - x.getLevel());
|
||||
this.fish = fish;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,25 +8,25 @@ import java.util.HashMap;
|
||||
*/
|
||||
public enum FishingSpot {
|
||||
|
||||
NET_BAIT(new int[] { 952, 316, 319, 320, 323, 325, 326, 327, 330, 332, 404, 1331, 2067, 2068, 2724, 4908, 5748, 5749, 7045 }, FishingOption.SMALL_NET, FishingOption.BAIT),
|
||||
NET_BAIT(new int[] { 952, 316, 319, 320, 323, 325, 326, 327, 330, 332, 404, 1331, 2724, 4908, 7045 }, FishingOption.SMALL_NET, FishingOption.BAIT),
|
||||
LURE_BAIT(new int[] { 309, 310, 311, 314, 315, 317, 318, 328, 329, 331, 403, 927, 1189, 1190, 3019 }, FishingOption.LURE, FishingOption.L_BAIT),
|
||||
CAGE_HARPOON(new int[] { 312, 321, 324, 333, 405, 1332, 1399, 3804, 5470, 7046}, FishingOption.CAGE, FishingOption.HARPOON),
|
||||
NET_HARPOON(new int[] { 313, 322, 334, 406, 1191, 1333, 1405, 1406, 3574, 3575, 5471, 7044 }, FishingOption.BIG_NET, FishingOption.N_HARPOON),
|
||||
HARPOON_NET(new int[] { 3848, 3849 }, FishingOption.HARPOON, FishingOption.H_NET, FishingOption.BARB_HARPOON),
|
||||
SPOT_MORTMYRE(new int[] {5748, 5749}, FishingOption.MORTMYRE_ROD),
|
||||
SPOT_LUMDSAWMP(new int[] {2067, 2068}, FishingOption.LUMBDSWAMP_ROD),
|
||||
SPOT_KBWANJI(new int[] {1174}, FishingOption.KBWANJI_NET),
|
||||
SPOT_KARAMBWAN(new int[] {1177}, FishingOption.KARAMBWAN_VES);
|
||||
SPOT_KARAMBWAN(new int[] {1177}, FishingOption.KARAMBWAN_VES),
|
||||
BAIT_EELS(new int[] {800}, FishingOption.OILY_FISHING_ROD);
|
||||
|
||||
public static HashMap<Integer,FishingSpot> spotMap = new HashMap<>();
|
||||
|
||||
static{
|
||||
FishingSpot[] spots = values();
|
||||
int spotsLength = spots.length;
|
||||
for (int x = 0; x < spotsLength; x++) {
|
||||
FishingSpot spot = spots[x];
|
||||
for (FishingSpot spot : spots) {
|
||||
int[] spotIds = spot.ids;
|
||||
int spotIdsLength = spotIds.length;
|
||||
for (int y = 0; y < spotIdsLength; y++) {
|
||||
spotMap.putIfAbsent(spotIds[y],spot);
|
||||
for (int spotId : spotIds) {
|
||||
spotMap.putIfAbsent(spotId, spot);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public enum FishingSpot {
|
||||
* Constructs a new {@code FishingSpot} {@code Object}.
|
||||
* @param ids The NPC ids.
|
||||
*/
|
||||
private FishingSpot(int[] ids, FishingOption... options) {
|
||||
FishingSpot(int[] ids, FishingOption... options) {
|
||||
this.ids = ids;
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class StringPulse extends SkillPulse<Item> {
|
||||
@Override
|
||||
public boolean checkRequirements() {
|
||||
if (getDelay() == 1) {
|
||||
setDelay(bow.string == 1777 ? 9 : 7);
|
||||
setDelay(bow.string == 1777 ? 2 : 1);
|
||||
}
|
||||
if (player.getSkills().getLevel(Skills.FLETCHING) < bow.level) {
|
||||
player.getDialogueInterpreter().sendDialogue("You need a fletching level of " + bow.level + " to string this bow.");
|
||||
|
||||
@@ -180,6 +180,11 @@ public final class PotionDecantingPlugin extends UseWithHandler {
|
||||
if (flagged(itemDose, otherDose)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.getId() == item.getNoteChange() || other.getId() == item.getNoteChange()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final int[] newDoses = getDoses(itemDose, otherDose);
|
||||
if (itemDose == 4 && otherDose == 0 || otherDose == 4 && itemDose == 0) {
|
||||
player.getInventory().replace(getItem(item.getName().contains("Vial") ? otherName : itemName, newDoses[1]), item.getSlot());
|
||||
|
||||
@@ -7,7 +7,25 @@ import core.game.node.item.Item;
|
||||
* @author 'Vexia
|
||||
*/
|
||||
public enum UnfinishedPotion {
|
||||
GUAM(Herbs.GUAM.getProduct(), 3, new Item(91)), MARRENTILL(Herbs.MARRENTILL.getProduct(), 5, new Item(93)), TARROMIN(Herbs.TARROMIN.getProduct(), 12, new Item(95)), HARRALANDER(Herbs.HARRALANDER.getProduct(), 22, new Item(97)), RANARR(Herbs.RANARR.getProduct(), 30, new Item(99)), TOADFLAX(Herbs.TOADFLAX.getProduct(), 34, new Item(3002)), SPIRIT_WEED(Herbs.SPIRIT_WEED.getProduct(), 40, new Item(12181)), IRIT(Herbs.IRIT.getProduct(), 45, new Item(101)), AVANTOE(Herbs.AVANTOE.getProduct(), 50, new Item(103)), KWUARM(Herbs.KWUARM.getProduct(), 55, new Item(105)), SNAPDRAGON(Herbs.SNAPDRAGON.getProduct(), 63, new Item(3004)), CADANTINE(Herbs.CADANTINE.getProduct(), 66, new Item(107)), LANTADYME(Herbs.LANTADYME.getProduct(), 69, new Item(2483)), DWARF_WEED(Herbs.DWARF_WEED.getProduct(), 72, new Item(109)), TORSTOL(Herbs.TORSTOL.getProduct(), 75, new Item(111)), STRONG_WEAPON_POISON(HerblorePulse.COCONUT_MILK, new Item(6016), 73, new Item(5936)), SUPER_STRONG_WEAPON_POISON(HerblorePulse.COCONUT_MILK, new Item(2398), 82, new Item(5939)), STRONG_ANTIPOISON(HerblorePulse.COCONUT_MILK, Herbs.TOADFLAX.getProduct(), 68, new Item(5942)), SUPER_STRONG_ANTIPOISON(HerblorePulse.COCONUT_MILK, Herbs.IRIT.getProduct(), 79, new Item(5951));
|
||||
GUAM(Herbs.GUAM.getProduct(), 3, new Item(91)),
|
||||
MARRENTILL(Herbs.MARRENTILL.getProduct(), 5, new Item(93)),
|
||||
TARROMIN(Herbs.TARROMIN.getProduct(), 12, new Item(95)),
|
||||
HARRALANDER(Herbs.HARRALANDER.getProduct(), 22, new Item(97)),
|
||||
RANARR(Herbs.RANARR.getProduct(), 30, new Item(99)),
|
||||
TOADFLAX(Herbs.TOADFLAX.getProduct(), 34, new Item(3002)),
|
||||
SPIRIT_WEED(Herbs.SPIRIT_WEED.getProduct(), 40, new Item(12181)),
|
||||
IRIT(Herbs.IRIT.getProduct(), 45, new Item(101)),
|
||||
AVANTOE(Herbs.AVANTOE.getProduct(), 50, new Item(103)),
|
||||
KWUARM(Herbs.KWUARM.getProduct(), 55, new Item(105)),
|
||||
SNAPDRAGON(Herbs.SNAPDRAGON.getProduct(), 63, new Item(3004)),
|
||||
CADANTINE(Herbs.CADANTINE.getProduct(), 66, new Item(107)),
|
||||
LANTADYME(Herbs.LANTADYME.getProduct(), 69, new Item(2483)),
|
||||
DWARF_WEED(Herbs.DWARF_WEED.getProduct(), 72, new Item(109)),
|
||||
TORSTOL(Herbs.TORSTOL.getProduct(), 75, new Item(111)),
|
||||
STRONG_WEAPON_POISON(HerblorePulse.COCONUT_MILK, new Item(6016), 73, new Item(5936)),
|
||||
SUPER_STRONG_WEAPON_POISON(HerblorePulse.COCONUT_MILK, new Item(2398), 82, new Item(5939)),
|
||||
STRONG_ANTIPOISON(HerblorePulse.COCONUT_MILK, Herbs.TOADFLAX.getProduct(), 68, new Item(5942)),
|
||||
SUPER_STRONG_ANTIPOISON(HerblorePulse.COCONUT_MILK, Herbs.IRIT.getProduct(), 79, new Item(5951));
|
||||
|
||||
/**
|
||||
* Represents the base item.
|
||||
|
||||
+2
-1
@@ -16,6 +16,7 @@ import core.game.world.map.Location;
|
||||
import core.game.world.map.zone.MapZone;
|
||||
import core.game.world.map.zone.ZoneBorders;
|
||||
import core.game.world.map.zone.ZoneBuilder;
|
||||
import core.game.world.map.zone.ZoneRestriction;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Plugin;
|
||||
import core.tools.RandomFunction;
|
||||
@@ -31,7 +32,7 @@ public final class FremennikDungeon extends MapZone implements Plugin<Object> {
|
||||
* Constructs a new {@code FremennikDungeon} {@code Object}.
|
||||
*/
|
||||
public FremennikDungeon() {
|
||||
super("fremennik", true);
|
||||
super("fremennik", true, ZoneRestriction.CANNON);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -256,8 +256,8 @@ public final class WildernessZone extends MapZone {
|
||||
p.getAppearance().sync();
|
||||
} else if (e instanceof NPC) {
|
||||
NPC n = (NPC) e;
|
||||
if (n.getDefinition().hasAttackOption()) {
|
||||
n.setAggressive(true);
|
||||
if (n.getDefinition().hasAttackOption() && n.isAggressive()) {
|
||||
//n.setAggressive(true);
|
||||
n.setAggressiveHandler(new AggressiveHandler(n, AggressiveBehavior.WILDERNESS));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user