Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package server;
- /**
- *@Auther - Jeff
- *Herblore Class
- */
- public class Herblore {
- public Client c;
- public Herblore(Client client) {
- this.c = client;
- }
- public void potionMaking(int itemUsed, int useWith) {
- /**
- *List of Potions for Dose Mixing
- */
- public static final int potions[][] = { { 229, 125, 123, 121, 2428 },
- { 229, 179, 177, 175, 2446 }, { 229, 119, 117, 115, 113 },
- { 229, 131, 129, 127, 2430 }, { 229, 137, 135, 133, 2432 },
- { 229, 143, 141, 139, 2434 }, { 229, 149, 147, 145, 2436 },
- { 229, 161, 159, 157, 2440 }, { 229, 3030, 3028, 3026, 3024 },
- { 229, 167, 165, 163, 2442 }, { 229, 6691, 6689, 6687, 6685 } };
- /**
- *This method handles the potion dose mixing
- */
- potionLoop: for (int i2 = 0; i2 < potions.length; i2++) {
- for (int i3 = 1; i3 < potions[i2].length; i3++) {
- if (itemUsed == potions[i2][i3]) {
- for (int i4 = 1; i4 < potions[i2].length; i4++) {
- if (useWith == potions[i2][i4]) {
- int newDosage1 = 0;
- int newDosage2 = i3 + i4;
- if (newDosage2 >= potions[i2].length) {
- newDosage1 = (newDosage2)
- - (potions[i2].length - 1);
- newDosage2 = potions[i2].length - 1;
- }
- playerItems[itemUsedSlot] = potions[i2][newDosage1] + 1;
- playerItems[usedWithSlot] = potions[i2][newDosage2] + 1;
- resetItems(3214);
- break potionLoop;
- }
- }
- break potionLoop;
- }
- }
- }
- /**
- * Start of Herb Identification
- */
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 1800;
- c.lastAction = System.currentTimeMillis();
- switch (ItemID) {
- case 199: // Guam Leaf Indentifier
- if (playerLevel[15] >= 1) {
- c.deleteItem(199, 1);
- c.sM("You indentify the herb, it's a Guam Leaf");
- c.addItem(249, 1);
- c.addSkillXP(100, 15);
- }
- break;
- case 201: // Marentill Indentifier
- if (playerLevel[15] >= 5) {
- c.deleteItem(201, 1);
- c.sM("You indentify the herb, it's a Marrentill");
- c.addItem(251, 1);
- c.addSkillXP(200, 15);
- } else {
- c.sM("You need a Herblore Level of 5 to indentify this");
- }
- break;
- case 203: // Tarromin Indentifier
- if (playerLevel[15] >= 11) {
- c.deleteItem(203, 1);
- c.sM("You indentify the herb, it's a Tarromin");
- c.addItem(253, 1);
- c.addSkillXP(400, 15);
- } else {
- c.sM("You need a Herblore Level of 11 to indentify this");
- }
- break;
- case 205: // Harralander Indentifier
- if (playerLevel[15] >= 20) {
- c.deleteItem(205, 1);
- c.sM("You indentify the herb, it's a Harralander");
- c.addItem(255, 1);
- c.addSkillXP(800, 15);
- } else {
- c.sM("You need a Herblore Level of 20 to indentify this");
- }
- break;
- case 207: // Ranarr Weed Indentifier
- if (playerLevel[15] >= 25) {
- c.deleteItem(207, 1);
- c.sM("You indentify the herb, it's a Ranarr Weed");
- c.addItem(257, 1);
- c.addSkillXP(1600, 15);
- } else {
- c.sM("You need a Herblore Level of 25 to indentify this");
- }
- break;
- case 209: // Irit Leaf Indentifier
- if (playerLevel[15] >= 40) {
- c.deleteItem(209, 1);
- c.sM("You indentify the herb, it's an Irit Leaf");
- c.addItem(259, 1);
- c.addSkillXP(3200, 15);
- } else {
- c.sM("You need a Herblore Level of 40 to indentify this");
- }
- break;
- case 211: // Avantoe Indentifier
- if (playerLevel[15] >= 48) {
- c.deleteItem(211, 1);
- c.sM("You indentify the herb, it's an Avantoe");
- c.addItem(261, 1);
- c.addSkillXP(6400, 15);
- } else {
- c.sM("You need a Herblore Level of 48 to indentify this");
- }
- break;
- case 213: // Kwuarm Indentifier
- if (playerLevel[15] >= 54) {
- c.deleteItem(213, 1);
- c.sM("You indentify the herb, it's a Kwuarm");
- c.addItem(263, 1);
- c.addSkillXP(12800, 15);
- } else {
- c.sM("You need a Herblore Level of 54 to indentify this");
- }
- break;
- case 215: // Cadantine Indentifier
- if (playerLevel[15] >= 65) {
- c.deleteItem(215, 1);
- c.sM("You indentify the herb, it's a Cadantine");
- c.addItem(265, 1);
- c.addSkillXP(25600, 15);
- } else {
- c.sM("You need a Herblore Level of 65 to indentify this");
- }
- break;
- case 217: // Dwarf Weed Indentifier
- if (playerLevel[15] >= 70) {
- c.deleteItem(217, 1);
- c.sM("You indentify the herb, it's a Dwarf Weed");
- c.addItem(267, 1);
- c.addSkillXP(51200, 15);
- } else {
- c.sM("You need a Herblore Level of 70 to indentify this");
- }
- break;
- case 219: // Torstol Indentifier
- if (playerLevel[15] >= 75) {
- c.deleteItem(219, 1);
- c.sM("You indentify the herb, it's a Torstol");
- c.addItem(269, 1);
- c.addSkillXP(102400, 15);
- } else {
- c.sM("You need a Herblore Level of 75 to indentify this");
- }
- break;
- }
- }
- /**
- *End of Identifying
- */
- break;
- /**
- * Start of Herblore potion making
- */
- // Guam used on Vial
- if (itemUsed == 227 && useWith == 249 || itemUsed == 249
- && useWith == 227) {
- if (playerLevel[15] >= 1) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(249, 1);
- c.setAnimation(3283);
- c.addItem(91, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- }
- }
- // Marrentill used on Vial
- if (itemUsed == 227 && useWith == 251 || itemUsed == 251
- && useWith == 227) {
- if (playerLevel[15] >= 5) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(251, 1);
- c.setAnimation(3283);
- c.addItem(93, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- } else {
- c.sM("You need an Herblore Level of 5 to make this");
- }
- }
- // Tarromin used on Vial
- if (itemUsed == 227 && useWith == 253 || itemUsed == 253
- && useWith == 227) {
- if (playerLevel[15] >= 12) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(253, 1);
- c.setAnimation(3283);
- c.addItem(95, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- } else {
- c.sM("You need an Herblore Level of 12 to make this");
- }
- }
- // Harralander Weed used on Vial
- if (itemUsed == 227 && useWith == 255 || itemUsed == 255
- && useWith == 227) {
- if (playerLevel[15] >= 22) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(255, 1);
- c.setAnimation(3283);
- c.addItem(97, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- } else {
- c.sM("You need an Herblore Level of 22 to make this");
- }
- }
- // Ranarr Weed used on Vial
- if (itemUsed == 227 && useWith == 257 || itemUsed == 257
- && useWith == 227) {
- if (playerLevel[15] >= 30) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(257, 1);
- c.setAnimation(3283);
- c.addItem(99, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- } else {
- c.sM("You need an Herblore Level of 30 to make this");
- }
- }
- // Irit Leaf used on Vial
- if (itemUsed == 227 && useWith == 259 || itemUsed == 259
- && useWith == 227) {
- if (playerLevel[15] >= 45) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(259, 1);
- c.setAnimation(3283);
- c.addItem(101, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- } else {
- c.sM("You need an Herblore Level of 45 to make this");
- }
- }
- // Avantoe used on Vial
- if (itemUsed == 227 && useWith == 261 || itemUsed == 261
- && useWith == 227) {
- if (playerLevel[15] >= 52) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(261, 1);
- c.setAnimation(3283);
- c.addItem(103, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- } else {
- c.sM("You need an Herblore Level of 52 to make this");
- }
- }
- // Kwuarm used on Vial
- if (itemUsed == 227 && useWith == 263 || itemUsed == 263
- && useWith == 227) {
- if (playerLevel[15] >= 55) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(263, 1);
- c.setAnimation(3283);
- c.addItem(105, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- } else {
- c.sM("You need an Herblore Level of 55 to make this");
- }
- }
- // Cadantine used on Vial
- if (itemUsed == 227 && useWith == 265 || itemUsed == 265
- && useWith == 227) {
- if (playerLevel[15] >= 66) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(265, 1);
- c.setAnimation(3283);
- c.addItem(107, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- } else {
- c.sM("You need an Herblore Level of 66 to make this");
- }
- }
- // Dwarf Weed used on Vial
- if (itemUsed == 227 && useWith == 267 || itemUsed == 267
- && useWith == 227) {
- if (playerLevel[15] >= 72) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(227, 1);
- c.deleteItem(267, 1);
- c.setAnimation(3283);
- c.addItem(109, 1);
- c.sM("You combine the ingredients together to form an unfinished potion");
- }
- } else {
- c.sM("You need an Herblore Level of 72 to make this");
- }
- }
- // Eye of Newt used on Unfinished Potion
- if (itemUsed == 221 && useWith == 91 || itemUsed == 91
- && useWith == 221) {
- if (playerLevel[15] >= 1) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(221, 1);
- c.deleteItem(91, 1);
- c.setAnimation(3283);
- c.addItem(121, 1);
- c.addSkillXP(1000, 15);
- c.sM("You add an Eye of Newt to create an Attack Potion");
- }
- }
- }
- // Unicorn horn dust on Unfinished potion
- if (itemUsed == 235 && useWith == 93 || itemUsed == 93
- && useWith == 235) {
- if (playerLevel[15] >= 5) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(235, 1);
- c.deleteItem(93, 1);
- c.setAnimation(3283);
- c.addItem(175, 1);
- c.addSkillXP(1000, 15);
- c.sM("You add Unicorn horn dust to create an Anti-Posion Potion");
- }
- } else {
- c.sM("You need an Herblore Level of 5 to make this");
- }
- }
- // Limpwurt root used on Unfinished potion
- if (itemUsed == 225 && useWith == 95 || itemUsed == 95
- && useWith == 225) {
- if (playerLevel[15] >= 12) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(221, 1);
- c.deleteItem(95, 1);
- c.setAnimation(3283);
- c.addItem(113, 1);
- c.addSkillXP(1000, 15);
- c.sM("You add Limpwurt root to create an Strength Potion");
- }
- } else {
- c.sM("You need an Herblore Level of 12 to make this");
- }
- }
- // Red spider eggs root used on Unfinished potion
- if (itemUsed == 223 && useWith == 97 || itemUsed == 97
- && useWith == 223) {
- if (playerLevel[15] >= 22) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(223, 1);
- c.deleteItem(97, 1);
- c.setAnimation(3283);
- c.addItem(127, 1);
- c.addSkillXP(1000, 15);
- c.sM("You add Red Spider eggs to create a Restore Potion");
- }
- } else {
- c.sM("You need an Herblore Level of 22 to make this");
- }
- }
- // White berries used on Unfinished potion
- if (itemUsed == 239 && useWith == 99 || itemUsed == 99
- && useWith == 239) {
- if (playerLevel[15] >= 30) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(239, 1);
- c.deleteItem(99, 1);
- c.setAnimation(3283);
- c.addItem(134, 1);
- c.addSkillXP(1000, 15);
- c.sM("You add White berries to create a Defence Potion");
- }
- } else {
- c.sM("You need an Herblore Level of 30 to make this");
- }
- }
- // Snape Grass used on Unfinished potion
- if (itemUsed == 231 && useWith == 99 || itemUsed == 99
- && useWith == 231) {
- if (playerLevel[15] >= 38) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(231, 1);
- c.deleteItem(99, 1);
- c.setAnimation(3283);
- c.addItem(139, 1);
- c.addSkillXP(1000, 15);
- c.sM("You add Snape Grass to create a Prayer Potion");
- }
- } else {
- c.sM("You need an Herblore Level of 38 to make this");
- }
- }
- // Eye of Newt used on Unfinished potion
- if (itemUsed == 221 && useWith == 101 || itemUsed == 101
- && useWith == 221) {
- if (playerLevel[15] >= 45) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(221, 1);
- c.deleteItem(101, 1);
- c.setAnimation(3283);
- c.addItem(145, 1);
- c.addSkillXP(1000, 15);
- c.sM("You add an Eye of Newt to create an Super Attack Potion");
- }
- } else {
- c.sM("You need an Herblore Level of 45 to make this");
- }
- }
- // Limpwurt Root used on Unfinished potion
- if (itemUsed == 225 && useWith == 103 || itemUsed == 103
- && useWith == 225) {
- if (playerLevel[15] >= 55) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(225, 1);
- c.deleteItem(103, 1);
- c.setAnimation(3283);
- c.addItem(157, 1);
- c.addSkillXP(1000, 15);
- c.sM("You add a Limpwurt Root to create a Super Strength Potion");
- }
- } else {
- c.sM("You need an Herblore Level of 55 to make this");
- }
- }
- // Whiteberries used on Unfinished potion
- if (itemUsed == 239 && useWith == 107 || itemUsed == 107
- && useWith == 239) {
- if (playerLevel[15] >= 66) {
- if (System.currentTimeMillis() - c.lastAction > c.actionInterval) {
- c.actionInterval = 2800;
- c.lastAction = System.currentTimeMillis();
- c.deleteItem(239, 1);
- c.deleteItem(107, 1);
- c.setAnimation(3283);
- c.addItem(163, 1);
- c.addSkillXP(1000, 15);
- c.sM("You add Whiteberries to create a Super Defence Potion");
- }
- } else {
- c.sM("You need an Herblore Level of 66 to make this");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement