Skip 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.

client.getMyPlayer().isAnimating()

Featured Replies

Hello,

 

Is het isAnimating() boolean broken?

 

When i smelt bars, isAnimating() seems to be false.

 

Anyone else is having this problem?

 

Thanks

  • Author

Anyone having this problem aswell?

The animating is only set to true, when he is actually doing the smithing.

 

So lets say you smelt 10 bars.

 

He smelts the first, then stops for a sec and has to smelt the second....

 

The half second he stopped.. The boolean will go to false and it will be as if he is not animating anymore...

 

 

You have to script around it. Or add stuff to make it work anyways. Like a counter, for the bars... Or what ever...

  • Author

The animating is only set to true, when he is actually doing the smithing.

 

So lets say you smelt 10 bars.

 

He smelts the first, then stops for a sec and has to smelt the second....

 

The half second he stopped.. The boolean will go to false and it will be as if he is not animating anymore...

 

 

You have to script around it. Or add stuff to make it work anyways. Like a counter, for the bars... Or what ever...

 

Yugod,

 

Ok. So booleanIsBroken == true?

 

I'll see what I can do about it , thanks.

  • Developer

The boolean is only set to true for one tick, no matter how long the animation takes to show. This is not a bug, it's simply how the Runescape client works. You could write listeners checking the inventory items for example.

  • Author

The boolean is only set to true for one tick, no matter how long the animation takes to show. This is not a bug, it's simply how the Runescape client works. You could write listeners checking the inventory items for example.

 

Thanks, this can be closed.

This is what I use:

public static class Timer {
        private long end;
        private final long start;
        private final long period;

        public Timer(final long period) {
            this.period = period;
            start = System.currentTimeMillis();
            end = start + period;
        }

        public boolean isRunning() {
            return System.currentTimeMillis() < end;
        }

        public void reset() {
            end = System.currentTimeMillis() + period;
        }
    }
	
	public boolean recentlyInCombat() {
		Timer cbCheckTimer = new Timer(500);
		
		while (cbCheckTimer.isRunning()) {
			if (cA.myPlayer().isUnderAttack() || cA.myPlayer().getAnimation() == 1156 || cA.myPlayer().getAnimation() == 388) {
				return true;
			}
		}
		return false;
	}

Change however you see fit. Runescape game ticks are 700ms I believe?

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.