Jump to content

Monk's brews


Ohren

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

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

}

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...