Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OSBot 2.0 - Disabling the RunAwayFromCombat antiban

Featured Replies

How would i go about disabling the RunAwayFromCombat antiban, i've looked through the API a bit, and i can't seem to figure it out.

 

Can anybody point me in the right direction?

How would i go about disabling the RunAwayFromCombat antiban, i've looked through the API a bit, and i can't seem to figure it out.

Can anybody point me in the right direction?

I assume when you say antiban, you really mean random event handler? If so, look in the RandomEventExecutor.unregisterHook(RandomEvent.EVENT_NAME). I'm on my phone, but I'm pretty sure that is where it is. ^_^

Edited by Mysteryy

  • Author

RandomExecutor.unregisterHook(RandomEvent.RUN_AWAY_FROM_COMBAT) ;

 

 

I assume when you say antiban, you really mean random event handler? If so, look in the RandomEventExecutor.unregisterHook(RandomEvent.EVENT_NAME). I'm on my phone, but I'm pretty sure that is where it is. happy.png

 

Thanks a lot, i got it.

 

Edit: I assumed it was working, but it isn't, i assume this may be an issue because the NPC it's running from is a tree spirit(From Lost City),

even though i disabled all random events(just to make sure i wasn't missing anything)

 

I am unregistering the hooks in the onStart method using a for loop

for(RandomEvent e : RandomEvent.values()) {
	getBot().getRandomExecutor().unregisterHook(e);
}

Edited by pressxtolog

Thanks a lot, i got it.

Edit: I assumed it was working, but it isn't, i assume this may be an issue because the NPC it's running from is a tree spirit(From Lost City),

even though i disabled all random events(just to make sure i wasn't missing anything)

I am unregistering the hooks in the onStart method using a for loop

for(RandomEvent e : RandomEvent.values()) {	getBot().getRandomExecutor().unregisterHook(e);}

So you are saying that code isn't unregistering the random hooks? I think you might have to reload the random handlers after you disable them. Is that code giving you any errors, or is it just not working?

  • Author

So you are saying that code isn't unregistering the random hooks? I think you might have to reload the random handlers after you disable them. Is that code giving you any errors, or is it just not working?

 

What do you mean by reloading the random handler, and no i'm not getting any errors, the Event only seems to be triggered by the tree spirit.

What do you mean by reloading the random handler, and no i'm not getting any errors, the Event only seems to be triggered by the tree spirit.

Uhmm look in RandimEventExecutor. I believe there is something like .registerHooks or registerRandoms. I think that method will refresh the random hooks. Again, I'm on my phone so I'm not much help. My Internet has been out for like 12 hours now so I can't do anything. t.t

  • Author

It won't be working as of the moment due to the Random Executor in the client being non-functional. @Ericthecmh has rectified the issue and it will be fixed in the new update 2.1.18 happy.png

 

Bump, using OSBot 2.1.18, and the bot still wants to run away from the tree spirit even after unregistering RunAwayFromCombat/All randoms(I tried just RunAwayFromCombat, and then tried unregistering all of the hooks, all with the same outcome, a message logged and the bot runs to a random nearby location)

 

The logged message - 

[INFO][Bot #1][06/28 08:32:06 AM]: This script does not use a custom RunAwayFromCombat handler!
[INFO][Bot #1][06/28 08:32:06 AM]: For some scripts this is more than just a necessity, contact the developer!
[INFO][Bot #1][06/28 08:32:06 AM]: We are running away from NPC : Tree spirit
[INFO][Bot #1][06/28 08:32:06 AM]: We've selected position [[x=11880, y=12388, z=1]] as a suitable destination to run away to!
[INFO][Bot #1][06/28 08:32:09 AM]: We've successfully walk to our run-away destination!
Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.