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
  • First bot, banned, can anyone take a look?


    supbruh

    Recommended Posts

    So I am really new to this, this is what I did and how I got banned, any help is appreciated. It's for old rs.

     

    I started researching, coding and testing in game around 8pm, script was a working prototype around midnight, until 6am I was tweaking it so bot paused for like 30 min then ran for 30-60 min. Then I left it run 4 hours and went to sleep from 6am to 10am with no pauses, constant cicle, it would bug out sometimes when trying to find a portal so there is a up to 2 min break there while he tries to find a portal. I set my pc to turn off so I got no logs and I recieved a ban message at 9am. Any ideas?

     

    I was thinking this could be the problem, because it happens ~20 times per run, same point on the map clicked over and over again as soon as the mushrooms are picked up

    getWalking().walk(logArea.getCenter());
    

    Any code and logic critique is welcome as well.

    code removed
    Link to comment
    Share on other sites

    Congrats on getting your first script working! One of the main improvements that you could make to the script would be replacing all of your arbitrary sleeps with conditional sleeps. This is one of the easiest things you can do right now for a fairly large impact. An example of what I mean would be where you're teleporting to the swamp. It looks like you're always sleeping for between 3-4 seconds regardless of what happens. Here is an example of what you could do to replace that arbitrary sleep with a conditional sleep.

    // set the swamp area (find and fill in the actual x/y values)
    Area swampTeleportArea = new Area(1,1,1,1,0);
    
    // do whatever you need to do to teleport
    // ...
    
    // after teleport, sleep until we arrive at the expected location (in this case the swamp teleport area)
    sleepUntil(() -> swampTeleportArea.contains(getLocalPlayer()), Calculations.random(2500, 5000));
    

    The way this conditional sleep would work is that it will sleep until either the swamp area contains your player, or the time expires (random between 2500 & 5000). 

     

    Another simple thing you could do to improve your script would be to check that your actions are successful with a conditional rather than assuming they always will be. An example of this would be only executing your sleepUntil after you try to teleport to the swamp if the interaction with the teleport item was successful. Here is an example of what that might look like.

    // get your teleport item (named teleporter)
    // ...
    
    // attempt to interact with the teleport item using a default left click
    if (teleporter != null && teleporter.interact()) {
        // do the sleeping inside this if statement to avoid sleeping if the action fails
    }
    

    If you want more feedback let me know and I'll take a closer look when I have a bit more time. Congrats again on getting your script working :) .

    Link to comment
    Share on other sites

    As for banrates, this is a highly monitored method.  Even with a private script, you should expect frequent bans. 

    that could explain why I got banned for being 12 hours in same area

    Kudos to @@distraction and @@Man16 . I've worked few more hours and updated the code again. Any feedback is much appreciated.

    Link to comment
    Share on other sites

    that could explain why I got banned for being 12 hours in same area

    Kudos to @@distraction and @@Man16 . I've worked few more hours and updated the code again. Any feedback is much appreciated.

     

    Nice job with your updates! You've definitely made a lot of improvements already. Here are a few more things I can see that I think you could improve a bit.

     

    1. In your moveToLogs function when you walk to the log area, you are always walking to the center tile (you mention you think this might be part of the issue). This isn't really a big problem or anything, but unless you specifically need to walk to the center of the area every time, it would probably be better to use something like "logArea.getRandomTile()". The reason for this is so that you aren't clicking the same exact tile 100% of the time when you walk to that area. Preventing any kind of pattern that you can will likely help reduce your ban/detection rate.
    2. It looks like when you bank you're manually finding the closest bank chest, and then always doing the default left click "interact()".  I think you should be able to replace that with just "getBank().open()". It should detect that it needs to use the chest rather than a bank booth if the chest is closer. Along those same lines it looks like you are manually right clicking and selecting the deposit all option on your fungus when you bank. It would probably be better to just use something like "getBank().depositAll("Name of fungus item")". Neither of these things are a big deal, but IMO it is best to just let the API handle as much as possible rather than doing it manually.
    3. I noticed that in most of the places where you are sleeping until you get near an object you're doing something like "sleepUntil(() -> getLocalPlayer().distance(someObject) < 3, Calulations.random(...))". It would probably beneficial to switch up the reaction distance from a static 3 to something like "Calculations.random(2, 5)". The reason for this is to avoid a pattern where your character always seems to react when it is an exact distance from some object.

    Really nice work getting things cleaned up today. I can see you have made a ton of improvements since I last looked this over. Be sure to let us know how it goes if you try running it again :).

    Link to comment
    Share on other sites

    Nice job with your updates! You've definitely made a lot of improvements already. Here are a few more things I can see that I think you could improve a bit.

     

    1. In your moveToLogs function when you walk to the log area, you are always walking to the center tile (you mention you think this might be part of the issue). This isn't really a big problem or anything, but unless you specifically need to walk to the center of the area every time, it would probably be better to use something like "logArea.getRandomTile()". The reason for this is so that you aren't clicking the same exact tile 100% of the time when you walk to that area. Preventing any kind of pattern that you can will likely help reduce your ban/detection rate.
    2. It looks like when you bank you're manually finding the closest bank chest, and then always doing the default left click "interact()".  I think you should be able to replace that with just "getBank().open()". It should detect that it needs to use the chest rather than a bank booth if the chest is closer. Along those same lines it looks like you are manually right clicking and selecting the deposit all option on your fungus when you bank. It would probably be better to just use something like "getBank().depositAll("Name of fungus item")". Neither of these things are a big deal, but IMO it is best to just let the API handle as much as possible rather than doing it manually.
    3. I noticed that in most of the places where you are sleeping until you get near an object you're doing something like "sleepUntil(() -> getLocalPlayer().distance(someObject) < 3, Calulations.random(...))". It would probably beneficial to switch up the reaction distance from a static 3 to something like "Calculations.random(2, 5)". The reason for this is to avoid a pattern where your character always seems to react when it is an exact distance from some object.

    Really nice work getting things cleaned up today. I can see you have made a ton of improvements since I last looked this over. Be sure to let us know how it goes if you try running it again :).

     

    Thanks man!

     

    I agree about the API, randomTile is not effective at all unfortunately, good call on reaction distance.

     

    I've been running this baby with tweaking the code last 7 hours and no ban yet. Plan is few daily runs with random pauses but you never know, @@Man16 is right... 

     

    Code updated. v1 now lol.

    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.