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
  • NPC onScreen but down a hill


    Booshotti

    Recommended Posts

    Strange... I am using Java 8 though (jdk1.8.0_141)

     

     

    Edit: You are the man! ;) It's apparently just a warning on IntelliJ, It works though.

     

    :doge:  :doge:  :doge:  :doge:  :doge:

    Link to comment
    Share on other sites

    Awesome! Will test this out now.

     

     

    Another question... I want to make sure more than one crab is attacking me so I am assuming I can count the getID(); values for the crabs.

    If(crabCount >= 4){
    attack crabs
    minus index on dead crab
    }
    
    if(crabCount == 0){
    walk to crabs
    add index
    repeat above
    }

    I can't think of a good way to track if 4 or more crabs are attacking me at one time?

     

    Haven't read the rest of the thread, but here is a snippet of what i do in PolyFighter for rock crab mode. It can probably be improved on, but it works well.

     

    https://pastebin.com/rR2YK8td

     

     

    edit:

     

    ps - that script will attempt to keep 3-4 crabs on the player and has a timer for resetting every ~15 mins?

     

    pps - its a virus xo

    Link to comment
    Share on other sites

    Haven't read the rest of the thread, but here is a snippet of what i do in PolyFighter for rock crab mode. It can probably be improved on, but it works well.

     

    https://pastebin.com/rR2YK8td

     

     

    edit:

     

    ps - that script will attempt to keep 3-4 crabs on the player and has a timer for resetting every ~15 mins?

     

    pps - its a virus xo

     

    Awesome! I still think Rock Crabs was a difficult first script to make :D

     

    Edit: Just tried your PolyFighter and the right click "Walk here" option does not work, It doesn't click it properly but this is more down to the client though.

     

     

     

    Also thank you for that snippet, I was unaware of sleepUntil and that has condensed my code a lot and it works nicer ;)

     

    It's not great but it seems to work...

    if(!getLocalPlayer().isInCombat() && !(interactionCount > Calculations.random(2,4))){
    
    if(getWalking().walk(InactiveRock.getTile().getRandomizedTile())){
    sleepUntil(() -> !getLocalPlayer().isMoving(), 1000);
    }
    } else {
    
    if(getLocalPlayer().isInCombat()){
    sleepUntil(() -> !getLocalPlayer().isInCombat() && interactionCount == 0, 5000);
    } else{
    RockCrab.interact();
    }
    

    }

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.