https://github.com/stavroskasidis/macrofunctions-vanillawow
https://github.com/stavroskasidis/macrofunctions-vanillawow
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/stavroskasidis/macrofunctions-vanillawow
- Owner: stavroskasidis
- Created: 2018-02-03T16:06:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-04T11:30:56.000Z (over 7 years ago)
- Last Synced: 2024-10-06T09:22:34.898Z (about 1 year ago)
- Language: Lua
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## MacroFunctions
Simple addon for vanilla wow (1.12) that adds some functions for macro usage.
### Functions added by addon
```lua
-- Returns a boolean on whether the provided 'unit' has a buff by name.
-- Parameters:
-- unit(string): the unit name e.g. "player", "target"
-- buffName(string): the name or part of the name of the buff to look up e.g. "WordShield"
UnitHasBuff(unit,buffName)-- Returns a boolean on whether the provided 'unit' has a debuff by name.
-- Parameters:
-- unit(string): the unit name e.g. "player", "target"
-- debuffName(string): the name or part of the name of the debuff to look up e.g. "WordShield"
UnitHasDebuff(unit,debuffName)-- Prints to the console the names of all the buffs of the target.
-- Helps you find the actual name of a buff (may not be what you see in the tooltip)
-- Parameters:
-- unit(string): the unit name e.g. "player", "target"
PrintUnitBuffs(unit)-- Prints to the console the names of all the debuffs of the target.
-- Helps you find the actual name of a debuff (may not be what you see in the tooltip)
-- Parameters:
-- unit(string): the unit name e.g. "player", "target"
PrintUnitDebuffs(unit)```
### Examples of usage
```lua-- Priest macro: This will cast power word shield on the player only if it not already on them.
/script if(not UnitHasBuff("player","WordS")) then CastSpellByName("Power Word: Shield"); end;
``````lua
-- Hunter "melee" macro. Will stop casting wing clip if it already exists on the target
/script if (not PlayerFrame.inCombat) then CastSpellByName("Attack"); end
/cast Raptor Strike
/cast Mongoose Bite
/script if (not UnitHasDebuff("target","_Trip")) then CastSpellByName("Wing Clip");end;```
### Installation
* Download from [here](https://github.com/stavroskasidis/MacroFunctions-VanillaWow/releases)
* Extract and copy folder "MacroFunctions" in your addons folder (Interface\AddOns)