Skip to content

Commit

Permalink
Added take to prevent the main script from putting up too many traps
Browse files Browse the repository at this point in the history
  • Loading branch information
Gage307 committed Jan 25, 2025
1 parent 48b8557 commit ee4bce3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ public void handleBreaks() {
Microbot.log("Placing trap");
int maxTries = 0;
while(Rs2GameObject.getGameObject(LayTrapTile) == null) {
if(!Rs2GroundItem.exists("Box trap", 0)) {
if(!Rs2GroundItem.exists("Box trap", 6)) {
if (Rs2Inventory.contains("Box trap")) {
Rs2Inventory.interact("Box trap", "Lay");
sleep(4000, 6000);
}
} else {
//Box trap item is on the ground letting main script handle setting it up.
break;
Rs2GroundItem.take("Box trap", 6);
sleep(4000, 6000);
}
if(maxTries>=3){
Microbot.log("Failed, placing the trap");
Expand Down

0 comments on commit ee4bce3

Please sign in to comment.