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.

Easy help

Featured Replies

I am trying to get my player to walk back to ONE specific coord(x, y, z), I am using getWalking().walk(coord) and the bot always seems to click one tile off of the coordinate I have it set to move to.

 

I need to be on a specific tile to aggro all the monsters and efficiently run my script

 

Also on tips/ideas/logic about having myPlayer reset aggro?

I'm using a not so good check because If I kill all the crabs my script thinks I have to reset aggro

		if (!myPlayer().isHitBarVisible()) {
				if (!RESET_AREA.contains(myPlayer())) {

					return State.Reset;
				}
		}
		

Is there a efficient way to set a timer so after a certain amount of time the script returns a state?

 

By the way, trying to make a simple Sandcrab killer with resetting

Thank you so much !

Edited by domp

I am trying to get my player to walk back to ONE specific coord(x, y, z), I am using getWalking().walk(coord) and the bot always seems to click one tile off of the coordinate I have it set to move to.

 

I need to be on a specific tile to aggro all the monsters and efficiently run my script

 

Also on tips/ideas/logic about having myPlayer reset aggro?

I'm using a not so good check because If I kill all the crabs my script thinks I have to reset aggro

		if (!myPlayer().isHitBarVisible()) {
				if (!RESET_AREA.contains(myPlayer())) {

					return State.Reset;
				}
		}
		

Is there a efficient way to set a timer so after a certain amount of time the script returns a state?

 

By the way, trying to make a simple Sandcrab killer with resetting

Thank you so much !

 

Use the WalkingEvent:

WalkingEvent walkingEvent = new WalkingEvent(position);
walkingEvent.setMinDistanceThreshold(0);
execute(walkingEvent);

For a timer you could do something like this:

//Class variable
private long timer;

//when you want to start/reset the timer
timer = System.currentTimeMillis();

//to check if the timer is past a certain amount of time, ex. 1 min.
System.currentTimeMillis() - timer >= 60000;

  • Author

 

Use the WalkingEvent:

WalkingEvent walkingEvent = new WalkingEvent(position);
walkingEvent.setMinDistanceThreshold(0);
execute(walkingEvent);

Thankyou, I implemented this and I will let you know how it works, currently laying low..did alot of testing that was faulty

 

 

For a timer you could do something like this:

//Class variable
private long timer;

//when you want to start/reset the timer
timer = System.currentTimeMillis();

//to check if the timer is past a certain amount of time, ex. 1 min.
System.currentTimeMillis() - timer >= 60000;

Thank you for this idea! I will be using this for my reset state!


public class Timer {

private final long start;

private final long period;

private long end;

public Timer(long period) {

this.period = period;

this.start = System.currentTimeMillis();

this.end = (this.start + period);

}

public long getElapsed()

{

return System.currentTimeMillis() - this.start;

}

public long getRemaining() {

if (isRunning()) {

return this.end - System.currentTimeMillis();

}

return 0L;

}

public boolean isRunning()

{

return System.currentTimeMillis() < this.end;

}

public void reset()

{

this.end = (System.currentTimeMillis() + this.period);

}

public long setEndIn(long ms) {

this.end = (System.currentTimeMillis() + ms);

return this.end;

}

public String toElapsedString()

{

return Time.format(getElapsed());

}

public String toRemainingString()

{

return Time.format(getRemaining());

}

}


public class Time {

public static String format(long time) {

StringBuilder t = new StringBuilder();

long total_secs = time / 1000L;

long total_mins = total_secs / 60L;

long total_hrs = total_mins / 60L;

long total_days = total_hrs / 24L;

int secs = (int)total_secs % 60;

int mins = (int)total_mins % 60;

int hrs = (int)total_hrs % 24;

int days = (int)total_days;

if (days > 0) {

if (days < 10) {

t.append("0");

}

t.append(days);

t.append(":");

}

if (hrs < 10) {

t.append("0");

}

t.append(hrs);

t.append(":");

if (mins < 10) {

t.append("0");

}

t.append(mins);

t.append(":");

if (secs < 10) {

t.append("0");

}

t.append(secs);

return t.toString();

}

}

Create an account or sign in to comment

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.