LuaNinja Macro Collection menu

User Tag List

Page 14 of 42 FirstFirst ... 101112131415161718 ... LastLast
Results 196 to 210 of 629
  1. #196
    osbornx22's Avatar Sergeant
    Reputation
    14
    Join Date
    Nov 2009
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by CrazyCactuaR View Post
    Hey guy's, got another one for you. +2 rep to whoever solves this one. This is regarding a rogue's Dismantle, so far i've managed to do the following;

    Code:
    /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
    /stopmacro [stealth]
    /startattack [combat, nostealth]
    
    /run InCombat = UnitAffectingCombat("player")
    /run DismantleCD=GetSpellCooldown("Dismantle")
    /run Dismantle=IsUsableSpell("Dismantle")
    /run RiposteCD=GetSpellCooldown("Riposte")
    /run Riposte=IsUsableSpell("Riposte")
    /run Creature=UnitCreatureType("target")
    /run if DismantleCD == 0 and Dismantle and (Creature == "Humanoid" or Creature == "Demon") then CastSpellByName("Dismantle") end
    /run if RiposteCD == 0 and Riposte then CastSpellByName("Riposte") end
    /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
    This work's perfectly fine however, is their a more suitable way of knowing if the target can have dismantle used on them insted of just 'hoping' the humanoid/demon has weapons equipped. Dismantle triggers GCD when attempted to be used, eg, having it spam on a beast will block all other commands because of the GCD use.
    The answer to this question interests me too. I dont test it, but i think this is one solution (PSEUDOCODE):

    /run if startT == nil then startT = GetTime() end
    /run if tries == nil then tries = 0 end
    /run if Castable(disarm) and tries < 2 then Cast(disarm) tries++ end
    /run if UnitHasDebuff(disarm) then tries = 0 end
    /run if GetTime() - startT > 100 then tries = 0 startT = GetTime() end

    works that?
    Last edited by osbornx22; 12-21-2009 at 05:10 AM.

    LuaNinja Macro Collection
  2. #197
    optovisc's Avatar Sergeant
    Reputation
    10
    Join Date
    Nov 2009
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by pinhe1ro View Post
    Hi, i need a holy pala macro to cast Sacred Shield and Beacon of Light in tank (party or raid) just when he don´t have the buffs, i already tried this:

    /run if not UnitBuff("target=focus or player name", "Sacred Shield") then CastSpellByName("Sacred Shield") end
    /cast [target=mouseover] Flash of Light

    I need some help here plx, thanx
    Pretty sure it should be
    /run if not UnitBuff("target", "Sacred Shield") then CastSpellByName("Sacred Shield") end
    /run if not UnitBuff("target", "Beacon of Light") then CastSpellByName("Beacon of Light") end

    Don't think you can combine one for target AND focus in the same macro. Just change the "target to "focus" in another macro and you should be good.

  3. #198
    Trollblod's Avatar Elite drone
    Reputation
    445
    Join Date
    May 2009
    Posts
    1,710
    Thanks G/R
    2/7
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any chance you can write a macro for prot palas with the 969 rotation? [ame=http://www.youtube.com/watch?v=MZyOoMKtREI]YouTube - Protection Paladin TPS / DPS Tanking Rotation[/ame]


  4. #199
    Viral Fly-by's Avatar Contributor
    Reputation
    136
    Join Date
    Dec 2009
    Posts
    376
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by optovisc View Post
    Pretty sure it should be
    /run if not UnitBuff("target", "Sacred Shield") then CastSpellByName("Sacred Shield") end
    /run if not UnitBuff("target", "Beacon of Light") then CastSpellByName("Beacon of Light") end

    Don't think you can combine one for target AND focus in the same macro. Just change the "target to "focus" in another macro and you should be good.
    You need to check if it is your own Beacon and/or Shield on the target. Also he can't just change target to focus...b/c you're using CastSpellByName which won't cast it on the focus.


    Here's what I use for doing this on focus:
    Code:
    /run _,_,_,_,_,_,_,b,_ = UnitBuff("focus","Beacon of Light"); if b ~= "player" then RunMacroText("/cast [@focus] Beacon of Light") end;
    /run _,_,_,_,_,_,_,s,_ = UnitBuff("focus","Sacred Shield"); if s ~= "player" then RunMacroText("/cast [@focus] Sacred Shield") end;
    It will make sure Beacon and Shield stay on the focus. I'm actually at some point going to post my complete holy pally macro that does all the healing as long as you focus the tank. It will bubble if low hp or plea low mana....prefers to heal non-focus because of beacon healing focus...chooses spells appropriately...and even cleanses debuffs when no one needs healing. Very spammable for easy mode healing.

    Edit: BTW, my example is not entirely complete since it will be very confused if there are multiple paladins. If someone else has BoL or SS on someone, this could end up recasting it unnecessarily. When I post the full macro I'll have the fully correct lines. The only way to really do it is to go through all buffs looking for specifically your buff. If you find it, do nothing, else buff. ALL buff checks need to be done this way.
    Last edited by Viral Fly-by; 12-21-2009 at 02:21 PM. Reason: Clarification of Example

  5. #200
    Viral Fly-by's Avatar Contributor
    Reputation
    136
    Join Date
    Dec 2009
    Posts
    376
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by CrazyCactuaR View Post
    Hey guy's, got another one for you. +2 rep to whoever solves this one. This is regarding a rogue's Dismantle, so far i've managed to do the following;

    Code:
    /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
    /stopmacro [stealth]
    /startattack [combat, nostealth]
    
    /run InCombat = UnitAffectingCombat("player")
    /run DismantleCD=GetSpellCooldown("Dismantle")
    /run Dismantle=IsUsableSpell("Dismantle")
    /run RiposteCD=GetSpellCooldown("Riposte")
    /run Riposte=IsUsableSpell("Riposte")
    /run Creature=UnitCreatureType("target")
    /run if DismantleCD == 0 and Dismantle and (Creature == "Humanoid" or Creature == "Demon") then CastSpellByName("Dismantle") end
    /run if RiposteCD == 0 and Riposte then CastSpellByName("Riposte") end
    /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
    This work's perfectly fine however, is their a more suitable way of knowing if the target can have dismantle used on them insted of just 'hoping' the humanoid/demon has weapons equipped. Dismantle triggers GCD when attempted to be used, eg, having it spam on a beast will block all other commands because of the GCD use.
    I don't believe it's possible to check all those conditions. I think it's the same problem as shred that you can't detect if you're behind the target.

    I would suggest something like the following:
    Code:
    /run n = UnitName("target"); if n ~= _G["disarmTarget"] then _G["disarmTarget"] = n; _G["disarmAble"] = 0; c = UnitCreatureType("target"); if c=="Humanoid" or c=="Demon" then _G["disarmTry"] = 1 else _G["disarmTry"] = 0 end; end
    /run if UnitName("target") == _G["disarmTarget"] and (UnitDebuff("target", "Dismantle") or UnitDebuff("target", "Disarm")) then _G["disarmAble"] = 1 end
    /run if GetSpellCooldown("Dismantle")==0 and IsUsableSpell("Dismantle") and (_G["disarmAble"]==1 or _G["disarmTry"]==1) and not (UnitDebuff("target", "Dismantle") or UnitDebuff("target", "Disarm")) then CastSpellByName("Dismantle"); _G["disarmTry"] = 0; end
    /run if UnitName("target") == _G["disarmTarget"] and (UnitDebuff("target", "Dismantle") or UnitDebuff("target", "Disarm")) then _G["disarmAble"] = 1 end
    So basically this works with 3 global variables to keep track of whether or not the mob can be disarmed.

    Lines are like this:
    1) If we have a new target (because our target is not disarmTarget), then reset all of the variables. We assume it cannot be disarmed (disarmAble = 0). If it's Humanoid or Demon, we set flag so we'll attempt to disarm (disarmTry = 1).

    2) If we're still targetting disarmTarget and that target has either a Disarm or a Dismantle debuff (from us or someone else), we now know they can be disarmed...so set disarmAble = 1.

    3) If Dismantle is ready, then we try to use it if either we know it can be disarmed (disarmAble==1) or we still need to try (disarmTry==1). It also checks it's not currently disarmed.


    So basically if you or any other rogue/warrior dismantles/disarms your target, it will detect that and know it can. If not, you will try once anyway because of the disarmTry. If your dismantle is successful, it will trigger your own flag. So you will only try to dismantle something once. It will reset if you switch targets though which is unfortunate in some situations. With an addon you could save a list of creatures that can be successfully disarmed.
    Last edited by Viral Fly-by; 12-21-2009 at 04:13 PM. Reason: Typo! Had OR capitalized in the macro!

  6. #201
    kakamonster's Avatar Member
    Reputation
    3
    Join Date
    Aug 2008
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why is this not renewing at 2 seconds left?

    /run i=1 while(i<=40)do a={UnitDebuff("target",i)} if(a[1]=="Flame Shock" and a[8]=="player" or a[7]==GetTime()<2)then break elseif(i==40) then CastSpellByName("Flame Shock") i=i+1 else i=i+1 end end

  7. #202
    Viral Fly-by's Avatar Contributor
    Reputation
    136
    Join Date
    Dec 2009
    Posts
    376
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kakamonster View Post
    Why is this not renewing at 2 seconds left?

    /run i=1 while(i<=40)do a={UnitDebuff("target",i)} if(a[1]=="Flame Shock" and a[8]=="player" or a[7]==GetTime()<2)then break elseif(i==40) then CastSpellByName("Flame Shock") i=i+1 else i=i+1 end end

    I'm assuming that never casts unless the debuff isn't present.

    Code:
    a[7]==GetTime()<2
    That makes no sense. You also have some problems with your conditions....AND is higher precedence than OR so you need parentheses...but also I don't think it's checking the conditions the way you want.
    Here's a better corrected (but untested) version:
    Code:
    /run i=1 while(i<=40)do a={UnitDebuff("target",i)} if(a[1]=="Flame Shock" and a[8]=="player" and (a[7]-GetTime())>2)then break elseif(i==40) then CastSpellByName("Flame Shock") i=i+1 else i=i+1 end end
    That will cast Flame Shock if yours isn't present or if it has 2 seconds or less remaining.

  8. #203
    optovisc's Avatar Sergeant
    Reputation
    10
    Join Date
    Nov 2009
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Was hoping someone could help me fix my macro that i pasted earlier in this thread.
    dps
    /run if UnitCastingInfo("target") and GetSpellCooldown("Wind Shear")==0 then SpellStopCasting() CastSpellByName("Wind Shear") else RunMacro"dps1" end

    dps1
    /run if GetSpellCooldown("Shamanistic Rage")==0 and UnitMana("player")/UnitManaMax("Player")<0.20 then CastSpellByName("Shamanistic Rage") else RunMacro"dps2" end

    dps2
    /run local _,_,_,c=UnitBuff("player","Maelstrom Weapon") if c==5 then CastSpellByName("Lightning Bolt") else RunMacro"dps3" end

    dps3
    /run if not UnitDebuff("target", "Flame Shock") then CastSpellByName("Flame Shock") else RunMacro"dps4" end

    dps4
    /run local n,_,_,_,_,_,_,c=UnitDebuff("target","Stormstrike") if c~="player" and GetSpellCooldown("Earth Shock")==0 then CastSpellByName("Earth Shock") else RunMacro"dps5" end

    dps5
    /run local if not UnitDebuff("target", "Stormstrike") and GetSpellCooldown("Stormstrike")==0 then CastSpellByName("Stormstrike") else RunMacro"dps6" end

    dps6
    /run if GetSpellCooldown("Earth Shock")==0 then CastSpellByName("Earth Shock") else RunMacro"dps7" end

    dps7
    /run local _, totemname, start, duration = GetTotemInfo(1) if not totemname or totemname == "" then CastSpellByName("Magma Totem") else RunMacro"dps8" end

    dps8
    /run local _,_,_,c=UnitBuff("player","Lightning Shield") if c<=1 then CastSpellByName("Lightning Shield") else RunMacro"dps9" end

    dps9
    /run if GetSpellCooldown("Lava Lash")==0 then CastSpellByName("Lava Lash") else RunMacro"dpsA" end

    dpsA
    /run local f,_,_,_,c=GetTotemInfo(1) if f==1 and GetSpellCooldown("Fire Nova")==0 then CastBySpellName("Fire Nova") else CastBySpellName("Magma Totem") end



    What it does:
    Use SR if less than 20% mana
    MW5_LB
    FS if none on target
    ES_SS
    SS
    ES
    MT
    LS
    LL
    FN

    Doesn't seem to work. Can't get it to go to dps7 (not casting Magma Totem) and if I skip directly (manually click) to dps8 an error comes out.
    Also seems to cast Earth Shock before casting StormStrike even though stormstrike is off cooldown

  9. #204
    Viral Fly-by's Avatar Contributor
    Reputation
    136
    Join Date
    Dec 2009
    Posts
    376
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by optovisc View Post
    Was hoping someone could help me fix my macro that i pasted earlier in this thread.

    What it does:
    Use SR if less than 20% mana
    MW5_LB
    FS if none on target
    ES_SS
    SS
    ES
    MT
    LS
    LL
    FN

    Doesn't seem to work. Can't get it to go to dps7 (not casting Magma Totem) and if I skip directly (manually click) to dps8 an error comes out.
    Also seems to cast Earth Shock before casting StormStrike even though stormstrike is off cooldown

    Here's my rewrite (fixes the debuff detection) as a SuperDuperMacro rather than split up into many:
    Code:
    /run if UnitCastingInfo("target") and GetSpellCooldown("Wind Shear")==0 then SpellStopCasting() CastSpellByName("Wind Shear") end
    /run if GetSpellCooldown("Shamanistic Rage")==0 and UnitPower("player")/UnitPowerMax("player")<0.20 then CastSpellByName("Shamanistic Rage") end
    /run local _,_,_,c=UnitBuff("player","Maelstrom Weapon") if c==5 then CastSpellByName("Lightning Bolt") end
    /run local i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Flame Shock" and a[8]=="player" then break else i=i+1 end end; if i>40 and GetSpellCooldown("Flame Shock")==0 then CastSpellByName("Flame Shock") end
    /run local i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Stormstrike" and a[8]=="player" then break else i=i+1 end end; if i<=40 and GetSpellCooldown("Earth Shock")==0 then CastSpellByName("Earth Shock") end
    /run local i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Stormstrike" and a[8]=="player" then break else i=i+1 end end; if i>40 and GetSpellCooldown("Stormstrike")==0 then CastSpellByName("Stormstrike") end
    /run if GetSpellCooldown("Earth Shock")==0 then CastSpellByName("Earth Shock") end
    /run local _,t,_,_ = GetTotemInfo(1); if t==nil or t=="" then CastSpellByName("Magma Totem") end
    /run local _,_,_,c=UnitBuff("player","Lightning Shield") if c==nil or c<=1 then CastSpellByName("Lightning Shield") end
    /run if GetSpellCooldown("Lava Lash")==0 then CastSpellByName("Lava Lash") end
    /run local _,t,_,_ = GetTotemInfo(1); if t~=nil and t~="" and GetSpellCooldown("Fire Nova")==0 then CastSpellByName("Fire Nova") end
    (Note: Above is edited to final working version.)

    BTW...casting ES before SS is what it's setup to do...as long as the SS debuff is on the target to boost ES damage. That is correct for the rotation as well. I'm not at a wow machine to test the totem stuff...but it should be correct based on the API information on WowWiki.
    Last edited by Viral Fly-by; 12-23-2009 at 11:23 AM. Reason: Typo! O_o

  10. #205
    optovisc's Avatar Sergeant
    Reputation
    10
    Join Date
    Nov 2009
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It should only cast ES before SS only if SS debuff is on the boss or if SS is on cooldown. In my macro, it did not do that at all. Will test your macro in game now thank you.

    also, an error occurs if you do not have lightning shield up prior to pressing the macro. could there be a check placed for that?
    also an error occured while i was testing the macro
    Code:
    Message: [string "local _,t,_,_ = GetTotemInfo(1); if (totemn..."]:1: attempt to call global 'CastBySpellName' (a nil value)
    Time: 12/22/09 03:53:23
    Count: 40
    Stack: [string "local _,t,_,_ = GetTotemInfo(1); if (totemn..."]:1: in main chunk
    [C]: in function `RunScript'
    Interface\FrameXML\ChatFrame.lua:1897: in function `?'
    Interface\FrameXML\ChatFrame.lua:3544: in function `ChatEdit_ParseText'
    Interface\FrameXML\ChatFrame.lua:3213: in function `ChatEdit_SendText'
    Interface\FrameXML\ChatFrame.lua:2304: in function <Interface\FrameXML\ChatFrame.lua:2297>
    [C]: in function `RunMacroText'
    Interface\FrameXML\SecureTemplates.lua:378: in function `handler'
    Interface\FrameXML\SecureTemplates.lua:529: in function <Interface\FrameXML\SecureTemplates.lua:478>
    [C]: in function `Click'
    Interface\FrameXML\ChatFrame.lua:1345: in function `?'
    Interface\FrameXML\ChatFrame.lua:3526: in function `ChatEdit_ParseText'
    ...
    [C]: in function `Click'
    Interface\FrameXML\ChatFrame.lua:1345: in function `?'
    Interface\FrameXML\ChatFrame.lua:3526: in function `ChatEdit_ParseText'
    Interface\FrameXML\ChatFrame.lua:3213: in function `ChatEdit_SendText'
    Interface\FrameXML\ChatFrame.lua:2304: in function <Interface\FrameXML\ChatFrame.lua:2297>
    [C]: in function `UseAction'
    Interface\FrameXML\SecureTemplates.lua:310: in function `handler'
    Interface\FrameXML\SecureTemplates.lua:529: in function `SecureActionButton_OnClick'
    Interface\FrameXML\ActionButton.lua:40: in function `ActionButtonUp'
    [string "ACTIONBUTTON2"]:4: in function <[string "ACTIONBUTTON2"]:1>
    
    Locals: _ = true
    t = ""
    _ = 0
    _ = 0
    (*temporary) = nil
    (*temporary) = "Fire Nova"
    (*temporary) = "attempt to call global 'CastBySpellName' (a nil value)"
    Occurs as soon as I cast my lightning shield manually and press the macro.
    Last edited by optovisc; 12-21-2009 at 02:55 PM.

  11. #206
    Viral Fly-by's Avatar Contributor
    Reputation
    136
    Join Date
    Dec 2009
    Posts
    376
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by optovisc View Post
    It should only cast ES before SS only if SS debuff is on the boss or if SS is on cooldown. In my macro, it did not do that at all. Will test your macro in game now thank you.
    The way I have it now should be:

    1. If target is casting, stop and Wind Shear to interrupt.
    2. If below 20% mana, Shamanistic Rage.
    3. If MW at 5, Lightning Bolt.
    4. If your Flame Shock not on target, Flame Shock.
    5. If your Stormstrike on target and Earth Shock ready, Earth Shock.
    6. If your Stormstrike is not on the target and Stormstrike is ready, Stormstrike.
    7. If Earth Shock is ready, Earth Shock (regardless of SS).
    8. If you don't have a Fire Totem, drop Magma Totem.
    9. If you have 1 orb or less of Lightning Shield, then Lightning Shield.
    10. If Lava Lash is ready, Lava Lash.
    11. If you have a Fire totem and Fire Nova is ready, the Fire Nova.



    BTW, I had to edit my previous post because of a typo around detecting the Stormstrike debuff...please grab the updated one.


    Edit: Can you try the macro above now? I corrected the stormstrike problem and the silly typo causing your error. I had CastBySpellName rather than CastSpellByName...lol. Also I think I corrected the "lightning shield not up" bug. Can you try that too with latest edit?
    Last edited by Viral Fly-by; 12-21-2009 at 03:08 PM. Reason: More comments.

  12. #207
    CrazyCactuaR's Avatar Contributor
    Reputation
    84
    Join Date
    Sep 2008
    Posts
    201
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Viral Fly-by View Post
    I don't believe it's possible to check all those conditions. I think it's the same problem as shred that you can't detect if you're behind the target.

    I would suggest something like the following:
    Code:
    /run n = UnitName("target"); if n ~= _G["disarmTarget"] then _G["disarmTarget"] = n; _G["disarmAble"] = 0; c = UnitCreatureType("target"); if c=="Humanoid" or c=="Demon" then _G["disarmTry"] = 1 else _G["disarmTry"] = 0 end; end
    /run if UnitName("target") == _G["disarmTarget"] and (UnitDebuff("target", "Dismantle") or UnitDebuff("target", "Disarm")) then _G["disarmAble"] = 1 end
    /run if GetSpellCooldown("Dismantle")==0 and IsUsableSpell("Dismantle") and (_G["disarmAble"]==1 OR _G["disarmTry"]==1) and not (UnitDebuff("target", "Dismantle") or UnitDebuff("target", "Disarm")) then CastSpellByName("Dismantle"); _G["disarmTry"] = 0; end
    /run if UnitName("target") == _G["disarmTarget"] and (UnitDebuff("target", "Dismantle") or UnitDebuff("target", "Disarm")) then _G["disarmAble"] = 1 end
    So basically this works with 3 global variables to keep track of whether or not the mob can be disarmed.

    Lines are like this:
    1) If we have a new target (because our target is not disarmTarget), then reset all of the variables. We assume it cannot be disarmed (disarmAble = 0). If it's Humanoid or Demon, we set flag so we'll attempt to disarm (disarmTry = 1).

    2) If we're still targetting disarmTarget and that target has either a Disarm or a Dismantle debuff (from us or someone else), we now know they can be disarmed...so set disarmAble = 1.

    3) If Dismantle is ready, then we try to use it if either we know it can be disarmed (disarmAble==1) or we still need to try (disarmTry==1). It also checks it's not currently disarmed.


    So basically if you or any other rogue/warrior dismantles/disarms your target, it will detect that and know it can. If not, you will try once anyway because of the disarmTry. If your dismantle is successful, it will trigger your own flag. So you will only try to dismantle something once. It will reset if you switch targets though which is unfortunate in some situations. With an addon you could save a list of creatures that can be successfully disarmed.
    The reason i used Humanoid and Demon was just most commonly they have weapons equipped, so checking for the unit types isn't required for what you wrote. I dont have time to check what you've wrote fully but it seems logical to me, if it attempts dismantle once and doesnt repeat when failed then thats more than good enough for me! Would you mind editing the code to remove the creature type check as it isn't required from what you wrote.

    + rep regardless dude, thanks.

  13. #208
    optovisc's Avatar Sergeant
    Reputation
    10
    Join Date
    Nov 2009
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure why but your macro seems to stop at Flame Shock. Won't cast anything beyond that. The SR and LB ones are working fine but anything after Flame Shock seems to be ignored.

    probably a problem with

    Code:
    /run local i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Flame Shock" and a[8]=="player" then break else i=i+1 end end; if(i>40) then CastSpellByName("Flame Shock") end
    /run local i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Stormstrike" and a[8]=="player" then break else i=i+1 end end; if(i<=40) then CastSpellByName("Earth Shock") end
    /run local i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Stormstrike" and a[8]=="player" then break else i=i+1 end end; if(i>40) then CastSpellByName("Stormstrike") end
    Last edited by optovisc; 12-21-2009 at 03:22 PM.

  14. #209
    Viral Fly-by's Avatar Contributor
    Reputation
    136
    Join Date
    Dec 2009
    Posts
    376
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by CrazyCactuaR View Post
    The reason i used Humanoid and Demon was just most commonly they have weapons equipped, so checking for the unit types isn't required for what you wrote. I dont have time to check what you've wrote fully but it seems logical to me, if it attempts dismantle once and doesnt repeat when failed then thats more than good enough for me! Would you mind editing the code to remove the creature type check as it isn't required from what you wrote.

    Creature Type check removed:
    Code:
    /run n = UnitName("target"); if n ~= _G["disarmTarget"] then _G["disarmTarget"] = n; _G["disarmAble"] = 0; _G["disarmTry"] = 1; end
    /run if UnitName("target") == _G["disarmTarget"] and (UnitDebuff("target", "Dismantle") or UnitDebuff("target", "Disarm")) then _G["disarmAble"] = 1 end
    /run if GetSpellCooldown("Dismantle")==0 and IsUsableSpell("Dismantle") and (_G["disarmAble"]==1 OR _G["disarmTry"]==1) and not (UnitDebuff("target", "Dismantle") or UnitDebuff("target", "Disarm")) then CastSpellByName("Dismantle"); _G["disarmTry"] = 0; end
    /run if UnitName("target") == _G["disarmTarget"] and (UnitDebuff("target", "Dismantle") or UnitDebuff("target", "Disarm")) then _G["disarmAble"] = 1 end

  15. #210
    Viral Fly-by's Avatar Contributor
    Reputation
    136
    Join Date
    Dec 2009
    Posts
    376
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by optovisc View Post
    Not sure why but your macro seems to stop at Flame Shock. Won't cast anything beyond that. The SR and LB ones are working fine but anything after Flame Shock seems to be ignored.
    That's because typing code without being able to test it sucks...

    This should be the problem fixer...I was checking the conditions but then not checking if Flame Shock was actually available. So it kept trying to cast a spell that was on cooldown so it just fizzled. This should correct that problem...please test:
    Code:
    /run if UnitCastingInfo("target") and GetSpellCooldown("Wind Shear")==0 then SpellStopCasting() CastSpellByName("Wind Shear") end
    /run if GetSpellCooldown("Shamanistic Rage")==0 and UnitPower("player")/UnitPowerMax("player")<0.20 then CastSpellByName("Shamanistic Rage") end
    /run local _,_,_,c=UnitBuff("player","Maelstrom Weapon") if c==5 then CastSpellByName("Lightning Bolt") end
    /run local i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Flame Shock" and a[8]=="player" then break else i=i+1 end end; if i>40 and GetSpellCooldown("Flame Shock")==0 then CastSpellByName("Flame Shock") end
    /run local i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Stormstrike" and a[8]=="player" then break else i=i+1 end end; if i<=40 and GetSpellCooldown("Earth Shock")==0 then CastSpellByName("Earth Shock") end
    /run local i=1 while(i<=40) do a={UnitDebuff("target",i)} if a[1]=="Stormstrike" and a[8]=="player" then break else i=i+1 end end; if i>40 and GetSpellCooldown("Stormstrike")==0 then CastSpellByName("Stormstrike") end
    /run if GetSpellCooldown("Earth Shock")==0 then CastSpellByName("Earth Shock") end
    /run local _,t,_,_ = GetTotemInfo(1); if t==nil or t=="" then CastSpellByName("Magma Totem") end
    /run local _,_,_,c=UnitBuff("player","Lightning Shield") if c==nil or c<=1 then CastSpellByName("Lightning Shield") end
    /run if GetSpellCooldown("Lava Lash")==0 then CastSpellByName("Lava Lash") end
    /run local _,t,_,_ = GetTotemInfo(1); if t~=nil and t~="" and GetSpellCooldown("Fire Nova")==0 then CastSpellByName("Fire Nova") end
    (Note: Above is edited to final working version.)
    Last edited by Viral Fly-by; 12-23-2009 at 11:24 AM. Reason: Fixt!

Page 14 of 42 FirstFirst ... 101112131415161718 ... LastLast

Similar Threads

  1. [Macro-Collection] All-In-One-Button Macro for all Classes from Level 15-90!
    By Classicclean in forum WoW UI, Macros and Talent Specs
    Replies: 21
    Last Post: 01-21-2014, 08:16 AM
  2. Addon For LuaNinja Macros
    By Tracerv0 in forum WoW UI, Macros and Talent Specs
    Replies: 7
    Last Post: 01-06-2010, 02:21 PM
  3. /Dump Macro Collection (WIP at mo!)
    By Anotherfox in forum WoW UI, Macros and Talent Specs
    Replies: 97
    Last Post: 01-04-2010, 03:21 PM
  4. [HOW TO] Ascii Macro + my collection
    By wickermanz in forum World of Warcraft Guides
    Replies: 12
    Last Post: 01-05-2009, 12:58 PM
  5. Macro Love - My Collection of useful and/or Space saving Macro's!
    By Anotherfox in forum World of Warcraft Guides
    Replies: 15
    Last Post: 12-28-2008, 12:29 AM
All times are GMT -5. The time now is 02:17 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