Skill Macro

  • I would think of something like


    CastSpellbyName ("Skillname")

    wait x x= cooldown from the skill / global cooldown

    CastSpellbyName ("Skillname")

    wait x

    ....


    Problem is - this is limited to a few iterations.

    Therefor if the mob is dead - it will stop since there´s no target anymore

    If the mob isn´t dead - it stops because of the limited iterations.


    If you really want to do a skill "until the mob is dead"


    You´ll need something like


    Code
    1. /run for i=1,999 do local d=UnitHealth("target")  if d==0 then TargetUnit("") temp=1 break end CastSpellByName("Skillname") wait 1 end

    Not sure if this works... just gave it 5min of thinking about it

    This will do the same thing like above but 999 times with 1s wait (global cooldown? )


    if you really want to do this forever (e.g. target has 100.000.000 HP and you make 1 dmg each) you would need

    "i=1,0" (where i´m not sure if this isn´t deactivated) or just a really high number


    can´t test this one right now since i´m not at home

  • You cannot use wait in loops. That's why there is no way (to my knowledge) to write loops with skills in them. They removed these possibilities because of bots.

    The ships hung in the sky in much the same way that bricks don’t.


    Douglas Adams in The Hitchhiker's Guide to the Galaxy


    -- Halbblut postet nur für den Counter! --

  • No wait in loops - ok

    but what about this macro without wait but i=1,0

    yes it will give you tons of "can´t do this right now - skill has cooldown"

    but simply put it should go on forever? or not? Is this also deactivated?


    Sry i don´t use macros this much and don´t write that many...

  • honestly, you should just put shot in your macro rotation:


    /run if GetActionUsable(shot slot #) then CastSpellByName("Shot");else CastSpellByName("Vampire Arrows");end


    It almost sounds like you want an autoshot macro for afk'ing kills?

  • yes its for a s/w


    at this moment im using this


    /cast shot

    /wait 1

    /cast shot

    /wait 1

    /cast shot

    /wait 1

    /cast shot

    /wait 1

    /cast shot

    ...

    ...


    now when the mob is dead it still casting shot and my char run to the dead mob and its annoying


    im looking for some macro that while im fighting a mob it auto cast shot like the skill "autoshot" but stop the macro when the mob is dead




    or just a way to stop the macro when i want

  • I guess you could loop the following in your macro instead of just /cast Shot:


    /run if GetActionUsable(shot slot #) and UnitHealth("target")>0 then CastSpellByName("Shot");end

    /wait 2


    This would only cast Shot if it was available & Shot's cd is 2 seconds.

  • thank you!

    but i tried it and dont work

    only say nothing on chat

  • thank you for your time but dont worked :(

  • On your screen, I don't see that you have Shot on your actionbar at all. You need to have it on your actionbar and put the slot # (1-80) into the macro.


    The other thing is that you might need to type the 2 lines into the macro first & then copy/paste those 2 lines. The game sometimes doesn't like copy/paste from forums.

  • like this? dont working :S sorry im noob at macros xd

  • Code
    1. /run if UnitHealth("target")>0 then CastSpellByName("Shot") else TargetUnit("") end
    2. /wait 1
    3. /run if UnitHealth("target")>0 then CastSpellByName("Shot") else TargetUnit("") end
    4. /wait 1
    5. /run if UnitHealth("target")>0 then CastSpellByName("Shot") else TargetUnit("") end
    6. /wait 1


    This should work too and it´s shorter.


    If you install the addon ExtendedMacroIcons you can have longer macros.

    pdoaula2cb8.png :thumbsup:

  • Download the addon "Extended Macro Icons" (or similar name). It doesn't just give you more icons for macros, but also increases the macro length by at least 5-6x.


    ^ too late

  • Code
    1. /run function fn()if UnitHealth("target")>0 then CastSpellByName("Shot")else TargetUnit("")end end fn()
    2. /wait 1
    3. /run fn()
    4. /wait 1
    5. /run fn()
    6. /wait 1
    7. ...

    even more reduced...not sure if fn is the best name but yeah...should work^^

    Du willst testen und zukünftigen Content sehen? Bewirb dich als Tech-Teamler!


    Du bist mit einer Entscheidung von mir nicht zufrieden? Kontaktiere meinen Superior SaitoHajime