highco 7 Posted December 6, 2015 Share Posted December 6, 2015 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 Link to comment https://wrobot.eu/forums/topic/2493-luascript-in-is-complete-condition/ Share on other sites More sharing options...
Droidz 2738 Posted December 9, 2015 Share Posted December 9, 2015 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');"); highco and cindarella 2 Link to comment https://wrobot.eu/forums/topic/2493-luascript-in-is-complete-condition/#findComment-11483 Share on other sites More sharing options...
highco 7 Posted December 10, 2015 Author Share Posted December 10, 2015 Thank You very much I will try that. Link to comment https://wrobot.eu/forums/topic/2493-luascript-in-is-complete-condition/#findComment-11494 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now