mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Replaced item IDs in construction code with constants
This commit is contained in:
parent
08241eb1db
commit
fff1476714
21 changed files with 670 additions and 656 deletions
|
|
@ -12,6 +12,7 @@ import core.plugin.Initializable;
|
|||
import core.game.dialogue.DialogueInterpreter;
|
||||
import core.game.dialogue.DialoguePlugin;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -193,7 +194,7 @@ public final class BuildRoomDialogue extends DialoguePlugin {
|
|||
options("Rotate clockwise", "Rotate anticlockwise", "Build", "Cancel");
|
||||
return true;
|
||||
case 3:
|
||||
if (player.getInventory().remove(new Item(995, room.getProperties().getCost()))) {
|
||||
if (player.getInventory().remove(new Item(Items.COINS_995, room.getProperties().getCost()))) {
|
||||
room.setRotation(directions[index]);
|
||||
boolean[] exit = new boolean[exits.length];
|
||||
for (int i = 0; i < exit.length; i++) {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import core.net.packet.out.ContainerPacket;
|
|||
import core.tools.Log;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import core.tools.SystemLogger;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -67,7 +68,7 @@ public final class BuildingUtils {
|
|||
/**
|
||||
* The plank item.
|
||||
*/
|
||||
public static final Item PLANK = new Item(960);
|
||||
public static final Item PLANK = new Item(Items.PLANK_960);
|
||||
|
||||
/**
|
||||
* The watering can(8) item id.
|
||||
|
|
|
|||
|
|
@ -20,33 +20,33 @@ class ConstructionGuideBook : InteractionListener {
|
|||
private val TITLE = "Construction guide book"
|
||||
/** The resources used in beta. */
|
||||
private val RESOURCES = arrayOf(
|
||||
Item(8794),
|
||||
Item(2347),
|
||||
Item(4819, 500000),
|
||||
Item(4820, 500000),
|
||||
Item(1539, 500000),
|
||||
Item(4821, 500000),
|
||||
Item(4822, 500000),
|
||||
Item(4823, 500000),
|
||||
Item(4824, 500000),
|
||||
Item(961, 500000),
|
||||
Item(8779, 500000),
|
||||
Item(8781, 500000),
|
||||
Item(8783, 500000),
|
||||
Item(8791, 500000),
|
||||
Item(8785, 500000),
|
||||
Item(8787, 500000),
|
||||
Item(8789, 500000), // 16
|
||||
Item(8418, 500000),
|
||||
Item(8420, 500000),
|
||||
Item(8422, 500000),
|
||||
Item(8424, 500000),
|
||||
Item(8426, 500000),
|
||||
Item(8428, 500000),
|
||||
Item(8430, 500000),
|
||||
Item(8432, 500000),
|
||||
Item(8434, 500000),
|
||||
Item(8436, 500000)
|
||||
Item(Items.SAW_8794),
|
||||
Item(Items.HAMMER_2347),
|
||||
Item(Items.BRONZE_NAILS_4819, 500000),
|
||||
Item(Items.IRON_NAILS_4820, 500000),
|
||||
Item(Items.STEEL_NAILS_1539, 500000),
|
||||
Item(Items.BLACK_NAILS_4821, 500000),
|
||||
Item(Items.MITHRIL_NAILS_4822, 500000),
|
||||
Item(Items.ADAMANTITE_NAILS_4823, 500000),
|
||||
Item(Items.RUNE_NAILS_4824, 500000),
|
||||
Item(Items.PLANK_961, 500000),
|
||||
Item(Items.OAK_PLANK_8779, 500000),
|
||||
Item(Items.TEAK_PLANK_8781, 500000),
|
||||
Item(Items.MAHOGANY_PLANK_8783, 500000),
|
||||
Item(Items.BOLT_OF_CLOTH_8791, 500000),
|
||||
Item(Items.GOLD_LEAF_8785, 500000),
|
||||
Item(Items.MARBLE_BLOCK_8787, 500000),
|
||||
Item(Items.MAGIC_STONE_8789, 500000), // 16
|
||||
Item(Items.BAGGED_DEAD_TREE_8418, 500000),
|
||||
Item(Items.BAGGED_NICE_TREE_8420, 500000),
|
||||
Item(Items.BAGGED_OAK_TREE_8422, 500000),
|
||||
Item(Items.BAGGED_WILLOW_TREE_8424, 500000),
|
||||
Item(Items.BAGGED_MAPLE_TREE_8426, 500000),
|
||||
Item(Items.BAGGED_YEW_TREE_8428, 500000),
|
||||
Item(Items.BAGGED_MAGIC_TREE_8430, 500000),
|
||||
Item(Items.BAGGED_PLANT_1_8432, 500000),
|
||||
Item(Items.BAGGED_PLANT_2_8434, 500000),
|
||||
Item(Items.BAGGED_PLANT_3_8436, 500000)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -131,7 +131,7 @@ class EstateAgentDialogue : core.game.dialogue.DialoguePlugin {
|
|||
|
||||
7 -> {
|
||||
if (player.inventory.contains(995, 1000)) {
|
||||
player.inventory.remove(Item(995, 1000))
|
||||
player.inventory.remove(Item(Items.COINS_995, 1000))
|
||||
player.houseManager.createNewHouseAt(HouseLocation.RIMMINGTON)
|
||||
npc(
|
||||
"Thank you. Go through the Rimmington house portal",
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public enum HouseLocation {
|
|||
}
|
||||
if (player.getSkills().hasLevel(Skills.CONSTRUCTION, hl.levelRequirement)) {
|
||||
if (player.getInventory().contains(995, hl.cost)) {
|
||||
player.getInventory().remove(new Item(995, hl.cost));
|
||||
player.getInventory().remove(new Item(Items.COINS_995, hl.cost));
|
||||
player.getHouseManager().setLocation(hl);
|
||||
player.sendMessage("<col=006600>You have changed your house location to " + hl.name() + "!");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package content.global.skill.construction;
|
|||
|
||||
|
||||
import core.game.node.item.Item;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
/**
|
||||
* Represents a type of servant
|
||||
|
|
@ -11,10 +12,10 @@ import core.game.node.item.Item;
|
|||
public enum ServantType {
|
||||
NONE(-1, -1, -1, -1, -1),
|
||||
RICK(4235, 500, 6, 20, 60),
|
||||
MAID(4237, 1000, 10, 25, 50, new Item(2003)),
|
||||
COOK(4239, 3000, 16, 30, 17, new Item(2301), new Item(712)),
|
||||
BUTLER(4241, 5000, 20, 40, 12, new Item(1897), new Item(712)),
|
||||
DEMON_BUTLER(4243, 10000, 26, 50, 7, new Item(2011))
|
||||
MAID(4237, 1000, 10, 25, 50, new Item(Items.STEW_2003)),
|
||||
COOK(4239, 3000, 16, 30, 17, new Item(Items.PINEAPPLE_PIZZA_2301), new Item(Items.CUP_OF_TEA_712)),
|
||||
BUTLER(4241, 5000, 20, 40, 12, new Item(Items.CHOCOLATE_CAKE_1897), new Item(Items.CUP_OF_TEA_712)),
|
||||
DEMON_BUTLER(4243, 10000, 26, 50, 7, new Item(Items.CURRY_2011))
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import core.game.node.scenery.Scenery;
|
|||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
/**
|
||||
* Handles the Construction beer barrels.
|
||||
|
|
@ -43,7 +44,7 @@ public class BeerBarrelPlugin extends UseWithHandler {
|
|||
Player player = event.getPlayer();
|
||||
final Scenery object = (Scenery) event.getUsedWith();
|
||||
|
||||
if (player.getInventory().remove(new Item(1919))) {
|
||||
if (player.getInventory().remove(new Item(Items.BEER_GLASS_1919))) {
|
||||
player.animate(Animation.create(833));
|
||||
player.sendMessage("You fill up your glass.");
|
||||
player.getInventory().add(new Item(getReward(object.getId()), 1));
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import core.game.system.task.Pulse;
|
|||
import core.game.world.GameWorld;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Plugin;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
/**
|
||||
* Handles the various fireplaces that you may light in Construction.
|
||||
|
|
@ -51,7 +52,7 @@ public final class FireplacePlugin extends OptionHandler {
|
|||
if (!obj.isActive()) {
|
||||
return true;
|
||||
}
|
||||
player.getInventory().remove(new Item(1511));
|
||||
player.getInventory().remove(new Item(Items.LOGS_1511));
|
||||
player.getSkills().addExperience(Skills.FIREMAKING, 80);
|
||||
SceneryBuilder.replace(new Scenery(obj.getId(), obj.getLocation()), new Scenery(obj.getId() + 1, obj.getLocation(), obj.getRotation()), 1000);
|
||||
player.sendMessage("You light the fireplace.");
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import core.game.world.update.flag.context.Animation
|
|||
import core.tools.RandomFunction
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.interaction.IntType
|
||||
import org.rs09.consts.Items
|
||||
|
||||
/**
|
||||
* Handles the lighting of the torches of the Chapel.
|
||||
|
|
@ -21,14 +22,14 @@ class BurnerListener : InteractionListener {
|
|||
if (player.ironmanManager.checkRestriction() && !player.houseManager.isInHouse(player)) {
|
||||
return@on true
|
||||
}
|
||||
if (!player.inventory.containsItem(Item(590)) || !player.inventory.containsItem(Item(251))) {
|
||||
if (!player.inventory.containsItem(Item(Items.TINDERBOX_590)) || !player.inventory.containsItem(Item(Items.CLEAN_MARRENTILL_251))) {
|
||||
player.dialogueInterpreter.sendDialogue(
|
||||
"You'll need a tinderbox and a clean marrentill herb in order to",
|
||||
"light the burner."
|
||||
)
|
||||
return@on true
|
||||
}
|
||||
if (player.inventory.remove(Item(251))) {
|
||||
if (player.inventory.remove(Item(Items.CLEAN_MARRENTILL_251))) {
|
||||
player.lock(1)
|
||||
player.animate(Animation.create(3687))
|
||||
player.sendMessage("You burn some marrentill in the incense burner.")
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import core.game.node.scenery.Scenery;
|
|||
import core.game.world.update.flag.context.Animation;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
/**
|
||||
* Handles the Construction beer barrels.
|
||||
|
|
@ -44,7 +45,7 @@ public class BeerBarrelPlugin extends UseWithHandler {
|
|||
Player player = event.getPlayer();
|
||||
final Scenery object = (Scenery) event.getUsedWith();
|
||||
|
||||
if (player.getInventory().remove(new Item(1919))) {
|
||||
if (player.getInventory().remove(new Item(Items.BEER_GLASS_1919))) {
|
||||
player.animate(Animation.create(3661 + (object.getId() - 13569)));
|
||||
player.sendMessage("You fill up your glass with " + object.getName().toLowerCase().replace("barrel", "").trim() + ".");
|
||||
player.getInventory().add(new Item(getReward(object.getId()), 1));
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import core.game.node.entity.player.Player;
|
|||
import core.game.node.item.Item;
|
||||
import core.plugin.Plugin;
|
||||
import core.plugin.ClassScanner;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
/**
|
||||
* Handles the interactions for the three Larders.
|
||||
|
|
@ -95,19 +96,19 @@ public final class LarderPlugin extends OptionHandler {
|
|||
case 1:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
player.getInventory().add(new Item(7738, 1));
|
||||
player.getInventory().add(new Item(Items.TEA_LEAVES_7738, 1));
|
||||
end();
|
||||
break;
|
||||
case 2:
|
||||
player.getInventory().add(new Item(1927, 1));
|
||||
player.getInventory().add(new Item(Items.BUCKET_OF_MILK_1927, 1));
|
||||
end();
|
||||
break;
|
||||
case 3:
|
||||
player.getInventory().add(new Item(1944, 1));
|
||||
player.getInventory().add(new Item(Items.EGG_1944, 1));
|
||||
end();
|
||||
break;
|
||||
case 4:
|
||||
player.getInventory().add(new Item(1933, 1));
|
||||
player.getInventory().add(new Item(Items.POT_OF_FLOUR_1933, 1));
|
||||
end();
|
||||
break;
|
||||
case 5:
|
||||
|
|
@ -120,19 +121,19 @@ public final class LarderPlugin extends OptionHandler {
|
|||
case 2:
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
player.getInventory().add(new Item(1942, 1));
|
||||
player.getInventory().add(new Item(Items.POTATO_1942, 1));
|
||||
end();
|
||||
break;
|
||||
case 2:
|
||||
player.getInventory().add(new Item(1550, 1));
|
||||
player.getInventory().add(new Item(Items.GARLIC_1550, 1));
|
||||
end();
|
||||
break;
|
||||
case 3:
|
||||
player.getInventory().add(new Item(1957, 1));
|
||||
player.getInventory().add(new Item(Items.ONION_1957, 1));
|
||||
end();
|
||||
break;
|
||||
case 4:
|
||||
player.getInventory().add(new Item(1985, 1));
|
||||
player.getInventory().add(new Item(Items.CHEESE_1985, 1));
|
||||
end();
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import core.game.node.item.Item;
|
|||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import core.plugin.ClassScanner;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
/**
|
||||
* Handles the shelves in the kitchen room.
|
||||
|
|
@ -107,23 +108,23 @@ public final class ShelfPlugin extends OptionHandler {
|
|||
switch (buttonId) {
|
||||
case 1:
|
||||
end();
|
||||
player.getInventory().add(new Item(7688, 1));
|
||||
player.getInventory().add(new Item(Items.KETTLE_7688, 1));
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
player.getInventory().add(new Item(7702, 1));
|
||||
player.getInventory().add(new Item(Items.TEAPOT_7702, 1));
|
||||
break;
|
||||
case 3:
|
||||
end();
|
||||
player.getInventory().add(new Item(7728, 1));
|
||||
player.getInventory().add(new Item(Items.EMPTY_CUP_7728, 1));
|
||||
break;
|
||||
case 4:
|
||||
end();
|
||||
player.getInventory().add(new Item(1919, 1));
|
||||
player.getInventory().add(new Item(Items.BEER_GLASS_1919, 1));
|
||||
break;
|
||||
case 5:
|
||||
end();
|
||||
player.getInventory().add(new Item(1887, 1));
|
||||
player.getInventory().add(new Item(Items.CAKE_TIN_1887, 1));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -131,23 +132,23 @@ public final class ShelfPlugin extends OptionHandler {
|
|||
switch (buttonId) {
|
||||
case 1:
|
||||
end();
|
||||
player.getInventory().add(new Item(7688, 1));
|
||||
player.getInventory().add(new Item(Items.KETTLE_7688, 1));
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
player.getInventory().add(new Item(7702, 1));
|
||||
player.getInventory().add(new Item(Items.TEAPOT_7702, 1));
|
||||
break;
|
||||
case 3:
|
||||
end();
|
||||
player.getInventory().add(new Item(7728, 1));
|
||||
player.getInventory().add(new Item(Items.EMPTY_CUP_7728, 1));
|
||||
break;
|
||||
case 4:
|
||||
end();
|
||||
player.getInventory().add(new Item(1919, 1));
|
||||
player.getInventory().add(new Item(Items.BEER_GLASS_1919, 1));
|
||||
break;
|
||||
case 5:
|
||||
end();
|
||||
player.getInventory().add(new Item(1923, 1));
|
||||
player.getInventory().add(new Item(Items.BOWL_1923, 1));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -155,19 +156,19 @@ public final class ShelfPlugin extends OptionHandler {
|
|||
switch (buttonId) {
|
||||
case 1:
|
||||
end();
|
||||
player.getInventory().add(new Item(7688, 1));
|
||||
player.getInventory().add(new Item(Items.KETTLE_7688, 1));
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
player.getInventory().add(new Item(7702, 1));
|
||||
player.getInventory().add(new Item(Items.TEAPOT_7702, 1));
|
||||
break;
|
||||
case 3:
|
||||
end();
|
||||
player.getInventory().add(new Item(4244, 1));
|
||||
player.getInventory().add(new Item(Items.PORCELAIN_CUP_4244, 1));
|
||||
break;
|
||||
case 4:
|
||||
end();
|
||||
player.getInventory().add(new Item(1919, 1));
|
||||
player.getInventory().add(new Item(Items.BEER_GLASS_1919, 1));
|
||||
break;
|
||||
case 5:
|
||||
interpreter.sendOptions("Select an Option", "Bowl", "Cake tin");
|
||||
|
|
@ -179,30 +180,30 @@ public final class ShelfPlugin extends OptionHandler {
|
|||
switch (buttonId) {
|
||||
case 1:
|
||||
end();
|
||||
player.getInventory().add(new Item(1923, 1));
|
||||
player.getInventory().add(new Item(Items.BOWL_1923, 1));
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
player.getInventory().add(new Item(1887, 1));
|
||||
player.getInventory().add(new Item(Items.CAKE_TIN_1887, 1));
|
||||
break;
|
||||
}
|
||||
case 5:// teak shelves
|
||||
switch (buttonId) {
|
||||
case 1:
|
||||
end();
|
||||
player.getInventory().add(new Item(7688, 1));
|
||||
player.getInventory().add(new Item(Items.KETTLE_7688, 1));
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
player.getInventory().add(new Item(7702, 1));
|
||||
player.getInventory().add(new Item(Items.TEAPOT_7702, 1));
|
||||
break;
|
||||
case 3:
|
||||
end();
|
||||
player.getInventory().add(new Item(7735, 1));
|
||||
player.getInventory().add(new Item(Items.PORCELAIN_CUP_7735, 1));
|
||||
break;
|
||||
case 4:
|
||||
end();
|
||||
player.getInventory().add(new Item(1919, 1));
|
||||
player.getInventory().add(new Item(Items.BEER_GLASS_1919, 1));
|
||||
break;
|
||||
case 5:
|
||||
interpreter.sendOptions("Select an Option", "Bowl", "Pie dish", "Empty pot");
|
||||
|
|
@ -214,15 +215,15 @@ public final class ShelfPlugin extends OptionHandler {
|
|||
switch (buttonId) {
|
||||
case 1:
|
||||
end();
|
||||
player.getInventory().add(new Item(1923, 1));
|
||||
player.getInventory().add(new Item(Items.BOWL_1923, 1));
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
player.getInventory().add(new Item(2313, 1));
|
||||
player.getInventory().add(new Item(Items.PIE_DISH_2313, 1));
|
||||
break;
|
||||
case 3:
|
||||
end();
|
||||
player.getInventory().add(new Item(1931, 1));
|
||||
player.getInventory().add(new Item(Items.EMPTY_POT_1931, 1));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import core.plugin.Initializable
|
|||
import core.plugin.Plugin
|
||||
import core.game.world.GameWorld
|
||||
import core.game.interaction.InterfaceListener
|
||||
import org.rs09.consts.Items
|
||||
|
||||
/**
|
||||
* Handles the lectern
|
||||
|
|
@ -47,21 +48,21 @@ class LecternPlugin : OptionHandler() {
|
|||
* The required decoration (lectern)
|
||||
*/
|
||||
private val requiredDecorations: Array<Decoration>, vararg requiredItems: Item) {
|
||||
ARDOUGNE(2, 51, 61.0, Item(TeleTabsListener.TeleTabs.ADDOUGNE_TELEPORT.item), arrayOf<Decoration>(Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(563, 2), Item(555, 2)),
|
||||
BONES_TO_BANANNAS(3, 15, 25.0, Item(8014), arrayOf<Decoration>(Decoration.DEMON_LECTERN, Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(561, 1), Item(557, 2), Item(555, 2)),
|
||||
BONES_TO_PEACHES(4, 60, 35.5, Item(8015), arrayOf<Decoration>(Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(561, 2), Item(557, 4), Item(555, 4)),
|
||||
CAMELOT(5, 45, 55.5, Item(TeleTabsListener.TeleTabs.CAMELOT_TELEPORT.item), arrayOf<Decoration>(Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(563), Item(556, 5)),
|
||||
ENCHANT_DIAMOND(6, 57, 67.0, Item(8019), arrayOf<Decoration>(Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(564), Item(557, 10)),
|
||||
ENCHANT_DRAGONSTONE(7, 68, 78.0, Item(8020), arrayOf<Decoration>(Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(564), Item(557, 15), Item(555, 15)),
|
||||
ENCHANT_EMERALD(8, 27, 37.0, Item(8017), arrayOf<Decoration>(Decoration.DEMON_LECTERN, Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(564), Item(556, 3)),
|
||||
ENCHANT_ONYX(9, 87, 97.0, Item(8021), arrayOf<Decoration>(Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(564), Item(557, 20), Item(554, 20)),
|
||||
ENCHANT_RUBY(10, 49, 59.0, Item(8018), arrayOf<Decoration>(Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(564), Item(554, 5)),
|
||||
ENCHANT_SAPPHIRE(11, 7, 17.5, Item(8016), arrayOf<Decoration>(Decoration.OAK_LECTERN, Decoration.EAGLE_LECTERN, Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN, Decoration.DEMON_LECTERN, Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(564), Item(555)),
|
||||
FALADOR(12, 37, 48.0, Item(TeleTabsListener.TeleTabs.FALADOR_TELEPORT.item), arrayOf<Decoration>(Decoration.EAGLE_LECTERN, Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(563), Item(555), Item(556, 3)),
|
||||
LUMBRIDGE(13, 31, 41.0, Item(TeleTabsListener.TeleTabs.LUMBRIDGE_TELEPORT.item), arrayOf<Decoration>(Decoration.EAGLE_LECTERN, Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(563), Item(557), Item(556, 3)),
|
||||
HOUSE(14, 40, 30.0, Item(8013), arrayOf<Decoration>(Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(563), Item(557), Item(556)),
|
||||
VARROCK(15, 25, 35.0, Item(TeleTabsListener.TeleTabs.VARROCK_TELEPORT.item), arrayOf<Decoration>(Decoration.OAK_LECTERN, Decoration.EAGLE_LECTERN, Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN, Decoration.DEMON_LECTERN, Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(563), Item(554), Item(556, 3)),
|
||||
WATCHTOWER(16, 58, 68.0, Item(TeleTabsListener.TeleTabs.WATCH_TOWER_TELEPORT.item), arrayOf<Decoration>(Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(563, 2), Item(557, 2));
|
||||
ARDOUGNE(2, 51, 61.0, Item(TeleTabsListener.TeleTabs.ADDOUGNE_TELEPORT.item), arrayOf<Decoration>(Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(Items.LAW_RUNE_563, 2), Item(Items.WATER_RUNE_555, 2)),
|
||||
BONES_TO_BANANNAS(3, 15, 25.0, Item(Items.BONES_TO_BANANAS_8014), arrayOf<Decoration>(Decoration.DEMON_LECTERN, Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(Items.NATURE_RUNE_561, 1), Item(Items.EARTH_RUNE_557, 2), Item(Items.WATER_RUNE_555, 2)),
|
||||
BONES_TO_PEACHES(4, 60, 35.5, Item(Items.BONES_TO_PEACHES_8015), arrayOf<Decoration>(Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(Items.NATURE_RUNE_561, 2), Item(Items.EARTH_RUNE_557, 4), Item(Items.WATER_RUNE_555, 4)),
|
||||
CAMELOT(5, 45, 55.5, Item(TeleTabsListener.TeleTabs.CAMELOT_TELEPORT.item), arrayOf<Decoration>(Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(Items.LAW_RUNE_563), Item(Items.AIR_RUNE_556, 5)),
|
||||
ENCHANT_DIAMOND(6, 57, 67.0, Item(Items.ENCHANT_DIAMOND_8019), arrayOf<Decoration>(Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(Items.COSMIC_RUNE_564), Item(Items.EARTH_RUNE_557, 10)),
|
||||
ENCHANT_DRAGONSTONE(7, 68, 78.0, Item(Items.ENCHANT_DRAGONSTN_8020), arrayOf<Decoration>(Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(Items.COSMIC_RUNE_564), Item(Items.EARTH_RUNE_557, 15), Item(Items.WATER_RUNE_555, 15)),
|
||||
ENCHANT_EMERALD(8, 27, 37.0, Item(Items.ENCHANT_EMERALD_8017), arrayOf<Decoration>(Decoration.DEMON_LECTERN, Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(Items.COSMIC_RUNE_564), Item(Items.AIR_RUNE_556, 3)),
|
||||
ENCHANT_ONYX(9, 87, 97.0, Item(Items.ENCHANT_ONYX_8021), arrayOf<Decoration>(Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(Items.COSMIC_RUNE_564), Item(Items.EARTH_RUNE_557, 20), Item(Items.FIRE_RUNE_554, 20)),
|
||||
ENCHANT_RUBY(10, 49, 59.0, Item(Items.ENCHANT_RUBY_8018), arrayOf<Decoration>(Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(Items.COSMIC_RUNE_564), Item(Items.FIRE_RUNE_554, 5)),
|
||||
ENCHANT_SAPPHIRE(11, 7, 17.5, Item(Items.ENCHANT_SAPPHIRE_8016), arrayOf<Decoration>(Decoration.OAK_LECTERN, Decoration.EAGLE_LECTERN, Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN, Decoration.DEMON_LECTERN, Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(Items.COSMIC_RUNE_564), Item(Items.WATER_RUNE_555)),
|
||||
FALADOR(12, 37, 48.0, Item(TeleTabsListener.TeleTabs.FALADOR_TELEPORT.item), arrayOf<Decoration>(Decoration.EAGLE_LECTERN, Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(Items.LAW_RUNE_563), Item(Items.WATER_RUNE_555), Item(Items.AIR_RUNE_556, 3)),
|
||||
LUMBRIDGE(13, 31, 41.0, Item(TeleTabsListener.TeleTabs.LUMBRIDGE_TELEPORT.item), arrayOf<Decoration>(Decoration.EAGLE_LECTERN, Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(Items.LAW_RUNE_563), Item(Items.EARTH_RUNE_557), Item(Items.AIR_RUNE_556, 3)),
|
||||
HOUSE(14, 40, 30.0, Item(Items.TELEPORT_TO_HOUSE_8013), arrayOf<Decoration>(Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(Items.LAW_RUNE_563), Item(Items.EARTH_RUNE_557), Item(Items.AIR_RUNE_556)),
|
||||
VARROCK(15, 25, 35.0, Item(TeleTabsListener.TeleTabs.VARROCK_TELEPORT.item), arrayOf<Decoration>(Decoration.OAK_LECTERN, Decoration.EAGLE_LECTERN, Decoration.TEAK_EAGLE_LECTERN, Decoration.MAHOGANY_EAGLE_LECTERN, Decoration.DEMON_LECTERN, Decoration.TEAK_DEMON_LECTERN, Decoration.MAHOGANY_DEMON_LECTERN), SOFT_CLAY, Item(Items.LAW_RUNE_563), Item(Items.FIRE_RUNE_554), Item(Items.AIR_RUNE_556, 3)),
|
||||
WATCHTOWER(16, 58, 68.0, Item(TeleTabsListener.TeleTabs.WATCH_TOWER_TELEPORT.item), arrayOf<Decoration>(Decoration.MAHOGANY_EAGLE_LECTERN), SOFT_CLAY, Item(Items.LAW_RUNE_563, 2), Item(Items.EARTH_RUNE_557, 2));
|
||||
|
||||
/**
|
||||
* The required items
|
||||
|
|
@ -215,6 +216,6 @@ class LecternPlugin : OptionHandler() {
|
|||
/**
|
||||
* Soft clay
|
||||
*/
|
||||
private val SOFT_CLAY = Item(1761, 1)
|
||||
private val SOFT_CLAY = Item(Items.SOFT_CLAY_1761, 1)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import core.game.node.item.Item
|
|||
import core.plugin.Initializable
|
||||
import core.plugin.Plugin
|
||||
import kotlin.math.ceil
|
||||
import org.rs09.consts.Items
|
||||
|
||||
@Initializable
|
||||
class ArmourStand : UseWithHandler(494, 468, 496, 470, 498, 472, 500, 502, 474, 504, 476, 506, 478, 6741, 4856, 4857, 4858, 4859, 4860, 4862, 4863, 4864, 4865, 4866, 4868, 4869, 4870, 4871, 4872, 4874, 4875, 4876, 4877, 4878, 4880, 4881, 4882, 4883, 4884, 4886, 4887, 4888, 4889, 4890, 4892, 4893, 4894, 4895, 4896, 4898, 4899, 4900, 4901, 4902, 4904, 4905, 4906, 4907, 4908, 4910, 4911, 4912, 4913, 4914, 4916, 4917, 4918, 4919, 4920, 4922, 4923, 4924, 4925, 4926, 4928, 4929, 4930, 4931, 4932, 4934, 4935, 4936, 4937, 4938, 4940, 4941, 4942, 4943, 4944, 4946, 4947, 4948, 4949, 4950, 4952, 4953, 4954, 4955, 4956, 4958, 4959, 4960, 4961, 4962, 4964, 4965, 4966, 4967, 4968, 4970, 4971, 4972, 4973, 4974, 4976, 4977, 4978, 4979, 4980, 4982, 4983, 4984, 4985, 4986, 4988, 4989, 4990, 4991, 4992, 4994, 4995, 4996, 4997, 4998){
|
||||
|
|
@ -88,7 +89,7 @@ class ArmourStand : UseWithHandler(494, 468, 496, 470, 498, 472, 500, 502, 474,
|
|||
}
|
||||
|
||||
fun exchangeItems(item: Item, cost: Int, product: Item) {
|
||||
val coins = Item(995, cost)
|
||||
val coins = Item(Items.COINS_995, cost)
|
||||
if (player.inventory.containsItem(coins) && player.inventory.containsItem(item)) {
|
||||
player.inventory.remove(item, coins)
|
||||
player.inventory.add(product)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import core.game.node.scenery.Scenery;
|
|||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
import core.plugin.ClassScanner;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
/**
|
||||
* Handles the clockmakers bench in the workshop
|
||||
|
|
@ -35,13 +36,13 @@ public class ClockmakersBenchPlugin extends OptionHandler {
|
|||
private enum Craftable {
|
||||
|
||||
TOY_HORSEY(2520, 10, BuildingUtils.PLANK),
|
||||
CLOCKWORK(8792, 8, new Item(2353)),
|
||||
TOY_SOLDIER(7759, 13, BuildingUtils.PLANK, new Item(8792)),
|
||||
TOY_DOLL(7763, 18, BuildingUtils.PLANK, new Item(8792)),
|
||||
TOY_MOUSE(7767, 33, BuildingUtils.PLANK, new Item(8792)),
|
||||
TOY_CAT(7771, 85, BuildingUtils.PLANK, new Item(8792)),
|
||||
WATCH(2575, 28, new Item(8792), new Item(2353)),
|
||||
SEXTANT(2574, 23, new Item(2353));
|
||||
CLOCKWORK(8792, 8, new Item(Items.STEEL_BAR_2353)),
|
||||
TOY_SOLDIER(7759, 13, BuildingUtils.PLANK, new Item(Items.CLOCKWORK_8792)),
|
||||
TOY_DOLL(7763, 18, BuildingUtils.PLANK, new Item(Items.CLOCKWORK_8792)),
|
||||
TOY_MOUSE(7767, 33, BuildingUtils.PLANK, new Item(Items.CLOCKWORK_8792)),
|
||||
TOY_CAT(7771, 85, BuildingUtils.PLANK, new Item(Items.CLOCKWORK_8792)),
|
||||
WATCH(2575, 28, new Item(Items.CLOCKWORK_8792), new Item(Items.STEEL_BAR_2353)),
|
||||
SEXTANT(2574, 23, new Item(Items.STEEL_BAR_2353));
|
||||
|
||||
/**
|
||||
* The itemId to give after making this
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import core.game.world.GameWorld;
|
|||
import core.game.world.map.Location;
|
||||
import core.game.world.map.path.Pathfinder;
|
||||
import content.global.handlers.iface.SawmillPlankInterface.Plank;
|
||||
import org.rs09.consts.Items;
|
||||
|
||||
/**
|
||||
* Handles the Servant's dialogues.
|
||||
|
|
@ -146,7 +147,7 @@ public class HouseServantDialogue extends DialoguePlugin {
|
|||
stage++;
|
||||
break;
|
||||
case 3:
|
||||
if (type != null && player.getInventory().getAmount(995) >= type.getCost() && player.getInventory().remove(new Item(995, type.getCost()))) {
|
||||
if (type != null && player.getInventory().getAmount(995) >= type.getCost() && player.getInventory().remove(new Item(Items.COINS_995, type.getCost()))) {
|
||||
manager.setServant(new Servant(type));
|
||||
interpreter.sendDialogue("The servant heads to your house.");
|
||||
stage = 100;
|
||||
|
|
@ -218,11 +219,11 @@ public class HouseServantDialogue extends DialoguePlugin {
|
|||
interpreter.sendDialogues(servant, servant.getId() == 4243 ? FacialExpression.HALF_GUILTY : null, "You have no need to pay me yet, I haven't performed", "any of my services for you.");
|
||||
break;
|
||||
}
|
||||
if (!player.getInventory().containsItem(new Item(995, type.getCost()))) {
|
||||
if (!player.getInventory().containsItem(new Item(Items.COINS_995, type.getCost()))) {
|
||||
interpreter.sendDialogues(servant, servant.getId() == 4243 ? FacialExpression.HALF_GUILTY : null, "Thanks for the kind gesture, but you don't have enough", "money to pay me. I require " + type.getCost() + " coins every eight uses", "of my services.");
|
||||
break;
|
||||
}
|
||||
if (player.getInventory().remove(new Item(995, type.getCost()))) {
|
||||
if (player.getInventory().remove(new Item(Items.COINS_995, type.getCost()))) {
|
||||
interpreter.sendDialogues(servant, servant.getId() == 4243 ? FacialExpression.HALF_GUILTY : null, "Thank you very much.");
|
||||
servant.setUses(0);
|
||||
}
|
||||
|
|
@ -311,18 +312,18 @@ public class HouseServantDialogue extends DialoguePlugin {
|
|||
case 60:
|
||||
switch(buttonId) {
|
||||
case 1: //planks
|
||||
bankFetch(player, new Item(960));
|
||||
bankFetch(player, new Item(Items.PLANK_960));
|
||||
stage = 100;
|
||||
break;
|
||||
case 2: //oak
|
||||
bankFetch(player, new Item(8778));
|
||||
bankFetch(player, new Item(Items.OAK_PLANK_8778));
|
||||
stage = 100;
|
||||
break;
|
||||
case 3: //teak
|
||||
bankFetch(player, new Item(8780));
|
||||
bankFetch(player, new Item(Items.TEAK_PLANK_8780));
|
||||
break;
|
||||
case 4: //mahog
|
||||
bankFetch(player, new Item(8782));
|
||||
bankFetch(player, new Item(Items.MAHOGANY_PLANK_8782));
|
||||
break;
|
||||
case 5:
|
||||
options("Soft clay", "Limestone bricks", "Steel bars", "Cloth", "More options");
|
||||
|
|
@ -333,16 +334,16 @@ public class HouseServantDialogue extends DialoguePlugin {
|
|||
case 61:
|
||||
switch(buttonId) {
|
||||
case 1: //clay
|
||||
bankFetch(player, new Item(1761));
|
||||
bankFetch(player, new Item(Items.SOFT_CLAY_1761));
|
||||
break;
|
||||
case 2: //lime
|
||||
bankFetch(player, new Item(3420));
|
||||
bankFetch(player, new Item(Items.LIMESTONE_BRICK_3420));
|
||||
break;
|
||||
case 3: //steel bars
|
||||
bankFetch(player, new Item(2353));
|
||||
bankFetch(player, new Item(Items.STEEL_BAR_2353));
|
||||
break;
|
||||
case 4: //cloth
|
||||
bankFetch(player, new Item(8790));
|
||||
bankFetch(player, new Item(Items.BOLT_OF_CLOTH_8790));
|
||||
break;
|
||||
case 5:
|
||||
options("Gold leaves", "Marble blocks", "Magic stones");
|
||||
|
|
@ -353,13 +354,13 @@ public class HouseServantDialogue extends DialoguePlugin {
|
|||
case 62:
|
||||
switch(buttonId) {
|
||||
case 1: //leaves
|
||||
bankFetch(player, new Item(4692));
|
||||
bankFetch(player, new Item(Items.GOLD_LEAF_4692));
|
||||
break;
|
||||
case 2: //marble
|
||||
bankFetch(player, new Item(8786));
|
||||
bankFetch(player, new Item(Items.MARBLE_BLOCK_8786));
|
||||
break;
|
||||
case 3: //magic stones
|
||||
bankFetch(player, new Item(4703));
|
||||
bankFetch(player, new Item(Items.MAGIC_STONE_4703));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -478,7 +479,7 @@ public class HouseServantDialogue extends DialoguePlugin {
|
|||
return;
|
||||
}
|
||||
end();
|
||||
if (player.getInventory().remove(new Item(item.getId(), amt)) && player.getInventory().remove(new Item(995, amt * plank.getPrice()))) {
|
||||
if (player.getInventory().remove(new Item(item.getId(), amt)) && player.getInventory().remove(new Item(Items.COINS_995, amt * plank.getPrice()))) {
|
||||
manager.getServant().setItem(new Item(plank.getPlank().getId(), amt));
|
||||
servant.setInvisible(true);
|
||||
servant.getLocks().lockMovement(100);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class StonemasonPlugin extends OptionHandler {
|
|||
* Constructs a new {@Code SupplyStore} {@Code Object}
|
||||
*//*
|
||||
public SupplyStore() {
|
||||
super("Keldagrim Stonemason", new Item[] { new Item(3420, 1000), new Item(8786, 20), new Item(8784, 20), new Item(8788, 10) }, false);
|
||||
super("Keldagrim Stonemason", new Item[] { new Item(Items.LIMESTONE_BRICK_3420, 1000), new Item(Items.MARBLE_BLOCK_8786, 20), new Item(Items.GOLD_LEAF_8784, 20), new Item(Items.MAGIC_STONE_8788, 10) }, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue