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.

How to implement Lua functions in C#

Featured Replies

  • Author
52 minutes ago, Brian said:

Lua.LuaDoString<string>("UnitIsDead('target')")

I know you can do this to retrieve a bool or a string or whatever you want but it's a bit more complicated than that

1 hour ago, MrBottie said:

I know you can do this to retrieve a bool or a string or whatever you want but it's a bit more complicated than that

If you want to retrieve multiple values;

 

a,b,c,d,e,f,g =  Lua.LuaDoString<string>("UnitIsDead('target'));

a,b,c.. are the respective values in order

4 hours ago, Brian said:

If you want to retrieve multiple values;

 

a,b,c,d,e,f,g =  Lua.LuaDoString<string>("UnitIsDead('target'));

a,b,c.. are the respective values in order

That way it's not possible. Or you use an foreach loop or an switch construction.

But a,b,... stands for what ?

 

3 hours ago, Pasterke said:

That way it's not possible. Or you use an foreach loop or an switch construction.

But a,b,... stands for what ?

 

string name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, 
shouldConsolidate, spellId = Lua.LuaDoString<string>("BuffStatus('target','Hunter's Mark')"); 
58 minutes ago, Brian said:

string name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, 
shouldConsolidate, spellId = Lua.LuaDoString<string>("BuffStatus('target','Hunter's Mark')"); 

You can try :

string[] result = Lua.LuaDoString<string>("local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId=what you want to check",0);

then result[0] should contains name, result[1] rank etc ...

1 hour ago, Pasterke said:

You can try :

string[] result = Lua.LuaDoString<string>("local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId=what you want to check",0);

then result[0] should contains name, result[1] rank etc ...

This is for OP, not for me :P, I use it just fine

  • Author
11 hours ago, Pasterke said:

You can try :

string[] result = Lua.LuaDoString<string>("local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId=what you want to check",0);

then result[0] should contains name, result[1] rank etc ...

I just want to know if it's possible to integrate the Time To Die LUA functions above in C#

And if so... how? :)

  • 3 weeks later...

Hello, like this:

            bool isDead = Lua.LuaDoString<bool>("return UnitIsDead('target')");
            string spellName = Lua.LuaDoString<string>("local name, rank, icon, castingTime, minRange, maxRange, spellID = GetSpellInfo(1); return name;");
            // only in next wrobot version
            List<string> returnGetSpellInfo = Lua.LuaDoString<List<string>>("return GetSpellInfo(1);");
            string spellName2 = returnGetSpellInfo[0];

 

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.