Autorun Macro (doesnt work..need help)

Need help running MacroQuest 1? Too bad! Use MQ2.

Moderator: MacroQuest Developers

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Autorun Macro (doesnt work..need help)

Post by Draekz » Fri Aug 02, 2002 12:11 pm

[L124RD moved this topic to the appropriate forum]
Wasnt sure if this is where I'd post this..but its my first shot at a macro thats not extremely basic..yet not exactly advanced either (just something fun to do)

Anyway when I try it, it gives me these "errors" and nothing really happens.

FYI, I already have a target and am about to run the macro when I get this as a "response" to my scripting :P

With Target

Couldn't find a comparison operator in 'monk'
Couldn't find a comparison operator in 'monk'
MacroQuest: You need to select a target to run after first.
All macro variables and timers cleared.
The current macro has ended.


Without Target

MacroQuest: You need to select a target to run after first.
All macro variables and timers cleared.
The current macro has ended.


--------------------------
Here is the code i used
--------------------------

Code: Select all

| This should make you autorun to your target
| Will get u stuck on objects if they are in your way tho
| -Draekz-

Sub Main

     :Target

	/if $target()==TRUE /goto :Speed
	/if $target()==FALSE /goto :End

     /return

     :Speed
	
	/if $char(class) == "Bard" /if n $char(level) >= 5 /cast 1 /goto :Run
	/if $char(class) == "Druid" /if n $char(level) >= 5 /cast 1
	/delay 70
	/goto :Run
     /return	

     :Run

	/face
	/if $target(distance)>=15 /goto :Run

     :End

	/echo You need to select a target to run after first.	
	/endmacro
	
     /return
Any ideas why it gives me that error when I have a target? Also..did i do the "casting" buff subevent correctly?
Thx for any response/help :)

No need to re-write the script if you dont want to..perhaps maybe a hint or something so i can figure it out myself ;) But if you want to put both so I know where I went wrong and how to fix it..thats fine too :D

Thanks for any help :)

~Draekz~

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Fri Aug 02, 2002 12:12 pm

PS:

Code: Select all

	
	/if $char(class) == "Bard" /if n $char(level) >= 5 /cast 1 /goto :Run
Thats all on one line in my script..just wrapped on the boards here.

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Fri Aug 02, 2002 12:50 pm

My autorun loop is similar to this. I hope this helps you a bit

Code: Select all

Sub follow
  /if n $target(distance)>14 /sendkey down up
  | If target far press up to go towards

  /if n $target(distance)<11 /sendkey down down
   | If The target is too close then backup

  /if n $target(distance)<15 /sendkey up up
   | If target close then stop moving towards

  /if n $target(distance)>10 /sendkey up down 
   | If target is far stop moving away from it

  /face

/goto follow

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Fri Aug 02, 2002 12:58 pm

You can also take a look at L124rd's fight macro which has a good autorun loop

http://macroquest2.com/phpBB2/viewtopic.php?t=170

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Fri Aug 02, 2002 3:11 pm

OH wow..

actually that helped a lot ;)

Thanks Imperfect :) Appreciate it :)