chatgpt #dreambot
- Log in to your account on the Old School RuneScape (OSRS) game.
- Navigate to the Al-Kharid Duel Arena.
- Challenge another player to a duel.
- Accept any duel requests from other players.
- If you win the duel, teleport to the Edgeville bank and deposit your winnings.
- If you lose the duel, teleport to the Lumbridge castle and heal up at the kitchen.
import org.dreambot.api.methods.Calculations;
import org.dreambot.api.methods.map.Area;
import org.dreambot.api.methods.skills.Skill;
import org.dreambot.api.script.AbstractScript;
import org.dreambot.api.script.Category;
import org.dreambot.api.script.ScriptManifest;
import org.dreambot.api.wrappers.interactive.NPC;
@ScriptManifest(author = "Your Name", category = Category.DUEL_ARENA, name = "Duel Arena Bot", version = 1.0)
public class DuelArenaBot extends AbstractScript {
private static final Area AL_KHARID_DUEL_ARENA = new Area(3312, 3234, 3295, 3221);
private static final Area LUMBRIDGE_CASTLE = new Area(3207, 3217, 3206, 3218);
private static final Area EDGEVILLE_BANK = new Area(3092, 3491, 3096, 3488);
@Override
public void onStart() {
log("Starting Duel Arena bot");
}
@Override
public int onLoop() {
// If we're not at the Duel Arena, walk there
if (!getLocalPlayer().isInArea(AL_KHARID_DUEL_ARENA)) {
getWalking().walk(AL_KHARID_DUEL_ARENA.getRandomTile());
sleepUntil(() -> getLocalPlayer().isInArea(AL_KHARID_DUEL_ARENA), Calculations.random(4800, 5400));
} else {
// Look for a player to challenge
NPC playerToChallenge = getNpcs().closest(npc -> npc.getName() != null && npc.getName().equals("Player"));
if (playerToChallenge != null && playerToChallenge.interact("Challenge")) {
sleepUntil(() -> getDialogues().inDialogue(), Calculations.random(4800, 5400));
// Confirm the challenge
getDialogues().clickContinue();
sleepUntil(() -> getDueling().isDueling(), Calculations.random(4800, 5400));
}
// Accept any incoming challenges
if (getDueling().isDueling()) {
if (getDueling().isChallenger()) {
getDueling().accept();
}
if (getDueling().isBeingChallenged()) {
getDueling().accept();
}
}
// If the duel is over
if (getDueling().isDueling()) {
// If we won the duel
if (getSkills().getRealLevel(Skill.HITPOINTS) > 0) {
// Teleport to Edgeville bank and deposit winnings
getInventory().get("Coins").interact("Use");
getGameObjects().closest("Bank booth").interact("Use");
sleepUntil(() -> getBank().isOpen(), Calculations.random(4800, 5400));
getBank().depositAll();
getBank().close();
} else {
// Teleport to Lumbridge castle and heal up
getInventory().get("Varrock teleport").interact("Break");
sleepUntil(() -> getLocalPlayer().isInArea(LUMBRIDGE_CASTLE), Calculations.random(4800, 5400));
getGameObjects().closest("Range").interact("Cook");
sleepUntil(() -> getSkills().getRealLevel(Skill.HITPOINTS) > 6, Calculations.random(4800, 5400));
}
}
}
return Calculations.random(600, 1200);
}
@Override
public void onExit() {
log("Stopping Duel Arena bot");
}
}
This script will continuously challenge other players to duels at the Al-Kharid Duel Arena, and accept any incoming challenges. If you win the duel, it will teleport you to the Edgeville bank and deposit your winnings. If you lose the duel, it will teleport you to the Lumbridge castle and heal up at the kitchen.
Last update: November 18, 2023
Created: October 12, 2023
Created: October 12, 2023