Looking for auto-interupt macro on any friendly target's target. menu

User Tag List

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

    Looking for auto-interupt macro on any friendly target's target.

    Basically, I'm looking for a spammable macro that will look at everyone's target in your party (and eventually raid) and evaluate if they are casting/channeling an interruptable spell. This is including protected functions preferably. Easy rep if you're looking to rep farm and you know how to make macros.

    I tried writing my own, but something is conflicting or doesn't like me. I was able to get a successful auto-interrupt macro on my own target and my focus's target by using the following...

    Code:
    /run i={UnitCastingInfo('target')} if i[9]==false and IsSpellInRange("Wind Shear","target") and GetSpellCooldown("Wind Shear")==0 and not UnitBuff("target","Shield of Lights") and not UnitBuff("target","Shield of Darkness") then CastSpellByName("Wind Shear") end
    /run i={UnitChannelInfo('target')} if i[8]==false and IsSpellInRange("Wind Shear","target") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear") end
    /run i={UnitCastingInfo('focustarget')} if i[9]==false and IsSpellInRange("Wind Shear","focustarget") and GetSpellCooldown("Wind Shear")==0 and not UnitBuff("focustarget","Shield of Lights") and not UnitBuff("focustarget","Shield of Darkness") then CastSpellByName("Wind Shear","focustarget") end
    /run i={UnitChannelInfo('focustarget')} if i[8]==false and IsSpellInRange("Wind Shear","focustarget") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear","focustarget) end
    But when I add on these, it's pretty hit and miss. I see wind shear going off once in a while, but recount doesn't report a successful interupt.

    Code:
    /run i={UnitCastingInfo('party1target')} if i[9]==false and IsSpellInRange("Wind Shear","party1target") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear","party1target") end
    
    /run i={UnitChannelInfo('party1target')} if i[8]==false and IsSpellInRange("Wind Shear","party1target") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear","party1target") end
    
    /run i={UnitCastingInfo('party2target')} if i[9]==false and IsSpellInRange("Wind Shear","party2target") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear","party2target") end
    
    /run i={UnitChannelInfo('party2target')} if i[8]==false and IsSpellInRange("Wind Shear","party2target") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear","party2target") end
    
    /run i={UnitCastingInfo('party3target')} if i[9]==false and IsSpellInRange("Wind Shear","party3target") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear","party3target") end
    
    /run i={UnitChannelInfo('party3target')} if i[8]==false and IsSpellInRange("Wind Shear","party3target") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear","party3target") end
    
    /run i={UnitCastingInfo('party4target')} if i[9]==false and IsSpellInRange("Wind Shear","party4target") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear","party4target") end
    
    /run i={UnitChannelInfo('party4target')} if i[8]==false and IsSpellInRange("Wind Shear","party4target") and GetSpellCooldown("Wind Shear")==0 then CastSpellByName("Wind Shear","party4target") end
    Any help here?

    e: I added ==1 after IsSpellInRange checks. Still acts funny thgouh.
    Last edited by Ssateneth; 10-07-2010 at 02:42 AM.

    Looking for auto-interupt macro on any friendly target's target.
  2. #2
    nightcracker's Avatar Contributor
    Reputation
    102
    Join Date
    Jan 2008
    Posts
    96
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll give the example for target, you should change it yourself for other units.

    Code:
    /run local u,i=UnitCastingInfo;i=select(9,u"target")if u"target"and not i and IsSpellInRange("Wind Shear","target")==1 then CastSpellByName("Wind Shear","target")end
    Last edited by nightcracker; 10-07-2010 at 07:54 AM.
    Three things are certain,
    Death, taxes and site not found,
    You, victim of one.

  3. #3
    Ssateneth's Avatar Contributor
    Reputation
    141
    Join Date
    May 2008
    Posts
    866
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by nightcracker View Post
    I'll give the example for target, you should change it yourself for other units.

    Code:
    /run local u,i=UnitCastingInfo;i=select(9,u"target")if i u"target"and not i and IsSpellInRange("Wind Shear","target")==1 then CastSpellByName("Wind Shear","target")end
    Well.. +rep for effort. I haven't tested it yet, but part of the dealbreaker is I'm still new-ish to lua, so I have a hard time 'reading' your macros, in case I need to add or change something. No clue whats going on with the select(9 and the i between if and u"target". I know you like to have super short macros, but length isn't entirely a concern, as long as it fits in SuperDuperMacro. I abbreviate some functions obviously, like CastSpellByName to reduce some clutter, mind, but some of your shortcuts are hard to follow

  4. #4
    nightcracker's Avatar Contributor
    Reputation
    102
    Join Date
    Jan 2008
    Posts
    96
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There was a little error in my previous macro, I edited it out.

    select(n, arg1, arg2, arg3, ...) selects the nth argument from the arguments that follow after n. so select(3, 4, 5, 1, 9, 0, 3) will return 1.

    Here is my macro without shortcuts:
    Code:
    /run local uninterruptable = select(9,UnitCastingInfo("target")); if UnitCastingInfo("target") and not uninterruptable and IsSpellInRange("Wind Shear","target")==1 then CastSpellByName("Wind Shear","target") end
    Three things are certain,
    Death, taxes and site not found,
    You, victim of one.

  5. #5
    Ssateneth's Avatar Contributor
    Reputation
    141
    Join Date
    May 2008
    Posts
    866
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by nightcracker View Post
    There was a little error in my previous macro, I edited it out.

    select(n, arg1, arg2, arg3, ...) selects the nth argument from the arguments that follow after n. so select(3, 4, 5, 1, 9, 0, 3) will return 1.

    Here is my macro without shortcuts:
    Code:
    /run local uninterruptable = select(9,UnitCastingInfo("target")); if UnitCastingInfo("target") and not uninterruptable and IsSpellInRange("Wind Shear","target")==1 then CastSpellByName("Wind Shear","target") end
    Ahhhhhh, I get the select now. It's like what I do as far as storing a local variable with a table such as a={GetCastingInfo("target")} print(a[9])

  6. #6
    nightcracker's Avatar Contributor
    Reputation
    102
    Join Date
    Jan 2008
    Posts
    96
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Blehmeh View Post
    Ahhhhhh, I get the select now. It's like what I do as far as storing a local variable with a table such as a={GetCastingInfo("target")} print(a[9])
    Yup, but select is less memory intensive
    Three things are certain,
    Death, taxes and site not found,
    You, victim of one.

  7. #7
    Ssateneth's Avatar Contributor
    Reputation
    141
    Join Date
    May 2008
    Posts
    866
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by nightcracker View Post
    Yup, but select is less memory intensive
    So that explains why my frames per second go down after a while (usually from 90 to about 30). I think I'll alter all my macros that use tables to use select (unless where necessary)

    edit: Then again, after seeing my memory usage go down after a minute after spamming the macro (which causes usage to go up about 500KB/sec), it might be something else, since a logoff and logon usually fixes the FPS issue. example, I sit at 64MB usage, spam for a while to 75MB, stop, it sits at 75 for a while then drops back down to 64, as if it does a cleanup.
    Last edited by Ssateneth; 10-08-2010 at 09:36 PM.

  8. #8
    nightcracker's Avatar Contributor
    Reputation
    102
    Join Date
    Jan 2008
    Posts
    96
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It does a cleanup, that's the default Lua memory garbage collecter. You can make the memory usage go down immediately by manually activating the garbage collector:

    Code:
    /run collectgarbage"collect"
    Three things are certain,
    Death, taxes and site not found,
    You, victim of one.

Similar Threads

  1. Look For Objekt Scan Macro or Addon ?
    By morenagirl in forum WoW Items & Quests
    Replies: 0
    Last Post: 11-25-2012, 06:36 PM
  2. faster looking for group (need tank or healer friend)
    By darkriderking in forum World of Warcraft Guides
    Replies: 3
    Last Post: 12-21-2009, 03:42 AM
  3. Looking for someone to use Recruit a Friend (i'll gift u goldz)
    By Premium-mmo in forum World of Warcraft General
    Replies: 3
    Last Post: 09-14-2008, 04:20 PM
  4. Looking for - Auto Backup
    By Ganoran in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 11-11-2007, 05:29 AM
  5. Im Looking For A /script Macro... Plz Help
    By codycondame in forum World of Warcraft General
    Replies: 0
    Last Post: 10-05-2006, 02:04 PM
All times are GMT -5. The time now is 10:26 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search