April 1, 201412 yr So I have an issue, which I might resolve before anyone else comes up with an answer... but here goes.. Working on my Windwalker profile, and I am adding in Tigereye Brew into the rotation. Problem is, the buff that keeps track of stacks of it is called Tigereye Brew, and the buff itself that gives the damage increase is also Tigereye Brew. I need LUA to find a way to differentiate these.
April 1, 201412 yr Use the actual spell ID's instead of the Spell names. If each spell does something different then there will be more than one spell ID for each one.
April 1, 201412 yr Author Can you use spell ID's instead of spell names? I guess I've never tried that. And yes, they each have a different spell ID.
April 2, 201412 yr Hello, I have found this id: 116740;Tigereye Brew 125195;Tigereye Brew 125196;+1 Tigereye Brew 123980;Brewing: Tigereye Brew 137591;Tigereye Brew! Try this: In FightClass "General Settings", "Additional C# code" add: public int TigereyeBrewStackCount() { // 116740;Tigereye Brew // 125195;Tigereye Brew // 125196;+1 Tigereye Brew // 137591;Tigereye Brew! int buffStack = 0; buffStack = buffStack + ObjectManager.Me.BuffStack(116740); buffStack = buffStack + ObjectManager.Me.BuffStack(125195); buffStack = buffStack + ObjectManager.Me.BuffStack(125196); buffStack = buffStack + ObjectManager.Me.BuffStack(137591); return buffStack; } To use it, add in the spell condition type "C Sharp Code", > in "Value" put code: TigereyeBrewStackCount() >= 10 (replace 10 by number of stack required) ps: I ignore if this code works but it is good way to calculate stack of several spells. ps 2: You can replace "ObjectManager.Me.BuffStack" by "ObjectManager.Target.BuffStack" to get target stack.
April 3, 201412 yr Author Hey Droidz, thank you very much for this, definitely adding this into my collection of LUA/C# snippets.
April 3, 201412 yr Author One quick question, when returning a Boolean, would it be TigereyeBuffCheck() = false or does it return bool values as a 0/1 format? I guess I just need an example of how to make it work with Me.HaveBuff. Since I need it to check for spell ID of 116740.
April 5, 201412 yr return true or false. Look this. if (ObjectManager.Me.HaveBuff(0) == false) { // buff no found } if (!ObjectManager.Me.HaveBuff(0)) { // buff no found, like == false } if (ObjectManager.Me.HaveBuff(0) == true) { // buff found } if (ObjectManager.Me.HaveBuff(0)) { // buff found, like == true }
Create an account or sign in to comment