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.

interact and onmessage

Featured Replies

Anything wrong with this code?

public void onMessage(Message message) throws InterruptedException {
if (message.toString().contains("stunned")) {
log("am stunned, pausing.");
sleep(random(1000, 4000));
}
if (message.toString().contains("during")) {
log("In combat.");
map.walk(new Position(3266, 3415, 0));
}
}

solved: need to use 

message.getMessage().toString().contains("stunned")
npc.interact

seem to walk with minimap way to often.

Even it the npc is just 4 tiles away it walks on minimap somtimes...

Edited by fre024

That's just the default algorithm for the walking in OSBot. If you want to use the Game screen all the time i'm pretty sure there is a method like localwalker.walkOnScreen() or something like that (if it ported from OSBot 1).
 

Have a  look through the API.

Maybe there are other lines ingame which have 'during' in them, perhaps make it more definite.

 

Also I believe this stuff is case sensitive, maybe you could do toString().toLowerCase() or something?

 

 

  • Author

That's just the default algorithm for the walking in OSBot. If you want to use the Game screen all the time i'm pretty sure there is a method like localwalker.walkOnScreen() or something like that (if it ported from OSBot 1).

 

Have a  look through the API.

 

I don't want it to walk at all, i just want it to interact with the npc without first walking to it.

I don't want it to walk at all, i just want it to interact with the npc without first walking to it.

Raise the walking distance threshold.

  • Author

Raise the walking distance threshold.

 

That is a good idea, how do i do this?

Cannot find anything about this in the API.

That is a good idea, how do i do this?

Cannot find anything about this in the API.

 

look into WalkingEvent. i think this is your best bet.

  • Author

look into WalkingEvent. i think this is your best bet.

 

I looked into events before, but cannot figure out how to use them :(

Can someone point me in the right direction?

 

THx

I looked into events before, but cannot figure out how to use them sad.png

Can someone point me in the right direction?

 

THx

 

please attempt to do it, if you're still stuck, post the specific issue and we'll gladly help :)

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.