mainfinity 1 Report post Posted January 20, 2017 I found this macro in the web,it acts similar to castsequence and puts 2 totems 1 after other with 1 button /run if n~= 1 then CastSpellByName("windfury totem") n=1 else CastSpellByName("mana spring totem") n=0 end so the question is:is it possible to extend it to use 3-4 totems?Im not good in scripting,so asking for help here. 0 Share this post Link to post Share on other sites
mainfinity 1 Report post Posted January 21, 2017 Noone??? 0 Share this post Link to post Share on other sites
KVital 14 Report post Posted January 21, 2017 coe best addon for shaman ever dont need anything more 0 Share this post Link to post Share on other sites
Gorstavich 1 Report post Posted January 21, 2017 Give this a try, Mainfinity: /run if n=1 then CastSpellByName("first totem") n=2 elseif n=2 then CastSpellByName("second totem") n=3 elseif n=3 then CastSpellByName("third totem") n=1 end The problem you may quickly run into though is the 255 character macro limit (I think it still existed in this version of the game). 0 Share this post Link to post Share on other sites
mainfinity 1 Report post Posted January 22, 2017 (edited) if n=1 then CastSpellByName("mana spring totem") n=2 elseif n=2..."]:1: 'then' expected near '=' Thats what it tells me when i try to run the macros Edited January 22, 2017 by mainfinity 0 Share this post Link to post Share on other sites
Gorstavich 1 Report post Posted January 22, 2017 ...Syntax, you horrible horrible beast. Why do you haunt me so? *cry* Try this, Mainfinity: /run if n==1 then CastSpellByName("first totem") n=2 elseif n==2 then CastSpellByName("second totem") n=3 elseif n==3 then CastSpellByName("third totem") n=1 end 0 Share this post Link to post Share on other sites
mainfinity 1 Report post Posted January 22, 2017 It places only 2 first totems now xD 0 Share this post Link to post Share on other sites
Gorstavich 1 Report post Posted January 22, 2017 And this is a lesson... of the fact that I am not an expert. In the past I've always created an addon that is simply a list of functions which I call via macro. So a macro would look like this: /run MainfinTotemDrop(); And the main addon code itself would look something like: MainfinTotemVar = 1; MainfinTotem1 = "Stoneskin Totem"; MainfinTotem2 = "Searing Totem"; MainfinTotem3 = "Cleansing Totem"; MainfinTotem4 = "Grace of Air Totem"; function MainfinTotemDrop() if ( MainfinTotemVar == 1 ) then CastSpellByName(MainfinTotem1); MainfinTotemVar = 2; elseif ( MainfinTotemVar == 2 ) then CastSpellByName(MainfinTotem2); MainfinTotemVar = 3; elseif ( MainfinTotemVar == 3 ) then CastSpellByName(MainfinTotem3); MainfinTotemVar = 4; elseif ( MainfinTotemVar == 4 ) then CastSpellByName(MainfinTotem4); MainfinTotemVar = 1; end end Of course, if I'm going to do this I'd probably code in an automatic reset to 1 when you leave combat, etc. At this point you probably want to look at the real totem addons already out there (or start learning how to make them yourself, which is what I did at a basic level). Because of the World of Warcraft version (1.12.1) being run, a lot of the later macro conveniences just don't exist yet. 0 Share this post Link to post Share on other sites
reflect 3 Report post Posted January 23, 2017 (edited) This one should work. You'll need to replace the spellnames below with what u want. It's also possible to append more spells to the list. (Just follow the pattern) /run local _gspells = { "Ice Armor", "Dampen Magic", "Arcane Intellect"} if GetSpellCooldown(4,"BOOKTYPE_SPELL")==0 then _gi=_gi and _gi > 0 and _gi or 1 CastSpellByName(_gspells[_gi]) _gi = math.mod(1+_gi, 1+table.getn(_gspells))end Edit: If the code is going to be used in more than 1 macro, you'll need to rename all occurrences of variable "_gi" so they're unique to each macro. Edited January 23, 2017 by reflect 0 Share this post Link to post Share on other sites
фткyн 1469 Report post Posted January 23, 2017 (edited) I'm just using supermacro, my ugly macro looks like /script if not buffed mana spring then cast mana spring totem /script if not buffed windfury then cast windfury and so on. Atm typing from my mobile phone so can't post real macro, but it works well even if ugly. upd, this /script if not buffed("Mana Spring", 'player') then cast("Mana Spring Totem")end; /script if not buffed("Windfury", 'player') then cast("Windfury Totem")end; /script if not buffed("Strength of Earth", 'player') then cast("Strength of Earth Totem")end; But it checks only buff, so if you have any oil on wep its will dont work, i think Edited January 23, 2017 by фткyн 0 Share this post Link to post Share on other sites
mainfinity 1 Report post Posted January 24, 2017 OMG MAN,this works ye it has a lottle downside of checking if te buff is on me and only then placing the new totem,but at least its 3 pve totems in button,thx mate 0 Share this post Link to post Share on other sites