Jump to content

Search the Community

Showing results for tags 'repair'.



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

  1. Information Hello everyone, I'm here to share a Armour Repair Stand with you, you can easily add more amour to be repaired. The reason: I decided share this because most of the Server does not have a Armour Repair Stand, so you can not get your broken item repaired. Guide First, open your source and then find a folder called: 'Dialogues'. Create a new Java file called 'Repair'. [CODE] package com.rs.game.player.dialogues; import com.rs.game.player.content.RepairItems; public class Repair extends Dialogue { private int itemId; [MENTION=15855]Over[/MENTION]ride public void start() { itemId = (Integer) parameters[1]; sendOptionsDialogue("What would you like to do?", "Repair my item!", "How much would it cost?","Nevermind.."); } [MENTION=15855]Over[/MENTION]ride public void run(int interfaceId, int componentId) { int amount = player.getInventory().getItems().getNumberOf(itemId); if (stage == -1) { if (componentId == OPTION_1) { if (amount == 1) { RepairItems.Repair(player,itemId,1); return; } sendOptionsDialogue("What would you like to do?", "Repair one item.","Repair X of your items", "Repair all items."); stage = 2; } else if (componentId == OPTION_2) { RepairItems.CheckPrice(player,itemId,amount); } else { end(); } } else if (stage == 2) { if (componentId == OPTION_1) { RepairItems.Repair(player,itemId,1); } else if (componentId == OPTION_2) { player.getTemporaryAttributtes().put("Repair", Integer.valueOf(0)); player.getTemporaryAttributtes().put("Ritem", itemId); player.getPackets().sendRunScript(108, new Object[] { "You have "+amount+" items that need to be repaired, How many would you like to repair?" }); end(); } else { RepairItems.Repair(player,itemId,amount); } } } [MENTION=15855]Over[/MENTION]ride public void finish() { } } [/CODE] After you have added the go to DiallogueHandler.Java and add this: [CODE] handledDialogues.put("Repair", (Class<Dialogue>) Class.forName(Repair.class.getCanonicalName())); [/CODE] Ok after you have done it, you should find a folder named: 'Content. Then you need to add a java file called 'RepairItems'. And then add: [CODE] package com.rs.game.player.content; import java.util.HashMap; import java.util.Map; import java.text.DecimalFormat; import com.rs.game.item.Item; import com.rs.game.player.Player; public class RepairItems { public enum BrokenItems { GUTHANS_HELM(4908, 4724, 100000), GUTHANS_PLATEBODY(4920, 4738, 100000), GUTHANS_PLATESKIRT(4926, 4730, 100000), GUTHANS_WARSPEAR(4914, 4726, 100000), AHRIMS_HOOD(4860, 4708, 100000), AHRIMS_STAFF(4866, 4710, 100000), AHRIMS_ROBE_TOP(4872, 4712, 100000), AHRIMS_ROBE_SKIRT(4878, 4714, 100000), DHAROKS_HELM(4884, 4716, 100000), DHAROKS_GREATAXE(4890, 4718, 100000), DHAROKS_PLATEBODY(4896, 4720, 100000), DHAROKS_PLATELEGS(4902, 4722, 100000), KARILS_COIF(4932, 4732, 100000), KARILS_CROSSBOW(4938, 4734, 100000), KARILS_TOP(4944, 4736, 100000), KARILS_SKIRT(4950, 4738, 100000), TORAGS_HELM(4956, 4745, 100000), TORAGS_HAMMER(4962, 4747, 100000), TORAGS_PLATEBODY(4968, 4749, 100000), TORAGS_PLATELEGS(4974, 4751, 100000), VERACS_HELM(4980, 4753, 100000), VERACS_FLAIL(4968, 4755, 100000), VERACS_BRASSARD(4992, 4757, 100000), VERACS_PLATESKIRT(4998, 4759, 100000), TORVA_HELM(20138, 20135, 2000000), TORVA_PLATE(20142, 20139, 2000000), TORVA_LEGS(20146, 20143, 2000000), TORVA_GLOVES(24979, 24977, 2000000), TORVA_BOOTS(24985, 24983, 2000000), PERNIX_COWL(20150, 20147, 1500000), PERNIX_BODY(20154, 20151, 1500000), PERNIX_CHAPS(20158, 20155, 1500000), PERNIX_GLOVES(24976, 24974, 1500000), PERNIX_BOOTS(24991, 24989, 1500000), ZARYTE_BOW(20174, 20171, 2000000), VIRTUS_MASK(20162, 20159, 1000000), VIRTUS_TOP(20166, 20163, 1000000), VIRTUS_LEGS(20170, 20167, 1000000), VIRTUS_GLOVES(24982, 24980, 1000000), VIRTUS_BOOTS(24988, 24986, 1000000); private int id; private int id2; private int Price; private static Map<Integer, BrokenItems> BROKENITEMS = new HashMap<Integer, BrokenItems>(); static { for (BrokenItems brokenitems : BrokenItems.values()) { BROKENITEMS.put(brokenitems.getId(), brokenitems); } } public static BrokenItems forId(int id) { return BROKENITEMS.get(id); } private BrokenItems(int id, int id2, int Price) { this.id = id; this.id2 = id2; this.Price = Price; } public int getId() { return id; } public int getId2() { return id2; } public int getPrice() { return Price; } } public static void Repair(Player player,int itemId,int amount) { final BrokenItems brokenitems = BrokenItems.forId(itemId); Item item = new Item(brokenitems.getId(), 1); int price = brokenitems.getPrice(); if (amount == 1) { if (player.getInventory().containsItem(995, price)) { player.getInventory().deleteItem(itemId, 1); player.getInventory().deleteItem(995, price); player.getInventory().addItem(brokenitems.getId2(), 1); player.getDialogueManager().startDialogue("SimpleMessage","You have repaired your item("+item.getName()+") for "+getFormattedNumber(price)+" coins."); return; } else { player.getDialogueManager().startDialogue("SimpleMessage","You dont have enough money to repair this item."+"You need "+getFormattedNumber(price)+" coins."); return; } } else { if (player.getInventory().containsItem(995, price * amount)) { player.getInventory().deleteItem(itemId, amount); player.getInventory().deleteItem(995, price * amount); player.getInventory().addItem(brokenitems.getId2(), amount); player.getDialogueManager().startDialogue("SimpleMessage","You have repaired your items("+amount+" X "+item.getName()+") for "+getFormattedNumber(price * amount)+" coins."); return; } else { player.getDialogueManager().startDialogue("SimpleMessage","You dont have enough money to repair these items."+"You need "+getFormattedNumber(price * amount)+" coins."); return; } } } public static void CheckPrice(Player player,int itemId, int amount) { final BrokenItems brokenitems = BrokenItems.forId(itemId); int price = brokenitems.getPrice(); player.getDialogueManager().startDialogue("SimpleNPCMessage",945, "These items will cost you " +getFormattedNumber(price * amount)+" coins."); return; } private static String getFormattedNumber(int amount) { return new DecimalFormat("#,###,##0").format(amount).toString(); } } [/CODE] Ok so to get the Armour Repair Stand to work you need to add this method in the folder named: 'ObjectHandler'. Search for: [CODE]'handleItemOnObject'. [/CODE] Add this below. [CODE] } else if (object.getId() == 13715) { if (BrokenItems.forId(itemId) == null) { player.getDialogueManager().startDialogue("SimpleMessage","You can't repair this item."); return; } player.getDialogueManager().startDialogue("Repair", 945, itemId); return; [/CODE] Picture By using your broken item on the 'Armour Repair', will you get your armour repaired. [IMG]http://i59.tinypic.com/2r70a6d.png[/IMG] [I]Enjoy it.[/I]
  2. Thought I would release this as it may help some of those who dont know how or simply are too lazy... I was aske dto make this today so here it is! Make a new Dialogue class called Repair.java and add this in: [CODE] package com.rs.game.player.dialogues; import com.rs.cache.loaders.NPCDefinitions; import com.rs.game.WorldTile; public class Repair extends Dialogue { private int npcId; [MENTION=15855]Over[/MENTION]ride public void start() { npcId = (Integer) parameters[0]; sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Hello, I can your broken equipment,", " would you like to?" }, IS_NPC, npcId, 9827); } [MENTION=15855]Over[/MENTION]ride public void run(int interfaceId, int componentId) { if (stage == -1) { sendEntityDialogue(SEND_1_TEXT_CHAT, new String[] { player.getDisplayName(), "um, Hellz yea!" }, IS_PLAYER, player.getIndex(), 9827); stage = 1; } else if (stage == 1) { sendOptionsDialogue("What would you like to repair?", "Torva full helm", "Torva platebody.", "Torva platelegs.", "Torva gloves.", "More Options..."); stage = 2; } else if (stage == 2) { if (componentId == OPTION_1) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20138, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20138, 1); player.getInventory().addItem(20135, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Torva full helm to repair this."); } } player.closeInterfaces(); } else if (componentId == OPTION_2) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20142, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20142, 1); player.getInventory().addItem(20139, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Torva platebody to repair this."); } } player.closeInterfaces(); } else if (componentId == OPTION_3) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20146, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20146, 1); player.getInventory().addItem(20143, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Torva platelegs to repair this."); } } player.closeInterfaces(); } else if (componentId == OPTION_4) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(24979, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(24979, 1); player.getInventory().addItem(24977, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Torva gloves to repair this."); } } player.closeInterfaces(); } else if (componentId == OPTION_5) { stage = 3; sendOptionsDialogue("What would you like to repair?", "Torva boots.", "Pernix cowl.", "Pernix body.", "Pernix chaps", "More Options..."); } } else if (stage == 3) { if (componentId == OPTION_1) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(24985, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(24985, 1); player.getInventory().addItem(24983, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Torva boots to repair this."); } } player.closeInterfaces(); } else if (componentId == OPTION_2) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20150, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20150, 1); player.getInventory().addItem(20147, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Pernix cowl to repair this."); } } player.closeInterfaces(); } else if (componentId == OPTION_3) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20154, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20154, 1); player.getInventory().addItem(20151, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Pernix body to repair this."); } } player.closeInterfaces(); } else if (componentId == OPTION_4) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20158, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20158, 1); player.getInventory().addItem(20155, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Pernix chaps to repair this."); } } player.closeInterfaces(); } else if (componentId == OPTION_5) { sendOptionsDialogue("What would you like to repair?", "Pernix gloves", "Pernix boots.", "Virtus mask.", "Virtus robe top.", "More Options..."); stage = 4; } } else if (stage == 4) { if (componentId == OPTION_1) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(24976, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(24976, 1); player.getInventory().addItem(24974, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Pernix gloves to repair this."); } } } else if (componentId == OPTION_2) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(24991, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(24991, 1); player.getInventory().addItem(24989, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Pernix boots to repair this."); } } } else if (componentId == OPTION_3) if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20162, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20162, 1); player.getInventory().addItem(20159, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Virtus mask to repair this."); } } else if (componentId == OPTION_4) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20166, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20166, 1); player.getInventory().addItem(20163, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Virtus robe top to repair this."); } } } else if (componentId == OPTION_5) { stage = 5; sendOptionsDialogue("What would you like to repair?", "Virtus robe legs", "Virtus gloves.", "Virtus boots.", "Zaryte bow.", "More Options..."); } } else if (stage == 5) { if (componentId == OPTION_1) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20170, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20170, 1); player.getInventory().addItem(20167, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Virtus robe legs to repair this."); } } } else if (componentId == OPTION_2) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(24982, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(24982, 1); player.getInventory().addItem(24980, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Virtus gloves to repair this."); } } } else if (componentId == OPTION_3) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(24988, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(24988, 1); player.getInventory().addItem(24986, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Virtus boots to repair this."); } } } else if (componentId == OPTION_4) { if (player.getInventory().containsItem(995, 100000000)) { if (player.getInventory().containsItem(20174, 1)) { player.getInventory().deleteItem(995, 100000000); player.getInventory().deleteItem(20174, 1); player.getInventory().addItem(20171, 1); } else { player.getPackets().sendGameMessage("You need 100m and a broken Zarye bow to repair this."); } } } else if (componentId == OPTION_5) { stage = 2; sendOptionsDialogue("What would you like to repair?", "Torva full helm", "Torva platebody.", "Torva platelegs.", "Torva gloves.", "More Options..."); } } } [MENTION=15855]Over[/MENTION]ride public void finish() { } } [/CODE] Inside NPCHandler.java under first click add: [CODE] else if (npc.getId() == 10) player.getDialogueManager().startDialogue("Repair", npc.getId()); [/CODE] (yes ik its a schoolgirl you can replace the ID) Next in DialogueHandler.java add this: [CODE] Class<Dialogue> value46 = (Class<Dialogue>) Class .forName(Repair.class.getCanonicalName()); handledDialogues.put("Repair", value56); [/CODE] Save Close Compile And Done! Then place a spot in you NPCSpawning.java file and save compile and close then load server and get to repairing your broken stuff like a boss.
×