Skip to content
View in the app

A better way to browse. Learn more.

WRobot

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.

Is Lua.LuaDoString using a lock?

Featured Replies

Hey @Droidz

is Lua.LuaDoString using a lock? I'm trying to figure something out.
When I lock frames, my entire combat iterations works very fast. When I don't freeze them, it's very slow (about 8 times slower, even when putting a lock on ObjectManager.Locker).
I have optimized my framework quite a lot in recent times and still don't understand why things can take as long as they do sometimes. 
I thought it might have something to do with me utilizing multi threading.

Just trying to understand wRobot better and I happen to use a lot of Lua instead of reading from memory directly.
 

Hello,

(when you don't use lock frame) Lua is slow because WRobot need to inject code in wow (that run in next frame refresh). If you call 5 times lua (on 1 thread) you need to wait ~5 wow frames, ~80ms with 60 fps.

You can:

- lockframe (it is a easier way, and in some case better)

- avoid to use lua (but a lot of wrobot api methods use lua it is hard to know what methods you can use or not)

- try to avoid useless lua call (by sample if you use "if (lua.do("is ok") && me.health < 10 && me.havetarget)" replace it by "if (me.havetarget && me.health < 10 && lua.do("is ok"))"

- combine your lua scripts (if you use several lua calls in one condition try to combine it to one call)

Create an account or sign in to comment

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.