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.

NoMemoryEdit shortcut

  • Version: All
  • Product: WRobot General
  • Type: Bug
  • Status: Not a Bug

Hey Droidz,

for my framework, I set focus and mouseover units to make casting on off targets more easily possible. 
Can you add the option to still write mouseover guid via wRobot API? I think ObjectManager.Me.FocusGuid Setter still works just fine. 

Or is there at least a check like Usefuls.CanWriteToMemory?
Then MAYBE I can think of a workaround. But currently it breaks some of my stuff.

For Mouseover via ObjectManager.Me.MouseoverGuid, if you want:
 

private static void SetMouseoverGuid(ulong guid)
    {
        switch (Usefuls.WowVersion)
        {
            case 5875:
                Memory.WowMemory.Memory.WriteUInt64((uint)Memory.WowMemory.Memory.MainModuleAddress + 0x74E2C8, guid);
                break;
            case 8606:
                Memory.WowMemory.Memory.WriteUInt64((uint)Memory.WowMemory.Memory.MainModuleAddress + 0x86E950, guid);
                break;
            case 12340:
                Memory.WowMemory.Memory.WriteUInt64( 0x00BD07A0, guid);
                break;
            default:
                throw new Exception("Wow version is not supported!");
        }
    }



 

User Feedback

Recommended Comments

Matenia

Elite user

Update: It seems this actually works... It's weird, sometimes it seemed to break. 
I'd write the mouseover guid, call Lua.LuaDoString($"CastSpellByName('{name}', 'mouseover')") and nothing happens. It seems almost like the WoW client breaks for a bit. Happens on Warmane only I guess and I can't really reproduce it.

Matenia

Elite user

Yes, thank you. I noticed this is a different issue that seems to taint some Lua functions on Warmane somehow. I cannot reproduce it reliably, so for now it's okay.

Matenia

Elite user

Hello @Droidz,

I found the issue, I think. It's a multi threading issue, I think.
If you call Lua.LuaDoString twice within the same framelock there are some Lua variables that get restored to their incorrect state.
 

Pseudo code:

-- first thread
local _protectedFunctionSave = protectedFunction;
protectedFunction = function(abc)
	return expectedValueForAntiCheat;
end
-- do actual lua code here
-- !first thread

-- before this function is restored another thread comes and does this
-- second thread:
local _protectedFunctionSave = protectedFunction; -- this is now the wrong function we are saving
protectedFunction = function(abc)
	return expectedValueForAntiCheat;
end
-- !second thread

-- first thread
protectedFunction = _protectedFunctionSave; -- original is restored correctly
-- !first thread

-- second thread
-- do actual lua code here
protectedFunction = _protectedFunctionSave; -- wrong function is restored and breaks client a bit
-- !second thread

Is this possible? If yes, maybe thread-lock Lua class?

You save/restore function in same lua script (in one Lua.LuaDoString )?

Matenia

Elite user

No, I do not. But I know you do (CastSpellByName). 
I think that is causing it eventually to be corrupted. 

It's just a guess because someone CastSpellByName stops working after a while on WotLK.

CastSpellByName is modified by some servers.

WRobot (and wow) run lua script by script (lua is not multithread in wow). 

Maybe, if you lua code crash sometime you don't restore function?

try code like:

if not randomNameProtectedFunctionSave then
	randomNameProtectedFunctionSave = protectedFunction;
end
protectedFunction = function(abc)
	return expectedValueForAntiCheat;
end


YOUR CODE HERE....


protectedFunction = randomNameProtectedFunctionSave

(for the session use same name for "randomNameProtectedFunctionSave" (and don't use local var))

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.