January 2, 20188 yr I was trying to figure this out for vanilla to optimize my combat rotation. Finally made it work. public decimal BuffTimeLeft() { var SliceAndDiceTimeLeft = Lua.LuaDoString<decimal>("for i=0,31 do\r\n local id,cancel = GetPlayerBuff(i,\"HELPFUL|HARMFUL|PASSIVE\");\r\n if(id > -1) then\r\n local buffTexture = GetPlayerBuffTexture(id);\r\n if(strfind(buffTexture,\"Ability_Rogue_SliceDice\")) then\r\n local timeleft = GetPlayerBuffTimeLeft(id);\r\n return timeleft;\r\n end\r\n end\r\nend"); return SliceAndDiceTimeLeft; } Just change the buff texture from "Ability_Rogue_SliceDice" to the texture name you are checking for.
Create an account or sign in to comment