GHI_CountBuffs

Pilus edited this page Sep 10, 2015 · 4 revisions
Clone this wiki locally

Syntax:

GHI_CountBuffs(name, unit)

Arguments:

GHI_CountBuffs has 1 required argument and 1 optional argument.

name
''String''
The name of the buff you want to count.
unit [Optional]
''UnitID[http://wowprogramming.com/docs/api_types#unitID]''
The unit you wish to look for buffs on. Left out it will default to the player who uses the item.

Aliases:

  • CountGHIBuff()

Example:

if GHI_CountBuffs("Drunk") then

print("You've had too many drinks already")

end

This script checks if you have the buff called Drunk and if you do it prints a message saying you are drunk.

if GHI_CountBuffs("Beers") <= 3 then

print("You could have another beer without passing out.")

end

This script checks if you have had 3 or more beers. If you haven't then it tells you you can have another.