Page 1 of 1

basic macro?

Posted: Fri Nov 03, 2006 1:50 pm
by crankyplayer
i have read the slash commands and so on and wondering if this macro will work - i know it is extremely simple but i am hoping i grasped the info somewhat
http://www.macroquest2.com/wiki/index.p ... ros#Macros
| this macro will make the cleric cast complete heal on a target at 80% health

Code: Select all

| this macro will make the cleric cast complete heal on a target at 80% health

:loop
/target "x"
/if (${Target.PctHPs}<80) /cast 1
/goto :loop

Posted: Fri Nov 03, 2006 2:18 pm
by wakkedup
Need a Sub Main & /return, but yeah, it looks like it would work. Might not want to put /target in your loop though, as it will keep targetting that "x" person.

Maybe want to do

Code: Select all

/if (!${Target.ID}) /target "x"
instead.

txt to .mac

Posted: Fri Nov 03, 2006 3:02 pm
by crankyplayer
Hi - i was reading in Wiki and noticed that it cant be .txt needs to be .mac ... i searched the forums and didnt find much about how to convert or rewrite my simplex code in a .mac format ...

got any tips?

Re: basic macro?

Posted: Fri Nov 03, 2006 3:05 pm
by toomanynames

Code: Select all

| this macro will make the cleric cast complete heal on a target at 80% health
Sub Main
:loop
/if (${Target.ID}!=${Spawn[target's name].ID}) /tar id ${Spawn[target's 
name].ID}
/delay 1s ${Target.ID}==${Spawn[target's name].ID}
/if (${Target.PctHPs}<80) {
:castagain
  /cast 1
  /delay 5
  /if (!${Me.Casting.ID}) /goto :castagain
  /delay 11s !${Me.Casting.ID}
}
/goto :loop
/return
You could even get a bit more fancy and confirm the target is a PC:
${Spawn[pc bobbytankguy].ID} so that way you don't tag say a beastlord pet (I think this would work).

That should be a gtg working macro right there !!

EDIT

To make it a .mac file. either rename it to .mac from .txt or in notepad or whatever editor, do a file -> save as -> all file types -> type in ch.mac

EDIT x2
put a small delay in to give it a chance to see if you are casting (/delay 5)

basic macro

Posted: Fri Nov 03, 2006 10:59 pm
by crankyplayer

Code: Select all

| this macro will make the cleric cast complete heal on a target at 80% health 

Sub Main 
:loop 
/if (${Target.ID}!=${Spawn[MONK].ID}) /tar id ${Spawn[MONK].ID} 
/delay 1s ${Target.ID}==${Spawn[MONK].ID} 
/if (${Target.PctHPs}<70) { 
:castagain 
  /cast 2 
  /delay 5 
  /if (!${Me.Casting.ID}) /goto :castagain 
  /delay 5s !${Me.Casting.ID}  
{
Sub
/if (${Target.ID}!=${Spawn[BEAST].ID}) /tar id ${Spawn[BEAST].ID} 
/delay 1s ${Target.ID}==${Spawn[BEAST].ID} 
/if (${Target.PctHPs}<70) { 
:castagain 
  /cast 2 
  /delay 5 
  /if (!${Me.Casting.ID}) /goto :castagain 
  /delay 5s !${Me.Casting.ID} 
/goto :loop
/return[/code]hi again everyone i have been working on making a macro for my cleric that will just heal my beastlord and monk with Pious Elixer when they hit 70% i have written the macro the best i can with help from others in previous post.


When i load this macro i get a "Bad Blocking Pairing {}"
i dont really know why this is occuring but also i am wondering why the macro doesnt /tar the when his life is low - basically if i target my cleric and leave it targeted on cleric it will never target the other chars to make sure their life is ok - any input you guys would have is great.
thank you all for reading[/code]

Posted: Fri Nov 03, 2006 11:42 pm
by wakkedup

Code: Select all

Sub Main
   :loop
   /if (${Target.ID}!=${Spawn[MONK].ID}) /tar id ${Spawn[MONK].ID}
   /delay 1s ${Target.ID}==${Spawn[MONK].ID}
   /if (${Target.PctHPs}<70) {
      :castagain
      /cast 2
      /delay 5
      /if (!${Me.Casting.ID}) /goto :castagain
      /delay 5s !${Me.Casting.ID} 
   }
   /if (${Target.ID}!=${Spawn[BEAST].ID}) /tar id ${Spawn[BEAST].ID}
   /delay 1s ${Target.ID}==${Spawn[BEAST].ID}
   /if (${Target.PctHPs}<70) {
      :castagain2
      /cast 2
      /delay 5
      /if (!${Me.Casting.ID}) /goto :castagain2
      /delay 5s !${Me.Casting.ID}
   }
   /goto :loop
/return
Try that...first off, you had a { at the end of your Sub Main, and then had a Sub with no name. What this looks like it will do is keep targeting each of the 2 chars, then, once it gets a target who is under 70% hps, he will cast #2 on the target. For a personal macro that i wouldnt plan on sharing, i'd just do /if (!${Target.CleanName.Equal[MyToon1]}) or whatever. I played my cleric before i got mq2, and i've not tested your code nor my code, so i could be completely wrong here.
Cheers

:EDIT: also, i'm fairly sure your macro gets killed when you get your error. I've never had that one before, but I'd imagine it stops running your macro, as the errors i do see tend to do that.