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.

luascript in is complete condition

Featured Replies

Hey Droidz,

I was wondering whether there is a way have Lua code in the <is complete condition> for questprofiles.

I would like to expand the garrison routine to starting workorders. and as <is complete condition> i would like to evaluate the number of available orders. this is possible with the returns from C_Garrison.GetLandingPageShipmentInfo() Lua Befehl.

I thougt it might be possible to just use the wManager.Wow.Helpers.Lua.LuaDoString(with proper lua script) in the is complete condition, but i can get it to work. Would this even work in theory. How do i have to format the Luascript for the wmanager. Can i just put my luascript in the brakets.

If this wouldnt work this way at all, is there a possibility to use the OverridePulseCSharpCode QuestType and have the <is complete condition> configured somehow in the c# code.

Thanks a lot for Your help.

Best Regards

highco

Hello,

You can use code like this in <is complete condition>  (not tested):

        int shipmentCapacity = wManager.Wow.Helpers.Lua.LuaDoString<int>("local name, texture, shipmentCapacity, shipmentsTotal, creationTime, duration, timeLeftString, itemName, itemIcon, itemQuality, itemID = C_Garrison.GetLandingPageShipmentInfo(); return shipmentCapacity;");
        int shipmentsTotal = wManager.Wow.Helpers.Lua.LuaDoString<int>("local name, texture, shipmentCapacity, shipmentsTotal, creationTime, duration, timeLeftString, itemName, itemIcon, itemQuality, itemID = C_Garrison.GetLandingPageShipmentInfo(); return shipmentsTotal;");
        return shipmentsTotal >= shipmentCapacity;

 

A few samples of lua usages:

string luaValue = wManager.Wow.Helpers.Lua.LuaDoString("luaVarName = 'value text'", "luaVarName");
        string luaValue2 = wManager.Wow.Helpers.Lua.LuaDoString<string>("return 'value text';");
        bool luaValueBool = wManager.Wow.Helpers.Lua.LuaDoString<bool>("return 1==1;");
        wManager.Wow.Helpers.Lua.LuaDoString("print('run lua code without return value');");

 

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.