Jump to content

Search the Community

Showing results for tags 'option'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 35 results

  1. Title says it all, i need to change fun weapons text in duel arena to whip/dds!. help is much appreciated!
  2. Just like the title says. I am using Chronicscape 4.5 if that matters. I've tried making the source both my jdk and jre and neither works. I can start the server and client just fine. Any ideas?
  3. Hello all, Im working on a 317 Sever and im trying to make a NPC talk via the talk to action for adding quests and other stuff however, all my goggle searches have simply returned making the npc talk with text above there head. could anyone link me to a thread that may help?
  4. :) niggas be hatin now :)
  5. Hi, i got a duel arena issue, when im entering the duel arena i see the battleaxe icon but i when im right clicking on a person there is no 'challange' option. Anybody knows how to fix this? Il also give the names of my files from Duel Arena: Duelarena.java DuelControler.java DuelRules.java Thanks for answer, would be appriciated.
  6. Thorin

    [PI]Buy 200 Option

    What file would i go into to add the "Buy 200" option? would it be ShopAssistant.java?
  7. Hey guys at the moment I have an issue with having to right click to attack even if you are the same combat level. I am almost 99% sure it has to do with team capes due to me having a blue dot on the minimap as if I was wearing the same team cape as someone. Please help, it's affecting new players and I don't know the fix for it. THANKS
  8. Hello guys.. I recently added cow milking and I noticed that the 'empty' option on bucket of milk and vial of water, etc doesn't work... How I can make that the 'empty' option works? (when I click on 'empty' it empties the item of the content' Is there a tutorial or what?
  9. Hi everyone, I was wondering if anyone could help me with the combine option when you click on shards of armadyl, if you have 100 of them it should turn into an orb of armadyl. But it doesnt work on my server yet. So... Does somebody know where to find this, or could anyone help me with this problem? Ive been searching for hours, but couldnt find anything ;) Thanks, B A T
  10. I would like it to be server sided but also client sided is ok, i guess? Anyway i have done lots of things by my self but now i'm in trouble. So I should add push option to "Shipwreck" object. I will also add cost for it and emote etc. but i can do that by my self. I think it's maybe at "objectDefinitions"? Not sure anyway.. :D And picture.. :>[ATTACH=CONFIG]7899[/ATTACH] and objectDefinitions.. [CODE]package com.rs.cache.loaders; import java.io.IOException; import java.util.HashMap; import java.util.concurrent.ConcurrentHashMap; import com.rs.cache.Cache; import com.rs.game.player.content.dungeoneering.DungeonUtils; import com.rs.io.InputStream; @SuppressWarnings("unused") public class ObjectDefinitions { private static final ConcurrentHashMap<Integer, ObjectDefinitions> objectDefinitions = new ConcurrentHashMap<Integer, ObjectDefinitions>(); private short[] originalColors; int[] toObjectIds; static int anInt3832; int[] anIntArray3833 = null; private int anInt3834; int anInt3835; static int anInt3836; private byte aByte3837; int anInt3838 = -1; boolean aBoolean3839; private int anInt3840; private int anInt3841; static int anInt3842; static int anInt3843; int anInt3844; boolean aBoolean3845; static int anInt3846; private byte aByte3847; private byte aByte3849; int anInt3850; int anInt3851; public boolean secondBool; public boolean aBoolean3853; int anInt3855; public boolean notCliped; int anInt3857; private byte[] aByteArray3858; int[] anIntArray3859; int anInt3860; String[] options; int configFileId; private short[] modifiedColors; int anInt3865; boolean aBoolean3866; boolean aBoolean3867; public boolean projectileCliped; private int[] anIntArray3869; boolean aBoolean3870; public int sizeY; boolean aBoolean3872; boolean aBoolean3873; public int thirdInt; private int anInt3875; public int anInt3876; private int anInt3877; private int anInt3878; public int clipType; private int anInt3881; private int anInt3882; private int anInt3883; Object loader; private int anInt3889; public int sizeX; public boolean aBoolean3891; int anInt3892; public int secondInt; boolean aBoolean3894; boolean aBoolean3895; int anInt3896; int configId; private byte[] aByteArray3899; int anInt3900; public String name; private int anInt3902; int anInt3904; int anInt3905; boolean aBoolean3906; int[] anIntArray3908; private byte aByte3912; int anInt3913; private byte aByte3914; private int anInt3915; public int[][] modelIds; private int anInt3917; private short[] aShortArray3919; private short[] aShortArray3920; int anInt3921; private HashMap<Integer, Object> parameters; boolean aBoolean3923; boolean aBoolean3924; int anInt3925; public int id; public static void main(String[] args) throws IOException { Cache.init(); for (int i = 4903; i < 4904; i++) { ObjectDefinitions defs = getObjectDefinitions(i); // if (!defs.name.equals("null")) System.out.println(i + ", " + defs.configId); } /* * System.out.println(defs.configId); * System.out.println(defs.configFileId); */ } public String getFirstOption() { if (options == null || options.length < 1) return ""; return options[0]; } public String getSecondOption() { if (options == null || options.length < 2) return ""; return options[1]; } public String getOption(int option) { if (options == null || options.length < option || option == 0) return ""; return options[option - 1]; } public String getThirdOption() { if (options == null || options.length < 3) return ""; return options[2]; } public boolean containsOption(int i, String option) { if (options == null || options.length <= i) return false; return options[i].equals(option); } public boolean containsOption(String o) { if (options == null) return false; for (String option : options) { if (option == null) continue; if (option.equalsIgnoreCase(o)) return true; } return false; } private void readValues(InputStream stream, int opcode) { // System.out.println(opcode); if (opcode != 1 && opcode != 5) { if (opcode != 2) { if (opcode != 14) { if (opcode != 15) { if (opcode == 17) { // nocliped projectileCliped = false; clipType = 0; } else if (opcode != 18) { if (opcode == 19) secondInt = stream.readUnsignedByte(); else if (opcode == 21) aByte3912 = (byte) 1; else if (opcode != 22) { if (opcode != 23) { if (opcode != 24) { if (opcode == 27) // cliped, no idea // diff between 2 // and 1 clipType = 1; else if (opcode == 28) anInt3892 = (stream .readUnsignedByte() << 2); else if (opcode != 29) { if (opcode != 39) { if (opcode < 30 || opcode >= 35) { if (opcode == 40) { int i_53_ = (stream .readUnsignedByte()); originalColors = new short[i_53_]; modifiedColors = new short[i_53_]; for (int i_54_ = 0; i_53_ > i_54_; i_54_++) { originalColors[i_54_] = (short) (stream .readUnsignedShort()); modifiedColors[i_54_] = (short) (stream .readUnsignedShort()); } } else if (opcode != 41) { // object // anim if (opcode != 42) { if (opcode != 62) { if (opcode != 64) { if (opcode == 65) anInt3902 = stream .readUnsignedShort(); else if (opcode != 66) { if (opcode != 67) { if (opcode == 69) anInt3925 = stream .readUnsignedByte(); else if (opcode != 70) { if (opcode == 71) anInt3889 = stream .readShort() << 2; else if (opcode != 72) { if (opcode == 73) secondBool = true; else if (opcode == 74) notCliped = true; else if (opcode != 75) { if (opcode != 77 && opcode != 92) { if (opcode == 78) { anInt3860 = stream .readUnsignedShort(); anInt3904 = stream .readUnsignedByte(); } else if (opcode != 79) { if (opcode == 81) { aByte3912 = (byte) 2; anInt3882 = 256 * stream .readUnsignedByte(); } else if (opcode != 82) { if (opcode == 88) aBoolean3853 = false; else if (opcode != 89) { if (opcode == 90) aBoolean3870 = true; else if (opcode != 91) { if (opcode != 93) { if (opcode == 94) aByte3912 = (byte) 4; else if (opcode != 95) { if (opcode != 96) { if (opcode == 97) aBoolean3866 = true; else if (opcode == 98) aBoolean3923 = true; else if (opcode == 99) { anInt3857 = stream .readUnsignedByte(); anInt3835 = stream .readUnsignedShort(); } else if (opcode == 100) { anInt3844 = stream .readUnsignedByte(); anInt3913 = stream .readUnsignedShort(); } else if (opcode != 101) { if (opcode == 102) anInt3838 = stream .readUnsignedShort(); else if (opcode == 103) thirdInt = 0; else if (opcode != 104) { if (opcode == 105) aBoolean3906 = true; else if (opcode == 106) { int i_55_ = stream .readUnsignedByte(); anIntArray3869 = new int[i_55_]; anIntArray3833 = new int[i_55_]; for (int i_56_ = 0; i_56_ < i_55_; i_56_++) { anIntArray3833[i_56_] = stream .readBigSmart(); int i_57_ = stream .readUnsignedByte(); anIntArray3869[i_56_] = i_57_; anInt3881 += i_57_; } } else if (opcode == 107) anInt3851 = stream .readUnsignedShort(); else if (opcode >= 150 && opcode < 155) { options[opcode + -150] = stream .readString(); /* * if * ( * ! * loader * . * showOptions * ) * options * [ * opcode * + * - * 150 * ] * = * null * ; */ } else if (opcode != 160) { if (opcode == 162) { aByte3912 = (byte) 3; anInt3882 = stream .readInt(); } else if (opcode == 163) { aByte3847 = (byte) stream .readByte(); aByte3849 = (byte) stream .readByte(); aByte3837 = (byte) stream .readByte(); aByte3914 = (byte) stream .readByte(); } else if (opcode != 164) { if (opcode != 165) { if (opcode != 166) { if (opcode == 167) anInt3921 = stream .readUnsignedShort(); else if (opcode != 168) { if (opcode == 169) { aBoolean3845 = true; // added // opcode } else if (opcode == 170) { int anInt3383 = stream .readUnsignedSmart(); // added // opcode } else if (opcode == 171) { int anInt3362 = stream .readUnsignedSmart(); // added // opcode } else if (opcode == 173) { int anInt3302 = stream .readUnsignedShort(); int anInt3336 = stream .readUnsignedShort(); // added // opcode } else if (opcode == 177) { boolean ub = true; // added // opcode } else if (opcode == 178) { int db = stream .readUnsignedByte(); } else if (opcode == 189) { boolean bloom = true; } else if (opcode == 249) { int length = stream .readUnsignedByte(); if (parameters == null) parameters = new HashMap<Integer, Object>( length); for (int i_60_ = 0; i_60_ < length; i_60_++) { boolean bool = stream .readUnsignedByte() == 1; int i_61_ = stream .read24BitInt(); if (!bool) parameters .put(i_61_, stream.readInt()); else parameters .put(i_61_, stream.readString()); } } } else aBoolean3894 = true; } else anInt3877 = stream .readShort(); } else anInt3875 = stream .readShort(); } else anInt3834 = stream .readShort(); } else { int i_62_ = stream .readUnsignedByte(); anIntArray3908 = new int[i_62_]; for (int i_63_ = 0; i_62_ > i_63_; i_63_++) anIntArray3908[i_63_] = stream .readUnsignedShort(); } } else anInt3865 = stream .readUnsignedByte(); } else anInt3850 = stream .readUnsignedByte(); } else aBoolean3924 = true; } else { aByte3912 = (byte) 5; anInt3882 = stream .readShort(); } } else { aByte3912 = (byte) 3; anInt3882 = stream .readUnsignedShort(); } } else aBoolean3873 = true; } else aBoolean3895 = false; } else aBoolean3891 = true; } else { anInt3900 = stream .readUnsignedShort(); anInt3905 = stream .readUnsignedShort(); anInt3904 = stream .readUnsignedByte(); int i_64_ = stream .readUnsignedByte(); anIntArray3859 = new int[i_64_]; for (int i_65_ = 0; i_65_ < i_64_; i_65_++) anIntArray3859[i_65_] = stream .readUnsignedShort(); } } else { configFileId = stream .readUnsignedShort(); if (configFileId == 65535) configFileId = -1; configId = stream .readUnsignedShort(); if (configId == 65535) configId = -1; int i_66_ = -1; if (opcode == 92) { i_66_ = stream .readBigSmart(); } int i_67_ = stream .readUnsignedByte(); toObjectIds = new int[i_67_ - -2]; for (int i_68_ = 0; i_67_ >= i_68_; i_68_++) { toObjectIds[i_68_] = stream .readBigSmart(); } toObjectIds[i_67_ + 1] = i_66_; } } else anInt3855 = stream .readUnsignedByte(); } else anInt3915 = stream .readShort() << 2; } else anInt3883 = stream .readShort() << 2; } else anInt3917 = stream .readUnsignedShort(); } else anInt3841 = stream .readUnsignedShort(); } else // 64 aBoolean3872 = false; } else aBoolean3839 = true; } else { int i_69_ = (stream .readUnsignedByte()); aByteArray3858 = (new byte[i_69_]); for (int i_70_ = 0; i_70_ < i_69_; i_70_++) aByteArray3858[i_70_] = (byte) (stream .readByte()); } } else { int i_71_ = (stream .readUnsignedByte()); aShortArray3920 = new short[i_71_]; aShortArray3919 = new short[i_71_]; for (int i_72_ = 0; i_71_ > i_72_; i_72_++) { aShortArray3920[i_72_] = (short) (stream .readUnsignedShort()); aShortArray3919[i_72_] = (short) (stream .readUnsignedShort()); } } } else { options[-30 + opcode] = (stream .readString()); } } else // 39 anInt3840 = (stream.readByte() * 5); } else {// 29 anInt3878 = stream.readByte(); } } else { anInt3876 = stream.readBigSmart(); } } else thirdInt = 1; } else aBoolean3867 = true; } else projectileCliped = false; } else // 15 sizeY = stream.readUnsignedByte(); } else // 14 sizeX = stream.readUnsignedByte(); } else { name = stream.readString(); } } else { boolean aBoolean1162 = false; if (opcode == 5 && aBoolean1162) skipReadModelIds(stream); int i_73_ = stream.readUnsignedByte(); modelIds = new int[i_73_][]; aByteArray3899 = new byte[i_73_]; for (int i_74_ = 0; i_74_ < i_73_; i_74_++) { aByteArray3899[i_74_] = (byte) stream.readByte(); int i_75_ = stream.readUnsignedByte(); modelIds[i_74_] = new int[i_75_]; for (int i_76_ = 0; i_75_ > i_76_; i_76_++) modelIds[i_74_][i_76_] = stream.readBigSmart(); } if (opcode == 5 && !aBoolean1162) skipReadModelIds(stream); } } private void skipReadModelIds(InputStream stream) { int length = stream.readUnsignedByte(); for (int index = 0; index < length; index++) { stream.skip(1); int length2 = stream.readUnsignedByte(); for (int i = 0; i < length2; i++) stream.readBigSmart(); } } private void readValueLoop(InputStream stream) { for (;;) { int opcode = stream.readUnsignedByte(); if (opcode == 0) { // System.out.println("Remaining: "+stream.getRemaining()); break; } readValues(stream, opcode); } } private ObjectDefinitions() { anInt3835 = -1; anInt3860 = -1; configFileId = -1; aBoolean3866 = false; anInt3851 = -1; anInt3865 = 255; aBoolean3845 = false; aBoolean3867 = false; anInt3850 = 0; anInt3844 = -1; anInt3881 = 0; anInt3857 = -1; aBoolean3872 = true; anInt3882 = -1; anInt3834 = 0; options = new String[5]; anInt3875 = 0; aBoolean3839 = false; anIntArray3869 = null; sizeY = 1; thirdInt = -1; anInt3883 = 0; aBoolean3895 = true; anInt3840 = 0; aBoolean3870 = false; anInt3889 = 0; aBoolean3853 = true; secondBool = false; clipType = 2; projectileCliped = true; notCliped = false; anInt3855 = -1; anInt3878 = 0; anInt3904 = 0; sizeX = 1; anInt3876 = -1; aBoolean3891 = false; anInt3905 = 0; name = "null"; anInt3913 = -1; aBoolean3906 = false; aBoolean3873 = false; aByte3914 = (byte) 0; anInt3915 = 0; anInt3900 = 0; secondInt = -1; aBoolean3894 = false; aByte3912 = (byte) 0; anInt3921 = 0; anInt3902 = 128; configId = -1; anInt3877 = 0; anInt3925 = 0; anInt3892 = 64; aBoolean3923 = false; aBoolean3924 = false; anInt3841 = 128; anInt3917 = 128; } final void method3287() { if (secondInt == -1) { secondInt = 0; if (aByteArray3899 != null && aByteArray3899.length == 1 && aByteArray3899[0] == 10) secondInt = 1; for (int i_13_ = 0; i_13_ < 5; i_13_++) { if (options[i_13_] != null) { secondInt = 1; break; } } } if (anInt3855 == -1) anInt3855 = clipType != 0 ? 1 : 0; } private static int getArchiveId(int i_0_) { return i_0_ >>> -1135990488; } public static ObjectDefinitions getObjectDefinitions(int id) { ObjectDefinitions def = objectDefinitions.get(id); if (def == null) { def = new ObjectDefinitions(); def.id = id; byte[] data = Cache.STORE.getIndexes()[16].getFile( getArchiveId(id), id & 0xff); if (data == null) System.out.println("Failed loading Object " + id + "."); else def.readValueLoop(new InputStream(data)); def.method3287(); if ((def.name != null && (def.name.equalsIgnoreCase("bank booth") || def.name .equalsIgnoreCase("counter")))) { def.notCliped = false; def.projectileCliped = true; if (def.clipType == 0) def.clipType = 1; } else if (DungeonUtils.isDoor(id)) { def.notCliped = false; def.projectileCliped = true; if (def.clipType == 0) def.clipType = 1; } if (def.notCliped) { def.projectileCliped = false; def.clipType = 0; } objectDefinitions.put(id, def); } return def; } public int getClipType() { return clipType; } public boolean isProjectileCliped() { return projectileCliped; } public int getSizeX() { return sizeX; } public int getSizeY() { return sizeY; } public static void clearObjectDefinitions() { objectDefinitions.clear(); } }[/CODE]
  11. I was wondering if it was possible to add an extra option to an object and if someone could give me a rough idea on how to do it.
  12. When i choose an option in the npc option dialogue it will do what its supposed to do but sometimes it will also do something else thats in there? i have made it check if an int is a certain number but it still doesn't work, its so annoying ~___~
  13. Okay so im trying to use npcpackethandler option 2 so when you click listen on a musician it will rest at him but it says npc not added blah blah blah and its set to option 2... but if its on a shop and you choose trade which is the 2nd option it will work???????
  14. At the moment there are only two options for forum themes (excluding the mobile theme). Both of these themes have white backgrounds. White backgrounds are not so easy on the eyes for some people, including myself. Please add a darker them as an option. Thanks :)
  15. I wasn't sure if this was the right section or not, but I decided to post here because no one had posted in the 508 Client Hacking Help section since March 2012. Anyway, I want to know what the item option variables are. Here's an example of one of my items right now: [CODE]case 14001: class142.anInt2274 = 40207; class142.aClass124_2296 = Class14_Sub2_Sub2.method263(1178, "Dragon platebody");//Item Name class142.anInt2317 = 0;// model rotation 1 class142.anInt2286 = 0;// model rotation 2 class142.anInt2293 = 0;// model offset 1 class142.anInt2285 = 0;// model offset 2 class142.anInt2311 = 44576;//inventory/drop model class142.anInt2273 = 900;//model zoom break; [/CODE] What I want to add is a Wear option as at the moment it only has Use, Drop and Examine options. Can someone help me out? I can't find this anywhere online.
  16. my inventoryoptionhandler.java ---------------------------- [code]package com.rs.net.decoders.handlers; import java.util.List; import com.rs.Settings; import com.rs.cores.WorldThread; import com.rs.game.ForceTalk; import com.rs.game.Animation; import com.rs.game.World; import com.rs.game.WorldTile; import com.rs.game.WorldObject; import com.rs.game.item.Item; import com.rs.game.npc.NPC; import com.rs.game.player.controlers.Barrows; import com.rs.game.npc.familiar.Familiar.SpecialAttack; import com.rs.game.player.Equipment; import com.rs.game.player.Inventory; import com.rs.game.player.Pets; import com.rs.game.player.Player; import com.rs.game.player.actions.Firemaking; import com.rs.game.player.actions.Fletching; import com.rs.game.player.actions.Fletching.Fletch; import com.rs.game.player.actions.GemCutting; import com.rs.game.player.actions.GemCutting.Gem; import com.rs.game.player.actions.HerbCleaning; import com.rs.game.player.actions.Herblore; import com.rs.game.player.actions.Hunter; import com.rs.game.player.actions.Hunter.HunterEquipment; import com.rs.game.player.actions.LeatherCrafting; import com.rs.game.player.actions.Summoning; import com.rs.game.player.actions.Summoning.Pouches; import com.rs.game.player.content.AncientEffigies; import com.rs.game.player.content.ArmourSets; import com.rs.game.player.content.ArmourSets.Sets; import com.rs.game.player.content.Burying; import com.rs.game.player.content.Foods; import com.rs.game.player.content.ItemOnItemHandler; import com.rs.game.player.content.ItemOnItemHandler.ItemOnItem; import com.rs.game.player.content.Magic; import com.rs.game.player.content.Pots; import com.rs.game.player.content.Runecrafting; import com.rs.game.player.content.SkillCapeCustomizer; import com.rs.game.player.controlers.Barrows; import com.rs.game.player.content.Burying; import com.rs.game.player.content.Burying.Bone; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; import com.rs.game.Graphics; import com.rs.game.minigames.DiceGame; import com.rs.io.InputStream; import com.rs.utils.Logger; import com.rs.utils.Utils; public class InventoryOptionsHandler { public static void handleItemOption2(final Player player, final int slotId, final int itemId, Item item) { if (Firemaking.isFiremaking(player, itemId)) return; if (itemId >= 5509 && itemId <= 5514) { int pouch = -1; if (itemId == 5509) pouch = 0; if (itemId == 5510) pouch = 1; if (itemId == 5512) pouch = 2; if (itemId == 5514) pouch = 3; Runecrafting.emptyPouch(player, pouch); } else if (itemId == 15098) { DiceGame.rollDice8(player); player.setNextAnimation(new Animation(11900)); player.setNextGraphics(new Graphics(2075)); return; } else { if (player.isEquipDisabled()) return; long passedTime = Utils.currentTimeMillis() - WorldThread.LAST_CYCLE_CTM; WorldTasksManager.schedule(new WorldTask() { @Override public void run() { List<Integer> slots = player.getSwitchItemCache(); int[] slot = new int[slots.size()]; for (int i = 0; i < slot.length; i++) slot[i] = slots.get(i); player.getSwitchItemCache().clear(); ButtonHandler.sendWear(player, slot); player.stopAll(false); } }, passedTime >= 600 ? 0 : passedTime > 400 ? 1 : 0);// switching // one item, // if delay // too close // to next // ticket, // delay so // wont // instant if (player.getSwitchItemCache().contains(slotId)) return; player.getSwitchItemCache().add(slotId); } } public static void handleItemOption1(Player player, final int slotId, final int itemId, Item item) { long time = Utils.currentTimeMillis(); if (player.getStopDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); if (Foods.eat(player, item, slotId)) return; if (itemId == 15098) { DiceGame.rollDice8(player); player.setNextAnimation(new Animation(11900)); player.setNextGraphics(new Graphics(2075)); return; }; if (Burying.bury(player, slotId)) return; if (itemId == 15098) { // DiceGame.handleItem(player, Rolls.PRIVATE_ROLL); return; } if (itemId == 24143) { player.sendMessage("<692E15>You have a Barrows Kill Count of " + player.getBarrowsKillCount() + "."); return; } if (!player.getControlerManager().handleItemOption1(player, slotId, itemId, item)) return; if (Pots.pot(player, item, slotId)) return; if (itemId >= 5509 && itemId <= 5514) { int pouch = -1; if (itemId == 5509) pouch = 0; if (itemId == 5510) pouch = 1; if (itemId == 5512) pouch = 2; if (itemId == 5514) pouch = 3; Runecrafting.fillPouch(player, pouch); return; } if (itemId == 952) {// spade player.resetWalkSteps(); if (Barrows.digToBrother(player)) return; player.setNextAnimation(new Animation(830)); player.getPackets().sendGameMessage("You find nothing."); return; } if (itemId == 20718) {// confetti player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(1341)); return; } if (itemId == 19475) {// Nardah player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(2582, 3481, 0)); player.getInventory().deleteItem(19475, 1); return; } if (itemId == 19476) {// Bandit Camp player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(3176, 2987, 0)); player.getInventory().deleteItem(19476, 1); return; } if (itemId == 19477) {// Miscellania player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(2509, 3845, 0)); player.getInventory().deleteItem(19477, 1); return; } if (itemId == 19478) {// Phoenix Lair player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(3359, 2910, 0)); player.getInventory().deleteItem(19478, 1); return; } if (itemId == 19479) {// Tai Bwo Wannai player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(2803, 3065, 0)); player.getInventory().deleteItem(19479, 1); return; } if (itemId == 19480) {// Lumber Yard player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(3308, 3491, 0)); player.getInventory().deleteItem(19480, 1); return; } if (itemId == 22308) {// impious ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(56)); player.getSkills().addXp(5, 2500); player.getInventory().deleteItem(22308, 1); player.getPackets().sendGameMessage("You spread the Impious Ashes."); return; } if (itemId == 20264) {// impious ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(56)); player.getSkills().addXp(5, 2500); player.getInventory().deleteItem(20264, 1); player.getPackets().sendGameMessage("You spread the Impious Ashes."); return; } if (itemId == 22310) {// accursed ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(47)); player.getSkills().addXp(5, 3700); player.getInventory().deleteItem(22310, 1); player.getPackets().sendGameMessage("You spread the Accursed Ashes."); return; } if (itemId == 20266) {// accursed ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(47)); player.getSkills().addXp(5, 3700); player.getInventory().deleteItem(20266, 1); player.getPackets().sendGameMessage("You spread the Accursed Ashes."); return; } if (itemId == 22312) {// infernal ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(40)); player.getSkills().addXp(5, 5000); player.getInventory().deleteItem(22312, 1); player.getPackets().sendGameMessage("You spread the Infernal Ashes."); return; } if (itemId == 20268) {// infernal ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(40)); player.getSkills().addXp(5, 5000); player.getInventory().deleteItem(20268, 1); player.getPackets().sendGameMessage("You spread the Infernal Ashes."); return; } if (itemId == 299) { final WorldTile tile = new WorldTile(player); if (!player.addWalkSteps(player.getX() - 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX() + 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX(), player.getY() + 1, 1)) player.addWalkSteps(player.getX(), player.getY() - 1, 1); player.getInventory().deleteItem(299, 1); //World.spawnObject(new WorldObject(Utils.random(2981, 2983), 10, -1, player.getX(), player.getY(), player.getPlane()), true); World.spawnTempGroundObject(new WorldObject(Utils.random(2981, 2983), 10, 0, tile.getX(), tile.getY(), tile.getPlane()), 299, 35000); } if (itemId == 20721) {// firework player.setNextAnimation(new Animation(2286)); return; } if (itemId == 20722) {// firecracker player.setNextAnimation(new Animation(2286)); return; } if (itemId == 21250) {// pet rock player.setNextAnimation(new Animation(1333)); return; } if (itemId == 21252) {// pet rock player.setNextAnimation(new Animation(1333)); return; } if (itemId == 21254) {// pet rock player.setNextAnimation(new Animation(1333)); return; } if (itemId == 21256) {// pet rock player.setNextAnimation(new Animation(1333)); return; } if (itemId == 23745) {// small con lamp player.getSkills().addXp(22, 50000); player.getInventory().deleteItem(23745, 1); return; } if (itemId == 23746) {// medium con lamp player.getSkills().addXp(22, 75000); player.getInventory().deleteItem(23746, 1); return; } if (itemId == 23747) {// large con lamp player.getSkills().addXp(22, 125000); player.getInventory().deleteItem(23747, 1); return; } if (itemId == 23748) {// huge con lamp player.getSkills().addXp(22, 250000); player.getInventory().deleteItem(23748, 1); return; } if (itemId == 23778) {// small slayer lamp player.getSkills().addXp(18, 50000); player.getInventory().deleteItem(23778, 1); return; } if (itemId == 23779) {// medium slayer lamp player.getSkills().addXp(18, 75000); player.getInventory().deleteItem(23779, 1); return; } if (itemId == 23780) {// large slayer lamp player.getSkills().addXp(18, 125000); player.getInventory().deleteItem(23780, 1); return; } if (itemId == 23781) {// huge slayer lamp player.getSkills().addXp(18, 250000); player.getInventory().deleteItem(23781, 1); return; } if (itemId == 23810) {// small farming lamp player.getSkills().addXp(19, 50000); player.getInventory().deleteItem(23810, 1); return; } if (itemId == 23811) {// medium farming lamp player.getSkills().addXp(19, 75000); player.getInventory().deleteItem(23811, 1); return; } if (itemId == 23812) {// large farming lamp player.getSkills().addXp(19, 125000); player.getInventory().deleteItem(23812, 1); return; } if (itemId == 23813) {// huge farming lamp player.getSkills().addXp(19, 250000); player.getInventory().deleteItem(23813, 1); return; } if (itemId == 23814) {// small summoning lamp player.getSkills().addXp(23, 50000); player.getInventory().deleteItem(23814, 1); return; } if (itemId == 23815) {// medium summoning lamp player.getSkills().addXp(23, 75000); player.getInventory().deleteItem(23815, 1); return; } if (itemId == 23816) {// large summoning lamp player.getSkills().addXp(23, 125000); player.getInventory().deleteItem(23816, 1); return; } if (itemId == 23817) {// huge summoning lamp player.getSkills().addXp(23, 250000); player.getInventory().deleteItem(23817, 1); return; } if (itemId == 20667) {// Vecna skull player.setNextAnimation(new Animation(725)); return; } if (itemId == 6199) { int[] RandomItems = {11732, 4151, 11283, 385, 2347, 1712, 1712, 6585, 1712, 6585, 11732, 11732, 3105, 6918, 6920, 6922, 6924, 6570, 10828, 1079, 1127, 20072, 20072, 8850, 10551, 10548, 4087, 15332, 15332, 4712, 4714, 4716, 4718, 4720, 4722, 4724, 4726, 4728, 4730, 4732, 4734, 4736, 4738, 4745, 4747, 4749, 4751, 4753, 4755, 4757, 4759, 6585, 5698, 1704, 7378, 7370, 7390, 6737, 6731, 6733, 11716, 6199, 6199, 7386, 7394, 11846, 11850, 11852, 2673, 2669, 2671, 6889, 6914, 2653, 2655, 2657, 1837, 10330, 11848, 11854, 11856, 10332, 10334, 10336, 542, 4087, 4585, 6568, 6568, 10338, 10340, 10342, 10344, 10346, 10348, 10350, 10352, 2581, 13736, 6916, 6918, 6920, 6922, 6924, 3481, 3483, 3486, 2577, 2665, 10452, 10454, 10456, 9470, 2661, 10450, 10446, 10448, 1037, 14595, 14603, 1050, 23679, 23680, 23681, 23682, 23683, 23684, 23685, 23686, 23687, 23688, 23689, 23690, 23691, 23692, 23693, 23694, 23695, 23696, 23697, 23698, 23699, 23700, 1040, 1042, 1044, 1046, 1048, 1050, 1053, 1055, 1057, 11732, 3105, 1712, 1704, 1706, 1079, 1127, 6585, 6570, }; //Other ids go in there as well player.getInventory().deleteItem(6199, 1); for (int i = 0; i < RandomItems.length; i++) player.getInventory().addItem(RandomItems[i], 1); player.getPackets().sendGameMessage("You've recieved an item from the Mystery Box!"); return; } if (itemId == 952) {// spade player.resetWalkSteps(); if (Barrows.digToBrother(player)) return; player.setNextAnimation(new Animation(830)); player.getPackets().sendGameMessage("You find nothing."); return; } if (HerbCleaning.clean(player, item, slotId)) return; Bone bone = Bone.forId(itemId); if (bone != null) { Bone.bury(player, slotId); return; } if (Magic.useTabTeleport(player, itemId)) return; if (itemId == AncientEffigies.SATED_ANCIENT_EFFIGY || itemId == AncientEffigies.GORGED_ANCIENT_EFFIGY || itemId == AncientEffigies.NOURISHED_ANCIENT_EFFIGY || itemId == AncientEffigies.STARVED_ANCIENT_EFFIGY) player.getDialogueManager().startDialogue("AncientEffigiesD", itemId); else if (itemId == 4155) player.getDialogueManager().startDialogue("EnchantedGemDialouge"); else if (itemId == 1856) {// Information Book player.getInterfaceManager().sendInterface(275); player.getPackets() .sendIComponentText(275, 2, Settings.SERVER_NAME); player.getPackets().sendIComponentText(275, 16, "Welcome to " + Settings.SERVER_NAME + "."); player.getPackets().sendIComponentText(275, 17, "If want some an item use command ::item id."); player.getPackets().sendIComponentText(275, 18, "If you don't have an item list you can find ids"); player.getPackets().sendIComponentText(275, 19, "at http://itemdb.biz"); player.getPackets().sendIComponentText(275, 20, "You can change your prayers and spells at home."); player.getPackets().sendIComponentText(275, 21, "If you need any help, do ::ticket. (Don't abuse it)"); player.getPackets().sendIComponentText(275, 22, "at start of your message on public chat."); player.getPackets().sendIComponentText(275, 22, "By the way you can compare your ::score with your mates."); player.getPackets().sendIComponentText(275, 23, "Oh and ye, don't forget to ::vote and respect rules."); player.getPackets().sendIComponentText(275, 24, ""); player.getPackets().sendIComponentText(275, 25, "Forums: " + Settings.WEBSITE_LINK); player.getPackets().sendIComponentText(275, 26, ""); player.getPackets().sendIComponentText(275, 27, "Enjoy your time on " + Settings.SERVER_NAME + "."); player.getPackets().sendIComponentText(275, 28, "<img=1> Staff Team"); player.getPackets().sendIComponentText(275, 29, ""); player.getPackets().sendIComponentText(275, 30, ""); player.getPackets().sendIComponentText(275, 14, "<u>Visit Website</u>"); for (int i = 31; i < 300; i++) player.getPackets().sendIComponentText(275, i, ""); } else if (itemId == HunterEquipment.BOX.getId()) // almost done player.getActionManager().setSkill(new Hunter(HunterEquipment.BOX)); else if (itemId == HunterEquipment.BRID_SNARE.getId()) player.getActionManager().setSkill( new Hunter(HunterEquipment.BRID_SNARE)); if (Settings.DEBUG) Logger.log("ItemHandler", "Item Select:" + itemId + ", Slot Id:" + slotId); } /* * returns the other */ public static Item contains(int id1, Item item1, Item item2) { if (item1.getId() == id1) return item2; if (item2.getId() == id1) return item1; return null; } public static boolean contains(int id1, int id2, Item... items) { boolean containsId1 = false; boolean containsId2 = false; for (Item item : items) { if (item.getId() == id1) containsId1 = true; else if (item.getId() == id2) containsId2 = true; } return containsId1 && containsId2; } public static void handleItemOnItem(final Player player, InputStream stream) { int interfaceId = stream.readIntV1() >> 16; int itemUsedId = stream.readUnsignedShort128(); int fromSlot = stream.readUnsignedShortLE128(); int interfaceId2 = stream.readIntV2() >> 16; int itemUsedWithId = stream.readUnsignedShort128(); int toSlot = stream.readUnsignedShortLE(); if ((interfaceId2 == 747 || interfaceId2 == 662) && interfaceId == Inventory.INVENTORY_INTERFACE) { if (player.getFamiliar() != null) { player.getFamiliar().setSpecial(true); if (player.getFamiliar().getSpecialAttack() == SpecialAttack.ITEM) { if (player.getFamiliar().hasSpecialOn()) player.getFamiliar().submitSpecial(toSlot); } } return; } if (interfaceId == Inventory.INVENTORY_INTERFACE && interfaceId == interfaceId2 && !player.getInterfaceManager().containsInventoryInter()) { if (toSlot >= 28 || fromSlot >= 28) return; Item usedWith = player.getInventory().getItem(toSlot); Item itemUsed = player.getInventory().getItem(fromSlot); if (itemUsed == null || usedWith == null || itemUsed.getId() != itemUsedId || usedWith.getId() != itemUsedWithId) return; player.stopAll(); if (!player.getControlerManager().canUseItemOnItem(itemUsed, usedWith)) return; Fletch fletch = Fletching.isFletching(usedWith, itemUsed); if (fletch != null) { player.getDialogueManager().startDialogue("FletchingD", fletch); return; } int herblore = Herblore.isHerbloreSkill(itemUsed, usedWith); if (herblore > -1) { player.getDialogueManager().startDialogue("HerbloreD", herblore, itemUsed, usedWith); return; } if (itemUsed.getId() == LeatherCrafting.NEEDLE.getId() || usedWith.getId() == LeatherCrafting.NEEDLE.getId()) { if (LeatherCrafting .handleItemOnItem(player, itemUsed, usedWith)) { return; } } Sets set = ArmourSets.getArmourSet(itemUsedId, itemUsedWithId); if (set != null) { ArmourSets.exchangeSets(player, set); return; } ItemOnItem itemOnItem = ItemOnItem.forId(itemUsedId); if (itemOnItem != null) { if (itemUsedWithId == itemOnItem.getItem2()) ItemOnItemHandler.handleItemOnItem(player, itemOnItem, usedWith.getId(), itemUsed.getId()); return; } if (Firemaking.isFiremaking(player, itemUsed, usedWith)) return; else if (contains(1755, Gem.OPAL.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.OPAL); else if (contains(1755, Gem.JADE.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.JADE); else if (contains(1755, Gem.RED_TOPAZ.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.RED_TOPAZ); else if (contains(1755, Gem.SAPPHIRE.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.SAPPHIRE); else if (contains(1755, Gem.EMERALD.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.EMERALD); else if (contains(1755, Gem.RUBY.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.RUBY); else if (contains(1755, Gem.DIAMOND.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.DIAMOND); else if (contains(1755, Gem.DRAGONSTONE.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.DRAGONSTONE); else if (contains(1755, Gem.ONYX.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.ONYX); else player.getPackets().sendGameMessage( "Nothing interesting happens."); if (Settings.DEBUG) Logger.log("ItemHandler", "Used:" + itemUsed.getId() + ", With:" + usedWith.getId()); } } public static void handleItemOption3(Player player, int slotId, int itemId, Item item) { long time = Utils.currentTimeMillis(); if (player.getStopDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); if (itemId == 20767 || itemId == 20769 || itemId == 20771) SkillCapeCustomizer.startCustomizing(player, itemId); else if (Equipment.getItemSlot(itemId) == Equipment.SLOT_AURA) player.getAuraManager().sendTimeRemaining(itemId); } public static void handleItemOption4(Player player, int slotId, int itemId, Item item) { System.out.println("Option 4"); } public static void handleItemOption5(Player player, int slotId, int itemId, Item item) { System.out.println("Option 5"); } public static void handleItemOption6(Player player, int slotId, int itemId, Item item) { long time = Utils.currentTimeMillis(); if (player.getStopDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); Pouches pouches = Pouches.forId(itemId); if (pouches != null) Summoning.spawnFamiliar(player, pouches); else if (itemId == 1438) Runecrafting.locate(player, 3127, 3405); else if (itemId == 1440) Runecrafting.locate(player, 3306, 3474); else if (itemId == 1442) Runecrafting.locate(player, 3313, 3255); else if (itemId == 1444) Runecrafting.locate(player, 3185, 3165); else if (itemId == 1446) Runecrafting.locate(player, 3053, 3445); else if (itemId == 1448) Runecrafting.locate(player, 2982, 3514); else if (itemId <= 1712 && itemId >= 1706 || itemId >= 10354 && itemId <= 10362) player.getDialogueManager().startDialogue("Transportation", "Edgeville", new WorldTile(3087, 3496, 0), "Karamja", new WorldTile(2918, 3176, 0), "Draynor Village", new WorldTile(3105, 3251, 0), "Al Kharid", new WorldTile(3293, 3163, 0), itemId); else if (itemId == 1704 || itemId == 10352) player.getPackets() .sendGameMessage( "The amulet has ran out of charges. You need to recharge it if you wish it use it once more."); else if (itemId >= 3853 && itemId <= 3867) player.getDialogueManager().startDialogue("Transportation", "Burthrope Games Room", new WorldTile(2880, 3559, 0), "Barbarian Outpost", new WorldTile(2519, 3571, 0), "Gamers' Grotto", new WorldTile(2970, 9679, 0), "Corporeal Beast", new WorldTile(2886, 4377, 0), itemId); } public static void handleItemOption7(Player player, int slotId, int itemId, Item item) { long time = System.currentTimeMillis(); if (player.getStopDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); if (item.getDefinitions().isDestroyItem()) { player.getDialogueManager().startDialogue("DestroyItemOption", new Object[] { Integer.valueOf(slotId), item }); return; } if (player.getCharges().degradeCompletly(item)) { return; } /** * Pets */ switch (itemId) { case 12196:// BullDog Puppy if (player.getPet() != null) { player.sendMessage("You already have a pet spawned, please dissmis it to spawn another."); return; } player.setPetId(12196); new Pets(6969, player, new WorldTile(player.getX() + 1, player.getY() + 1, player.getPlane()), 0, false); player.getInventory().deleteItem(slotId, item); return; case 21512:// Baby jad. if (player.getPet() != null) { player.sendMessage("You already have a pet spawned, please dissmis it to spawn another."); return; } player.setPetId(21512); new Pets(3604, player, new WorldTile(player.getX() + 1, player.getY() + 1, player.getPlane()), 0, false); player.getInventory().deleteItem(slotId, item); return; case 1555:// cat if (player.getPet() != null) { player.sendMessage("You already have a pet spawned, please dissmis it to spawn another."); return; } player.setPetId(1555); new Pets(3604, player, new WorldTile(player.getX() + 1, player.getY() + 1, player.getPlane()), 0, false); player.getInventory().deleteItem(slotId, item); return; case 22992: if (!player.isDonator()) { player.sendMessage("Only donators can use this pet, sorry!"); return; } player.setPetId(22992); new Pets(14832, player, new WorldTile(player.getX() + 1, player.getY() + 1, player.getPlane()), 0, false); player.getInventory().deleteItem(slotId, item); return; default: World.addGroundItem(item, new WorldTile(player), player, false, 180, true); player.getInventory().deleteItem(slotId, item); player.getPackets().sendSound(2739, 0, 1); return; } } }[/code] ----------------------------------------------------------- 1 help met out pls!1
  17. Here is me InventoryOptionHandler.java --------------------------------- [code]package com.rs.net.decoders.handlers; import java.util.List; import com.rs.Settings; import com.rs.cores.WorldThread; import com.rs.game.ForceTalk; import com.rs.game.Animation; import com.rs.game.World; import com.rs.game.WorldTile; import com.rs.game.WorldObject; import com.rs.game.item.Item; import com.rs.game.npc.NPC; import com.rs.game.player.controlers.Barrows; import com.rs.game.npc.familiar.Familiar.SpecialAttack; import com.rs.game.player.Equipment; import com.rs.game.player.Inventory; import com.rs.game.player.Pets; import com.rs.game.player.Player; import com.rs.game.player.actions.Firemaking; import com.rs.game.player.actions.Fletching; import com.rs.game.player.actions.Fletching.Fletch; import com.rs.game.player.actions.GemCutting; import com.rs.game.player.actions.GemCutting.Gem; import com.rs.game.player.actions.HerbCleaning; import com.rs.game.player.actions.Herblore; import com.rs.game.player.actions.Hunter; import com.rs.game.player.actions.Hunter.HunterEquipment; import com.rs.game.player.actions.LeatherCrafting; import com.rs.game.player.actions.Summoning; import com.rs.game.player.actions.Summoning.Pouches; import com.rs.game.player.content.AncientEffigies; import com.rs.game.player.content.ArmourSets; import com.rs.game.player.content.ArmourSets.Sets; import com.rs.game.player.content.Burying; import com.rs.game.player.content.Foods; import com.rs.game.player.content.ItemOnItemHandler; import com.rs.game.player.content.ItemOnItemHandler.ItemOnItem; import com.rs.game.player.content.Magic; import com.rs.game.player.content.Pots; import com.rs.game.player.content.Runecrafting; import com.rs.game.player.content.SkillCapeCustomizer; import com.rs.game.player.controlers.Barrows; import com.rs.game.player.content.Burying; import com.rs.game.player.content.Burying.Bone; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; import com.rs.game.Graphics; import com.rs.game.minigames.DiceGame; import com.rs.io.InputStream; import com.rs.utils.Logger; import com.rs.utils.Utils; public class InventoryOptionsHandler { public static void handleItemOption2(final Player player, final int slotId, final int itemId, Item item) { if (Firemaking.isFiremaking(player, itemId)) return; if (itemId >= 5509 && itemId <= 5514) { int pouch = -1; if (itemId == 5509) pouch = 0; if (itemId == 5510) pouch = 1; if (itemId == 5512) pouch = 2; if (itemId == 5514) pouch = 3; Runecrafting.emptyPouch(player, pouch); } else if (itemId == 15098) { DiceGame.rollDice8(player); player.setNextAnimation(new Animation(11900)); player.setNextGraphics(new Graphics(2075)); return; } else { if (player.isEquipDisabled()) return; long passedTime = Utils.currentTimeMillis() - WorldThread.LAST_CYCLE_CTM; WorldTasksManager.schedule(new WorldTask() { @Override public void run() { List<Integer> slots = player.getSwitchItemCache(); int[] slot = new int[slots.size()]; for (int i = 0; i < slot.length; i++) slot[i] = slots.get(i); player.getSwitchItemCache().clear(); ButtonHandler.sendWear(player, slot); player.stopAll(false); } }, passedTime >= 600 ? 0 : passedTime > 400 ? 1 : 0);// switching // one item, // if delay // too close // to next // ticket, // delay so // wont // instant if (player.getSwitchItemCache().contains(slotId)) return; player.getSwitchItemCache().add(slotId); } } public static void handleItemOption1(Player player, final int slotId, final int itemId, Item item) { long time = Utils.currentTimeMillis(); if (player.getStopDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); if (Foods.eat(player, item, slotId)) return; if (itemId == 15098) { DiceGame.rollDice8(player); player.setNextAnimation(new Animation(11900)); player.setNextGraphics(new Graphics(2075)); return; }; if (Burying.bury(player, slotId)) return; if (itemId == 15098) { // DiceGame.handleItem(player, Rolls.PRIVATE_ROLL); return; } if (itemId == 24143) { player.sendMessage("<692E15>You have a Barrows Kill Count of " + player.getBarrowsKillCount() + "."); return; } if (!player.getControlerManager().handleItemOption1(player, slotId, itemId, item)) return; if (Pots.pot(player, item, slotId)) return; if (itemId >= 5509 && itemId <= 5514) { int pouch = -1; if (itemId == 5509) pouch = 0; if (itemId == 5510) pouch = 1; if (itemId == 5512) pouch = 2; if (itemId == 5514) pouch = 3; Runecrafting.fillPouch(player, pouch); return; } if (itemId == 952) {// spade player.resetWalkSteps(); if (Barrows.digToBrother(player)) return; player.setNextAnimation(new Animation(830)); player.getPackets().sendGameMessage("You find nothing."); return; } if (itemId == 20718) {// confetti player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(1341)); return; } if (itemId == 19475) {// Nardah player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(2582, 3481, 0)); player.getInventory().deleteItem(19475, 1); return; } if (itemId == 19476) {// Bandit Camp player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(3176, 2987, 0)); player.getInventory().deleteItem(19476, 1); return; } if (itemId == 19477) {// Miscellania player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(2509, 3845, 0)); player.getInventory().deleteItem(19477, 1); return; } if (itemId == 19478) {// Phoenix Lair player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(3359, 2910, 0)); player.getInventory().deleteItem(19478, 1); return; } if (itemId == 19479) {// Tai Bwo Wannai player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(2803, 3065, 0)); player.getInventory().deleteItem(19479, 1); return; } if (itemId == 19480) {// Lumber Yard player.setNextAnimation(new Animation(9597)); player.setNextGraphics(new Graphics(1680)); player.setNextWorldTile(new WorldTile(3308, 3491, 0)); player.getInventory().deleteItem(19480, 1); return; } if (itemId == 22308) {// impious ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(56)); player.getSkills().addXp(5, 2500); player.getInventory().deleteItem(22308, 1); player.getPackets().sendGameMessage("You spread the Impious Ashes."); return; } if (itemId == 20264) {// impious ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(56)); player.getSkills().addXp(5, 2500); player.getInventory().deleteItem(20264, 1); player.getPackets().sendGameMessage("You spread the Impious Ashes."); return; } if (itemId == 22310) {// accursed ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(47)); player.getSkills().addXp(5, 3700); player.getInventory().deleteItem(22310, 1); player.getPackets().sendGameMessage("You spread the Accursed Ashes."); return; } if (itemId == 20266) {// accursed ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(47)); player.getSkills().addXp(5, 3700); player.getInventory().deleteItem(20266, 1); player.getPackets().sendGameMessage("You spread the Accursed Ashes."); return; } if (itemId == 22312) {// infernal ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(40)); player.getSkills().addXp(5, 5000); player.getInventory().deleteItem(22312, 1); player.getPackets().sendGameMessage("You spread the Infernal Ashes."); return; } if (itemId == 20268) {// infernal ashes player.setNextAnimation(new Animation(10952)); player.setNextGraphics(new Graphics(40)); player.getSkills().addXp(5, 5000); player.getInventory().deleteItem(20268, 1); player.getPackets().sendGameMessage("You spread the Infernal Ashes."); return; } if (itemId == 299) { final WorldTile tile = new WorldTile(player); if (!player.addWalkSteps(player.getX() - 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX() + 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX(), player.getY() + 1, 1)) player.addWalkSteps(player.getX(), player.getY() - 1, 1); player.getInventory().deleteItem(299, 1); //World.spawnObject(new WorldObject(Utils.random(2981, 2983), 10, -1, player.getX(), player.getY(), player.getPlane()), true); World.spawnTempGroundObject(new WorldObject(Utils.random(2981, 2983), 10, 0, tile.getX(), tile.getY(), tile.getPlane()), 299, 35000); } if (itemId == 20721) {// firework player.setNextAnimation(new Animation(2286)); return; } if (itemId == 20722) {// firecracker player.setNextAnimation(new Animation(2286)); return; } if (itemId == 21250) {// pet rock player.setNextAnimation(new Animation(1333)); return; } if (itemId == 21252) {// pet rock player.setNextAnimation(new Animation(1333)); return; } if (itemId == 21254) {// pet rock player.setNextAnimation(new Animation(1333)); return; } if (itemId == 21256) {// pet rock player.setNextAnimation(new Animation(1333)); return; } if (itemId == 23745) {// small con lamp player.getSkills().addXp(22, 50000); player.getInventory().deleteItem(23745, 1); return; } if (itemId == 23746) {// medium con lamp player.getSkills().addXp(22, 75000); player.getInventory().deleteItem(23746, 1); return; } if (itemId == 23747) {// large con lamp player.getSkills().addXp(22, 125000); player.getInventory().deleteItem(23747, 1); return; } if (itemId == 23748) {// huge con lamp player.getSkills().addXp(22, 250000); player.getInventory().deleteItem(23748, 1); return; } if (itemId == 23778) {// small slayer lamp player.getSkills().addXp(18, 50000); player.getInventory().deleteItem(23778, 1); return; } if (itemId == 23779) {// medium slayer lamp player.getSkills().addXp(18, 75000); player.getInventory().deleteItem(23779, 1); return; } if (itemId == 23780) {// large slayer lamp player.getSkills().addXp(18, 125000); player.getInventory().deleteItem(23780, 1); return; } if (itemId == 23781) {// huge slayer lamp player.getSkills().addXp(18, 250000); player.getInventory().deleteItem(23781, 1); return; } if (itemId == 23810) {// small farming lamp player.getSkills().addXp(19, 50000); player.getInventory().deleteItem(23810, 1); return; } if (itemId == 23811) {// medium farming lamp player.getSkills().addXp(19, 75000); player.getInventory().deleteItem(23811, 1); return; } if (itemId == 23812) {// large farming lamp player.getSkills().addXp(19, 125000); player.getInventory().deleteItem(23812, 1); return; } if (itemId == 23813) {// huge farming lamp player.getSkills().addXp(19, 250000); player.getInventory().deleteItem(23813, 1); return; } if (itemId == 23814) {// small summoning lamp player.getSkills().addXp(23, 50000); player.getInventory().deleteItem(23814, 1); return; } if (itemId == 23815) {// medium summoning lamp player.getSkills().addXp(23, 75000); player.getInventory().deleteItem(23815, 1); return; } if (itemId == 23816) {// large summoning lamp player.getSkills().addXp(23, 125000); player.getInventory().deleteItem(23816, 1); return; } if (itemId == 23817) {// huge summoning lamp player.getSkills().addXp(23, 250000); player.getInventory().deleteItem(23817, 1); return; } if (itemId == 20667) {// Vecna skull player.setNextAnimation(new Animation(725)); return; } if (itemId == 6199) { int[] RandomItems = {11732, 4151, 11283, 385, 2347, 1712, 1712, 6585, 1712, 6585, 11732, 11732, 3105, 6918, 6920, 6922, 6924, 6570, 10828, 1079, 1127, 20072, 20072, 8850, 10551, 10548, 4087, 15332, 15332, 4712, 4714, 4716, 4718, 4720, 4722, 4724, 4726, 4728, 4730, 4732, 4734, 4736, 4738, 4745, 4747, 4749, 4751, 4753, 4755, 4757, 4759, 6585, 5698, 1704, 7378, 7370, 7390, 6737, 6731, 6733, 11716, 6199, 6199, 7386, 7394, 11846, 11850, 11852, 2673, 2669, 2671, 6889, 6914, 2653, 2655, 2657, 1837, 10330, 11848, 11854, 11856, 10332, 10334, 10336, 542, 4087, 4585, 6568, 6568, 10338, 10340, 10342, 10344, 10346, 10348, 10350, 10352, 2581, 13736, 6916, 6918, 6920, 6922, 6924, 3481, 3483, 3486, 2577, 2665, 10452, 10454, 10456, 9470, 2661, 10450, 10446, 10448, 1037, 14595, 14603, 1050, 23679, 23680, 23681, 23682, 23683, 23684, 23685, 23686, 23687, 23688, 23689, 23690, 23691, 23692, 23693, 23694, 23695, 23696, 23697, 23698, 23699, 23700, 1040, 1042, 1044, 1046, 1048, 1050, 1053, 1055, 1057, 11732, 3105, 1712, 1704, 1706, 1079, 1127, 6585, 6570, }; //Other ids go in there as well player.getInventory().deleteItem(6199, 1); for (int i = 0; i < RandomItems.length; i++) player.getInventory().addItem(RandomItems[i], 1); player.getPackets().sendGameMessage("You've recieved an item from the Mystery Box!"); return; } if (itemId == 952) {// spade player.resetWalkSteps(); if (Barrows.digToBrother(player)) return; player.setNextAnimation(new Animation(830)); player.getPackets().sendGameMessage("You find nothing."); return; } if (HerbCleaning.clean(player, item, slotId)) return; Bone bone = Bone.forId(itemId); if (bone != null) { Bone.bury(player, slotId); return; } if (Magic.useTabTeleport(player, itemId)) return; if (itemId == AncientEffigies.SATED_ANCIENT_EFFIGY || itemId == AncientEffigies.GORGED_ANCIENT_EFFIGY || itemId == AncientEffigies.NOURISHED_ANCIENT_EFFIGY || itemId == AncientEffigies.STARVED_ANCIENT_EFFIGY) player.getDialogueManager().startDialogue("AncientEffigiesD", itemId); else if (itemId == 4155) player.getDialogueManager().startDialogue("EnchantedGemDialouge"); else if (itemId == 1856) {// Information Book player.getInterfaceManager().sendInterface(275); player.getPackets() .sendIComponentText(275, 2, Settings.SERVER_NAME); player.getPackets().sendIComponentText(275, 16, "Welcome to " + Settings.SERVER_NAME + "."); player.getPackets().sendIComponentText(275, 17, "If want some an item use command ::item id."); player.getPackets().sendIComponentText(275, 18, "If you don't have an item list you can find ids"); player.getPackets().sendIComponentText(275, 19, "at http://itemdb.biz"); player.getPackets().sendIComponentText(275, 20, "You can change your prayers and spells at home."); player.getPackets().sendIComponentText(275, 21, "If you need any help, do ::ticket. (Don't abuse it)"); player.getPackets().sendIComponentText(275, 22, "at start of your message on public chat."); player.getPackets().sendIComponentText(275, 22, "By the way you can compare your ::score with your mates."); player.getPackets().sendIComponentText(275, 23, "Oh and ye, don't forget to ::vote and respect rules."); player.getPackets().sendIComponentText(275, 24, ""); player.getPackets().sendIComponentText(275, 25, "Forums: " + Settings.WEBSITE_LINK); player.getPackets().sendIComponentText(275, 26, ""); player.getPackets().sendIComponentText(275, 27, "Enjoy your time on " + Settings.SERVER_NAME + "."); player.getPackets().sendIComponentText(275, 28, "<img=1> Staff Team"); player.getPackets().sendIComponentText(275, 29, ""); player.getPackets().sendIComponentText(275, 30, ""); player.getPackets().sendIComponentText(275, 14, "<u>Visit Website</u>"); for (int i = 31; i < 300; i++) player.getPackets().sendIComponentText(275, i, ""); } else if (itemId == HunterEquipment.BOX.getId()) // almost done player.getActionManager().setSkill(new Hunter(HunterEquipment.BOX)); else if (itemId == HunterEquipment.BRID_SNARE.getId()) player.getActionManager().setSkill( new Hunter(HunterEquipment.BRID_SNARE)); if (Settings.DEBUG) Logger.log("ItemHandler", "Item Select:" + itemId + ", Slot Id:" + slotId); } /* * returns the other */ public static Item contains(int id1, Item item1, Item item2) { if (item1.getId() == id1) return item2; if (item2.getId() == id1) return item1; return null; } public static boolean contains(int id1, int id2, Item... items) { boolean containsId1 = false; boolean containsId2 = false; for (Item item : items) { if (item.getId() == id1) containsId1 = true; else if (item.getId() == id2) containsId2 = true; } return containsId1 && containsId2; } public static void handleItemOnItem(final Player player, InputStream stream) { int interfaceId = stream.readIntV1() >> 16; int itemUsedId = stream.readUnsignedShort128(); int fromSlot = stream.readUnsignedShortLE128(); int interfaceId2 = stream.readIntV2() >> 16; int itemUsedWithId = stream.readUnsignedShort128(); int toSlot = stream.readUnsignedShortLE(); if ((interfaceId2 == 747 || interfaceId2 == 662) && interfaceId == Inventory.INVENTORY_INTERFACE) { if (player.getFamiliar() != null) { player.getFamiliar().setSpecial(true); if (player.getFamiliar().getSpecialAttack() == SpecialAttack.ITEM) { if (player.getFamiliar().hasSpecialOn()) player.getFamiliar().submitSpecial(toSlot); } } return; } if (interfaceId == Inventory.INVENTORY_INTERFACE && interfaceId == interfaceId2 && !player.getInterfaceManager().containsInventoryInter()) { if (toSlot >= 28 || fromSlot >= 28) return; Item usedWith = player.getInventory().getItem(toSlot); Item itemUsed = player.getInventory().getItem(fromSlot); if (itemUsed == null || usedWith == null || itemUsed.getId() != itemUsedId || usedWith.getId() != itemUsedWithId) return; player.stopAll(); if (!player.getControlerManager().canUseItemOnItem(itemUsed, usedWith)) return; Fletch fletch = Fletching.isFletching(usedWith, itemUsed); if (fletch != null) { player.getDialogueManager().startDialogue("FletchingD", fletch); return; } int herblore = Herblore.isHerbloreSkill(itemUsed, usedWith); if (herblore > -1) { player.getDialogueManager().startDialogue("HerbloreD", herblore, itemUsed, usedWith); return; } if (itemUsed.getId() == LeatherCrafting.NEEDLE.getId() || usedWith.getId() == LeatherCrafting.NEEDLE.getId()) { if (LeatherCrafting .handleItemOnItem(player, itemUsed, usedWith)) { return; } } Sets set = ArmourSets.getArmourSet(itemUsedId, itemUsedWithId); if (set != null) { ArmourSets.exchangeSets(player, set); return; } ItemOnItem itemOnItem = ItemOnItem.forId(itemUsedId); if (itemOnItem != null) { if (itemUsedWithId == itemOnItem.getItem2()) ItemOnItemHandler.handleItemOnItem(player, itemOnItem, usedWith.getId(), itemUsed.getId()); return; } if (Firemaking.isFiremaking(player, itemUsed, usedWith)) return; else if (contains(1755, Gem.OPAL.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.OPAL); else if (contains(1755, Gem.JADE.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.JADE); else if (contains(1755, Gem.RED_TOPAZ.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.RED_TOPAZ); else if (contains(1755, Gem.SAPPHIRE.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.SAPPHIRE); else if (contains(1755, Gem.EMERALD.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.EMERALD); else if (contains(1755, Gem.RUBY.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.RUBY); else if (contains(1755, Gem.DIAMOND.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.DIAMOND); else if (contains(1755, Gem.DRAGONSTONE.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.DRAGONSTONE); else if (contains(1755, Gem.ONYX.getUncut(), itemUsed, usedWith)) GemCutting.cut(player, Gem.ONYX); else player.getPackets().sendGameMessage( "Nothing interesting happens."); if (Settings.DEBUG) Logger.log("ItemHandler", "Used:" + itemUsed.getId() + ", With:" + usedWith.getId()); } } public static void handleItemOption3(Player player, int slotId, int itemId, Item item) { long time = Utils.currentTimeMillis(); if (player.getStopDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); if (itemId == 20767 || itemId == 20769 || itemId == 20771) SkillCapeCustomizer.startCustomizing(player, itemId); else if (Equipment.getItemSlot(itemId) == Equipment.SLOT_AURA) player.getAuraManager().sendTimeRemaining(itemId); } public static void handleItemOption4(Player player, int slotId, int itemId, Item item) { System.out.println("Option 4"); } public static void handleItemOption5(Player player, int slotId, int itemId, Item item) { System.out.println("Option 5"); } public static void handleItemOption6(Player player, int slotId, int itemId, Item item) { long time = Utils.currentTimeMillis(); if (player.getStopDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); Pouches pouches = Pouches.forId(itemId); if (pouches != null) Summoning.spawnFamiliar(player, pouches); else if (itemId == 1438) Runecrafting.locate(player, 3127, 3405); else if (itemId == 1440) Runecrafting.locate(player, 3306, 3474); else if (itemId == 1442) Runecrafting.locate(player, 3313, 3255); else if (itemId == 1444) Runecrafting.locate(player, 3185, 3165); else if (itemId == 1446) Runecrafting.locate(player, 3053, 3445); else if (itemId == 1448) Runecrafting.locate(player, 2982, 3514); else if (itemId <= 1712 && itemId >= 1706 || itemId >= 10354 && itemId <= 10362) player.getDialogueManager().startDialogue("Transportation", "Edgeville", new WorldTile(3087, 3496, 0), "Karamja", new WorldTile(2918, 3176, 0), "Draynor Village", new WorldTile(3105, 3251, 0), "Al Kharid", new WorldTile(3293, 3163, 0), itemId); else if (itemId == 1704 || itemId == 10352) player.getPackets() .sendGameMessage( "The amulet has ran out of charges. You need to recharge it if you wish it use it once more."); else if (itemId >= 3853 && itemId <= 3867) player.getDialogueManager().startDialogue("Transportation", "Burthrope Games Room", new WorldTile(2880, 3559, 0), "Barbarian Outpost", new WorldTile(2519, 3571, 0), "Gamers' Grotto", new WorldTile(2970, 9679, 0), "Corporeal Beast", new WorldTile(2886, 4377, 0), itemId); } public static void handleItemOption7(Player player, int slotId, int itemId, Item item) { long time = System.currentTimeMillis(); if (player.getStopDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); if (item.getDefinitions().isDestroyItem()) { player.getDialogueManager().startDialogue("DestroyItemOption", new Object[] { Integer.valueOf(slotId), item }); return; } if (player.getCharges().degradeCompletly(item)) { return; } /** * Pets */ switch (itemId) { case 12196:// BullDog Puppy if (player.getPet() != null) { player.sendMessage("You already have a pet spawned, please dissmis it to spawn another."); return; } player.setPetId(12196); new Pets(6969, player, new WorldTile(player.getX() + 1, player.getY() + 1, player.getPlane()), 0, false); player.getInventory().deleteItem(slotId, item); return; case 21512:// Baby jad. if (player.getPet() != null) { player.sendMessage("You already have a pet spawned, please dissmis it to spawn another."); return; } player.setPetId(21512); new Pets(3604, player, new WorldTile(player.getX() + 1, player.getY() + 1, player.getPlane()), 0, false); player.getInventory().deleteItem(slotId, item); return; case 1555:// cat if (player.getPet() != null) { player.sendMessage("You already have a pet spawned, please dissmis it to spawn another."); return; } player.setPetId(1555); new Pets(3604, player, new WorldTile(player.getX() + 1, player.getY() + 1, player.getPlane()), 0, false); player.getInventory().deleteItem(slotId, item); return; case 22992: if (!player.isDonator()) { player.sendMessage("Only donators can use this pet, sorry!"); return; } player.setPetId(22992); new Pets(14832, player, new WorldTile(player.getX() + 1, player.getY() + 1, player.getPlane()), 0, false); player.getInventory().deleteItem(slotId, item); return; default: World.addGroundItem(item, new WorldTile(player), player, false, 180, true); player.getInventory().deleteItem(slotId, item); player.getPackets().sendSound(2739, 0, 1); return; } } }[/code] ------------------------------------------------- if someone could help me out i would be very happy!
  18. how can i add a roll option to me dice bag? Any help would be appericated!
  19. Alright, so I noticed that when you try and buy 500 items from a shop it says not enough space, rather than it giving you the amount for your free slots. So, I edited my shophandler so it would buy that much: [code] int itemid = returnItemId(p.shopid, buttonId2); long value = p.getInventory().getFreeSlots() * GameEngine.prices.getMaximumPrice(itemid); case 173: /* Buy 500. fixed by Sageofmali*/ if(p.getInventory().getFreeSlots() > 500 && p.getInventory().numberOf(995) >= value) { buystock(p, itemid, 500); } else if(p.getInventory().getFreeSlots() <= 500 && p.getInventory().numberOf(995) >= value) { buystock(p, itemid, p.getInventory().getFreeSlots()); return; } break;[/code] It works fine until you have one free space and you buy 500 of a stackable item, it buys 2147m of it without having to pay for it. Could someone possibly help me fix this?
  20. You should implement a select all feature for snippets (code bb code). Just a simple click option next to code that highlights all in the selection. [QUOTE] [SIZE=2]Code: [URL="http://runelocus.com/forums/"]Select All[/URL][/SIZE] [SIZE=1]public static void main(String args[]) { System.out.println("Hello world"); }[/SIZE] [/QUOTE] You get the idea. Surprised we don't have this, makes things so much easier :L
  21. Hi! When i right click an item in my shops, i see that the max i can buy at once is 10 How do i change that To 500? Thanks! Oh, i'm using DELTA
  22. Hey guys, So I'm trying to add summoning, and I haven't really had to deal with this at all. I was wondering if anyone knew how to do "option-checking" for the left-click summoning interface (or any interface for that matter)? If so, could someone post a link to a thread on how to do this or post a guide below on how to do this? [img]http://i52.tinypic.com/4rbwaf.png[/img] Thanks for reading.
  23. Please could someone help me that has experience with these servers? i need to fix the accept trade option it wont let me. but it allows me to decline
  24. runehero

    [PI] Option Screen

    Hi. How do you make it where if a player clicks object 13619, they get a option screen like this: [IMG]http://i41.tinypic.com/2m7de0j.jpg[/IMG] And where would I put the code? Is it in ClickObject.java or ActionHandler.java? Thanks for the help!
  25. I've been trying to figure out how to make it so when people right click on Kuradal and choose 'rewards' it will open the slayer rewards interface. Can anyone help me? I'm on a 562 if that helps. Edit: Nevermind this has been solved.
×