Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • duper83

    Members
    • Posts

      68
    • Joined

    • Last visited

    Recent Profile Visitors

    596 profile views

    duper83's Achievements

    1. I agree this should be a free script as the environment for it to work no longer exist. There just simply aren't enough people using it for it to work atm. Make it free so the user count increases and it actually works. @GZero
    2. Does this work for untradeables like god books or ghostly robes?
    3. fix it bro
    4. import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; import org.dreambot.api.methods.skills.Skill; import org.dreambot.api.methods.map.Area; import org.dreambot.api.methods.map.Tile; import org.dreambot.api.wrappers.interactive.NPC; import org.dreambot.api.wrappers.interactive.GameObject; import org.dreambot.api.wrappers.items.Item; import org.dreambot.api.wrappers.items.GroundItem; import org.dreambot.api.methods.dialogues.Dialogues; import org.dreambot.api.utilities.impl.Condition; import org.dreambot.api.utilities.Sleep; import org.dreambot.api.methods.MethodProvider; @ScriptManifest( author = "Grok", name = "DesertTreasureBot", version = 3.0, description = "Extremely detailed theoretical script for Desert Treasure I", category = Category.QUEST ) public class DesertTreasureBot extends AbstractScript { // Constants: Areas private final Area LUMBRIDGE = new Area(3205, 3208, 3225, 3232); private final Area GRAND_EXCHANGE = new Area(3161, 3486, 3171, 3492); private final Area LUMBRIDGE_SWAMP_MINE = new Area(3270, 3150, 3290, 3170); private final Area GNOME_STRONGHOLD = new Area(2470, 3436, 2490, 3456); private final Area ARDOUGNE_MARKET = new Area(2610, 3290, 2670, 3310); private final Area TAVERLEY = new Area(2880, 3390, 2900, 3410); private final Area VARROCK = new Area(2945, 3365, 2965, 3385); private final Area BURTHORPE = new Area(2427, 3537, 2437, 3547); private final Area BEDABIN_CAMP = new Area(3300, 3100, 3320, 3120); private final Area DIG_SITE = new Area(3345, 3345, 3365, 3365); private final Area TROLLHEIM = new Area(2850, 3750, 2870, 3770); private final Area SMOKE_DUNGEON = new Area(3300, 5200, 3320, 5220); private final Area SHADOW_DUNGEON = new Area(2720, 5060, 2740, 5080); private final Area PYRAMID = new Area(3220, 2880, 3240, 2900); // Constants: Quest Order private final String[] QUEST_ORDER = { "Cook's Assistant", "The Restless Ghost", "Priest in Peril", "Waterfall Quest", "The Feud", "Druidic Ritual", "The Dig Site", "The Tourist Trap", "Death Plateau", "Troll Stronghold", "Temple of Ikov", "Desert Treasure" }; // Constants: Skill Requirements private final Skill[] SKILLS = { Skill.MINING, Skill.AGILITY, Skill.THIEVING, Skill.HERBLORE, Skill.FLETCHING, Skill.SMITHING, Skill.RANGED, Skill.SLAYER, Skill.FIREMAKING, Skill.MAGIC }; private final int[] INITIAL_LEVELS = {15, 10, 5, 1, 1, 1, 1, 1, 1, 1}; private final int[] FINAL_LEVELS = {15, 15, 53, 10, 10, 20, 40, 10, 50, 50}; // State Management private enum State { INITIALIZE, TRAIN_INITIAL_SKILLS, COMPLETE_QUESTS, TRAIN_FINAL_SKILLS, DESERT_TREASURE, RECOVER, BANK, COMBAT } private State currentState = State.INITIALIZE; private String currentQuest = null; private int questStep = 0; private String currentBoss = null; // Inventory and Gear private final String[] STARTING_ITEMS = { "Shark,100,1000", "Prayer potion(4),20,10000", "Super restore(4),10,10000", "Antipoison(4),5,2000", "Amulet of glory(6),1,15000", "Coins,10000,0", "Fire rune,5000,5", "Air rune,20000,5", "Earth rune,5000,5", "Water rune,5000,5", "Tinderbox,1,100", "Knife,1,100", "Guam leaf,50,100", "Eye of newt,50,100", "Logs,100,50", "Copper ore,200,100", "Tin ore,200,100", "Shortbow,1,100", "Bronze arrow,1000,5", "Willow logs,700,100" }; private final String[] DESERT_TREASURE_ITEMS = { "Magic logs,12,1000", "Steel bar,6,500", "Molten glass,6,200", "Ashes,1,100", "Charcoal,1,100", "Blood rune,1,200", "Bones,1,100", "Silver bar,1,100", "Garlic,1,50", "Spice,1,200", "Pestle and mortar,1,100", "Cake,1,200", "Spiked boots,1,500", "Facemask,1,1000", "Ice gloves,1,1000", "Lockpick,20,50" }; @Override public void onStart() { log("Starting Desert Treasure Bot (Theoretical, Extremely Detailed)"); currentState = State.INITIALIZE; currentQuest = null; questStep = 0; currentBoss = null; } @Override public int onLoop() { // Redundant checks if (!getClient().isLoggedIn()) { log("Not logged in. Stopping."); stop(); return -1; } if (getInventory().isFull() && currentState != State.BANK) { log("Inventory full. Switching to BANK state."); currentState = State.BANK; } if (getLocalPlayer().isInCombat() && currentState != State.DESERT_TREASURE && currentState != State.COMBAT) { log("Unexpected combat detected. Switching to COMBAT state."); currentState = State.COMBAT; } if (getLocalPlayer().getHealthPercent() == 0) { log("Player is dead. Switching to RECOVER state."); currentState = State.RECOVER; } // Execute state switch (currentState) { case INITIALIZE: initialize(); break; case TRAIN_INITIAL_SKILLS: trainInitialSkills(); break; case COMPLETE_QUESTS: completeQuests(); break; case TRAIN_FINAL_SKILLS: trainFinalSkills(); break; case DESERT_TREASURE: completeDesertTreasure(); break; case RECOVER: recover(); break; case BANK: bankItems(); break; case COMBAT: handleUnexpectedCombat(); break; } // Anti-ban: Random delays and actions if (MethodProvider.random(0, 100) < 10) { getCamera().rotateToEntity(getLocalPlayer()); MethodProvider.sleep(sleepRandom(100, 300)); } if (MethodProvider.random(0, 100) < 5) { getSkills().hoverSkill(Skill.HITPOINTS); MethodProvider.sleep(sleepRandom(200, 500)); } return sleepRandom(200, 600); } // 1. Initialization private void initialize() { log("Initializing script..."); // Verify starting conditions (redundant checks) for (int i = 0; i < SKILLS.length; i++) { if (getSkills().getRealLevel(SKILLS[i]) > 1) { log("Skill " + SKILLS[i] + " is level " + getSkills().getRealLevel(SKILLS[i]) + ", expected 1. Stopping."); stop(); return; } if (getSkills().getRealLevel(SKILLS[i]) != 1) { log("Double-check: Skill " + SKILLS[i] + " is not level 1. Stopping."); stop(); return; } } if (getQuests().getQuestPoints() > 0) { log("Quest points are " + getQuests().getQuestPoints() + ", expected 0. Stopping."); stop(); return; } if (getQuests().getQuestPoints() != 0) { log("Double-check: Quest points not 0. Stopping."); stop(); return; } // Move to Grand Exchange if (!GRAND_EXCHANGE.contains(getLocalPlayer())) { log("Moving to Grand Exchange to buy starting items."); getWalking().walk(GRAND_EXCHANGE.getRandomTile()); Sleep.sleepUntil(() -> GRAND_EXCHANGE.contains(getLocalPlayer()), 15000); if (!GRAND_EXCHANGE.contains(getLocalPlayer())) { log("Failed to reach Grand Exchange. Retrying."); getWalking().walk(GRAND_EXCHANGE.getRandomTile()); Sleep.sleepUntil(() -> GRAND_EXCHANGE.contains(getLocalPlayer()), 15000); } } // Buy starting items log("Buying starting items..."); for (String item : STARTING_ITEMS) { String[] parts = item.split(","); String name = parts[0]; int quantity = Integer.parseInt(parts[1]); int price = Integer.parseInt(parts[2]); if (!getInventory().contains(name) || getInventory().count(name) < quantity) { log("Buying " + quantity + " " + name + " for " + price + " each."); getGrandExchange().buyItem(name, quantity, price); Sleep.sleepUntil(() -> getInventory().contains(name) && getInventory().count(name) >= quantity, 20000); if (!getInventory().contains(name)) { log("Failed to buy " + name + ". Retrying."); getGrandExchange().buyItem(name, quantity, price); Sleep.sleepUntil(() -> getInventory().contains(name), 20000); } } } // Bank items and withdraw essentials log("Banking items and withdrawing essentials..."); if (!getBank().isOpen()) { log("Opening bank."); getBank().open(); Sleep.sleepUntil(() -> getBank().isOpen(), 5000); if (!getBank().isOpen()) { log("Bank not opened. Retrying."); getBank().open(); Sleep.sleepUntil(() -> getBank().isOpen(), 5000); } } getBank().depositAllItems(); Sleep.sleepUntil(() -> getInventory().isEmpty(), 5000); getBank().withdraw("Coins", 10000); Sleep.sleepUntil(() -> getInventory().contains("Coins") && getInventory().count("Coins") >= 10000, 5000); getBank().withdraw("Shark", 28); Sleep.sleepUntil(() -> getInventory().contains("Shark") && getInventory().count("Shark") >= 28, 5000); getBank().withdraw("Amulet of glory(6)", 1); Sleep.sleepUntil(() -> getInventory().contains("Amulet of glory(6)"), 5000); getBank().close(); Sleep.sleepUntil(() -> !getBank().isOpen(), 5000); log("Initialization complete. Switching to TRAIN_INITIAL_SKILLS."); currentState = State.TRAIN_INITIAL_SKILLS; } // 2. Train Initial Skills (Mining 15, Agility 10, Thieving 5) private void trainInitialSkills() { log("Training initial skills..."); // Mining to 15 if (getSkills().getRealLevel(Skill.MINING) < 15) { log("Training Mining to level 15."); trainSkill(Skill.MINING, LUMBRIDGE_SWAMP_MINE, "Copper rock", 15, new String[]{"Bronze pickaxe,1,100"}); } // Double-check Mining if (getSkills().getRealLevel(Skill.MINING) < 15) { log("Double-check: Mining still below 15. Retraining."); trainSkill(Skill.MINING, LUMBRIDGE_SWAMP_MINE, "Copper rock", 15, new String[]{"Bronze pickaxe,1,100"}); } // Agility to 10 if (getSkills().getRealLevel(Skill.AGILITY) < 10) { log("Training Agility to level 10."); trainSkill(Skill.AGILITY, GNOME_STRONGHOLD, "Log balance", 10, new String[]{}); } if (getSkills().getRealLevel(Skill.AGILITY) < 10) { log("Double-check: Agility still below 10. Retraining."); trainSkill(Skill.AGILITY, GNOME_STRONGHOLD, "Log balance", 10, new String[]{}); } // Thieving to 5 if (getSkills().getRealLevel(Skill.THIEVING) < 5) { log("Training Thieving to level 5."); trainSkill(Skill.THIEVING, LUMBRIDGE, "Man", 5, new String[]{}); } if (getSkills().getRealLevel(Skill.THIEVING) < 5) { log("Double-check: Thieving still below 5. Retraining."); trainSkill(Skill.THIEVING, LUMBRIDGE, "Man", 5, new String[]{}); } // Verify all initial skills if (getSkills().getRealLevel(Skill.MINING) >= 15 && getSkills().getRealLevel(Skill.AGILITY) >= 10 && getSkills().getRealLevel(Skill.THIEVING) >= 5) { log("Initial skills trained. Switching to COMPLETE_QUESTS."); currentState = State.COMPLETE_QUESTS; } else { log("Initial skills not fully trained. Retrying."); } } // 3. Complete Quests private void completeQuests() { log("Checking quests..."); if (currentQuest == null) { log("No current quest. Selecting next quest."); for (String quest : QUEST_ORDER) { if (!getQuests().isFinished(quest) && !quest.equals("Desert Treasure")) { log("Selected quest: " + quest); currentQuest = quest; questStep = 0; checkQuestRequirements(quest); break; } } if (currentQuest == null) { log("All prerequisite quests complete. Switching to TRAIN_FINAL_SKILLS."); currentState = State.TRAIN_FINAL_SKILLS; } } else { log("Executing quest: " + currentQuest + ", step " + questStep); executeQuestStep(currentQuest, questStep); } } private void checkQuestRequirements(String quest) { log("Checking requirements for " + quest); switch (quest) { case "The Feud": if (getSkills().getRealLevel(Skill.THIEVING) < 30) { log("Training Thieving to 30 for The Feud."); trainSkill(Skill.THIEVING, ARDOUGNE_MARKET, "Market stall", 30, new String[]{}); } if (getSkills().getRealLevel(Skill.THIEVING) < 30) { log("Double-check: Thieving still below 30. Retraining."); trainSkill(Skill.THIEVING, ARDOUGNE_MARKET, "Market stall", 30, new String[]{}); } break; case "The Dig Site": if (getSkills().getRealLevel(Skill.HERBLORE) < 10) { log("Need Herblore 10 for The Dig Site."); if (!getQuests().isFinished("Druidic Ritual")) { log("Druidic Ritual not complete. Starting it first."); currentQuest = "Druidic Ritual"; questStep = 0; } else { log("Training Herblore to 10."); trainSkill(Skill.HERBLORE, TAVERLEY, "Attack potion", 10, new String[]{"Guam leaf,10,100", "Eye of newt,10,100"}); } } if (getSkills().getRealLevel(Skill.HERBLORE) < 10) { log("Double-check: Herblore still below 10. Retraining."); trainSkill(Skill.HERBLORE, TAVERLEY, "Attack potion", 10, new String[]{"Guam leaf,10,100", "Eye of newt,10,100"}); } break; case "The Tourist Trap": if (getSkills().getRealLevel(Skill.FLETCHING) < 10) { log("Training Fletching to 10 for The Tourist Trap."); trainSkill(Skill.FLETCHING, LUMBRIDGE, "Arrow shafts", 10, new String[]{"Logs,100,50", "Knife,1,100"}); } if (getSkills().getRealLevel(Skill.FLETCHING) < 10) { log("Double-check: Fletching still below 10. Retraining."); trainSkill(Skill.FLETCHING, LUMBRIDGE, "Arrow shafts", 10, new String[]{"Logs,100,50", "Knife,1,100"}); } if (getSkills().getRealLevel(Skill.SMITHING) < 20) { log("Training Smithing to 20 for The Tourist Trap."); trainSkill(Skill.SMITHING, VARROCK, "Bronze bar", 20, new String[]{"Copper ore,100,100", "Tin ore,100,100"}); } if (getSkills().getRealLevel(Skill.SMITHING) < 20) { log("Double-check: Smithing still below 20. Retraining."); trainSkill(Skill.SMITHING, VARROCK, "Bronze bar", 20, new String[]{"Copper ore,100,100", "Tin ore,100,100"}); } break; case "Troll Stronghold": if (getSkills().getRealLevel(Skill.AGILITY) < 15) { log("Training Agility to 15 for Troll Stronghold."); trainSkill(Skill.AGILITY, GNOME_STRONGHOLD, "Log balance", 15, new String[]{}); } if (getSkills().getRealLevel(Skill.AGILITY) < 15) { log("Double-check: Agility still below 15. Retraining."); trainSkill(Skill.AGILITY, GNOME_STRONGHOLD, "Log balance", 15, new String[]{}); } break; case "Temple of Ikov": if (getSkills().getRealLevel(Skill.THIEVING) < 42) { log("Training Thieving to 42 for Temple of Ikov."); trainSkill(Skill.THIEVING, ARDOUGNE_MARKET, "Guard", 42, new String[]{}); } if (getSkills().getRealLevel(Skill.THIEVING) < 42) { log("Double-check: Thieving still below 42. Retraining."); trainSkill(Skill.THIEVING, ARDOUGNE_MARKET, "Guard", 42, new String[]{}); } if (getSkills().getRealLevel(Skill.RANGED) < 40) { log("Training Ranged to 40 for Temple of Ikov."); trainSkill(Skill.RANGED, LUMBRIDGE, "Chicken", 40, new String[]{"Shortbow,1,100", "Bronze arrow,1000,5"}); } if (getSkills().getRealLevel(Skill.RANGED) < 40) { log("Double-check: Ranged still below 40. Retraining."); trainSkill(Skill.RANGED, LUMBRIDGE, "Chicken", 40, new String[]{"Shortbow,1,100", "Bronze arrow,1000,5"}); } break; } log("Requirements for " + quest + " met."); } private void executeQuestStep(String quest, int step) { log("Executing " + quest + ", step " + step); switch (quest) { case "Cook's Assistant": handleCooksAssistant(step); break; case "The Restless Ghost": handleRestlessGhost(step); break; case "Priest in Peril": handlePriestInPeril(step); break; case "Waterfall Quest": handleWaterfallQuest(step); break; case "The Feud": handleTheFeud(step); break; case "Druidic Ritual": handleDruidicRitual(step); break; case "The Dig Site": handleDigSite(step); break; case "The Tourist Trap": handleTouristTrap(step); break; case "Death Plateau": handleDeathPlateau(step); break; case "Troll Stronghold": handleTrollStronghold(step); break; case "Temple of Ikov": handleTempleOfIkov(step); break; default: log("Quest not implemented: " + quest); stop(); break; } } // Quest Handlers private void handleCooksAssistant(int step) { switch (step) { case 0: // Start quest log("Starting Cook's Assistant."); getWalking().walk(new Area(3208, 3210, 3214, 3216)); NPC cook = getNPCs().closest("Cook"); if (cook != null && cook.exists()) { log("Talking to Cook."); cook.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); if (getDialogues().inDialogue()) { log("Continuing dialogue."); getDialogues().chooseOption(1); // "What's wrong?" Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(1); // "I'm always happy to help a cook in distress." Sleep.sleepUntil(() -> !getDialogues().inDialogue(), 3000); questStep++; } } else { log("Cook not found. Retrying."); } break; case 1: // Gather egg log("Gathering egg."); if (!getInventory().contains("Egg")) { getWalking().walk(new Area(3175, 3295, 3185, 3305)); GroundItem egg = getGroundItems().closest("Egg"); if (egg != null && egg.exists()) { log("Picking up egg."); egg.interact("Take"); Sleep.sleepUntil(() -> getInventory().contains("Egg"), 5000); if (!getInventory().contains("Egg")) { log("Failed to pick up egg. Retrying."); egg.interact("Take"); Sleep.sleepUntil(() -> getInventory().contains("Egg"), 5000); } } else { log("Egg not found. Retrying."); } } else { log("Egg acquired."); questStep++; } break; case 2: // Gather milk log("Gathering bucket of milk."); if (!getInventory().contains("Bucket of milk")) { if (!getInventory().contains("Bucket")) { log("Buying bucket."); buyItems(new String[]{"Bucket,1,50"}); } getWalking().walk(new Area(3250, 3265, 3260, 3275)); NPC cow = getNPCs().closest("Cow"); if (cow != null && cow.exists()) { log("Milking cow."); cow.interact("Milk"); Sleep.sleepUntil(() -> getInventory().contains("Bucket of milk"), 5000); if (!getInventory().contains("Bucket of milk")) { log("Failed to milk cow. Retrying."); cow.interact("Milk"); Sleep.sleepUntil(() -> getInventory().contains("Bucket of milk"), 5000); } } else { log("Cow not found. Retrying."); } } else { log("Bucket of milk acquired."); questStep++; } break; case 3: // Gather flour log("Gathering pot of flour."); if (!getInventory().contains("Pot of flour")) { if (!getInventory().contains("Pot")) { log("Buying pot."); buyItems(new String[]{"Pot,1,50"}); } getWalking().walk(new Area(3160, 3300, 3170, 3310)); GameObject wheat = getGameObjects().closest("Wheat"); if (wheat != null && wheat.exists()) { log("Picking wheat."); wheat.interact("Pick"); Sleep.sleepUntil(() -> getInventory().contains("Grain"), 5000); } getWalking().walk(new Area(3165, 3305, 3175, 3315)); GameObject hopper = getGameObjects().closest("Hopper"); if (hopper != null && hopper.exists()) { log("Using grain on hopper."); getInventory().get("Grain").interact("Use"); hopper.interact("Use"); Sleep.sleepUntil(() -> !getInventory().contains("Grain"), 5000); } GameObject controls = getGameObjects().closest("Hopper controls"); if (controls != null && controls.exists()) { log("Operating hopper controls."); controls.interact("Operate"); Sleep.sleepUntil(() -> true, 3000); } GameObject flourBin = getGameObjects().closest("Flour bin"); if (flourBin != null && flourBin.exists()) { log("Collecting flour."); flourBin.interact("Empty"); Sleep.sleepUntil(() -> getInventory().contains("Pot of flour"), 5000); if (!getInventory().contains("Pot of flour")) { log("Failed to collect flour. Retrying."); flourBin.interact("Empty"); Sleep.sleepUntil(() -> getInventory().contains("Pot of flour"), 5000); } } } else { log("Pot of flour acquired."); questStep++; } break; case 4: // Return to Cook log("Returning to Cook."); getWalking().walk(new Area(3208, 3210, 3214, 3216)); cook = getNPCs().closest("Cook"); if (cook != null && cook.exists()) { log("Delivering items to Cook."); cook.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); if (getDialogues().inDialogue()) { log("Continuing dialogue."); getDialogues().continueDialogue(); Sleep.sleepUntil(() -> getQuests().isFinished("Cook's Assistant"), 5000); if (getQuests().isFinished("Cook's Assistant")) { log("Cook's Assistant completed."); currentQuest = null; questStep = 0; } else { log("Quest not finished. Retrying dialogue."); getDialogues().continueDialogue(); Sleep.sleepUntil(() -> getQuests().isFinished("Cook's Assistant"), 5000); } } } else { log("Cook not found. Retrying."); } break; } } private void handleRestlessGhost(int step) { switch (step) { case 0: // Start quest log("Starting The Restless Ghost."); getWalking().walk(new Area(3245, 3205, 3255, 3215)); NPC fatherAereck = getNPCs().closest("Father Aereck"); if (fatherAereck != null) { log("Talking to Father Aereck."); fatherAereck.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "I'm looking for a quest!" Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(1); // "Ok, let me help then." Sleep.sleepUntil(() -> !getDialogues().inDialogue(), 3000); questStep++; } break; case 1: // Talk to Father Urhney log("Talking to Father Urhney."); getWalking().walk(new Area(3145, 3170, 3155, 3180)); NPC fatherUrhney = getNPCs().closest("Father Urhney"); if (fatherUrhney != null) { log("Talking to Father Urhney."); fatherUrhney.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "Father Aereck sent me to talk to you." Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(2); // "He's got a ghost haunting his graveyard." Sleep.sleepUntil(() -> getInventory().contains("Ghostspeak amulet"), 5000); questStep++; } break; case 2: // Equip amulet and talk to ghost log("Equipping Ghostspeak amulet."); if (!getEquipment().contains("Ghostspeak amulet")) { getInventory().get("Ghostspeak amulet").interact("Wear"); Sleep.sleepUntil(() -> getEquipment().contains("Ghostspeak amulet"), 3000); } getWalking().walk(new Area(3245, 3195, 3255, 3205)); NPC ghost = getNPCs().closest("Restless ghost"); if (ghost != null) { log("Talking to Restless ghost."); ghost.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); questStep++; } break; case 3: // Find skull log("Finding skull."); getWalking().walk(new Area(3115, 9565, 3125, 9575)); GameObject altar = getGameObjects().closest("Chaos altar"); if (altar != null) { log("Searching altar."); altar.interact("Search"); Sleep.sleepUntil(() -> !getLocalPlayer().isAnimating(), 5000); questStep++; } break; case 4: // Return skull log("Returning skull to coffin."); getWalking().walk(new Area(3245, 3195, 3255, 3205)); GameObject coffin = getGameObjects().closest("Coffin"); if (coffin != null) { log("Using skull on coffin."); getInventory().get("Skull").interact("Use"); coffin.interact("Use"); Sleep.sleepUntil(() -> getQuests().isFinished("The Restless Ghost"), 5000); if (getQuests().isFinished("The Restless Ghost")) { log("The Restless Ghost completed."); currentQuest = null; questStep = 0; } } break; } } private void handlePriestInPeril(int step) { switch (step) { case 0: // Start quest log("Starting Priest in Peril."); getWalking().walk(new Area(3405, 3485, 3415, 3495)); NPC kingRoald = getNPCs().closest("King Roald"); if (kingRoald != null) { log("Talking to King Roald."); kingRoald.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "I'm looking for a quest!" Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); questStep++; } break; case 1: // Talk to Drezel log("Talking to Drezel."); getWalking().walk(new Area(3435, 9895, 3445, 9905)); GameObject trapdoor = getGameObjects().closest("Trapdoor"); if (trapdoor != null) { trapdoor.interact("Open"); Sleep.sleepUntil(() -> getLocalPlayer().getZ() == 1, 5000); } NPC drezel = getNPCs().closest("Drezel"); if (drezel != null) { log("Talking to Drezel."); drezel.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 2: // Kill dog log("Killing temple guardian."); NPC dog = getNPCs().closest("Temple guardian"); if (dog != null) { log("Attacking temple guardian."); dog.interact("Attack"); Sleep.sleepUntil(() -> !dog.exists(), 30000); questStep++; } break; case 3: // Talk to Drezel again log("Talking to Drezel again."); drezel = getNPCs().closest("Drezel"); if (drezel != null) { drezel.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 4: // Get key log("Getting key from monks."); getWalking().walk(new Area(3215, 3475, 3225, 3485)); NPC monk = getNPCs().closest("Monk of Zamorak"); if (monk != null) { log("Attacking monk."); monk.interact("Attack"); Sleep.sleepUntil(() -> !monk.exists(), 30000); GroundItem key = getGroundItems().closest("Golden key"); if (key != null) { key.interact("Take"); Sleep.sleepUntil(() -> getInventory().contains("Golden key"), 5000); questStep++; } } break; case 5: // Use key log("Using golden key."); getWalking().walk(new Area(3435, 9895, 3445, 9905)); GameObject gate = getGameObjects().closest("Gate"); if (gate != null) { getInventory().get("Golden key").interact("Use"); gate.interact("Use"); Sleep.sleepUntil(() -> getLocalPlayer().getX() > 3440, 5000); questStep++; } break; case 6: // Fill buckets log("Filling buckets with blessed water."); if (!getInventory().contains("Bucket") || getInventory().count("Bucket") < 50) { buyItems(new String[]{"Bucket,50,50"}); } GameObject well = getGameObjects().closest("Well"); if (well != null) { for (int i = 0; i < 50; i++) { if (getInventory().contains("Bucket")) { getInventory().get("Bucket").interact("Use"); well.interact("Use"); Sleep.sleepUntil(() -> getInventory().contains("Bucket of water"), 5000); } } questStep++; } break; case 7: // Return to Drezel log("Returning to Drezel."); drezel = getNPCs().closest("Drezel"); if (drezel != null) { drezel.interact("Talk-to"); Sleep.sleepUntil(() -> getQuests().isFinished("Priest in Peril"), 5000); if (getQuests().isFinished("Priest in Peril")) { log("Priest in Peril completed."); currentQuest = null; questStep = 0; } } break; } } private void handleWaterfallQuest(int step) { switch (step) { case 0: // Start quest log("Starting Waterfall Quest."); getWalking().walk(new Area(2525, 3480, 2535, 3490)); NPC almera = getNPCs().closest("Almera"); if (almera != null) { almera.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "Can I help?" Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); questStep++; } break; case 1: // Check raft log("Checking raft."); getWalking().walk(new Area(2520, 3490, 2530, 3500)); GameObject raft = getGameObjects().closest("Log raft"); if (raft != null) { raft.interact("Board"); Sleep.sleepUntil(() -> getLocalPlayer().getY() > 3500, 5000); questStep++; } break; case 2: // Talk to Hudon log("Talking to Hudon."); NPC hudon = getNPCs().closest("Hudon"); if (hudon != null) { hudon.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 3: // Get rope log("Getting rope."); if (!getInventory().contains("Rope")) { buyItems(new String[]{"Rope,1,100"}); } questStep++; break; case 4: // Enter dungeon log("Entering Waterfall dungeon."); getWalking().walk(new Area(2555, 9855, 2565, 9865)); GameObject dungeon = getGameObjects().closest("Dungeon entrance"); if (dungeon != null) { getInventory().get("Rope").interact("Use"); dungeon.interact("Use"); Sleep.sleepUntil(() -> getLocalPlayer().getZ() == 1, 5000); questStep++; } break; case 5: // Navigate dungeon log("Navigating dungeon."); getWalking().walk(new Area(2575, 9875, 2585, 9885)); GameObject crate = getGameObjects().closest("Crate"); if (crate != null) { crate.interact("Search"); Sleep.sleepUntil(() -> getInventory().contains("Key"), 5000); questStep++; } break; case 6: // Use key log("Using key."); GameObject door = getGameObjects().closest("Door"); if (door != null) { getInventory().get("Key").interact("Use"); door.interact("Use"); Sleep.sleepUntil(() -> getLocalPlayer().getX() > 2580, 5000); questStep++; } break; case 7: // Get amulet log("Getting Glarial's amulet."); getWalking().walk(new Area(2595, 9895, 2605, 9905)); GameObject chest = getGameObjects().closest("Chest"); if (chest != null) { chest.interact("Open"); Sleep.sleepUntil(() -> getInventory().contains("Glarial's amulet"), 5000); questStep++; } break; case 8: // Get pebble log("Getting Glarial's pebble."); getWalking().walk(new Area(2525, 3475, 2535, 3485)); NPC golrie = getNPCs().closest("Golrie"); if (golrie != null) { golrie.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); Sleep.sleepUntil(() -> getInventory().contains("Glarial's pebble"), 5000); questStep++; } break; case 9: // Enter tomb log("Entering Glarial's tomb."); getWalking().walk(new Area(2555, 3445, 2565, 3455)); GameObject tomb = getGameObjects().closest("Tomb"); if (tomb != null) { getInventory().get("Glarial's pebble").interact("Use"); tomb.interact("Use"); Sleep.sleepUntil(() -> getLocalPlayer().getZ() == 1, 5000); questStep++; } break; case 10: // Place amulet log("Placing amulet."); getWalking().walk(new Area(2575, 9755, 2585, 9765)); GameObject statue = getGameObjects().closest("Statue of Glarial"); if (statue != null) { getInventory().get("Glarial's amulet").interact("Use"); statue.interact("Use"); Sleep.sleepUntil(() -> getQuests().isFinished("Waterfall Quest"), 5000); if (getQuests().isFinished("Waterfall Quest")) { log("Waterfall Quest completed."); currentQuest = null; questStep = 0; } } break; } } private void handleTheFeud(int step) { switch (step) { case 0: // Start quest log("Starting The Feud."); getWalking().walk(new Area(3355, 2985, 3365, 2995)); NPC aliMorrisane = getNPCs().closest("Ali Morrisane"); if (aliMorrisane != null) { aliMorrisane.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(2); // "Can you tell me about your family?" Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); questStep++; } break; case 1: // Talk to drunken Ali log("Talking to Drunken Ali."); getWalking().walk(new Area(3360, 2970, 3370, 2980)); NPC drunkenAli = getNPCs().closest("Drunken Ali"); if (drunkenAli != null) { drunkenAli.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 2: // Buy beers log("Buying beers."); if (!getInventory().contains("Beer") || getInventory().count("Beer") < 3) { buyItems(new String[]{"Beer,3,100"}); } drunkenAli = getNPCs().closest("Drunken Ali"); if (drunkenAli != null) { for (int i = 0; i < 3; i++) { getInventory().get("Beer").interact("Use"); drunkenAli.interact("Use"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); } questStep++; } break; case 3: // Talk to street urchin log("Talking to Street Urchin."); getWalking().walk(new Area(3345, 2975, 3355, 2985)); NPC urchin = getNPCs().closest("Street Urchin"); if (urchin != null) { urchin.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 4: // Pickpocket villager log("Pickpocketing villager."); getWalking().walk(new Area(3350, 2965, 3360, 2975)); NPC villager = getNPCs().closest("Villager"); if (villager != null) { villager.interact("Pickpocket"); Sleep.sleepUntil(() -> getInventory().contains("Jewels"), 5000); questStep++; } break; case 5: // Return jewels log("Returning jewels."); urchin = getNPCs().closest("Street Urchin"); if (urchin != null) { getInventory().get("Jewels").interact("Use"); urchin.interact("Use"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 6: // Get snake log("Getting snake."); getWalking().walk(new Area(3340, 2945, 3350, 2955)); GameObject basket = getGameObjects().closest("Snake basket"); if (basket != null) { basket.interact("Charm"); Sleep.sleepUntil(() -> getInventory().contains("Snake"), 5000); questStep++; } break; case 7: // Poison water log("Poisoning water."); getWalking().walk(new Area(3365, 2975, 3375, 2985)); GameObject water = getGameObjects().closest("Water source"); if (water != null) { getInventory().get("Snake").interact("Use"); water.interact("Use"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 8: // Fight bandit log("Fighting bandit."); NPC bandit = getNPCs().closest("Bandit leader"); if (bandit != null) { bandit.interact("Attack"); Sleep.sleepUntil(() -> !bandit.exists(), 30000); questStep++; } break; case 9: // Return to Ali log("Returning to Ali Morrisane."); aliMorrisane = getNPCs().closest("Ali Morrisane"); if (aliMorrisane != null) { aliMorrisane.interact("Talk-to"); Sleep.sleepUntil(() -> getQuests().isFinished("The Feud"), 5000); if (getQuests().isFinished("The Feud")) { log("The Feud completed."); currentQuest = null; questStep = 0; } } break; } } private void handleDruidicRitual(int step) { switch (step) { case 0: // Start quest log("Starting Druidic Ritual."); getWalking().walk(new Area(2915, 3485, 2925, 3495)); NPC kaqemeex = getNPCs().closest("Kaqemeex"); if (kaqemeex != null) { kaqemeex.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "I'm in search of a quest." Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); questStep++; } break; case 1: // Talk to Sanfew log("Talking to Sanfew."); getWalking().walk(new Area(2895, 3425, 2905, 3435)); NPC sanfew = getNPCs().closest("Sanfew"); if (sanfew != null) { sanfew.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 2: // Gather meats log("Gathering enchanted meats."); String[] meats = {"Raw rat meat", "Raw bear meat", "Raw beef", "Raw chicken"}; for (String meat : meats) { if (!getInventory().contains(meat)) { buyItems(new String[]{meat + ",1,100"}); } } getWalking().walk(new Area(2910, 3490, 2920, 3500)); GameObject cauldron = getGameObjects().closest("Cauldron of Thunder"); if (cauldron != null) { for (String meat : meats) { getInventory().get(meat).interact("Use"); cauldron.interact("Use"); Sleep.sleepUntil(() -> !getInventory().contains(meat), 5000); } questStep++; } break; case 3: // Return to Sanfew log("Returning to Sanfew."); sanfew = getNPCs().closest("Sanfew"); if (sanfew != null) { sanfew.interact("Talk-to"); Sleep.sleepUntil(() -> getQuests().isFinished("Druidic Ritual"), 5000); if (getQuests().isFinished("Druidic Ritual")) { log("Druidic Ritual completed."); currentQuest = null; questStep = 0; } } break; } } private void handleDigSite(int step) { switch (step) { case 0: // Start quest log("Starting The Dig Site."); getWalking().walk(DIG_SITE); NPC examiner = getNPCs().closest("Examiner"); if (examiner != null) { examiner.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "I'm looking for a quest." Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); questStep++; } break; case 1: // Get items log("Gathering items for exam."); String[] items = {"Rope,1,100", "Trowel,1,100", "Specimen jar,1,100"}; buyItems(items); questStep++; break; case 2: // Exam 1 log("Taking first exam."); examiner = getNPCs().closest("Examiner"); if (examiner != null) { examiner.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "I want to take the exam." Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(2); // Correct answer Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(1); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(3); Sleep.sleepUntil(() -> getInventory().contains("Certificate"), 5000); questStep++; } break; case 3: // Exam 2 log("Taking second exam."); examiner = getNPCs().closest("Examiner"); if (examiner != null) { examiner.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(1); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(2); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(3); Sleep.sleepUntil(() -> getInventory().contains("Certificate"), 5000); questStep++; } break; case 4: // Exam 3 log("Taking third exam."); examiner = getNPCs().closest("Examiner"); if (examiner != null) { examiner.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(2); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(1); Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().chooseOption(3); Sleep.sleepUntil(() -> getInventory().contains("Certificate"), 5000); questStep++; } break; case 5: // Digging log("Digging at site."); getWalking().walk(new Area(3360, 3330, 3370, 3340)); GameObject digSite = getGameObjects().closest("Digsite"); if (digSite != null) { getInventory().get("Trowel").interact("Use"); digSite.interact("Use"); Sleep.sleepUntil(() -> getInventory().contains("Specimen"), 5000); questStep++; } break; case 6: // Return to Examiner log("Returning to Examiner."); examiner = getNPCs().closest("Examiner"); if (examiner != null) { examiner.interact("Talk-to"); Sleep.sleepUntil(() -> getQuests().isFinished("The Dig Site"), 5000); if (getQuests().isFinished("The Dig Site")) { log("The Dig Site completed."); currentQuest = null; questStep = 0; } } break; } } private void handleTouristTrap(int step) { switch (step) { case 0: // Start quest log("Starting The Tourist Trap."); getWalking().walk(new Area(3285, 3035, 3295, 3045)); NPC mercenaryCaptain = getNPCs().closest("Mercenary Captain"); if (mercenaryCaptain != null) { mercenaryCaptain.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "Can I talk about something else?" Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); questStep++; } break; case 1: // Get items log("Gathering items."); String[] items = {"Bronze bar,1,100", "Hammer,1,100", "Feather,10,10"}; buyItems(items); questStep++; break; case 2: // Make darts log("Making darts."); getInventory().get("Feather").interact("Use"); getInventory().get("Bronze bar").interact("Use"); Sleep.sleepUntil(() -> getInventory().contains("Bronze dart"), 5000); questStep++; break; case 3: // Talk to captain log("Talking to Mercenary Captain."); mercenaryCaptain = getNPCs().closest("Mercenary Captain"); if (mercenaryCaptain != null) { getInventory().get("Bronze dart").interact("Use"); mercenaryCaptain.interact("Use"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 4: // Enter mine log("Entering mine."); getWalking().walk(new Area(3300, 3030, 3310, 3040)); GameObject gate = getGameObjects().closest("Gate"); if (gate != null) { gate.interact("Open"); Sleep.sleepUntil(() -> getLocalPlayer().getX() > 3305, 5000); questStep++; } break; case 5: // Free Ana log("Freeing Ana."); getWalking().walk(new Area(3315, 9415, 3325, 9425)); NPC ana = getNPCs().closest("Ana"); if (ana != null) { ana.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 6: // Get barrel log("Getting barrel."); GameObject barrel = getGameObjects().closest("Barrel"); if (barrel != null) { barrel.interact("Take"); Sleep.sleepUntil(() -> getInventory().contains("Barrel"), 5000); questStep++; } break; case 7: // Escape log("Escaping with Ana."); getInventory().get("Barrel").interact("Use"); ana = getNPCs().closest("Ana"); if (ana != null) { ana.interact("Use"); Sleep.sleepUntil(() -> getInventory().contains("Barrel with Ana"), 5000); getWalking().walk(new Area(3300, 3030, 3310, 3040)); questStep++; } break; case 8: // Return to Irena log("Returning to Irena."); getWalking().walk(new Area(3275, 3025, 3285, 3035)); NPC irena = getNPCs().closest("Irena"); if (irena != null) { irena.interact("Talk-to"); Sleep.sleepUntil(() -> getQuests().isFinished("The Tourist Trap"), 5000); if (getQuests().isFinished("The Tourist Trap")) { log("The Tourist Trap completed."); currentQuest = null; questStep = 0; } } break; } } private void handleDeathPlateau(int step) { switch (step) { case 0: // Start quest log("Starting Death Plateau."); getWalking().walk(new Area(2865, 3575, 2875, 3585)); NPC denulth = getNPCs().closest("Denulth"); if (denulth != null) { denulth.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "Can I help you?" Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); questStep++; } break; case 1: // Talk to Eohric log("Talking to Eohric."); getWalking().walk(new Area(2895, 3565, 2905, 3575)); NPC eohric = getNPCs().closest("Eohric"); if (eohric != null) { eohric.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 2: // Get items log("Gathering items."); String[] items = {"Bread,1,100", "Trout,1,100"}; buyItems(items); questStep++; break; case 3: // Talk to Harold log("Talking to Harold."); getWalking().walk(new Area(2875, 3555, 2885, 3565)); NPC harold = getNPCs().closest("Harold"); if (harold != null) { getInventory().get("Bread").interact("Use"); harold.interact("Use"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); getInventory().get("Trout").interact("Use"); harold.interact("Use"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 4: // Return to Denulth log("Returning to Denulth."); denulth = getNPCs().closest("Denulth"); if (denulth != null) { denulth.interact("Talk-to"); Sleep.sleepUntil(() -> getQuests().isFinished("Death Plateau"), 5000); if (getQuests().isFinished("Death Plateau")) { log("Death Plateau completed."); currentQuest = null; questStep = 0; } } break; } } private void handleTrollStronghold(int step) { switch (step) { case 0: // Start quest log("Starting Troll Stronghold."); getWalking().walk(new Area(2875, 3575, 2885, 3585)); NPC denulth = getNPCs().closest("Denulth"); if (denulth != null) { denulth.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "What's happening?" Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); questStep++; } break; case 1: // Free prisoners log("Freeing prisoners."); getWalking().walk(new Area(2925, 10035, 2935, 10045)); GameObject cell = getGameObjects().closest("Cell door"); if (cell != null) { cell.interact("Unlock"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().continueDialogue(); questStep++; } break; case 2: // Fight trolls log("Fighting trolls."); NPC troll = getNPCs().closest("Troll General"); if (troll != null) { troll.interact("Attack"); Sleep.sleepUntil(() -> !troll.exists(), 30000); questStep++; } break; case 3: // Return to Denulth log("Returning to Denulth."); denulth = getNPCs().closest("Denulth"); if (denulth != null) { denulth.interact("Talk-to"); Sleep.sleepUntil(() -> getQuests().isFinished("Troll Stronghold"), 5000); if (getQuests().isFinished("Troll Stronghold")) { log("Troll Stronghold completed."); currentQuest = null; questStep = 0; } } break; } } private void handleTempleOfIkov(int step) { switch (step) { case 0: // Start quest log("Starting Temple of Ikov."); getWalking().walk(new Area(3175, 3335, 3185, 3345)); NPC lucien = getNPCs().closest("Lucien"); if (lucien != null) { lucien.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // "I'm looking for a quest." Sleep.sleepUntil(() -> getDialogues().canContinue(), 3000); getDialogues().continueDialogue(); questStep++; } break; case 1: // Enter temple log("Entering temple."); getWalking().walk(new Area(2535, 4715, 2545, 4725)); GameObject ladder = getGameObjects().closest("Ladder"); if (ladder != null) { ladder.interact("Climb-down"); Sleep.sleepUntil(() -> getLocalPlayer().getZ() == 1, 5000); questStep++; } break; case 2: // Get pendant log("Getting pendant."); if (!getInventory().contains("Pendant of Lucien")) { lucien = getNPCs().closest("Lucien"); if (lucien != null) { lucien.interact("Talk-to"); Sleep.sleepUntil(() -> getInventory().contains("Pendant of Lucien"), 5000); } } questStep++; break; case 3: // Navigate temple log("Navigating temple."); getWalking().walk(new Area(2555, 9735, 2565, 9745)); GameObject lever = getGameObjects().closest("Lever"); if (lever != null) { lever.interact("Pull"); Sleep.sleepUntil(() -> getLocalPlayer().getX() > 2560, 5000); questStep++; } break; case 4: // Fight or side log("Choosing side."); NPC winelda = getNPCs().closest("Winelda"); if (winelda != null) { winelda.interact("Talk-to"); Sleep.sleepUntil(() -> getDialogues().inDialogue(), 5000); getDialogues().chooseOption(1); // Side with Lucien Sleep.sleepUntil(() -> getQuests().isFinished("Temple of Ikov"), 5000); if (getQuests().isFinished("Temple of Ikov")) { log("Temple of Ikov completed."); currentQuest = null; questStep = 0; } } break; } } // 4. Train Final Skills private void trainFinalSkills() { log("Training final skills..."); if (getSkills().getRealLevel(Skill.SLAYER) < 10) { log("Training Slayer to 10."); trainSkill(Skill.SLAYER, BURTHORPE, "Turael", 10, new String[]{}); } if (getSkills().getRealLevel(Skill.SLAYER) < 10) { log("Double-check: Slayer still below 10. Retraining."); trainSkill(Skill.SLAYER, BURTHORPE, "Turael", 10, new String[]{}); } if (getSkills().getRealLevel(Skill.FIREMAKING) < 50) { log("Training Firemaking to 50."); trainSkill(Skill.FIREMAKING, new Area(3140, 3230, 3160, 3250), "Willow logs", 50, new String[]{"Willow logs,700,100", "Tinderbox,1,100"}); } if (getSkills().getRealLevel(Skill.FIREMAKING) < 50) { log("Double-check: Firemaking still below 50. Retraining."); trainSkill(Skill.FIREMAKING, new Area(3140, 3230, 3160, 3250), "Willow logs", 50, new String[]{"Willow logs,700,100", "Tinderbox,1,100"}); } if (getSkills().getRealLevel(Skill.MAGIC) < 50) { log("Training Magic to 50."); trainSkill(Skill.MAGIC, LUMBRIDGE, "Fire Strike", 50, new String[]{"Fire rune,1000,5", "Air rune,4000,5"}); } if (getSkills().getRealLevel(Skill.MAGIC) < 50) { log("Double-check: Magic still below 50. Retraining."); trainSkill(Skill.MAGIC, LUMBRIDGE, "Fire Strike", 50, new String[]{"Fire rune,1000,5", "Air rune,4000,5"}); } if (getSkills().getRealLevel(Skill.THIEVING) < 53) { log("Training Thieving to 53."); trainSkill(Skill.THIEVING, ARDOUGNE_MARKET, "Knight", 53, new String[]{}); } if (getSkills().getRealLevel(Skill.THIEVING) < 53) { log("Double-check: Thieving still below 53. Retraining."); trainSkill(Skill.THIEVING, ARDOUGNE_MARKET, "Knight", 53, new String[]{}); } if (getSkills().getRealLevel(Skill.SLAYER) >= 10 && getSkills().getRealLevel(Skill.FIREMAKING) >= 50 && getSkills().getRealLevel(Skill.MAGIC) >= 50 && getSkills().getRealLevel(Skill.THIEVING) >= 53) { log("Final skills trained. Switching to DESERT_TREASURE."); currentState = State.DESERT_TREASURE; } } private void trainSkill(Skill skill, Area area, String target, int targetLevel, String[] items) { log("Training " + skill + " to level " + targetLevel + " at " + area); // Ensure items for (String item : items) { String[] parts = item.split(","); if (!getInventory().contains(parts[0]) || getInventory().count(parts[0]) < Integer.parseInt(parts[1])) { log("Acquiring " + parts[0] + " for training."); buyItems(new String[]{item}); } } // Move to area if (!area.contains(getLocalPlayer())) { log("Moving to " + area); getWalking().walk(area.getRandomTile()); Sleep.sleepUntil(() -> area.contains(getLocalPlayer()), 15000); if (!area.contains(getLocalPlayer())) { log("Failed to reach " + area + ". Retrying."); getWalking().walk(area.getRandomTile()); Sleep.sleepUntil(() -> area.contains(getLocal
    5. duper83

      Rofl

      what graphic?
    6. You got any tips on using it? im preparing accounts right now to use it. What would you recommend? a quest here and there instead of just running it right off the rip or what?
    7. I'm more paranoid that Jagex can profile the thousands of accounts that are suddenly taking a day off
    8. more details? im on the fence about this script and the main questline i plan is dt
    9. I accidently purchased 1 month subscription instead of a lifetime yesterday. I just purchased lifetime and would like a refund for the 30 day subscription please. sorry for the inconvenience.
    10. Does this support NMZ? and do you highly recommend customizing the settings and tasks?
    11. does this have ring of forging support?
    12. script is broken, will randomly home teleport for no reason then walk back to POH portal.
    13. howcome this script is instanced? paying 20 usd to only build 1 account at a time seems unreasonable.
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.