Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/24 in all areas

  1. Hey, Due to some connection issues, you might have to download the new version from the Download button above. FIXES: - Fixed a connection issue causing the client not to load. MISC: - Minor bug fixes. - The OSBot Team
    5 points
  2. Just got a pet lmao
    2 points
  3. ────────────── PREMIUM SUITE ────────────── ─────────────── FREE / VIP+ ─────────────── ──────────────────────────────────────────────────────────── ⌠ Sand crabs - $4,99 | Rooftop Agility - $5,99 | AIO Smither - $4,99 | AIO Cooker - $3,99 | Unicow Killer - £3,99 | Chest Thiever - £2,99 | Rock crabs - $4,99 | Rune Sudoku - $9,99 ⌡ ⌠ AIO Herblore - FREE & OPEN-SOURCE | Auto Alcher - FREE | Den Cooker - FREE | Gilded Altar - FREE | AIO Miner - VIP+ ⌡ ──────────────────────────────────── What is a trial? A trial is a chance for you to give any of my scripts a test run. After following the instructions below, you will receive unrestricted access to the respective script for 24 hours starting when the trial is assigned. Your trial request will be processed when I log in. The trial lasts for 24 hours to cater for time zones, such that no matter when I start the trial, you should still get a chance to use the script. Rules: Only 1 trial per user per script. How to get a trial: 'Like' this thread AND the corresponding script thread using the button at the bottom right of the original post. Reply to this thread with the name of the script you would like a trial for. Your request will be processed as soon as I log in. If i'm taking a while, i'm probably asleep! Check back in the morning Once I process your request, you will have the script in your collection (just like any other SDN script) for 24 hours. Private scripts: Unfortunately I do not currently offer private scripts. ________________________________________ Thanks in advance and enjoy your trial! -Apaec.
    1 point
  4. I did some modifications on some parts and made some things simpler I did not test run it though ^^ import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep2; import java.util.Arrays; import java.util.List; @ScriptManifest(author = "pupupot", info = "Mines Amethyst crystals and crafts dart tips", name = "Amethyst Minecraft", version = 1.2, logo = "") public class AmethystMinecraft extends Script { private final int AMETHYST_X = 3008; private final List<Integer> AMETHYST_Y = Arrays.asList(9710, 9711, 9712); // Y positions of amethyst crystals private final String AMETHYST_NAME = "Amethyst"; @Override public void onStart() { log("Script started. Let's get this bag."); } @Override public int onLoop() throws InterruptedException { log("Looking for the purple shit to start mining."); if (getInventory().getEmptySlots() <= 2) { craftDartTips(); return 1000; } RS2Object amethyst = getObjects().closest(obj -> obj != null && obj.getName().equals("Amethyst crystals") && obj.getX() == AMETHYST_X && AMETHYST_Y.contains(obj.getY())); if (amethyst != null) { if (amethyst.interact("Mine")) { log("Mining amethyst... Getting this money"); ConditionalSleep2.sleep(240_000, () -> !amethyst.exists() || amethyst.getName().equals("Empty wall")); } } return random(600, 700); // Return a short random delay before the next loop } private void craftDartTips() throws InterruptedException { // Check if chisel and amethyst are in inventory String CHISEL_NAME = "Chisel"; if (!getInventory().contains(CHISEL_NAME) || !getInventory().contains(AMETHYST_NAME)) { log("Cannot craft amethyst dart tips. Missing required items."); return; } // Try to get Widget by Text or spellname as the ids can change sometimes, don;t know the widget root, but here is an example //getWidgets().getWidgetContainingAction(270, "Make"); if (getWidgets().isVisible(270, 17)) { //Could also press spacebar on keyboard with the Keyboard class if (getWidgets().interact(270, 17, "Make")) { ConditionalSleep2.sleep(60_000, () -> !getInventory().contains(AMETHYST_NAME)); } return; } if (!getInventory().isItemSelected()) { if (getInventory().interact("Use", CHISEL_NAME)) { ConditionalSleep2.sleep(2500, () -> getInventory().isItemSelected()); } } else { if (getInventory().interact("Use", AMETHYST_NAME)) { ConditionalSleep2.sleep(5_000, () -> getWidgets().isVisible(270, 17)); } } } @Override public void onExit() { log("Script stopped. Later Nerd."); } }
    1 point
  5. CS2 is a one liner, functions the same just less code. And the only reason to use a custom sleep class would be to add other functionality like a reset condition.
    1 point
  6. @pupu_pot API already has a empty slots method getInventory().getEmptySlots(); Use ConditionalSleep2 at least over ConditionalSleep if not a custom sleep class. Empty wall part doesn't actually work I'm pretty sure // Wait until the amethyst turns into "Empty wall" new ConditionalSleep(240000, 2000) { // 240,000 milliseconds (4 minutes) @Override public boolean condition() throws InterruptedException { return !amethyst.exists() || amethyst.getName().equals("Empty wall"); } }.sleep(); Furthermore I recommend not using any AI assistance if you're trying to truly learn coding. If you're just slapping scripts together go for it.
    1 point
  7. 1 point
  8. Make sure to update your client:
    1 point
  9. Hi! Today I remembered void armour was a thing, so I made this; it works well and as intended - around 350 points gained so far between testing and actually running. In a nutshell: it will cross the nearest gangplank (that way you can use it on any of the boat levels) it will wait until the game starts when the game starts, it will click between 14-18 tiles south (because the PC map's coords change constantly) it will stay around the void knight and kill any enemies within a specified radius it will constantly 1 tick prayer flick (so you never take too much damage and you always get boosts) rinse and repeat Feel free to use as-is, copyfor your own projects, or suggest improvements! @ScriptManifest(info = "", logo = "", name = "Pest Control", author = "Marcus", version = 1.0) public class pestControl extends Script { private InvokeHelper invokeHelper; private Position ATTACK_ZONE_POSITION; private boolean gameStarted = false; public void onStart() throws InterruptedException { super.onStart(); invokeHelper = new InvokeHelper(this); log("Bot Started!"); } @Override public int onLoop() { if (!isInGame()) { gameStarted = false; if (!isInBoat()) { crossGangplank(); } } else { if (!gameStarted) { setAttackZonePosition(); gameStarted = true; } if (shouldGoToAttackZone()) { goToAttackZone(); } else { attackNearbyNPC(); } } return random(200, 300); } @Override public void onGameTick() { super.onGameTick(); RS2Widget quickPrayerWidget = getQuickPrayerWidget(); if (quickPrayerWidget == null) { return; } if (getPrayer().isQuickPrayerActive()) { invokeHelper.invoke(quickPrayerWidget, 0); invokeHelper.invoke(quickPrayerWidget, 0); } else { invokeHelper.invoke(quickPrayerWidget, 0); } } private RS2Widget getQuickPrayerWidget() { return getWidgets().get(160, 19); } private boolean isInGame() { RS2Widget gameWidget = getWidgets().get(408, 5); return gameWidget != null && gameWidget.isVisible(); } private boolean isInBoat() { RS2Widget boatWidget = getWidgets().get(407, 4); return boatWidget != null && boatWidget.isVisible(); } private void crossGangplank() { RS2Object gangplank = getObjects().closest("Gangplank"); if (gangplank != null && gangplank.interact("Cross")) { Sleep.until(() -> isInBoat(), 5000); if (isInBoat()) { log("Waiting for the game to start..."); Sleep.until(() -> isInGame(), 5000); } } } private void setAttackZonePosition() { Position playerStartPosition = myPosition(); if (playerStartPosition != null) { ATTACK_ZONE_POSITION = new Position(playerStartPosition.getX(), playerStartPosition.getY() - (random(14,18)), 0); log("Attack zone position set to: " + ATTACK_ZONE_POSITION); } } private boolean shouldGoToAttackZone() { return ATTACK_ZONE_POSITION != null && myPlayer().getPosition().distance(ATTACK_ZONE_POSITION) > 7; } private void goToAttackZone() { if (!myPlayer().isAnimating() && !myPlayer().isMoving()) { log("Running to the attack zone at position: " + ATTACK_ZONE_POSITION); getWalking().walk(ATTACK_ZONE_POSITION); Sleep.until(() -> myPlayer().getPosition().distance(ATTACK_ZONE_POSITION) <= 7, 10000); } else { log("Player is moving..."); } } private void attackNearbyNPC() { NPC target = getNpcs().closest(npc -> npc != null && npc.exists() && npc.hasAction("Attack") && getMap().canReach(npc) && isNearAttackZone(npc) ); if (target != null) { log("Attacking NPC: " + target.getName()); if (invokeHelper.invoke(target, "Attack")) { Sleep.until(() -> myPlayer().isAnimating() || myPlayer().isUnderAttack(), 1000); } } else { log("No suitable NPC found."); } } private boolean isNearAttackZone(NPC npc) { return npc != null && ATTACK_ZONE_POSITION != null && ATTACK_ZONE_POSITION.distance(npc.getPosition()) < 7; } @Override public void onExit() { log("Bot Stopped!"); } }
    1 point
  10. Ty I will check out Crafting Table 1 and release a new update ASAP And then I give you another 24 hr trial for free.
    1 point
×
×
  • Create New...