UnitBuff stacking? menu

User Tag List

Results 1 to 3 of 3
  1. #1
    killc0unt's Avatar Member
    Reputation
    2
    Join Date
    Jan 2011
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    UnitBuff stacking?

    so im new to lua and i have been trying to make a macro for my shadow priest but for my rotation but i want it to start with 2 mind spikes then a mind blast, making the mind melt buff stack twice so mind blast is an instant cast but i have tried everything i can think of and i couldnt get it to work. i have tried giving unitbuff() a number and unitaura but i tried to get the count and i couldnt find it or just something didnt work, i used something like
    Code:
    /run local MM=(UnitAura("Player","Mind Melt","Count")) if MM==2 then CastSpellByName("Mind Blast") else end;
    also a noob question, i have seen scripts with n,_,_,_, then something like what im trying to do and im guessing the "n" means name but im not exactly clear on what it does. Thanks in advance for any help.

    UnitBuff stacking?
  2. #2
    Ultraviolence's Avatar Active Member
    Reputation
    15
    Join Date
    Aug 2008
    Posts
    102
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's some examples (traditional format for clarity... edit for in-game usage):

    Code:
    local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId
    if UnitBuff("player","Mind Melt") and count==2 then
    	CastSpellByName("Mind Blast")
    end
    If you aren't going to utilize all returns within a function (if you needed to save space in a macro, for example) you can use something like local name,_,_,count,_,_,_,UnitCaster, and so on.

    Or, a more simplistic/tidy method:

    Code:
    local mm={UnitBuff("player","Mind Melt")}
    if UnitBuff("player","Mind Melt") and mm[4]==2 then
    	CastSpellByName("Mind Blast")
    end
    Where [4] is the fourth result from the UnitBuff function (which happens to be count). And you can add other things like mm[7]-GetTime()<=2 (where [7] refers to expirationTime) to use Mind Blast with less than or equal to 2 seconds left of the Mind Melt buff, which is probably not even a good idea to do in this case, but I'm just giving another example.

    Good luck.
    Last edited by Ultraviolence; 04-04-2012 at 08:12 AM.

  3. #3
    killc0unt's Avatar Member
    Reputation
    2
    Join Date
    Jan 2011
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    awesome, thanks for the help

Similar Threads

  1. Stacking size buff. (Horde)
    By Hectic in forum World of Warcraft Exploits
    Replies: 18
    Last Post: 01-14-2007, 03:26 AM
  2. rogue talent fleet footed stack question
    By 4saken in forum World of Warcraft General
    Replies: 2
    Last Post: 12-10-2006, 03:05 AM
  3. More PvP pots in a stack
    By Shlurpee in forum World of Warcraft Exploits
    Replies: 4
    Last Post: 10-14-2006, 07:46 PM
  4. How do I stack Dark Portals?
    By negligice in forum World of Warcraft General
    Replies: 4
    Last Post: 08-29-2006, 01:51 AM
  5. Sunfruit STACKS for insane Strength Buff
    By Matt in forum World of Warcraft Exploits
    Replies: 3
    Last Post: 04-02-2006, 03:12 AM
All times are GMT -5. The time now is 06:35 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search