Need help: Mage fire macro, delay with scorch debuff? menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Ssateneth's Avatar Contributor
    Reputation
    142
    Join Date
    May 2008
    Posts
    866
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help: Mage fire macro, delay with scorch debuff?

    So as some of you may know, I got a way of using protected LUA functions freely once again, which works exactly like LuaNinja, and decided to try it out on my mage. However, I'm getting a problem concerning with the delay between when scorch leaves your hands and the improved scorch debuff shows up on the enemy. Here's what I got so far.

    Code:
    #showtooltip Pyroblast
    /startattack
    /use 13
    /use 14
    /run i=1 k={GetInstanceInfo()} while(i<=40)do a={UnitDebuff("target",i)} if(a[1]=="Living Bomb" and a[8]=="player")then break elseif(i==40) and ((k[2]=="none" or UnitIsPlayer("target")) or (k[2]=="party" and UnitHealth("target")>=45000) or (k[2]=="raid" and UnitHealth("target")>=125000)) then CastSpellByName("Living Bomb") i=i+1 else i=i+1 end end
    /run c=CastSpellByName d=UnitDebuff t='target' s={d(t,"Improved Scorch")} if UnitBuff("player","Hot Streak") then c("Pyroblast") elseif not (d(t,"Shadow Mastery") or (d(t,"Improved Scorch") and s[7]-GetTime()>=4) or d(t,"Winter's Chill")) then c("Scorch") else c("Fireball") end
    The priority is basically Living bomb if you're solo or fighting another player or in a dungeon and enemy HP is more than 45k or in a raid and enemy HP is more than 125k since theres no point bombing something if it can't explode, then check for Hot streak for Pyroblast, then Scorch only if Winter's Chill, Shadow Mastery is not present or Scorch is either not present or has 4 seconds of duration left, and finally Fireball spam if it can't do anything else.

    The problem is when spamming this, Scorch will usually get spammed 2-3 times before it progresses further in the code because of the lag between the finish of the cast and the application of the debuff. What can I add to this macro to prevent this? I will +rep for a successful solution to my problem. Something like a 3 second 'lockout' to casting Scorch when it successfully starts casting Scorch would work but I'm unsure how to implement this. Maybe something to do with CVar's but I'm unable to wrap my head around it.

    edit: wow, nobody? Even though I've gotten like 15 PMs about what hack I'm using, nobody really knows anything about writing macros using LUA functions itself? /sigh. I got +2 or +3 rep to give, don't remember how much I can give now. It'll bring you that much closer to contrib/elite/whatever.
    Last edited by Ssateneth; 08-05-2010 at 03:00 AM.

    Need help: Mage fire macro, delay with scorch debuff?
  2. #2
    Ssateneth's Avatar Contributor
    Reputation
    142
    Join Date
    May 2008
    Posts
    866
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Meh, nobody at all? It's such easy rep. Cmon guys.

  3. #3
    nightcracker's Avatar Contributor
    Reputation
    102
    Join Date
    Jan 2008
    Posts
    95
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not that hard, you just have to set a variable to true when you cast scorch and set it to false again when you cast an other spell and then check wether that variable is false before casting scorch. Implemented:

    Code:
    #showtooltip Pyroblast
    /startattack
    /use 13
    /use 14
    /run i,q,k=1,0,{GetInstanceInfo()}while(i<=40)do a={UnitDebuff("target",i)}if(a[1]=="Living Bomb"and a[8]=="player")then break elseif(i==40)and((k[2]=="none"or UnitIsPlayer"target")or(k[2]=="party" and UnitHealth"target">=44999)or(k[2]=="raid"and UnitHealth"target">124999))then CastSpellByName"Living Bomb"q=0 i=i+1 else i=i+1 end end
    /run c,t,d=CastSpellByName,"target",UnitDebuff s={d(t,"Improved Scorch")}if UnitBuff("player","Hot Streak")then c"Pyroblast"q=0 elseif not(d(t,"Shadow Mastery")or(d(t,"Improved Scorch")and s[7]-GetTime()>=4)or d(t,"Winter's Chill"))and q==0 then c("Scorch")q=1 else c("Fireball")q=0 end
    If you need any more macro/Lua help, contact me I'm one of the best

    P.S.: I shortened it a little up.

  4. #4
    Ssateneth's Avatar Contributor
    Reputation
    142
    Join Date
    May 2008
    Posts
    866
    Thanks G/R
    1/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by nightcracker View Post
    It's not that hard, you just have to set a variable to true when you cast scorch and set it to false again when you cast an other spell and then check wether that variable is false before casting scorch. Implemented:

    Code:
    #showtooltip Pyroblast
    /startattack
    /use 13
    /use 14
    /run i,q,k=1,0,{GetInstanceInfo()}while(i<=40)do a={UnitDebuff("target",i)}if(a[1]=="Living Bomb"and a[8]=="player")then break elseif(i==40)and((k[2]=="none"or UnitIsPlayer"target")or(k[2]=="party" and UnitHealth"target">=44999)or(k[2]=="raid"and UnitHealth"target">124999))then CastSpellByName"Living Bomb"q=0 i=i+1 else i=i+1 end end
    /run c,t,d=CastSpellByName,"target",UnitDebuff s={d(t,"Improved Scorch")}if UnitBuff("player","Hot Streak")then c"Pyroblast"q=0 elseif not(d(t,"Shadow Mastery")or(d(t,"Improved Scorch")and s[7]-GetTime()>=4)or d(t,"Winter's Chill"))and q==0 then c("Scorch")q=1 else c("Fireball")q=0 end
    If you need any more macro/Lua help, contact me I'm one of the best

    P.S.: I shortened it a little up.
    Thank you for the tips on how to shorten up declaring local variables, but it still spams scorch 2-3 times depending on when the debuff actually shows up. Setting a variable in the macro will not keep it between each run of it. Thats why I was thinking of a CVar since it persists.
    Last edited by Ssateneth; 08-09-2010 at 04:03 PM.

  5. #5
    ardshiel1's Avatar Member
    Reputation
    2
    Join Date
    Feb 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Set the variable to true immediately upon start of the macro, then set it to false after casting scorch. This provides and immediate step to the next spell.

  6. #6
    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)
    Thanks for the info guys.
    Last edited by Ultraviolence; 12-07-2010 at 09:26 PM.

Similar Threads

  1. Need help about /dump macro
    By Zanac in forum World of Warcraft General
    Replies: 1
    Last Post: 09-22-2009, 05:20 AM
  2. Need Help: Go's Dissapear even with save
    By kev3136 in forum WoW EMU Questions & Requests
    Replies: 12
    Last Post: 09-14-2008, 03:51 AM
  3. [Macro] Need help adjusting Mouseover Macro
    By dynamikz in forum WoW UI, Macros and Talent Specs
    Replies: 4
    Last Post: 01-24-2008, 05:26 AM
All times are GMT -5. The time now is 01:44 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