Jump to content
Sign in to follow this  
mainfinity

Shaman totem castsequence script improvement.

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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 by mainfinity

Share this post


Link to post
Share on other sites

...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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by reflect

Share this post


Link to post
Share on other sites

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 by фткyн

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×