Jump to content

Search the Community

Showing results for tags 'caskets'.



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

  1. Classes Modified: ActionHandler.java PlayerAssistant.java ClickItem.java Step1: Find all the other cases and put this under any other case located in [B][I][U]ActionHandler.java[/U][/I][/B] [CODE] case 405: if (c.getItems().freeSlots() >= 1) { c.getItems().deleteItem(405, 1); c.getItems().addItem(c.getPA().randomCasket(), 1); } break;[/CODE] Contents Of This Code: Case 405: = Item ID Of Casket if (c.getItems().freeSlots() >= 1) { = Making Sure Players Have 1 Space Free To Open A Casket c.getItems().deleteItem(405, 1); = Deletes The Item From The Inventory So Players Don't Have Unlimited Caskets c.getItems().addItem(c.getPA().randomCasket(), 1); = Basically Tells PlayerAssistant To Generate A Random Item In Which You'll Be Able To Edit Soon. [B][I][U]Next Open PlayerAssistant.java[/U][/I][/B] Now for those who have this it shouldn't be hard at all you should see static ints such as for example: [CODE] public static int Barrows[] = {4708,[/code] And so on. This is where you can add the random items you receive from the casket. So along with the other static int's put the following: [CODE]public static int Casket[] = {4151,14484,11694,11724};[/CODE] 4151 = Whip which is a random drop from the casket now you may change this and make the list longer by doing: 14484,11694, And so on. Once you have the drops you wish to have: Put this public int in: [CODE] public int randomCasket() { return Casket[(int)(Math.random()*Casket.length)]; }[/CODE] This makes sure the item you receive is also random Were Done With PlayerAssistant.java Open [B][I][U]ClickItem.java[/U][/I][/B] Basically here find all the other items like for example: [CODE] if(itemId == 8012) { c.getItems().deleteItem(8012,c.getItems().getItemSlot(8012),1); c.getPA().teleTabTeleport(2546, 3112, 0, "teleTab"); }[/CODE] Under these items put in the following: [CODE] if(itemId == 405) { c.getItems().deleteItem(405, 1); c.getItems().addItem(c.getPA().randomCasket(), 1); c.sendMessage("You Received A Random Item!"); }[/code] 405 = Item ID Which Is The Casket c.getItems().addItem(c.getPA().randomCasket(), 1); = Is The Random Item You Receive From The Casket Why add this in ClickItem? Because without it you can't open the Casket. Hope you guys enjoyed this fun little snippet if you want thanks and rep and w/e <3
  2. I wouldn't made a java file but my Caskets java got more content. About the release: I'm giving you a simple casket opening system, it contains no bugs and can be used straight away. [B] NOTE: MY packaging is different than yours, please replace the com.enso. imports to com.rs.[/B] Let's begin. So first you add Caskets.java to com.rs.game.player.content; [CODE]package com.enso.game.player.content; import com.enso.game.item.Item; import com.enso.game.player.Player; import com.enso.utils.Utils; /** * @author Fuzen Seth * @information Represents the caskets. */ public class Caskets { /** * Casket rewards. */ private static final int[] ITEM_REWARDS = {1712, 1215, 4587, 1305, 1079, 1127, }; /** * Open a casket. */ public static final boolean lootCasket(Player player, Item item) { if (player.isDead()) return false; if (item.getName().equals("Casket")) { player.getInventory().deleteItem(item.getId(), 1); player.addStopDelay(1); player.sendMessage("You loot the casket!"); switch (Utils.getRandom(1)) { case 0: // The gold coin reward. if (!player.isDonator()) player.getInventory().addItem(995, Utils.random(50000, 150000)); else player.getInventory().addItem(995, Utils.random(75000, 190000)); return true; case 1: //The item reward. player.getInventory().addItem(ITEM_REWARDS[Utils.getRandom(ITEM_REWARDS.length - 1)], 1); return true; } } return false; } } [/CODE] Next go to InventoryOptions handler and add this [CODE] if (Caskets.lootCasket(player, item)) return;[/CODE] Hope I saved your time. :) Picture [img]http://puu.sh/9GjAL/f5005da6c4.jpg[/img]
  3. yo guys i got a casket snippet, and i want to let ALL of my monsters drop them, but idk where to paste it :S:S [CODE]if (Misc.random(4) == 1) { if (this.getDefinition() .getCacheDefinition().combatLevel < 49) { GroundItemManager .createGroundItem(new GroundItem( receiver, new Item( 10231, 1), getLocation(), false)); } } if (Misc.random(8) == 1) { if (this.getDefinition() .getCacheDefinition().combatLevel > 49 && this.getDefinition() .getCacheDefinition().combatLevel < 100) { GroundItemManager .createGroundItem(new GroundItem( receiver, new Item( 10277, 1), getLocation(), false)); } } if (Misc.random(12) == 1) { if (this.getDefinition() .getCacheDefinition().combatLevel > 100) { GroundItemManager .createGroundItem(new GroundItem( receiver, new Item( 13039, 1), getLocation(), false)); } }[/CODE] please tell me where to paste it in.. have a nice day
×