Jump to content

Leaderboard

Popular Content

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

  1. Awesome thankyou. I have clicked all the buttons yet apologies
    1 point
  2. 1 point
  3. 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
  4. Man keeps on going, nice!
    1 point
  5. What worlds do you have in your list to hop to? it fails to load the next one, can you let me know what is in the hop list for you? EDIT: I changed something in V1.18, shoudl fix this error Will be live soon
    1 point
  6. czar could i get a trial as well, if thats ok bro
    1 point
  7. hey, testing it just now, but seems that tasking doesnt work. I have added multiple task so it could progress, hence it sticks to the first task only. Crafting table 1 doesnt work ... error states that Space not detected. if i remove it manually it builds one and stucks
    1 point
  8. Correct, I have it hard programmed, I shall update that, when no money is selected the max amount will be 28.
    1 point
  9. Nice! Scripter rank when? xD
    1 point
  10. What more can be said... Another Khal banger
    1 point
  11. hey mate, I've ran it for about 4 hours. Works great. I love the fact that I can use the npc map to select mobs to fight without being around them to select them. There's plenty of options to play around with too. Will definitely be purchasing this over the next few days.
    1 point
  12. Hello Czar , could i have trial please? thanks
    1 point
  13. Yep in settings -> Force lower mine this will make it go there For combo runes I will give it a try ^^
    1 point
  14. As for the GUI error public void onStart() { log("Initializing Script...."); frame = new JFrame("DexCutter"); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setBounds(50, 50, 400, 400); frame.setVisible(true); //<<<<<<<<<<<<<<<<< ... Move frame.setVisible(true); to the end of onStart(). It is set to visible before al the other components are added to the panel.
    1 point
  15. 1. Put the image in resources so that a network request is not needed then use SystemIO to get thz. There is no guarantee that the hosting service won't delete your image randomly. Refer to the link below for a more concise tutorial. RS2Object treeObject = getObjects().closest(tree.getObjectId()); if (treeObject == null) { this.log("Yew tree is null...."); } log("does it contain tree obj? " + treeArea.contains(treeObject)); 2. Use the filter API. This can be simplified to something like ``` RS2Object treeObject = getObjects().closest(rs2Object -> rs2Object.getId() == tree.getObjectId() && treeArea.contains(rs2Object); ``` This will ensure tree interactions are only done on trees of a certain type (regular, oak, willow, ect.) and are in the designated area. 3. The Paint and GUI are crammed in the the Script class its hard to read. Consider splitting these up into individual classes. You can designate a painter class by having it implement Painter. Then in onStart calling getBot().addPainter(<paint instance>) Make sure to remove this in onStop with getBot().removePainter(<same instance as above>) Otherwise the paint may not get cleaned up if the script crashes/exits. 4. You don't need to call this if you are intending to immediately interact with the object. The interaction will do this if the object is not on screen. if (getCamera().toEntity(treeObject)) Its a great first attempt. Ill take a look at the gui later.
    1 point
  16. Can i have a trial please?
    1 point
  17. would love a trail please
    1 point
  18. still offering trials?
    1 point
  19. Thank you, I appreciate that! Likely never, my motivation to play tends to come and go
    0 points
×
×
  • Create New...