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.

API Suggestion: Player#isStunned

Featured Replies

Simple suggestion, and it would help my thieving script a lot.

Player#isStunned() - checks if the player is stunned.

The way I currently do this is by checking the player height at the beginning of the script and whenever I'm running code to see if my new height is higher (when you are stunned, your height goes up by 7-8). This can be inaccurate at times, but it works.

 

In short, have a method that checks if the player is stunned (and maybe even stun time remaining).

Thanks :D

Simple suggestion, and it would help my thieving script a lot.

Player#isStunned() - checks if the player is stunned.

The way I currently do this is by checking the player height at the beginning of the script and whenever I'm running code to see if my new height is higher (when you are stunned, your height goes up by 7-8). This can be inaccurate at times, but it works.

 

In short, have a method that checks if the player is stunned (and maybe even stun time remaining).

Thanks biggrin.png

No config for being stunned?

There's no config sad.png

I think the options without hooking it are:

- listening for the game message "You've been stunned"

- checking model height

- checking player animation (upon being stunned) for 424/420/388... (more?)

- npc head message if no other player was interacting with it

A combination of those would still cause a small delay, so would be great to have it hooked ^^

Edited by Flamezzz

  • Author

There's no config sad.png

I think the options without hooking it are:

- listening for the game message "You've been stunned"

- checking model height

- checking player animation (upon being stunned) for 424/420/388... (more?)

- npc head message if no other player was interacting with it

A combination of those would still cause a small delay, so would be great to have it hooked ^^

 

I've always just looked at the model height, because every npc has a different stun time (leaving the other 3 methods redundant). This has its own inaccuracies, however, since model height itself fluctuates.

 

Getting stunned has not setting bcs it simply an animation.

 

Either you can use the message or use the players model.

If you are being stunned the players height will slightly increase.

 

Khaleesi

 

It must be stored somewhere that you aren't allowed to move though right ? :p

  • Author

Getting stunned has not setting bcs it simply an animation.

 

Either you can use the message or use the players model.

If you are being stunned the players height will slightly increase.

 

Khaleesi

 

Like I said, I already use that. However, the player height fluctuates anyway so it can be inaccurate.

  • Author

Just to add to this thread (crossposting a bug report from OmniPocket partially):

When you call Player#isUnderAttack() while getting stunned, it will return true briefly occasionally (which is understandable; you are getting hit). This is a problem I encountered for nearly a month now, except I used to just ignore it and removed a feature which uses Player#isUnderAttack() solely for non-pickpocket purposes.

This (to me at least) greatly increases the need for a Player#isStunned() method.

You can read his bug report here.

why not get the height of the player at the start, then use this height to determine whether the user is stunned or not? 

  • Author

why not get the height of the player at the start, then use this height to determine whether the user is stunned or not? 

 

Like stated above, there is a margin of error because the height fluctuates normally.

Like stated above, there is a margin of error because the height fluctuates normally.

 

you must know how much it increases by when stunned? well roughly since it fluctuates.

Edited by Precise

  • Author

you must know how much it increases by when stunned? 

 

I explain it all above :p It increases by 7-8 but even that fluctuates.

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.