Ohren 106 Posted April 1, 2014 Share Posted April 1, 2014 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. Link to comment https://wrobot.eu/forums/topic/1299-monks-brews/ Share on other sites More sharing options...
Bear T.O.E. 63 Posted April 1, 2014 Share Posted April 1, 2014 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. Link to comment https://wrobot.eu/forums/topic/1299-monks-brews/#findComment-6981 Share on other sites More sharing options...
Ohren 106 Posted April 1, 2014 Author Share Posted April 1, 2014 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. Link to comment https://wrobot.eu/forums/topic/1299-monks-brews/#findComment-6991 Share on other sites More sharing options...
Ohren 106 Posted April 2, 2014 Author Share Posted April 2, 2014 Yeah, that didn't work at all. :P Link to comment https://wrobot.eu/forums/topic/1299-monks-brews/#findComment-6998 Share on other sites More sharing options...
Droidz 2738 Posted April 2, 2014 Share Posted April 2, 2014 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. Link to comment https://wrobot.eu/forums/topic/1299-monks-brews/#findComment-6999 Share on other sites More sharing options...
Ohren 106 Posted April 3, 2014 Author Share Posted April 3, 2014 Hey Droidz, thank you very much for this, definitely adding this into my collection of LUA/C# snippets. Link to comment https://wrobot.eu/forums/topic/1299-monks-brews/#findComment-7013 Share on other sites More sharing options...
Ohren 106 Posted April 3, 2014 Author Share Posted April 3, 2014 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. Link to comment https://wrobot.eu/forums/topic/1299-monks-brews/#findComment-7014 Share on other sites More sharing options...
Droidz 2738 Posted April 5, 2014 Share Posted April 5, 2014 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 } Ohren 1 Link to comment https://wrobot.eu/forums/topic/1299-monks-brews/#findComment-7050 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