Jump to content

Search the Community

Showing results for tags 'roll'.



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 7 results

  1. [COLOR="#0000CD"][SIZE=4]This server is nowhere near complete, but I figured I'd show off my very first RSPS I'm working on. I know It's nothing special, but me being new to coding, It's come a long way for a beginner. :D[/SIZE][/COLOR] [SIZE=4][COLOR="#FF0000"]Features: Report Abuse All Skillcapes/Max cape/Comp cape, plus emotes Completionist Cape functions as an Ava's Device Every skill trainable Bosses include: Nex QBD KBD KQ Armadyl Zamorak Bandos (Saradomin is glitched for the moment) Corporeal Beast 100% Dwarf Multi Cannon Donator/VIP Zones Donator Cape Admin+ Cannot trade/drop/etc Fight Caves Fight Kiln Skiller Cape for level 3's with maxed stats 100% Rotten Potato for Administrators Auto-Donate feature Auto-Update Highscores Shooting Stars 50% Random Events[/COLOR][/SIZE] [SPOILER=Pictures][SIZE=5]Full Runespan[/SIZE] [IMG]http://i.imgur.com/EvljqrV.jpg[/IMG] [SIZE=5]Complete Fight Kiln with Crystals, etc.[/SIZE] [IMG]http://i.imgur.com/9nGJxF4.jpg[/IMG] [IMG]http://i.imgur.com/u5OeJ5F.jpg[/IMG] [SIZE=5]Nex[/SIZE] [IMG]http://i.imgur.com/H7FDDIr.jpg[/IMG] [SIZE=5]Full GWD[/SIZE] [IMG]http://i.imgur.com/jPtKmSD.jpg[/IMG] [SIZE=5]All Skills fully functional, including Hunter[/SIZE] [IMG]http://i.imgur.com/6RyezZQ.jpg[/IMG] [SIZE=5]Ganodermic Beasts[/SIZE] [IMG]http://i.imgur.com/cVePhKs.jpg[/IMG] [SIZE=5]Fight Caves[/SIZE] [IMG]http://i.imgur.com/ry6V5Em.jpg[/IMG] [IMG]http://i.imgur.com/W42FTuW.jpg[/IMG] [SIZE=5]100% Working Dwarf Multicannon[/SIZE] [IMG]http://i.imgur.com/TlRrsLd.jpg[/IMG] [SIZE=5]Custom Built VIP Zone[/SIZE] [IMG]http://i.imgur.com/P3NA7A0.jpg[/IMG] [SIZE=5]110% QBD[/SIZE] [IMG]http://i.imgur.com/UcDGT9c.jpg[/IMG] [IMG]http://i.imgur.com/d6rlImX.jpg[/IMG] [IMG]http://i.imgur.com/frUycfp.jpg[/IMG] [IMG]http://i.imgur.com/9yODcEK.jpg[/IMG] [IMG]http://i.imgur.com/dlGzfZd.jpg[/IMG] [IMG]http://i.imgur.com/br4yoo6.jpg[/IMG] [SIZE=5]Corporeal Beast + 100% Damage Soaking[/SIZE] [IMG]http://i.imgur.com/DSYN4JG.jpg[/IMG] [SIZE=5]Fully Functional Summoning Familiars + Special Attacks[/SIZE] [IMG]http://i.imgur.com/32WYeyT.jpg[/IMG] [SIZE=5]Random deep emotional picture for the lels[/SIZE] [IMG]http://i.imgur.com/Fs3rgAk.jpg[/IMG][/SPOILER] [SIZE=6]Thoughts/Comments/Constructive Criticism?[/SIZE]
  2. Go to [url]Http://Google.com[/url]. [You have to have google chrome to do this, another reason google chrome kicks ass] Type in 'Do a Barrel Roll' Your screen will do a barrel roll, post back if you did it. Fuck off if you've done it before.
  3. well i finally added the roll option and it rolls perfectly but got 1 problem when i roll it , it rolls private and not public. i want it like when u roll it comes above the player and not private in the chat. my dicing.java [code]package com.rs.game.player.content; import java.util.Random; import com.rs.game.Animation; import com.rs.game.Graphics; import com.rs.game.player.Player; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; public class Dicing { public static void handleRoll(final Player player, int itemId, boolean friends) { if(friends) { switch(itemId) { case 15086: friendsRoll(player, itemId, 2072, 1, 6); break; case 15088: friendsRoll(player, itemId, 2074, 1, 12); break; case 15090: friendsRoll(player, itemId, 2071, 1, 8); break; case 15092: friendsRoll(player, itemId, 2070, 1, 10); break; case 15094: friendsRoll(player, itemId, 2073, 1, 12); break; case 15096: friendsRoll(player, itemId, 2068, 1, 20); break; case 15098: friendsRoll(player, itemId, 2075, 1, 100); break; case 15100: friendsRoll(player, itemId, 2069, 1, 4); break; } } else { switch(itemId) { case 15086: privateRoll(player, itemId, 2072, 1, 6); break; case 15088: privateRoll(player, itemId, 2074, 1, 12); break; case 15090: privateRoll(player, itemId, 2071, 1, 8); break; case 15092: privateRoll(player, itemId, 2070, 1, 10); break; case 15094: privateRoll(player, itemId, 2073, 1, 12); break; case 15096: privateRoll(player, itemId, 2068, 1, 20); break; case 15098: privateRoll(player, itemId, 2075, 1, 100); break; case 15100: privateRoll(player, itemId, 2069, 1, 4); break; } } } public static void privateRoll(final Player player, final int itemId, int graphic, final int lowest, final int highest) { player.getPackets().sendGameMessage("Rolling...", true); player.getInventory().deleteItem(itemId, 1); player.setNextAnimation(new Animation(11900)); player.setNextGraphics(new Graphics(graphic)); WorldTasksManager.schedule(new WorldTask() { [MENTION=15855]Over[/MENTION]ride public void run() { player.getInventory().addItem(itemId, 1); player.getPackets().sendGameMessage( "You rolled <col=db3535>" + getRandom(lowest, highest) + "</col> on " + diceText(itemId) + " dice.", true); } }, 1); } public static void friendsRoll(final Player player, final int itemId, int graphic, final int lowest, final int highest) { final FriendChatsManager chat = player.getCurrentFriendChat(); if (chat == null) { player.getPackets().sendGameMessage("You need to be in a friend chat to use this option."); return; } player.lock(2); player.getPackets().sendGameMessage("Rolling..."); player.getInventory().deleteItem(itemId, 1); player.setNextAnimation(new Animation(11900)); player.setNextGraphics(new Graphics(graphic)); WorldTasksManager.schedule(new WorldTask() { [MENTION=15855]Over[/MENTION]ride public void run() { player.getInventory().addItem(itemId, 1); chat.sendDiceMessage(player, "Friends Chat channel-mate <col=db3535>" + player.getDisplayName() + "</col> rolled <col=db3535>" + getRandom(lowest, highest) + "</col> on " + diceText(itemId) + " dice."); } }, 1); } public static int getRandom(int lowest, int highest) { Random r = new Random(); if (lowest > highest) { return -1; } long range = (long) highest - (long) lowest + 1; long fraction = (long) (range * r.nextDouble()); int numberRolled = (int) (fraction + lowest); return numberRolled; } public static String diceText(int id) { switch (id) { case 15086: return "a six-sided"; case 15088: return "two six-sided"; case 15090: return "an eight-sided"; case 15092: return "a ten-sided"; case 15094: return "a twelve-sided"; case 15096: return "a a twenty-sided"; case 15098: return "the percentile"; case 15100: return "a four-sided"; } return ""; } public static int getGraphic(int id) { return 0; } }[/code] who could help me figure this out?
  4. 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
  5. 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!
  6. how can i add a roll option to me dice bag? Any help would be appericated!
  7. Fusion`

    Rick Roll

    [video=youtube;BMvnlemlnl8]http://www.youtube.com/watch?v=BMvnlemlnl8[/video]
×