Struggling with Macro Basics

Fynody

Member
Joined
Oct 12, 2014
Messages
59
Reaction score
7
Points
8
I wan to be able to define a pull skill or multiple pull skill depending on circumstance and class.

As such I believe I have to define / declare the string that contains the skill

I have been using.

/declare PullLongSkill string outer Ranged

with ranged being the default.

I then have a line which depending on the puller redefines the string.

eg:
/if (${Me.Class.ShortName.Equal [SHD]}) /varset PullLongSkill Casting "Spike of Disease"


Later in the Macro I am trying to use whatever that skill is though a command

/${PullLongSkill}

Of all the variations I have not been able to parse ${PullLongSkill} or return anything meaningful

Please advise. The logic seems sound the execution is failing.

How do I get the string of text to register in PullLongSkill.

at this point - even the declared default is not working - or is the error in /${PullLongSkill}
 
I reccomend reading through the MQ2 Manual, it is slightly outdated to the wiki but i find it easier to read

Macroquest2 Documentation

or the wiki

MacroQuest Wiki

The syntax you are using for the first declare is ok, the ${PullLongSkill} will return Ranger before any changes.

The varset you have is wrong though, it should be /varset variablename newvalue

So you should /varset PullLongSkill "Spike of Disease"

then in the macro where you are looking to use the PullLongSkill variable you need to have it workout/know whether it is using an item/spell/aa etc.

Which then dictates the / command for how you'll handle the ability
 
Your right

if I start the lie with /varset the settings work.

How do I get it to work if I want a different setting per pulling class.

I had assumed.

/if (${Me.Class.ShortName.Equal [SHD]}) /varset PullLongSkill Casting "Spike of Disease"

meant, if my class = shadow knight, then set PullLongSkill to Casting "Spike of Disease"

That does not appear to be the case.
 
That part us correct, the if sk do this.

How ever you should have /varset Pulllongskill "Spike of Disease"

/Varset won't accept a type of skill by putting casting in there, you have your different types of variables which in this case is a string so it will accept a word or multiple words with "" around them

Then when it comes to using said variable in a routine, it has to know what the variable is. In which case you can do checks similar to your if sk statement to check if it's an item, use this cmd, if it's an aa, use the aa via mq2cast, same for spells, if it's a disc, doability etc

Have a good read through the manual regarding variables and types that can be set / calculated etc

Also search the forums for PeteSampras' TLO builder it is a great asset
 
Thanks for the help.

I may be trying to make it too complicated, as I have only a couple of chars that would pull.

Is it possible to identify the range of the equipped range weapon?

At low level I am finding the recycle on the spell use much lower than I can pull and kill.
 
Yes you can find a range items distance.

http://www.mmobugs.com/forums/everq.../28025-tlo-builder.html?highlight=TLO+builder

There is the link to the thread with the TLO builded by PeteSampras, it has been invaluable to me.


For range items , i reccomend using the range - 10 or so so you don't try and throw from max distance which may happen to just be out of range after movement.

${Math.Calc[${Me.Inventory[ranged].Range} - 10]} or something the like.

${Me.Inventory[ranged].Range} will return the range of the item , if it has a range at least so must be a bow/throwing type item equipped. You can make use of the bandolier to swap to a pulling setup vs main setup between pulling etc.

But you should work out the basics and get a good understanding first, I always found diving headfirst into stuff easier and working it out as i go with lots of trial and error but reading and re-reading the resources available will be a benefit. Also look at macros here on the forum and over and the mq2 forums and look at that code for ideas and maybe how stuff works well