Jump to content

osbot 2 antiban api


botlyfe

Recommended Posts

Regarding AntiBan behaviours:

 

I was previously implementing my own method to run on chance and perform certain actions by directly accessing those API calls. Mainly because the script is performing a simple banking skill that only needs a few behaviors to mimic humans (such as moving mouse, checking skills etc).

 

 

e.g. mouse.move(x, y)

       tabs.skills.open

 

 

Is this necessary / recommended or does osbot 2 API contain some predetermined anti bans you can simply call and not worry about any further?

 

 

also does anyone have any tips on making these behaviors occur at a more inconspicuous rate, i'm currently calling a :

 

if (random(0,1000) == x)

{

antiBan();

}

 

But the entire program loop seems to be completing very fast and the condition is satisfied roughly every 5 seconds. Any tips?

 

 

Link to comment
Share on other sites

OSBot2 by default has the following AntiBan behaviors which have a set chance of triggering every time you call sleep.

 

BehaviorType.SLIGHT_MOUSE_MOVEMENT

BehaviorType.RANDOM_MOUSE_MOVEMENT

BehaviorType.CAMERA_SHIFT

 

If you do not disable them manually, that is.

The antiban class also allows you to register your own AntiBan behaviors by adding them as BehaviorType.OTHER

Doing that, it will automatically perform that behavior when the script is sleeping in a sufficient time period, depending on the interval you provide it as std and mean deviation

Edited by FrostBug
Link to comment
Share on other sites

So how would you recommend implementing my own anti ban algorithm? 

 

something like what I said in the original post and just make it less probable?

Just devise a way to execute actions without a static chance. For example, have a list of conditions such as if the player is in combat the antiban sleep time changes up, followed by another change if the player is idle, followed by another if the player is moving, etc.

Link to comment
Share on other sites

also how do u explicitly disable osbot antibans

 

I am at work so I cant see the code or look at the api, but its something like

 

script.bot.getAntiBan().unregisterBehaviour(AntiBan antiban)

 

you can loop through the antiban types and unregister all of them that way. I will post the code for it when I get home. ^_^

Link to comment
Share on other sites

I am at work so I cant see the code or look at the api, but its something like

 

script.bot.getAntiBan().unregisterBehaviour(AntiBan antiban)

 

you can loop through the antiban types and unregister all of them that way. I will post the code for it when I get home. happy.png

 

 

if it's an enum, you can loop thru it like this

 

for(AntiBan antiban : AntiBan.values()) {

      script.bot.getAntiBan().unregisterBehaviour(antiban);

}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...