November 9, 20169 yr Hey all, Just want to know if it's possible to implement the lua code below into C# fight class and if it's possible, I want to know how to do it. Basically, I want to know the calculated "Time To Die" of my target. Lua Example https://github.com/BadBoy-Ultimate-Raider/BadBoy/blob/39eb9363599d3679bef5500ee5644877f350b9ce/System/engines/ttdTable.lua Thx in advance
November 9, 20169 yr 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
November 9, 20169 yr 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
November 9, 20169 yr 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 ?
November 9, 20169 yr 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')");
November 9, 20169 yr 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 ...
November 9, 20169 yr 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
November 10, 20169 yr 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? :)
November 29, 20169 yr 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