Jump to content

own4g3

Member
  • Content count

    1,004
  • Joined

  • Last visited

Everything posted by own4g3

  1. [quote name='ItsFanboy'][code] if(Misc.random(Config.NPC_DROPS[npc][3]) == 0) { [/code][/QUOTE] [url]http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/ArrayIndexOutOfBoundsException.html[/url] The index is either negative or greater than or equal to the size of the array.
  2. Post your process method and line 2096.
  3. Clan Wars is finished... I need 4-5 beta testers for it.
  4. This is used for combining 2 items into 1. Example: Ely sigial + blessed shield = Ely shield. Create a new class in content folder and name it "ItemOnItemHandler.java" [code] package com.rs.game.player.content; import java.util.HashMap; import java.util.Map; import com.rs.game.player.Player; import com.rs.game.player.Skills; /** * Handles item on item. * * @author Own4g3 * */ public class ItemOnItemHandler { /** * An enum containing all the data. * * @author Own4g3 * */ public enum ItemOnItem { ELYSIAN_SPIRIT_SHIELD(13750, 13736, 13742, Skills.PRAYER, 90, 10, Skills.SMITHING, 85, 10); /** * A hasmap to store all the data. */ private static Map<Integer, ItemOnItem> itemOnItems = new HashMap<Integer, ItemOnItem>(); /** * Gets the data from mapping. * @param itemId The item used id. * @return The {@code ItemOnItem} {@code Object}, or {@code Null} if the data is nonexistent. */ public static ItemOnItem forId(int itemId) { return itemOnItems.get(itemId); } /** * Populating the map. */ static { for (ItemOnItem itemOnItem : ItemOnItem.values()) { itemOnItems.put(itemOnItem.getItem1(), itemOnItem); } } /** * The item to be used on item2. */ private final int item1; /** * The item to be used on item1. */ private final int item2; /** * The new item which player is going to make by combining item1 and item2. */ private final int item3; /** * If player can make this item. */ private final int[] skillRequirement; /** * Constructs a new {@code ItemOnItem} {@code Object}. * * @param item1 The item to be used on item2. * @param item2 The item to be used on item1. * @param item3 The new item which player is going to make by combining item1 and item2. * @param skillRequirement Skill Id, Required level, Exp in that skill. */ ItemOnItem(int item1, int item2, int item3, int...skillRequirement) { this.item1 = item1; this.item2 = item2; this.item3 = item3; this.skillRequirement = skillRequirement; } /** * Gets the first item. * @return item1 */ public int getItem1() { return item1; } /** * Gets the 2nd item. * @return item2 */ public int getItem2() { return item2; } /** * Gets the 3rd item. * @return item3 */ public int getItem3() { return item3; } /** * Gets skill requirments.. * @return skillRequirement */ public int[] getSkillRequirement() { return skillRequirement; } } /** * Handles the item on item action. * * @param player The player. * @param itemOnItem The itemOnItem. * @param usedWith The item used. * @param itemUsed The item used. */ public static void handleItemOnItem(Player player, ItemOnItem itemOnItem, int usedWith, int itemUsed) { int[] skillStuff = itemOnItem.getSkillRequirement(); if (player.getSkills().getLevel(skillStuff[0]) >= skillStuff[1]) { if (player.getSkills().getLevel(skillStuff[3]) >= skillStuff[4]) { player.getInventory().deleteItem(usedWith, 1); player.getInventory().deleteItem(itemUsed, 1); player.getInventory().addItem(itemOnItem.getItem3(), 1); player.getSkills().addXp(skillStuff[0], skillStuff[2]); } else player.getPackets().sendGameMessage("You need a " + Skills.SKILL_NAME[skillStuff[3]] + " level of " + Skills.SKILL_NAME[skillStuff[4]] + " to make this."); } else player.getPackets().sendGameMessage("You need a " + Skills.SKILL_NAME[skillStuff[0]] + " level of " + skillStuff[1] + " to make this."); } } [/code] Now, implement it. [B]InventoryOptionsHandler.java[/B] [code] ItemOnItem itemOnItem = ItemOnItem.forId(itemUsedId); if (itemOnItem != null) { if (itemUsedWithId == itemOnItem.getItem2()) ItemOnItemHandler.handleItemOnItem(player, itemOnItem, usedWith.getId(), itemUsed.getId()); return; } [/code] Add it under "handleItemOnItem" method. And that's it. You're done.
  5. There is no such method like that. [code] if (command[0].equalsIgnoreCase("korasi") && player.getInventory().contains(995, 100000000)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().addItem(19784, 1); player.sendMessage("As your money disappears, a korasi spawns."); } else { player.sendMessage("You need 100M to do this."); } [/code]
  6. [quote name='Intensive Tony']Nice. But maybe add in title that its for RuneEscape base.[/QUOTE] Kai. Btw, you can easily convert this to any other base.
  7. [img]http://i39.tinypic.com/28l9oiv.png[/img]
  8. How's cx going?

  9. Omg alphascape <3

  10. Thanks guys!! OT: I'm almost done with 100% Clan Wars.
  11. Uhh no, i don't..

  12. Horrible way to do this. Also, the title should be "562 Rs2hd [COLOR="#FF0000"]custom [/COLOR]party base"
  13. own4g3

    Matrix

    [quote name='Elm Co']Dumaiu sto razrabotchik katorii rabotait na matrix prodal leak. I saw that you said your location is "Russian Federation", are you Russian? :) I said I think that maybe a developer that worked on Matrix sold the leak.[/QUOTE] No. OT: No.
  14. [quote name='Niator']Uhm... Lol you are kidding right? We see that it's 2 different names. But they are almost the same! Its kinda scary meeting one with almost the same name as you...[/QUOTE] Uh..no it's not.
  15. [quote name='Emily']3299, 3722, 0 ?[/QUOTE] It used to be there but jagex removed it to somewhere else.. (New wilderness update)
  16. I need clan wars classic area coords. Does anybody know it?
  17. [quote name='Cart']Search button + "Clan wars coords" = 3000, 9679, 0 -- New clan wars area & stealing creation[/QUOTE] This is gamers' grotto coords. I want [url=http://images4.wikia.nocookie.net/__cb20120112095923/runescape/images/thumb/8/82/Clan_Wars_Classic.png/727px-Clan_Wars_Classic.png]this[/url]
  18. own4g3

    Hera 667

    Nice thread layout. Good luck with project.
×