Jump to content

Search the Community

Showing results for tags 'giving'.



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

  1. [CENTER][IMG]http://www.runehq.com/image/geitems/c/casket.gif[/IMG] [B]Hello again, this tutorial is on how to add a clickable casket that gives a random item from a string of item id's which you can change to your liking. Files Needed : PlayerAssistant.java , ClickItem.java & ActionHandler.java Skills Needed : Ctrl + C and Ctrl + V Difficulty : 3/10 To begin with, you want to head over to PlayerAssistant.java, found in src\server\model\players. You then want to search for [/B][QUOTE]public static int Barrows[][/QUOTE][B] , below the end of that line add [/B][QUOTE]public static int Casket[] = {};[/QUOTE] [B]This line of code will hold the item id's. So an example of mine was[/B] [QUOTE]public static int Casket[] = {995,2434,2434,2434,315,361,1333,1331,995,379,385,385,385,7630,7630,4129,1161,1163,1093,1079,1081,1083,1085,4718,7630,7630,7630,7630,7630,7630,7630,7630,1067,1069,1071,1073,1075,1077,1101,1103,1105,1107,1109,1111,1153,1155,1157,1159,1161,1191,1193,1195,1197,1199,1323,1325,1327,1329,1331,995,315,361,1333,1331,995,379,385,385,385,7630,7630,7630,7630,4129,1161,1163,1093,1079,1081,1083,1085,4718,7630,7630,7630,7630,1067,1069,1071,1073,1075,1077,1101,1103,1105,1107,1109,1111,1153,1155,1157,1159,1161,1191,1193,1195,1197,1199,1323,1325,1327,1329,1331};[/QUOTE][B] Just make sure you separate each item id with a comma. Secondly, head over to ActionHandler.java, found in src\server\model\players. Search for[/B] [QUOTE]public void firstClickObject[/QUOTE][B] , then below[/B] [QUOTE]switch(objectType) {[/QUOTE][B] add[/B] [QUOTE]case 405: if (c.getItems().freeSlots() >= 1) { c.getItems().deleteItem(405, 1); c.getItems().addItem(c.getPA().randomCasket(), 1); } break;[/QUOTE] [B]What this does is, checks if the user has enough space to open the casket, if so deletes the casket, then continues to add a item from the list of id's you declared. Lastly, open up ClickItem.java, which if normally found in src\server\model\players\packets. Now search for [/B][QUOTE]public void processPacket[/QUOTE][B] and with the rest of the if statements add [/B][QUOTE]if(itemId == 405) { c.getItems().deleteItem(405, 1); c.getItems().addItem(c.getPA().randomCasket(), 1); c.sendMessage("You recieve loot!"); }[/QUOTE][B] What this does is check if the item clicked had the id of 405 ( Casket ID is 405 ), deletes the casket from their inventory, adds a random item from the list of id's and send a message to the player, which can be customised. That's pretty much it, don't forget to add imports if you don't already have them, remember Eclipse will add them in for you, so I would recommend using it if you are a beginner. Thanks for checking out my second tutorial, feel free to make any suggestions on other tutorials, or any fixes or improvements for this! If you have any errors post them below and I will try to respond and get them fixed as soon as I can.[/B][/CENTER]
  2. This works for some people and doesn't work for the other people, I don't know the cause because I just want a jar client that works with everyone! Whenever I jar my client, it works for me and my friend also some other people that try it. Theres also another handful of people where when they try to open the jar file they get an error like this: [IMG]http://i58.tinypic.com/wu2rmq.png[/IMG] I HAVE ALREADY TRIED JARING IT WITH ECLIPSE. So please don't give me the option to jar with eclipse since the client works for some and doesn't for others..does anyone know how to fix this. I really need testers for my server and only got 50% players out of 100%....
  3. I'm not sure how on earth this money pouch is giving people max cash, but they've told me it's giving them max cash and I have checked their bank and seen max cash. Other than that, the money pouch is defected and not working properly. And I can't figure out why. Here's my InventoryOptionsHandler.java: [code]package com.rs.net.decoders.handlers; //import com.rs.game.player.ClueScrolls; import java.util.List; import com.rs.game.player.content.TreasureTrails; import com.rs.Settings; import com.rs.cores.WorldThread; import com.rs.game.Animation; import com.rs.game.Graphics; import com.rs.game.World; import com.rs.game.WorldTile; import com.rs.game.item.Item; import com.rs.game.minigames.CrystalChest; import com.rs.game.minigames.RandomEventGift; import com.rs.game.npc.NPC; import com.rs.game.npc.familiar.Familiar.SpecialAttack; import com.rs.game.npc.pet.Pet; import com.rs.game.player.ClueScrolls; import com.rs.game.player.CoordsEvent; import com.rs.game.player.Equipment; import com.rs.game.player.Inventory; import com.rs.game.player.Player; import com.rs.game.player.Skills; import com.rs.game.player.content.LividFarm; import com.rs.game.player.actions.BoxAction; import com.rs.game.player.actions.BoxAction.HunterEquipment; 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.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.Bone; import com.rs.game.player.content.Dicing; import com.rs.game.player.content.Foods; 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.controlers.FightKiln; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; 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); player.stopAll(false); } else if (itemId >= 15086 && itemId <= 15100) { Dicing.handleRoll(player, itemId, true); return; } else { if (player.isEquipDisabled()) return; long passedTime = Utils.currentTimeMillis() - WorldThread.LAST_CYCLE_CTM; WorldTasksManager.schedule(new WorldTask() { [MENTION=15855]Over[/MENTION]ride 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, true, false); } }, passedTime >= 600 ? 0 : passedTime > 330 ? 1 : 0); if (player.getSwitchItemCache().contains(slotId)) return; player.getSwitchItemCache().add(slotId); } } public static void dig(final Player player) { player.resetWalkSteps(); player.setNextAnimation(new Animation(830)); player.lock(); WorldTasksManager.schedule(new WorldTask() { [MENTION=15855]Over[/MENTION]ride public void run() { player.unlock(); if (Barrows.digIntoGrave(player)) return; if(player.getX() == 3005 && player.getY() == 3376 || player.getX() == 2999 && player.getY() == 3375 || player.getX() == 2996 && player.getY() == 3377 || player.getX() == 2989 && player.getY() == 3378 || player.getX() == 2987 && player.getY() == 3387 || player.getX() == 2984 && player.getY() == 3387) { //mole player.setNextWorldTile(new WorldTile(1752, 5137, 0)); player.getPackets().sendGameMessage("You seem to have dropped down into a network of mole tunnels."); return; } if (ClueScrolls.digSpot(player)){ return; } player.getPackets().sendGameMessage("You find nothing."); } }); } public static void handleItemOption1(Player player, final int slotId, final int itemId, Item item) { long time = Utils.currentTimeMillis(); if (player.getLockDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); if (Foods.eat(player, item, slotId)) return; if (itemId >= 15086 && itemId <= 15100) { Dicing.handleRoll(player, itemId, false); return; } if (itemId == 6) //Cannon player.getDwarfCannon().checkLocation(); if (itemId == 20494) {//Gold Cannon if (player.isDonator()) { player.getDwarfCannon().checkGoldLocation(); } else { player.sm("You must be an Extreme Donator to set up a Royal Cannon."); } } if (itemId == 20498) {//Royal Cannon if (player.isExtremeDonator()) { player.getDwarfCannon().checkRoyalLocation(); } else { player.sm("You must be an Extreme Donator to set up a Royal Cannon."); } } if (itemId == 20667) { Magic.VecnaSkull(player); } if (Pots.pot(player, item, slotId)) return; if (itemId == 2677) { TreasureTrails.handleClues(player); } if (itemId == 2678) { TreasureTrails.handleClues1(player); } if (itemId == 2679) { TreasureTrails.handleClues2(player); } 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 == 22370) { Summoning.openDreadnipInterface(player); } if (itemId == 6950) { player.getDialogueManager().startDialogue("LividOrb"); } if (itemId == 20704) { LividFarm.bunchPlants(player); } if (itemId == 10846) { player.getDialogueManager().startDialogue("PrizeOptions"); } if (itemId == 10847) { player.getDialogueManager().startDialogue("PrizeOptions"); } if (itemId == 10845) { player.getDialogueManager().startDialogue("PrizeOptions"); } if (itemId == 10844) { player.getDialogueManager().startDialogue("PrizeOptions"); } if (itemId == 2689) { player.getDialogueManager().startDialogue("ExtremeDonatorPanel"); } if (itemId == 952) {// spade dig(player); return; } for (int i: ClueScrolls.ScrollIds){ if (itemId == i){ if (ClueScrolls.Scrolls.getMap(itemId) != null){ ClueScrolls.showMap(player, ClueScrolls.Scrolls.getMap(itemId)); return; } if (ClueScrolls.Scrolls.getObjMap(itemId) != null){ ClueScrolls.showObjectMap(player, ClueScrolls.Scrolls.getObjMap(itemId)); return; } if (ClueScrolls.Scrolls.getRiddles(itemId) != null){ ClueScrolls.showRiddle(player, ClueScrolls.Scrolls.getRiddles(itemId)); return; } } } if (itemId == 2717){ ClueScrolls.giveReward(player); } 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 == 611) player.getLocationCrystal().handleClick(); else if (itemId == 6183) RandomEventGift.openGift(player); else if (itemId == 23749) { player.getSkills().addXp(Skills.DUNGEONEERING, 20); player.getInventory().deleteItem(23749, 1); } else if (itemId == 23750) { player.getSkills().addXp(Skills.DUNGEONEERING, 125); player.getInventory().deleteItem(23750, 1); } else if (itemId == 24155) { // Double Spin ticket player.getPackets().sendGameMessage("You opened your spin ticket and got two spins."); player.setSpins(player.getSpins() + 2); player.getPackets().sendIComponentText(1139, 10, " "+ player.getSpins() +" "); player.getInventory().deleteItem(24155, 1); } else if (itemId == 24154) { // Spin ticket player.getPackets().sendGameMessage("You opened your spin ticket and got one spin."); player.setSpins(player.getSpins() + 1); player.getPackets().sendIComponentText(1139, 10, " "+ player.getSpins() +" "); player.getInventory().deleteItem(24154, 1); } else if (itemId == 23717) { player.getSkills().addXp(Skills.ATTACK, 2500); player.getInventory().deleteItem(23717, 1); } else if (itemId == 23721) { player.getSkills().addXp(Skills.STRENGTH, 2500); player.getInventory().deleteItem(23721, 1); } else if (itemId == 23725) { player.getSkills().addXp(Skills.DEFENCE, 2500); player.getInventory().deleteItem(23725, 1); } else if (itemId == 23729) { player.getSkills().addXp(Skills.RANGE, 2500); player.getInventory().deleteItem(23729, 1); } else if (itemId == 23733) { player.getSkills().addXp(Skills.MAGIC, 2500); player.getInventory().deleteItem(23733, 1); } else if (itemId == 23737) { player.getSkills().addXp(Skills.PRAYER, 2500); player.getInventory().deleteItem(23737, 1); } else if (itemId == 23741) { player.getSkills().addXp(Skills.RUNECRAFTING, 2500); player.getInventory().deleteItem(23741, 1); } else if (itemId == 23745) { player.getSkills().addXp(Skills.CONSTRUCTION, 2500); player.getInventory().deleteItem(23745, 1); } else if (itemId == 23749) { player.getSkills().addXp(Skills.DUNGEONEERING, 2500); player.getInventory().deleteItem(23749, 1); } else if (itemId == 23753) { player.getSkills().addXp(Skills.HITPOINTS, 2500); player.getInventory().deleteItem(23753, 1); } else if (itemId == 23757) { player.getSkills().addXp(Skills.AGILITY, 2500); player.getInventory().deleteItem(23757, 1); } else if (itemId == 23761) { player.getSkills().addXp(Skills.HERBLORE, 2500); player.getInventory().deleteItem(23761, 1); } else if (itemId == 23765) { player.getSkills().addXp(Skills.THIEVING, 2500); player.getInventory().deleteItem(23765, 1); } else if (itemId == 23769) { player.getSkills().addXp(Skills.CRAFTING, 2500); player.getInventory().deleteItem(23769, 1); } else if (itemId == 23774) { player.getSkills().addXp(Skills.FLETCHING, 2500); player.getInventory().deleteItem(23774, 1); } else if (itemId == 23778) { player.getSkills().addXp(Skills.SLAYER, 2500); player.getInventory().deleteItem(23778, 1); } else if (itemId == 23782) { player.getSkills().addXp(Skills.HUNTER, 2500); player.getInventory().deleteItem(23782, 1); } else if (itemId == 23786) { player.getSkills().addXp(Skills.MINING, 2500); player.getInventory().deleteItem(23786, 1); } else if (itemId == 23790) { player.getSkills().addXp(Skills.SMITHING, 2500); player.getInventory().deleteItem(23790, 1); } else if (itemId == 23794) { player.getSkills().addXp(Skills.FISHING, 2500); player.getInventory().deleteItem(23794, 1); } else if (itemId == 23798) { player.getSkills().addXp(Skills.COOKING, 2500); player.getInventory().deleteItem(23798, 1); } else if (itemId == 23802) { player.getSkills().addXp(Skills.FIREMAKING, 2500); player.getInventory().deleteItem(23802, 1); } else if (itemId == 23806) { player.getSkills().addXp(Skills.WOODCUTTING, 2500); player.getInventory().deleteItem(23806, 1); } else if (itemId == 23810) { player.getSkills().addXp(Skills.FARMING, 2500); player.getInventory().deleteItem(23810, 1); } else if (itemId == 23814) { player.getSkills().addXp(Skills.SUMMONING, 2500); player.getInventory().deleteItem(23814, 1); } else if (itemId == 23718) { player.getSkills().addXp(Skills.ATTACK, 5000); player.getInventory().deleteItem(23718, 1); } else if (itemId == 23722) { player.getSkills().addXp(Skills.STRENGTH, 5000); player.getInventory().deleteItem(23722, 1); } else if (itemId == 23726) { player.getSkills().addXp(Skills.DEFENCE, 5000); player.getInventory().deleteItem(23726, 1); } else if (itemId == 23730) { player.getSkills().addXp(Skills.RANGE, 5000); player.getInventory().deleteItem(23730, 1); } else if (itemId == 23734) { player.getSkills().addXp(Skills.MAGIC, 5000); player.getInventory().deleteItem(23734, 1); } else if (itemId == 23738) { player.getSkills().addXp(Skills.PRAYER, 5000); player.getInventory().deleteItem(23738, 1); } else if (itemId == 23742) { player.getSkills().addXp(Skills.RUNECRAFTING, 5000); player.getInventory().deleteItem(23742, 1); } else if (itemId == 23746) { player.getSkills().addXp(Skills.CONSTRUCTION, 5000); player.getInventory().deleteItem(23746, 1); } else if (itemId == 23750) { player.getSkills().addXp(Skills.DUNGEONEERING, 5000); player.getInventory().deleteItem(23750, 1); } else if (itemId == 23754) { player.getSkills().addXp(Skills.HITPOINTS, 5000); player.getInventory().deleteItem(23754, 1); } else if (itemId == 23758) { player.getSkills().addXp(Skills.AGILITY, 5000); player.getInventory().deleteItem(23758, 1); } else if (itemId == 23762) { player.getSkills().addXp(Skills.HERBLORE, 5000); player.getInventory().deleteItem(23762, 1); } else if (itemId == 23766) { player.getSkills().addXp(Skills.THIEVING, 5000); player.getInventory().deleteItem(23766, 1); } else if (itemId == 23770) { player.getSkills().addXp(Skills.CRAFTING, 5000); player.getInventory().deleteItem(23770, 1); } else if (itemId == 23775) { player.getSkills().addXp(Skills.FLETCHING, 5000); player.getInventory().deleteItem(23775, 1); } else if (itemId == 23779) { player.getSkills().addXp(Skills.SLAYER, 5000); player.getInventory().deleteItem(23779, 1); } else if (itemId == 23783) { player.getSkills().addXp(Skills.HUNTER, 5000); player.getInventory().deleteItem(23783, 1); } else if (itemId == 23787) { player.getSkills().addXp(Skills.MINING, 5000); player.getInventory().deleteItem(23787, 1); } else if (itemId == 23791) { player.getSkills().addXp(Skills.SMITHING, 5000); player.getInventory().deleteItem(23791, 1); } else if (itemId == 23795) { player.getSkills().addXp(Skills.FISHING, 5000); player.getInventory().deleteItem(23795, 1); } else if (itemId == 23799) { player.getSkills().addXp(Skills.COOKING, 5000); player.getInventory().deleteItem(23799, 1); } else if (itemId == 23803) { player.getSkills().addXp(Skills.FIREMAKING, 5000); player.getInventory().deleteItem(23803, 1); } else if (itemId == 23807) { player.getSkills().addXp(Skills.WOODCUTTING, 5000); player.getInventory().deleteItem(23807, 1); } else if (itemId == 23811) { player.getSkills().addXp(Skills.FARMING, 5000); player.getInventory().deleteItem(23811, 1); } else if (itemId == 23815) { player.getSkills().addXp(Skills.SUMMONING, 5000); player.getInventory().deleteItem(23815, 1); } else if (itemId == 23719) { player.getSkills().addXp(Skills.ATTACK, 7500); player.getInventory().deleteItem(23719, 1); } else if (itemId == 23723) { player.getSkills().addXp(Skills.STRENGTH, 7500); player.getInventory().deleteItem(23723, 1); } else if (itemId == 23727) { player.getSkills().addXp(Skills.DEFENCE, 7500); player.getInventory().deleteItem(23727, 1); } else if (itemId == 23731) { player.getSkills().addXp(Skills.RANGE, 7500); player.getInventory().deleteItem(23731, 1); } else if (itemId == 23735) { player.getSkills().addXp(Skills.MAGIC, 7500); player.getInventory().deleteItem(23735, 1); } else if (itemId == 23739) { player.getSkills().addXp(Skills.PRAYER, 7500); player.getInventory().deleteItem(23739, 1); } else if (itemId == 23743) { player.getSkills().addXp(Skills.RUNECRAFTING, 7500); player.getInventory().deleteItem(23743, 1); } else if (itemId == 23747) { player.getSkills().addXp(Skills.CONSTRUCTION, 7500); player.getInventory().deleteItem(23747, 1); } else if (itemId == 23751) { player.getSkills().addXp(Skills.DUNGEONEERING, 7500); player.getInventory().deleteItem(23751, 1); } else if (itemId == 23755) { player.getSkills().addXp(Skills.HITPOINTS, 7500); player.getInventory().deleteItem(23755, 1); } else if (itemId == 23759) { player.getSkills().addXp(Skills.AGILITY, 7500); player.getInventory().deleteItem(23759, 1); } else if (itemId == 23763) { player.getSkills().addXp(Skills.HERBLORE, 7500); player.getInventory().deleteItem(23763, 1); } else if (itemId == 23767) { player.getSkills().addXp(Skills.THIEVING, 7500); player.getInventory().deleteItem(23767, 1); } else if (itemId == 23771) { player.getSkills().addXp(Skills.CRAFTING, 7500); player.getInventory().deleteItem(23771, 1); } else if (itemId == 23776) { player.getSkills().addXp(Skills.FLETCHING, 7500); player.getInventory().deleteItem(23776, 1); } else if (itemId == 23780) { player.getSkills().addXp(Skills.SLAYER, 7500); player.getInventory().deleteItem(23780, 1); } else if (itemId == 23784) { player.getSkills().addXp(Skills.HUNTER, 7500); player.getInventory().deleteItem(23784, 1); } else if (itemId == 23788) { player.getSkills().addXp(Skills.MINING, 7500); player.getInventory().deleteItem(23788, 1); } else if (itemId == 23792) { player.getSkills().addXp(Skills.SMITHING, 7500); player.getInventory().deleteItem(23792, 1); } else if (itemId == 23796) { player.getSkills().addXp(Skills.FISHING, 7500); player.getInventory().deleteItem(23796, 1); } else if (itemId == 23800) { player.getSkills().addXp(Skills.COOKING, 7500); player.getInventory().deleteItem(23800, 1); } else if (itemId == 23804) { player.getSkills().addXp(Skills.FIREMAKING, 7500); player.getInventory().deleteItem(23804, 1); } else if (itemId == 23808) { player.getSkills().addXp(Skills.WOODCUTTING, 7500); player.getInventory().deleteItem(23808, 1); } else if (itemId == 23812) { player.getSkills().addXp(Skills.FARMING, 7500); player.getInventory().deleteItem(23812, 1); } else if (itemId == 23816) { player.getSkills().addXp(Skills.SUMMONING, 7500); player.getInventory().deleteItem(23816, 1); } else if (itemId == 23720) { player.getSkills().addXp(Skills.ATTACK, 10000); player.getInventory().deleteItem(23720, 1); } else if (itemId == 23724) { player.getSkills().addXp(Skills.STRENGTH, 10000); player.getInventory().deleteItem(23724, 1); } else if (itemId == 23728) { player.getSkills().addXp(Skills.DEFENCE, 10000); player.getInventory().deleteItem(23728, 1); } else if (itemId == 23732) { player.getSkills().addXp(Skills.RANGE, 10000); player.getInventory().deleteItem(23732, 1); } else if (itemId == 23736) { player.getSkills().addXp(Skills.MAGIC, 10000); player.getInventory().deleteItem(23736, 1); } else if (itemId == 23740) { player.getSkills().addXp(Skills.PRAYER, 10000); player.getInventory().deleteItem(23740, 1); } else if (itemId == 23744) { player.getSkills().addXp(Skills.RUNECRAFTING, 10000); player.getInventory().deleteItem(23744, 1); } else if (itemId == 23748) { player.getSkills().addXp(Skills.CONSTRUCTION, 10000); player.getInventory().deleteItem(23748, 1); } else if (itemId == 23752) { player.getSkills().addXp(Skills.DUNGEONEERING, 10000); player.getInventory().deleteItem(23752, 1); } else if (itemId == 23756) { player.getSkills().addXp(Skills.HITPOINTS, 10000); player.getInventory().deleteItem(23756, 1); } else if (itemId == 23760) { player.getSkills().addXp(Skills.AGILITY, 10000); player.getInventory().deleteItem(23760, 1); } else if (itemId == 23764) { player.getSkills().addXp(Skills.HERBLORE, 10000); player.getInventory().deleteItem(23764, 1); } else if (itemId == 23768) { player.getSkills().addXp(Skills.THIEVING, 10000); player.getInventory().deleteItem(23768, 1); } else if (itemId == 23772) { player.getSkills().addXp(Skills.CRAFTING, 10000); player.getInventory().deleteItem(23772, 1); } else if (itemId == 23777) { player.getSkills().addXp(Skills.FLETCHING, 10000); player.getInventory().deleteItem(23777, 1); } else if (itemId == 23781) { player.getSkills().addXp(Skills.SLAYER, 10000); player.getInventory().deleteItem(23781, 1); } else if (itemId == 23785) { player.getSkills().addXp(Skills.HUNTER, 10000); player.getInventory().deleteItem(23785, 1); } else if (itemId == 23789) { player.getSkills().addXp(Skills.MINING, 10000); player.getInventory().deleteItem(23789, 1); } else if (itemId == 23793) { player.getSkills().addXp(Skills.SMITHING, 10000); player.getInventory().deleteItem(23793, 1); } else if (itemId == 23797) { player.getSkills().addXp(Skills.FISHING, 10000); player.getInventory().deleteItem(23797, 1); } else if (itemId == 23801) { player.getSkills().addXp(Skills.COOKING, 10000); player.getInventory().deleteItem(23801, 1); } else if (itemId == 23805) { player.getSkills().addXp(Skills.FIREMAKING, 10000); player.getInventory().deleteItem(23805, 1); } else if (itemId == 23809) { player.getSkills().addXp(Skills.WOODCUTTING, 10000); player.getInventory().deleteItem(23809, 1); } else if (itemId == 23813) { player.getSkills().addXp(Skills.FARMING, 10000); player.getInventory().deleteItem(23813, 1); } else if (itemId == 23817) { player.getSkills().addXp(Skills.SUMMONING, 10000); player.getInventory().deleteItem(23817, 1); } else if (itemId == 24300) { player.getSkills().addXp(Skills.ATTACK, 2000000); player.getSkills().addXp(Skills.STRENGTH, 2000000); player.getSkills().addXp(Skills.DEFENCE, 200000); player.getSkills().addXp(Skills.RANGE, 200000); player.getSkills().addXp(Skills.MAGIC, 200000); player.getSkills().addXp(Skills.PRAYER, 200000); player.getSkills().addXp(Skills.RUNECRAFTING, 200000); player.getSkills().addXp(Skills.CONSTRUCTION, 200000); player.getSkills().addXp(Skills.DUNGEONEERING, 200000); player.getSkills().addXp(Skills.HITPOINTS, 200000); player.getSkills().addXp(Skills.AGILITY, 200000); player.getSkills().addXp(Skills.HERBLORE, 200000); player.getSkills().addXp(Skills.THIEVING, 200000); player.getSkills().addXp(Skills.CRAFTING, 200000); player.getSkills().addXp(Skills.FLETCHING, 200000); player.getSkills().addXp(Skills.SLAYER, 200000); player.getSkills().addXp(Skills.HUNTER, 200000); player.getSkills().addXp(Skills.MINING, 200000); player.getSkills().addXp(Skills.SMITHING, 200000); player.getSkills().addXp(Skills.FISHING, 200000); player.getSkills().addXp(Skills.COOKING, 200000); player.getSkills().addXp(Skills.FIREMAKING, 200000); player.getSkills().addXp(Skills.WOODCUTTING, 200000); player.getSkills().addXp(Skills.FARMING, 200000); player.getSkills().addXp(Skills.SUMMONING, 200000); player.getInventory().deleteItem(24300, 1); } else if (itemId >= 23653 && itemId <= 23658) FightKiln.useCrystal(player, itemId); else if (itemId == 7681) {// Information Book player.getInterfaceManager().sendInterface(275); for (int i = 0; i < 100; i++) { player.getPackets().sendIComponentText(275, i, ""); }player.getPackets().sendIComponentText(275, 1, Settings.SERVER_NAME+" Quest Information!"); player.getPackets().sendIComponentText(275, 10, "What Are Quests?"); player.getPackets().sendIComponentText(275, 11, "___________"); player.getPackets().sendIComponentText(275, 12, "Quests are Adventures you can go on,"); player.getPackets().sendIComponentText(275, 13, "and when completed you can earn, special"); player.getPackets().sendIComponentText(275, 14, "items or even gold. Some are easy some are"); player.getPackets().sendIComponentText(275, 15, "hard. We want our players to always have fun, if"); player.getPackets().sendIComponentText(275, 16, "you need any help on a quest refer to the quest guide"); player.getPackets().sendIComponentText(275, 17, "for a book that will help you complete the quest available!"); player.getPackets().sendIComponentText(275, 18, "___________"); player.getPackets().sendIComponentText(275, 19, "Quests Available"); player.getPackets().sendIComponentText(275, 20, "___________"); player.getPackets().sendIComponentText(275, 21, "Meet me in the sky"); player.getPackets().sendIComponentText(275, 22, "-_-_-_-_-_-_-_-"); player.getPackets().sendIComponentText(275, 23, "Dragon Killer"); player.getPackets().sendIComponentText(275, 24, "-_-_-_-_-_-_-_-"); player.getPackets().sendIComponentText(275, 25, "Kill the Robber"); player.getPackets().sendIComponentText(275, 26, "-_-_-_-_-_-_-_-"); player.getPackets().sendIComponentText(275, 27, "Get the Meat Pie"); player.getPackets().sendIComponentText(275, 28, "-_-_-_-_-_-_-_-"); player.getPackets().sendIComponentText(275, 29, "Demons are here"); player.getPackets().sendIComponentText(275, 30, "-_-_-_-_-_-_-_-"); player.getPackets().sendIComponentText(275, 31, "Kalphite Gold"); player.getPackets().sendIComponentText(275, 32, "-_-_-_-_-_-_-_-"); player.getPackets().sendIComponentText(275, 33, "StarWars"); player.getPackets().sendIComponentText(275, 34, "-_-_-_-_-_-_-_-"); player.getPackets().sendIComponentText(275, 35, "Blood Trader"); player.getPackets().sendIComponentText(275, 36, "-_-_-_-_-_-_-_-"); player.getPackets().sendIComponentText(275, 37, "Dwarven Cake"); } else if (itemId == HunterEquipment.BOX.getId()) // almost done player.getActionManager().setAction(new BoxAction(HunterEquipment.BOX)); else if (itemId == HunterEquipment.BRID_SNARE.getId()) player.getActionManager().setAction( new BoxAction(HunterEquipment.BRID_SNARE)); else if (item.getDefinitions().getName().startsWith("Burnt")) player.getDialogueManager().startDialogue("SimplePlayerMessage", "Ugh, this is inedible."); 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 itemUsedWithId = stream.readShort(); int toSlot = stream.readShortLE128(); int interfaceId = stream.readInt() >> 16; int interfaceId2 = stream.readInt() >> 16; int fromSlot = stream.readShort(); int itemUsedId = stream.readShortLE128(); 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 (itemUsed.getId() == CrystalChest.toothHalf() && usedWith.getId() == CrystalChest.loopHalf() || itemUsed.getId() == CrystalChest.loopHalf() && usedWith.getId() == CrystalChest.toothHalf()){ CrystalChest.makeKey(player); return; } 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; } 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 (itemUsed.getId() == 13734 && usedWith.getId() == 13754){ player.getInventory().deleteItem(13734, 1); player.getInventory().deleteItem(13754, 1); player.getInventory().addItem(13736, 1); player.getPackets().sendGameMessage("You have poured the holy elixir on a spirit shield making it unleash Blessed powers."); } else if (itemUsed.getId() == 13754 && usedWith.getId() == 13734){ player.getInventory().deleteItem(13734, 1); player.getInventory().deleteItem(13754, 1); player.getInventory().addItem(13736, 1); player.getPackets().sendGameMessage("You have poured the holy elixir on a spirit shield making it unleash Blessed powers."); } else if (itemUsed.getId() == 13736 && usedWith.getId() == 13748){ player.getInventory().deleteItem(13736, 1); player.getInventory().deleteItem(13748, 1); player.getInventory().addItem(13740, 1); player.getPackets().sendGameMessage("You force the sigil upon the blessed spirit shield making it unleash Divine Powers."); } else if (itemUsed.getId() == 13736 && usedWith.getId() == 13750){ player.getInventory().deleteItem(13736, 1); player.getInventory().deleteItem(13750, 1); player.getInventory().addItem(13742, 1); player.getPackets().sendGameMessage("You force the sigil upon the blessed spirit shield making it unleash Elysian Powers."); } else if (itemUsed.getId() == 13736 && usedWith.getId() == 13746){ player.getInventory().deleteItem(13736, 1); player.getInventory().deleteItem(13746, 1); player.getInventory().addItem(13738, 1); player.getPackets().sendGameMessage("You force the sigil upon the blessed spirit shield making it unleash Arcane Powers."); } else if (itemUsed.getId() == 13746 && usedWith.getId() == 13736){ player.getInventory().deleteItem(13736, 1); player.getInventory().deleteItem(13746, 1); player.getInventory().addItem(13738, 1); player.getPackets().sendGameMessage("You force the sigil upon the blessed spirit shield making it unleash Arcane Powers."); } else if (itemUsed.getId() == 13736 && usedWith.getId() == 13752){ player.getInventory().deleteItem(13736, 1); player.getInventory().deleteItem(13752, 1); player.getInventory().addItem(13744, 1); player.getPackets().sendGameMessage("You force the sigil upon the blessed spirit shield making it unleash Spectral Powers."); } else if (itemUsed.getId() == 13752 && usedWith.getId() == 13736){ player.getInventory().deleteItem(13736, 1); player.getInventory().deleteItem(13752, 1); player.getInventory().addItem(13744, 1); player.getPackets().sendGameMessage("You force the sigil upon the blessed spirit shield making it unleash Spectral Powers."); } else if (itemUsed.getId() == 1540 && usedWith.getId() == 11286){ player.getInventory().deleteItem(1540, 1); player.getInventory().deleteItem(11286, 1); player.getInventory().addItem(11283, 1); player.getPackets().sendGameMessage("Congratulations You have made a Dragonfire Shield."); } else if (itemUsed.getId() == 11286 && usedWith.getId() == 1540){ player.getInventory().deleteItem(11286, 1); player.getInventory().deleteItem(1540, 1); player.getInventory().addItem(11283, 1); player.getPackets().sendGameMessage("Congratulations You have made a Dragonfire Shield."); } if (itemUsed.getId() == 11710 || usedWith.getId() == 11712 || usedWith.getId() == 11714) { if (player.getInventory().containsItem(11710, 1) && player.getInventory().containsItem(11712, 1) && player.getInventory().containsItem(11714, 1)) { player.getInventory().deleteItem(11710, 1); player.getInventory().deleteItem(11712, 1); player.getInventory().deleteItem(11714, 1); player.getInventory().addItem(11690, 1); player.getPackets().sendGameMessage("You made a godsword blade."); } } if (itemUsed.getId() == 11690 || usedWith.getId() == 11702) { if (player.getInventory().containsItem(11690, 1) && player.getInventory().containsItem(11702, 1)) { player.getInventory().deleteItem(11690, 1); player.getInventory().deleteItem(11702, 1); player.getInventory().addItem(11694, 1); player.getPackets().sendGameMessage("You attach the hilt to the blade and make an Armadyl godsword."); } } if (itemUsed.getId() == 11690 || usedWith.getId() == 11704) { if (player.getInventory().containsItem(11690, 1) && player.getInventory().containsItem(11704, 1)) { player.getInventory().deleteItem(11690, 1); player.getInventory().deleteItem(11704, 1); player.getInventory().addItem(11696, 1); player.getPackets().sendGameMessage("You attach the hilt to the blade and make an Bandos godsword."); } } if (itemUsed.getId() == 11690 || usedWith.getId() == 11706) { if (player.getInventory().containsItem(11690, 1) && player.getInventory().containsItem(11706, 1)) { player.getInventory().deleteItem(11690, 1); player.getInventory().deleteItem(11706, 1); player.getInventory().addItem(11698, 1); player.getPackets().sendGameMessage("You attach the hilt to the blade and make an Saradomin godsword."); } } if (itemUsed.getId() == 11690 || usedWith.getId() == 11708) { if (player.getInventory().containsItem(11690, 1) && player.getInventory().containsItem(11708, 1)) { player.getInventory().deleteItem(11690, 1); player.getInventory().deleteItem(11708, 1); player.getInventory().addItem(11700, 1); player.getPackets().sendGameMessage("You attach the hilt to the blade and make an Zamorak godsword."); } } 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.getLockDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); if (itemId == 20767 || itemId == 20769 || itemId == 20771) SkillCapeCustomizer.startCustomizing(player, itemId); else if(itemId >= 15084 && itemId <= 15100) player.getDialogueManager().startDialogue("DiceBag", itemId); else if(itemId == 24437 || itemId == 24439 || itemId == 24440 || itemId == 24441) player.getDialogueManager().startDialogue("FlamingSkull", item, slotId); 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.getLockDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; player.stopAll(false); Pouches pouches = Pouches.forId(itemId); if (pouches != null) Summoning.spawnFamiliar(player, pouches); else if (itemId == 995) { int amount = player.getInventory().getItems().getNumberOf(995); if (player.money + amount > 0) { player.getInventory().deleteItem(995, amount); player.getPackets().sendRunScript(5561, 1, amount); player.money += amount; player.refreshMoneyPouch(); } else { player.getPackets().sendGameMessage("You can't have more then 2147483647 coins in your pouch.") } } 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 = Utils.currentTimeMillis(); if (player.getLockDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; if (!player.getControlerManager().canDropItem(item)) return; player.stopAll(false); if (item.getDefinitions().isOverSized()) { player.getPackets().sendGameMessage("The item appears to be oversized."); player.getInventory().deleteItem(item); return; } if (item.getDefinitions().isDestroyItem()) { player.getDialogueManager().startDialogue("DestroyItemOption", slotId, item); return; } if (player.getPetManager().spawnPet(itemId, true)) { return; } player.getInventory().deleteItem(slotId, item); if (player.getCharges().degradeCompletly(item)) return; World.addGroundItem(item, new WorldTile(player), player, false, 180, true); player.getPackets().sendSound(2739, 0, 1); } */ } public static void handleItemOption7(Player player, int slotId, int itemId, Item item) { long time = Utils.currentTimeMillis(); if (player.getLockDelay() >= time || player.getEmotesManager().getNextEmoteEnd() >= time) return; if (!player.getControlerManager().canDropItem(item)) return; player.stopAll(false); if (item.getDefinitions().isOverSized()) { player.getPackets().sendGameMessage("The item appears to be oversized."); player.getInventory().deleteItem(item); return; } if (item.getDefinitions().isDestroyItem()) { player.getDialogueManager().startDialogue("DestroyItemOption", slotId, item); return; } if (player.getPetManager().spawnPet(itemId, true)) { return; } player.getInventory().deleteItem(slotId, item); if (player.getCharges().degradeCompletly(item)) return; World.addGroundItem(item, new WorldTile(player), player, false, 180, true); player.getPackets().sendSound(2739, 0, 1); } public static void handleItemOption8(Player player, int slotId, int itemId, Item item) { player.getInventory().sendExamine(slotId); } public static void handleItemOnNPC(final Player player, final NPC npc, final Item item) { if (item == null) { return; } player.setCoordsEvent(new CoordsEvent(npc, new Runnable() { [MENTION=15855]Over[/MENTION]ride public void run() { if (!player.getInventory().containsItem(item.getId(), item.getAmount())) { return; } if (npc instanceof Pet) { player.faceEntity(npc); player.getPetManager().eat(item.getId(), (Pet) npc); return; } } }, npc.getSize())); } }[/code] And here's my MoneyPouch.java: [code]package com.rs.game.player.content; import java.io.Serializable; import java.text.DecimalFormat; import com.rs.game.item.Item; import com.rs.game.player.Bank; import com.rs.game.player.Player; public class MoneyPouch implements Serializable { private static final long serialVersionUID = -3847090682601697992L; private transient Player player; public boolean usingPouch; public int amount; public MoneyPouch(Player player) { this.player = player; } public void switchPouch() { usingPouch = !usingPouch; refresh(true); } private void refresh(boolean swap) { if (swap) player.getPackets().sendRunScript(5557, 1); player.getPackets().sendRunScript(5560, getCoinAmount()); } public void sendDynamicInteraction(int amount, boolean remove) { int newAmount = remove ? amount - player.coinamount : amount + player.coinamount; if (usingPouch || !usingPouch) { Item item = new Item(995, amount - (remove ? 0 : Integer.MAX_VALUE)); if (remove) { if (newAmount < 0) { if (player.getInventory().containsItem(item.getId(), item.getAmount())) { player.getPackets().sendGameMessage("You dont have enough money in your pouch. Your coins will be taken from your inventory instead."); player.getInventory().deleteItem(item); } else player.getPackets().sendGameMessage("You don't have enough coins."); return; } else if (player.coinamount == 0){ player.getPackets().sendGameMessage("Your money-pouch is currently empty."); return; } else if (player.getInventory().getItems().getNumberOf(995) + player.coinamount > 2147483647 || player.getInventory().getItems().getNumberOf(995) + player.coinamount <= 0) { int dif = 2147483647 - player.getInventory().getItems().getNumberOf(995); if (dif > 0) player.getPackets().sendRunScript(5561, new Object[] {0, dif}); player.coinamount -= dif; player.getPackets().sendRunScript(5560, new Object[] {player.coinamount}); if (dif > 0) player.getInventory().addItem(995, dif); if (dif > 0) player.getPackets().sendGameMessage(getFormattedNumber(dif) +" coins have been removed from your money pouch."); return; } else player.getPackets().sendRunScript(5561, new Object[] {0, amount}); player.coinamount -= amount; player.getPackets().sendRunScript(5560, new Object[] {player.coinamount}); player.getInventory().addItem(995, amount); player.getPackets().sendGameMessage(getFormattedNumber(amount) +" coins have been removed from your money pouch."); } else { if (newAmount > 2147483647 || newAmount <= 0) { int dif = 2147483647 - player.coinamount; if (dif > 0) player.getPackets().sendRunScript(5561, new Object[] {1, dif}); player.coinamount += dif; player.getPackets().sendRunScript(5560, new Object[] {player.coinamount}); if (dif > 0) player.getInventory().deleteItem(995, dif); if (dif > 0) player.getPackets().sendGameMessage(getFormattedNumber(dif) +" coins have been added to your money pouch."); return; } else player.getPackets().sendRunScript(5561, new Object[] {1, amount}); player.coinamount += amount; player.getPackets().sendRunScript(5560, new Object[] {player.coinamount}); player.getInventory().deleteItem(995, amount); player.getPackets().sendGameMessage(getFormattedNumber(amount) +" coins have been added to your money pouch."); } setAmount(newAmount, amount, remove); } else { if (remove) player.getInventory().deleteItem(new Item(995, amount)); else player.getInventory().addItem(new Item(995, amount)); } } public String getFormattedNumber(int amount) { return new DecimalFormat("#,###,##0").format(amount).toString(); } public void sendExamine() { player.getPackets().sendGameMessage("Your money pouch current contains " + getFormattedNumber(getCoinAmount()) + " coins."); } private void setAmount(int coinAmount, int addedAmount, boolean remove) { this.setCoinAmount(coinAmount); player.getPackets().sendRunScript(5561 , remove ? 0 : 1, addedAmount); refresh(false); } public int getCoinAmount() { return player.coinamount; } public void setCoinAmount(int coinAmount) { this.player.coinamount = coinAmount; } }[/code] Any help would be appreciated as I cannot figure it out :(
  4. hey there guys... i downloaded a 718/753 source and a 718/753 client (**used Foxtrot 718 Client**) !! and when i changed the client ip in : Loader.java + configuration.java + class26.java .. or just the loader.java and when i compile i get there errors ... i dont know to to fix that !! im new to coding [ATTACH=CONFIG]10003[/ATTACH] or can any one make it for me ? here is the client link : [url]https://www.dropbox.com/s/0bbv2g3xhrvo4yn/Foxtrot%20718%20Client.zip[/url] can some one make it for me ? here is the ip to use it : 85.130.210.238 thanks !
  5. Hey guys, So I download RuneLove RSPS and when I go in-game and I try to click on any shops/npc/etc... Nothing happens and this is the error I get. Media [IMG]http://i1359.photobucket.com/albums/q785/ranqedrs/848a451a-13e1-4e1f-86fc-e72c7d036cc4_zpsa569445c.png[/IMG]
  6. Base: PI Difficulty: Copy & Paste Hello, Zygaria here. I'm releasing my class i just wrote. What this does is gives you four methods for boxes for donations or w/e you want. Make a new class w/e you want & name it DonatorReward. put this in clickItem.java [code] case 11846: DonatorReward.addBarrowsReward(c); break; case 15246: DonatorReward.addRareReward(c); break; case 6183: DonatorReward.addGodwarsReward(c); break; case 14664: DonatorReward.addChaoticReward(c); break; [/code] Here's the class. [code] package game; import game.player.*; import engine.util.*; /** * [MENTION=52317]auth[/MENTION]or Thee Legacy */ /** * * Random Boxes for Donaters. * Can be anything, I've added three boxes. * You may add as many as your heart desires. * */ public class DonatorReward { private static int[][] randomGodwars = {//item id: 6183 {11732, 1}, {11730, 1}, {11694, 1}, {11696, 1}, {11698, 1}, {11700, 1}, {11724, 1}, {11726, 1}, {11728, 1}, {11718, 1}, {11720, 1}, {11722, 1}, {20135, 1}, {20139, 1}, {20143, 1}, {20147, 1}, {20151, 1}, {20155, 1}, {20159, 1}, {20163, 1}, {20167, 1}, {20171, 1} }; private static int[][] randomBarrows = {//item id: 11846 {4708, 1}, {4710, 1}, {4712, 1}, {4714, 1}, {4716, 1}, {4718, 1}, {4720, 1}, {4722, 1}, {4724, 1}, {4726, 1}, {4728, 1}, {4730, 1}, {4732, 1}, {4734, 1}, {4736, 1}, {4738, 1}, {4745, 1}, {4747, 1}, {4749, 1}, {4751, 1}, {4753, 1}, {4755, 1}, {4757, 1}, {4759, 1} }; private static int[][] randomChaotic = {//item id: 14664 {18349, 1}, {18351, 1}, {18353, 1}, {18355, 1}, {18357, 1}, {18359, 1} }; private static int[][] rareRewards = {//item id: 15246 {1037, 1}, {1038, 1}, {1040, 1}, {1042, 1}, {1044, 1}, {1046, 1}, {1048, 1}, {1050, 1}, {1053, 1}, {1055, 1}, {1057, 1} }; public static int generateBarrowsReward() { int rewardLevel = 0; if(rewardLevel == 0) { rewardLevel = 3; } return rewardLevel; } public static void addBarrowsReward(Player c) { int items = 11846; if(c.getItems().freeSlots() >= 1) { if(c.getItems().playerHasItem(items)) { c.getItems().deleteItem(items, 1); int reward = generateBarrowsReward(); switch(reward) { case 3: int rareRandom = Misc.random(randomBarrows.length - 1); c.getItems().addItem(randomBarrows[rareRandom][0], randomBarrows[rareRandom][1]); break; } c.sendMessage("You have recieved a "+c.getItems().getItemName(reward)+" from your barrows box!"); } } else { c.sendMessage("You need to have atleast 1 free inventory slot to open this!"); } } public static int generateRareReward() { int rewardLevel = 0; if(rewardLevel == 0) { rewardLevel = 3; } return rewardLevel; } public static void addRareReward(Player c) { int items = 15246; if(c.getItems().freeSlots() >= 1) { if(c.getItems().playerHasItem(items)) { c.getItems().deleteItem(items, 1); int reward = generateRareReward(); switch(reward) { case 3: int rareRandom = Misc.random(rareRewards.length - 1); c.getItems().addItem(rareRewards[rareRandom][0], rareRewards[rareRandom][1]); break; } c.sendMessage("You have recieved a "+c.getItems().getItemName(reward)+" from your rare box!"); } } else { c.sendMessage("You need to have atleast 1 free inventory slot to open this!"); } } public static int generateGodwarsReward() { int rewardLevel = 0; if(rewardLevel == 0) { rewardLevel = 3; } return rewardLevel; } public static void addGodwarsReward(Player c) { int items = 6183; if(c.getItems().freeSlots() >= 1) { if(c.getItems().playerHasItem(items)) { c.getItems().deleteItem(items, 1); int reward = generateGodwarsReward(); switch(reward) { case 3: int rareRandom = Misc.random(randomGodwars.length - 1); c.getItems().addItem(randomGodwars[rareRandom][0], randomGodwars[rareRandom][1]); break; } c.sendMessage("You have recieved a "+c.getItems().getItemName(reward)+" from your godwars box!"); } } else { c.sendMessage("You need to have atleast 1 free inventory slot to open this!"); } } public static int generateChaoticReward() { int rewardLevel = 0; if(rewardLevel == 0) { rewardLevel = 3; } return rewardLevel; } public static void addChaoticReward(Player c) { int items = 14664; if(c.getItems().freeSlots() >= 1) { if(c.getItems().playerHasItem(items)) { c.getItems().deleteItem(items, 1); int reward = generateChaoticReward(); switch(reward) { case 3: int rareRandom = Misc.random(randomChaotic.length - 1); c.getItems().addItem(randomChaotic[rareRandom][0], randomChaotic[rareRandom][1]); break; } c.sendMessage("You have recieved a "+c.getItems().getItemName(reward)+" from your chaotic box!"); } } else { c.sendMessage("You need to have atleast 1 free inventory slot to open this!"); } } } [/code]
  7. Hello recently i've discovered a bug on a PI source i'm using which gives players rank owner (character-rights 6). This bug happens as soon as a staff member using xteletome 'user' or checkbank 'user' this seems to happen with a couple commands and the commands are perfectly fine however I cannot seem to diagnose the problem. Any suggestions would be nice thanks.
  8. Hey everyone. I'm going to be starting my own RSPS. I have been a global administrator on InnovationX/Legacy614 twice. It was a populated server & its player base (at one point) peaked up to about 900. Over the next year or so, player base began to drop. Sadly, InnovationX was recently shut down which is what made me want to start my own RSPS. I have been in the RSPS Community for a long time. On InnovationX/Legacy, I was known as the global administrator "Pur3 0f G0d". People also called me by my real life name, Mahdy. Anyways, moving on. My forums are complete (vBulletin forums - verified license). I was planning on (or trying to) get a 317 server old that had perfect skilling, great PKing and a great economy. I wanted to bring the good old fun days back. My question I want to ask is this: Does anyone want to help me? My forums are perfect, I have spent the last week or so making sure they are 100% complete. I had a coder but he had a death in his family and he had to resign from his position and told me he'll be back. He doesn't know when, but he wants me to go look for more coder(s). So, here I am. I am looking for people who have experience and know how to code. I'm giving my all into this project. I really wanna find some people who would be as committed to this as I am. I'm not only just looking for coders, I am also looking for: Forum Moderators, Server Moderators, GFX Designers, etc. I have tons of plans for this server. I plan on spending all the money I can on advertisement as well. All server donations go directly to server expenses; VPS coverage, advertisements, etc. If you're interested, post below. Tell me your skills, what position you are applying for, why you should get it, all that good stuff. Thanks and I hope to talk to some of you again :) Regards, RebellionX. If you would like to talk to me on Skype, add me: MahdyE23. Only people who are serious though.
  9. i will give this account plus you will get 35 percent of donations rest will go to server if you want to join me in this journey add my skype justin.eaker :)
  10. hello there, im not new, but everytime i try to add a new command trying to make it so owners give dung tokens it dont work i was wondering if any one had any commands like that kicking around?? Using the Zenith source 729.
  11. Hey guys im needing someone to help me make a rsps I've tried to find many server and clients but most of them have failed so could anyone help me reply here or add me on skype : skype: dark.j.money
  12. clickitem.java [CODE]if (itemId == 7498) { c.isDonator = 1; c.getItems().deleteItem(7498, 1); c.logout(); }[/CODE]
  13. Does anyone know how to add it so spells like wind strike, water strike, etc gives EXP when you do damage to a NPC? Right now the only thing that gives mage exp is teleport spells. I wouldn't know where to start to add these and just searching around isn't helping.
  14. I can't upload nothing right now. But I'm willing offer my help to any one, I'm a good coder, not a super good coder. I'll help for free, I don't cost I got a nuff money all ready. :D
  15. So, I know how to do all the additem / portforwarding / No-IP.. But I really need to ask a few questions and I would love it if you would answer! Okay, so Ive decided to start the RSPS Creation process. I am currently using (Delta) RenegadezpK source/client.. I know the changes throughout making rights different, how to add npcs / spawn items.. It's just, when i "Zip" the client. I DONT KNOW WHAT IM DOING! I zipped the client (which had all my updates/changes made to it) and I sent it to my friend to "attempt" to play. The problem was, that a black screen (the cmd) popped up briefly and went away. Another question, is what should i put the serverip to? My ip, 127.0.0.1, or my no-ip? It's very complicated and I need help! Please! Thanks. - VitalNix (PM ME, OR EVEN QUICK REPLY)
  16. Hey i have just gotton back into private servers and though id give it a shot getting a 508 online at home. Anyway im having some issues giving myself admin Ive opened the Player.java file and edited the p.rights to my name. [CODE] } if (p.username.equals("Mitch")) { p.rights = 2; }[/CODE] However after compiling i log into my server and i am still an ordinary user. I have used a few different sources and have had no luck with any of them. Not to sure if it is my compiler as once ive used the supplied compiler on these different sources im left with the following after a few seconds of running. [CODE]Press any key to continue . . .[/CODE] It would be much appreciated if somebody could give me a hand with this. My skype name is Mitchoxity if you would like to add me. Thanks, Mitch :)
  17. Warscape is going to be used in one of my previous projects, continuing it and I thought I'd use "Scape" as there is not much of them around anymore and I thought it would be pretty fun to use it! This server is actually going to have a meaning to it, not log on, know what your doing and there your maxed. This will take a long time to complete hopefully get it done for the 16th of may (My birthday) and have it released to the community for you all to play. It is going to be a 474 look a like with many features and several quests that will have it's reasons for unlocking things and such. [B]Areas:[/B] Dungeons using ladders abbys teleport from the wilderness monsters/training by traveling proper Runescape city teleports and none of this monster teles and more Update Log: [CODE]-Started working on traveling -Starting planning the economy -improved woodcutting and mining -removed all shops ready for new ones -Home area at falador -Started working on a custom tutorial island. [/CODE] [B]Developers[/B] General - Main Programmer (Server sided) Requesting developers for client sided and web development! [B]Become a developer:[/B] [CODE] Email Name Why you would like to develop What do you want to develop [/CODE] Thank you! -General Please show your support and boost my condifence by thanking this post!
  18. Ok so i am using InsidiaX but i have a small problem. When trying to open the skillcape shop with gold in your inventory, the client crashes. I want to add the specific skillcape/hood to their bank(incase inventory is full) upon them getting 99 in that stat? My PlayerAssistant.java: [code] public void l*****p(int skill) { int totalLevel = (getLevelForXP(c.playerXP[0]) + getLevelForXP(c.playerXP[1]) + getLevelForXP(c.playerXP[2]) + getLevelForXP(c.playerXP[3]) + getLevelForXP(c.playerXP[4]) + getLevelForXP(c.playerXP[5]) + getLevelForXP(c.playerXP[6]) + getLevelForXP(c.playerXP[7]) + getLevelForXP(c.playerXP[8]) + getLevelForXP(c.playerXP[9]) + getLevelForXP(c.playerXP[10]) + getLevelForXP(c.playerXP[11]) + getLevelForXP(c.playerXP[12]) + getLevelForXP(c.playerXP[13]) + getLevelForXP(c.playerXP[14]) + getLevelForXP(c.playerXP[15]) + getLevelForXP(c.playerXP[16]) + getLevelForXP(c.playerXP[17]) + getLevelForXP(c.playerXP[18]) + getLevelForXP(c.playerXP[19]) + getLevelForXP(c.playerXP[20]) + getLevelForXP(c.playerXP[21]) + getLevelForXP(c.playerXP[22]) + getLevelForXP(c.playerXP[23]) + getLevelForXP(c.playerXP[24])); sendFrame126("Levels: "+totalLevel, 13983); switch(skill) { case 0: sendFrame126("Congratulations, you just advanced an Attack level!", 6248); sendFrame126("Your Attack level is now " + getLevelForXP(c.playerXP[skill]) + ".", 6249); c.sendMessage("Congratulations, you just advanced an Attack level."); c.getPA().sendFrame126("Combat Level: " + c.getCombatLevel() + "", 3983); sendFrame164(6247); break; case 1: sendFrame126("Congratulations, you just advanced a defence level!", 6254); sendFrame126("Your defence level is now "+getLevelForXP(c.playerXP[skill])+".", 6255); c.sendMessage("Congratulations, you just advanced a defence level."); c.getPA().sendFrame126("Combat Level: "+c.getCombatLevel()+"", 3983); sendFrame164(6253); break; case 2: sendFrame126("Congratulations, you just advanced a strength level!", 6207); sendFrame126("Your strength level is now "+getLevelForXP(c.playerXP[skill])+".", 6208); c.sendMessage("Congratulations, you just advanced a strength level."); c.getPA().sendFrame126("Combat Level: "+c.getCombatLevel()+"", 3983); sendFrame164(6206); break; case 3: sendFrame126("Congratulations, you just advanced a hitpoints level!", 6217); sendFrame126("Your hitpoints level is now "+getLevelForXP(c.playerXP[skill])+".", 6218); c.sendMessage("Congratulations, you just advanced a hitpoints level."); c.getPA().sendFrame126("Combat Level: "+c.getCombatLevel()+"", 3983); sendFrame164(6216); break; case 4: sendFrame126("Congratulations, you just advanced a ranged level!", 5453); sendFrame126("Your ranged level is now "+getLevelForXP(c.playerXP[skill])+".", 6114); c.sendMessage("Congratulations, you just advanced a ranging level."); c.getPA().sendFrame126("Combat Level: "+c.getCombatLevel()+"", 3983); sendFrame164(4443); break; case 5: sendFrame126("Congratulations, you just advanced a prayer level!", 6243); sendFrame126("Your prayer level is now "+getLevelForXP(c.playerXP[skill])+".", 6244); c.sendMessage("Congratulations, you just advanced a prayer level."); c.getPA().sendFrame126("Combat Level: "+c.getCombatLevel()+"", 3983); sendFrame164(6242); break; case 6: sendFrame126("Congratulations, you just advanced a magic level!", 6212); sendFrame126("Your magic level is now "+getLevelForXP(c.playerXP[skill])+".", 6213); c.sendMessage("Congratulations, you just advanced a magic level."); c.getPA().sendFrame126("Combat Level: "+c.getCombatLevel()+"", 3983); sendFrame164(6211); break; case 7: sendFrame126("Congratulations, you just advanced a cooking level!", 6227); sendFrame126("Your cooking level is now "+getLevelForXP(c.playerXP[skill])+".", 6228); c.sendMessage("Congratulations, you just advanced a cooking level."); sendFrame164(6226); break; case 8: sendFrame126("Congratulations, you just advanced a woodcutting level!", 4273); sendFrame126("Your woodcutting level is now "+getLevelForXP(c.playerXP[skill])+".", 4274); c.sendMessage("Congratulations, you just advanced a woodcutting level."); sendFrame164(4272); break; case 9: sendFrame126("Congratulations, you just advanced a fletching level!", 6232); sendFrame126("Your fletching level is now "+getLevelForXP(c.playerXP[skill])+".", 6233); c.sendMessage("Congratulations, you just advanced a fletching level."); sendFrame164(6231); break; case 10: sendFrame126("Congratulations, you just advanced a fishing level!", 6259); sendFrame126("Your fishing level is now "+getLevelForXP(c.playerXP[skill])+".", 6260); c.sendMessage("Congratulations, you just advanced a fishing level."); sendFrame164(6258); break; case 11: sendFrame126("Congratulations, you just advanced a fire making level!", 4283); sendFrame126("Your firemaking level is now "+getLevelForXP(c.playerXP[skill])+".", 4284); c.sendMessage("Congratulations, you just advanced a fire making level."); sendFrame164(4282); break; case 12: sendFrame126("Congratulations, you just advanced a crafting level!", 6264); sendFrame126("Your crafting level is now "+getLevelForXP(c.playerXP[skill])+".", 6265); c.sendMessage("Congratulations, you just advanced a crafting level."); sendFrame164(6263); break; case 13: sendFrame126("Congratulations, you just advanced a smithing level!", 6222); sendFrame126("Your smithing level is now "+getLevelForXP(c.playerXP[skill])+".", 6223); c.sendMessage("Congratulations, you just advanced a smithing level."); sendFrame164(6221); break; case 14: sendFrame126("Congratulations, you just advanced a mining level!", 4417); sendFrame126("Your mining level is now "+getLevelForXP(c.playerXP[skill])+".", 4438); c.sendMessage("Congratulations, you just advanced a mining level."); sendFrame164(4416); break; case 15: sendFrame126("Congratulations, you just advanced a herblore level!", 6238); sendFrame126("Your herblore level is now "+getLevelForXP(c.playerXP[skill])+".", 6239); c.sendMessage("Congratulations, you just advanced a herblore level."); sendFrame164(6237); break; case 16: sendFrame126("Congratulations, you just advanced a agility level!", 4278); sendFrame126("Your agility level is now "+getLevelForXP(c.playerXP[skill])+".", 4279); c.sendMessage("Congratulations, you just advanced an agility level."); sendFrame164(4277); break; case 17: sendFrame126("Congratulations, you just advanced a thieving level!", 4263); sendFrame126("Your theiving level is now "+getLevelForXP(c.playerXP[skill])+".", 4264); c.sendMessage("Congratulations, you just advanced a thieving level."); sendFrame164(4261); break; case 18: sendFrame126("Congratulations, you just advanced a slayer level!", 12123); sendFrame126("Your slayer level is now "+getLevelForXP(c.playerXP[skill])+".", 12124); c.sendMessage("Congratulations, you just advanced a slayer level."); sendFrame164(12122); break; case 20: sendFrame126("Congratulations, you just advanced a runecrafting level!", 4268); sendFrame126("Your runecrafting level is now "+getLevelForXP(c.playerXP[skill])+".", 4269); c.sendMessage("Congratulations, you just advanced a runecrafting level."); sendFrame164(4267); break; case 21: c.sendMessage("Congratulations, you just advanced a hunter level!"); c.sendMessage("Your hunter level is now "+getLevelForXP(c.playerXP[skill])+"."); break; case 22: sendFrame126("Congratulations, you just advanced a Summoning level!", 4268); sendFrame126("Your Summoning level is now "+getLevelForXP(c.playerXP[skill])+".", 4269); c.sendMessage("Congratulations, you just advanced a Summoning level."); sendFrame164(4267); break; case 23: sendFrame126("Congratulations, you just advanced a PK'ing level!", 12123); sendFrame126("Your PK'ing level is now "+getLevelForXP(c.playerXP[skill])+".", 12124); c.sendMessage("Congratulations, you just advanced a PK'ing level."); sendFrame164(12122); break; case 24: sendFrame126("Congratulations, you just advanced a Dungeoneering level!", 12123); sendFrame126("Your Dungeoneering level is now "+getLevelForXP(c.playerXP[skill])+".", 12124); c.sendMessage("Congratulations, you just advanced a Dungeoneering level."); sendFrame164(12122); break; } c.dialogueAction = 0; c.nextChat = 0; }[/code] How could i do this?
  19. Hello, I'm giving these away since I'm putting time into my Webhost now, so anyone who wants it can reply to the thread and if I think you're worthy of it then I'll PM you the details. Note: I will give you RDC (Remote Desktop) Access to the VPS, and I will change the nameservers on the domain, this is simply for security reasons... (I pay using a Card)...[B] YOU ARE ALLOWED TO CHANGE THE VPS PASSWORD![/B] [B]If you do not trust me, please don't flame my thread, its a free giveaway... [/B] Good luck to everyone who replies to the thread :) Also I will pick the winner with a random number generator :D
  20. I am wondering how to add immunity to poison for a set amount of time for anti-poisons. (+ & ++) This is the coding that I have, and no matter what I have tried, I cannot get it to function quite right. //Anti-Poison Potion case 2446: if (System.currentTimeMillis() -c.potionDelay < 2000) return; c.foodDelay = System.currentTimeMillis(); if (c.inTrade) { c.sM("You can't do this in trade."); return; } c.potionDelay = System.currentTimeMillis(); c.setAnimation(0x33D); c.sM("You drink a dose of the Anti-Poison."); c.deleteItem(2446, slot, 1); c.addItem(175, 1); c.poisoned = false; c.poisonDmg = false; break; I got the curing the poison down really good. But I cannot figure out how to code immunity to it. Would not mind it in some other items such as rings or necklaces lol. Any help would be greatly appreciated.
  21. Im hosting the server InsidiaX and idk how to get myself admin it is 317-602 - the RIghts : isnt on the characters file
  22. Hey guys, I need an auto cache for my 317 delta but I cannot find a tutorial or anything on it so if somebody could give me a tutoiral or a download link or something, I will give u 2.9m rsgp and full rune (g) on rs if helped. Thanks!
  23. Hi, I'm trying to make a crate that gives a certain item, but it's not working. I want to make it so they can't get the item if they are already wearing it, or have it in their inventory. Here's my code in Object1PacketHandler [CODE] case 15243: if (player.getLocation().getX() == 2505 && player.getLocation().getY() == 10284) { if (player.getEquipment().get(0).getDefinition().getId() == 5013) { if (player.getInventory().contains(5013, 1)) { player.sm("You can't take what isn't yours."); } } } else if (player.getLocation().getX() == 2505 && player.getLocation().getY() == 10284) { player.getInventory().addItem(5013, 1); player.sm("You found a helmet inside the crate, maybe this used to belong to someone..."); } [/CODE] Also, if you know how to make it so if they have the item in their bank they can't get another, can you please post it?
  24. Hey, idk how to add an npc that will give me an item, if u have 99 in every skill, for max cash im guessing its a fairly simple problem, help would be appreciated, thanks THIS IS FOR PROJECT INSANITY, IM USING HYBRID PVP SOURCE IF THAT HELPS
×