Public Macros CotH macro.. any ideas?
Reply
CotH macro.. any ideas?
Hi folks
I wanted to automate a quick macro to be able to have my mage coth the rest of the group and I came up with this. It works, but there are problems. Yes, I know it will attempt to coth the mage as well. But the real problem is when I get to my beastlord, and it targets his warder instead. How can I make the name returned from netbots be the ID instead? Here is the macro...

sub main

/declare i int local 0
/declare toon string local

/for i 1 to ${NetBots.Counts}
/varset toon ${NetBots.Client[${i}]}
/if (${NetBots[${toon}].InZone} && ${NetBots[${toon}].InGroup}) {
/target ${toon}
/casting "Call of the Hero" -maxtries|5
/delay 4s
}
/next i
/return


Thanks for the help
Randall
Mon May 20, 2013 7:57 pm
CotH is group only. Don't use Netbots but instead the Group TLO: ${Group.Member[${i}].Spawn.ID}

Use the id parameter for the /casting command:
/casting "Call of the Hero" -maxtries|5 -id|${Group.Member[${i}].Spawn.ID}
No need for a separate /target command.


But the real problem is when I get to my beastlord, and it targets his warder instead. How can I make the name returned from netbots be the ID instead? Here is the macro...


Use exact match if it matters:
/echo ${Spawn[beastlordname].Name}
/echo ${Spawn[=beastlordname].Name}

The first may pick up the warder (if it's closer). The second one never will. Exact match works for any string I've tried it on.

You won't need it for this macro, but better target commands are:
/target id ${Group.Member[${i}].Spawn.ID}
/target id ${Spawn[=${toon}].ID}
Tue May 21, 2013 12:34 am
Senior Project Member
Thanks Grumble.. I will give this a try.
Tue May 21, 2013 10:00 am
Since there are so many different ways to do the same thing, I'll add this method:

Macro
More +
/for i 0 to ${Group}
  /if (${Spawn[pc ${Group.Member[${i}]}].ID} && ${Spawn[pc ${Group.Member[${i}]}].ID}!=${Me.ID} && ${Spawn[pc ${Group.Member[${i}]}].Distance3D}>50) {
    /tar ID ${Spawn[pc ${Group.Member[${i}]}].ID}
    <coh casting stuff here>
  }
/next i


This method checks:
i) Is the group member in this zone?
ii) Is the group member NOT you?
iii) Is the group member far enough to warrant summoning?

And it doesn't require netbots (which is neither good or bad), but just for potential users to be aware.
Mon Mar 31, 2014 7:19 pm
With beastlord there are targeting issues. putting a = in front of the name fixes most of them. just to try

/target =${toon}
Tue Apr 01, 2014 10:58 am
Listen to This Guy
Additional option, since you are checking net bots already, just use net bots info as it contains the ID. Also, do not bother to target. That is a waste of time. Let MQ2Cast handle it.
Macro
More +
/casting "Call of the Hero" -maxtries|5 -targetid|${NetBots[${toon}].ID}

_________________
Sorvani
Sun Apr 06, 2014 9:48 am
Senior Project Member
Public Macros CotH macro.. any ideas?
Reply