Jump to content

Search the Community

Showing results for tags 'dice'.



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

  1. I do not know if this person has already released a dice code, but here there is one place it under your home teleport command but here you have it [QUOTE] if(cmd[0].equalsIgnoreCase("roll")) { if (!player.isDonator()) { player.getPackets().sendGameMessage("<col=ff0000>You need to be a Donator to use this command."); return true; } final FriendChatsManager fc = player.getCurrentFriendChat(); if (fc == null) { player.getPackets().sendGameMessage("You need to be in a friend chat to use this option."); return false; } player.getPackets().sendGameMessage("Rolling..."); player.setNextGraphics(new Graphics(2075)); player.setNextAnimation(new Animation(11900)); int random = Utils.getRandom(100); int numberRolled = Utils.getRandom(100); player.setNextForceTalk(new ForceTalk("You rolled <col=FF0000>" + numberRolled + "</col> " + "on the percentile dice")); player.getPackets().sendGameMessage("rolled <col=FF0000>" + numberRolled + "</col> " + "on the percentile dice"); fc.sendDiceMessage(player, player.getUsername()+" rolled <col=FF0000>" + numberRolled + "</col> " + "on the percentile dice"); return true; } [/QUOTE] enjoin i hope i help some ppl out p.s: make sure you add it under your command home
  2. danielbrah

    Dice PI 317

    How would I go about making this go to clanchat? [CODE]c.forcedChat("Player "+ Misc.optimizeText(c.playerName) +" rolled a "+ Misc.random(100) +" on the percentile dice.");[/CODE] Right now it just says it over my head.
  3. I have a project insanity source {PI right?}, and everyone wants the dice bag to work, but im not an expert coder, or even ameture. All I do is look, and try to figure out what the fk is happening :) so if anyone could get me a working dice bag (Percentile ( 1-100)) then I would be glad, give a rep+ or whatever it is on this forums, and be happy :p
  4. Hey guys Coder Crypto im currently making a pking server but i was wondering if anyone knows how to make sort of dice permit so only those type of people can dice but i also want them to keep their donator rank. maybe people have a glittery effect around them to show they have a permit if you know how to do it could you please help me because i would really appreciate it add my skype : codercrypto
  5. Hey guy's i no i am meant to use an item definition editor, I just don't no what to change in it? Can some one help me out thank's.
  6. Sylveon

    [PI] Dice Bag [REQ]

    Hi i've been looking for a while and cant seem to track down a 317 Dice Bag model along with the GFX/Anim that is compatible with a 317 PI source or can link me to a thread that would be great. Thanks in advance!
  7. Venge Drop

    Adding Dice 317

    Hello im trying to add dice to my 317 and cant seem to get it fixed, under playercommands in commands.java i add this. [CODE] if(playerCommand.startsWith("dice")){ int random = Misc.random(100); c.forcedChat("[" + c.properName + "] just rolled " + random + "with their dice"); c.sendMessage("You just rolled " + random);//chat Method, clan chat etc }[/CODE] But it doesnt work i type ::dice and commands and everything someone please help.
  8. Hi guys, on matrix how do i makea command like ;;setroll 100 and then my guy rolls a 100 or setroll 20 and my guy rolls a 20, I wanna troll my friend lol. Also is there a way to make it show up in clan chat only?
  9. [CENTER] [url=http://runenova.com][img]http://i45.tinypic.com/2jaxjx3.jpg[/img][/url] [SIZE="1"]Click the image above to join RuneNova.[/SIZE] [SIZE="2"]Protocol: 742 Framework: RSE Server Type: Economic[/SIZE] [b]We are the first real 742 server.[/b] [url]http://www.youtube.com/watch?feature=player_embedded&v=3PC_VHwa6ug[/url] [url=http://runenova.com/play.html][img]http://runenova.com/download.png[/img][/url] [SPOILER="Features"]Flawless switching Summoning Fight Kiln Chaotics Display Names Wolpertinger Overloads [url=http://www.rune-server.org/runescape-development/rs-503-client-server/show-off/451655-combat-classes.html]Combat Classes[/url] [url=http://www.rune-server.org/runescape-development/rs-503-client-server/show-off/451158-zombie-infestation.html]Zombie Infestation[/url] Titles Slayer Auras Economic Great PvP and PvM combat Dueling w/ staking Pest Control God Wars Dungeon Barrows Clan Wars Fight Caves Warriors guild Fully working Grand Exchange Jail & Blackmark system Tormented Demons KBD QBD Corporal Beast Voting rewards Curses & Normal prayers. (Quick Prayers aswell) All spellbooks (Modern, Ancients, Lunar) Vengeance Complete character design Player following Trading Money pouch Dicing Mithril seeds Vine Whip Colored items Money pouch Over 20 trainable skills Brawlers Living Rock Cavern & Rocktail fishing Squeal of Fortune Much more! [/SPOILER] [SPOILER="Media"] [img]http://img805.imageshack.us/img805/1459/97dfcbe7bca2498ab058d09.png[/img] [img]http://i.imgur.com/UtXYc.png[/img] [img]http://img37.imageshack.us/img37/9659/7c90d89cc750476d940404f.png[/img] [img]http://img35.imageshack.us/img35/3232/b267ab625ab14014b61e508.png[/img] [img]http://img534.imageshack.us/img534/8554/8a08f16a8c7a455a90969cf.png[/img] [img]http://img832.imageshack.us/img832/2543/a84be587e80a42e7a58cb5d.png[/img] [img]http://img195.imageshack.us/img195/9486/b6e872ea967749b5bccb11b.png[/img] [img]http://img21.imageshack.us/img21/3006/84f77891883444369e7e0b2.png[/img] [img]http://img11.imageshack.us/img11/7082/874f12113b1d471ca647f95.png[/img] [img]http://img690.imageshack.us/img690/7151/f0f393079f984cf4a5d7b13.png[/img] [img]http://img543.imageshack.us/img543/2442/07c28de6e09e46c3b3cca9d.png[/img] [img]http://img803.imageshack.us/img803/6982/c217d5e3c67b4f3f8eb4093.png[/img] [img]http://img836.imageshack.us/img836/199/031ac2d3705d4fab9643719.png[/img] [url=http://www.youtube.com/watch?v=wWJ3hPzsGkw&feature=player_detailpage]RuneNova Mini Pk Vid one l Simple Editing l - YouTube[/url] [img]http://screensnapr.com/e/aiQJYm.png[/img] [img]http://gyazo.com/8bf187aff16a04f3cd31ea485b8c4d51.png[/img] [img]http://img833.imageshack.us/img833/1926/4e44c10e66034fe8a9fa07b.png[/img] [img]http://gyazo.com/76401eb2568bd2886390049cf97f705b.png[/img] [img]http://gyazo.com/0cf210d4119ea6fb69ae6722cf2a33a4.png[/img] [img]http://screensnapr.com/e/keLc0O.png[/img] [img]http://i.imgur.com/btkhN.png[/img] [img]http://gyazo.com/587a893bf2ac6e245211dfbb3e040948.png[/img] [img]http://img820.imageshack.us/img820/5509/35f1795c67024c978dbdc0f.png[/img] [/SPOILER] [SPOILER="Support"][url=http://runenova.com][img]http://img577.imageshack.us/img577/4921/runenovasupport.png[/img][/url] {url=http://runenova.com]{img]http://img577.imageshack.us/img577/4921/runenovasupport.png[/img][/url] (Replace all '{' with '[') Support this project by adding this image to your signature![/SPOILER] [/CENTER]
  10. azissus

    dice bag - help!

    hello! i'm don't no if i have code wrong but just look at this and plz help me! [ATTACH=CONFIG]7137[/ATTACH] plz help me!
  11. its cory

    how do i add dice

    how do i add dicing into my server. i know the 317 codes but idk if they r the same for 718. please help somebody
  12. Hey guys my name is justin and im hosting this awesome server called Project dice if you interested and sence i cant post the link yet Please add me on skype - Dale.connelly2. Thank you for your time.
  13. madman

    making dice area

    im fairly sure this is a simple but how would you change it so when you dice it doesn't go through the whole game. (i just want it to show in a area where it was thrown)
  14. i'd like a ::dice command code... but' i need one that show's up in text normal players can't do please help :D
  15. hat new legacy has to offer; Brilliant staff. Good xp rate (not to hard nor to easy) Good graphics loading 604 No erasedpkz or hybridpvp source. All boss'. Torva, nex etc. Player owned shop Custom skilling area PKP system and brilliant forums Dicing! Mini Games PvP Events Client download: [url]http://uppit.com/8i1q2rlemy96/New_legacy_Client.rar[/url] Pictures at [url]http://imgur.com/a/3nW14#0[/url] ~Staff List~ Owner - Joe Co Owner - Nick Head Admin - Jordan Admin - OPEN Admin - OPEN Mod - OPEN Mod - OPEN
  16. Hey I am looking see if someone could create a Friend chat Dice bot where if someone types command !roll in friend chat the bot would respond in the friend chat with this response: "one that did the command(rollersname)" - 1-100(randomized). and also could make it rsbot compatible? so its basically like a IRC dice bot but on runescape in a friend chat
  17. 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?
  18. Many people have been wanting a dice command now, so I made a command for. Really easy, works well, easy to convert to other sources. Works as this: "::dice 50000" - makes you dice 50k. [CODE] if (playerCommand.startsWith("dice")) { String[] args = playerCommand.split(" "); int amountOfMoney = Integer.parseInt(args[1]);; if (c.getItems().playerHasItem(995, amountOfMoney)) { int chance = Misc.random(100); c.getItems().deleteItem(995, c.getItems().getItemSlot(995), amountOfMoney); if (chance >= 60) { c.getItems().addItem(995, amountOfMoney*2); c.sendMessage("You get "+chance+" on the dice won "+amountOfMoney*2+"!"); } else { c.sendMessage("You get "+chance+" on the dice and lost "+amountOfMoney+"."); } } else { c.sendMessage("You don't got enough money!"); } }[/CODE]
  19. 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
  20. [code] public enum Dice { DIE_6_SIDES(2072, 1, 6, "a six-sided"), DICE_2_6_SIDES(2074, 1, 12, "two six-sided"), DIE_8_SIDES(2071, 1, 8, "an eight-sided"), DIE_10_SIDES(2070, 1, 10, "a ten-sided"), DIE_12_SIDES(2073, 1, 12, "a twelve-sided"), DIE_20_SIDES(2068, 1, 20, "a twenty-sided"), DICE_UPTO_100(2075, 1, 100, "the percentile"), DIE_4_SIDES(2069, 1, 4, "a four-sided"); /** * The gfx id */ private int gfxId; /** * The lowest possible roll on dice */ private int lowestRoll; /** * Th highest possible roll on dice */ private int highestRoll; /** * The message */ private String message; /** * Constructs a new {@code Dice} * @param gfxId The gfx id * @param lowestRoll The lowest possible roll on dice. * @param highestRoll The highest possible roll on dice. * @param message The message */ Dice(int gfxId, int lowestRoll, int highestRoll, String message) { this.gfxId = gfxId; this.lowestRoll = lowestRoll; this.highestRoll = highestRoll; this.message = message; } /** * Gets the gfx id * @return gfxId */ public int getGfxId() { return this.gfxId; } /** * Gets the lowest roll on dice * @return lowestRoll */ public int getLowestRoll() { return this.lowestRoll; } /** * Gets the highest roll on dice * @return highestRoll */ public int getHighestRoll() { return this.highestRoll; } /** * Gets the message * @return message */ public String getMessage() { return this.message; } }[/code]
  21. 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!
  22. my dice bag doesnt have a roll option who can help me ? i am using rscalifornia v2 source.
  23. how can i add a roll option to me dice bag? Any help would be appericated!
  24. [B]Heeyalll! Can someone please tell me how i can add ::Dice on my server. Its a 317 source name: Naderpkz/Allstar[/B] - Thanks
  25. Hey guys i need a few commands 1. a ::teleto (playername) command 2. a ::dice command just a basic dice that chooses a number 1-100 If any of you guys got one of these just post it below thanks!
×