joust.mac HELP!!

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

judochop
decaying skeleton
decaying skeleton
Posts: 7
Joined: Wed Oct 30, 2002 8:34 am

joust.mac HELP!!

Post by judochop » Wed Dec 04, 2002 1:04 am

I can not get this macro to run. Not sure what the problem is. It does continually face my target but the :attack never seems to be called upon. I am new to melee classes and am trying to get the timing right for PvP jousting. Thank you for any help.

Code: Select all

|  Joust.mac
|
|  Program used in melee PvP to constantly face opponent
|  and to attack the instant you are within melee range
|  and then to immediately face away from opponent to get
|  out of range of their attack.  This requires you to already
|  have your opponent targetted.
|

#turbo

sub Main

	:Loop

		/face fast nopredict 
		/if $target(distance)< 10 /goto :Attack
		/delay 1
   		/if "$target()"=="TRUE" /goto :Loop
		/return

	:Attack
	
		/attack on
		/face fast away
		/delay 20	|gives time to get away before facing again
		/attack off
		/return
	

Vendor001
Cheezily Banned
Cheezily Banned
Posts: 78
Joined: Wed Nov 13, 2002 1:37 pm

Post by Vendor001 » Wed Dec 04, 2002 2:32 pm

Seems that you do alot of /facing, but no actual movement.

You might also want to make sure you stay in range long enough to get a swing at them.

judochop
decaying skeleton
decaying skeleton
Posts: 7
Joined: Wed Oct 30, 2002 8:34 am

Post by judochop » Wed Dec 04, 2002 9:01 pm

The actual moving is to be done by myself. I just want to stay facing my opponent so I don't lose them with lag.

Vendor001
Cheezily Banned
Cheezily Banned
Posts: 78
Joined: Wed Nov 13, 2002 1:37 pm

Hacked up code...good luck :-)

Post by Vendor001 » Thu Dec 05, 2002 5:07 pm

Ok, try this instead(coding at work, so ymmv)

Code: Select all

|  Joust.mac 
| 
|  Program used in melee PvP to constantly face opponent 
|  and to attack the instant you are within melee range 
|  and then to immediately face away from opponent to get 
|  out of range of their attack.  This requires you to already 
|  have your opponent targetted. 
| 

sub Main 

:Loop 
  /face fast nopredict 
  /if $target(distance)< 10 /goto :Attack 
  /delay 5
  /goto :Check
  
:Attack 
  /attack on 
  /face fast away 
  /delay 20   |gives time to get away before facing again 
  /attack off 

:Check
  /if "$target()"=="TRUE" /goto :Loop 
  /echo "PvP Melee done."
/return 
Ok, if this is really what you want, it should do the following:

if you are > 10 away, keep /facing target
if you are < 10 away, /attack on, face away(hopefully you got an attack in there in that microsecond), wait 2 seconds, turn attack off, then end the script(with a "PvP Melee done." message).

A more "elegant" (stylistically speaking) would be:

Code: Select all

sub Main 
:Loop 
  /face fast nopredict 
  /if $target(distance)< 10 /call Attack 
| half second delay
  /delay 5
  /if "$target()"=="TRUE" /goto :Loop 
  /echo "PvP Melee done."
/return

Sub Attack 
  /attack on 
  /delay 20   |gives time to get away before facing again 
  /attack off 
  /face fast away 
/return

Personally, i'd use a script which would keep me in range, and just strafe around them. The advantage of doing that would be they still couldn't hit you, but you would still be poking them in the butt(no pun intended). :-)
Last edited by Vendor001 on Fri Dec 06, 2002 6:25 pm, edited 1 time in total.

judochop
decaying skeleton
decaying skeleton
Posts: 7
Joined: Wed Oct 30, 2002 8:34 am

Post by judochop » Thu Dec 05, 2002 7:54 pm

haha....I like the strafing around ... didn't think of that.... do you have an example of that? AND!! I thank you for the suggestions and will give them a try when I get home.

Thnx

Vendor001
Cheezily Banned
Cheezily Banned
Posts: 78
Joined: Wed Nov 13, 2002 1:37 pm

Post by Vendor001 » Thu Dec 05, 2002 9:29 pm

Very ghetto, please get the macrokit.zip for the fight.inc

Code: Select all

#turbo
#include fight.inc
Sub Main
  /call Melee
  /hp
  /mana
/return
Have the /hp and /mana only because I like to know after every battle.

BTW, keep a hotkey with /endmacro to use when you want to get out(short of killing the target). Without it, if the target runs from you, it'll stay right on their ass(yes, following them off a cliff/bridge/short pier/into guards).

lifewolf
a ghoul
a ghoul
Posts: 143
Joined: Fri Oct 18, 2002 6:29 pm

Re: joust.mac HELP!!

Post by lifewolf » Fri Dec 13, 2002 10:57 am

Untested, just see one big thing wrong noted below.. Third line under :Loop .

Also made it go back to loop (face, check distance, prepare attack) instead of just ending.

Havent even tried it too Fyi. No warrenty.

Edit space fix :: /if n $target(distance)<10 /goto :Attack

Edit: RE-re add n in ^^^^^^^^^^^^^^^^^^

Code: Select all

|  Joust.mac
|
|  Program used in melee PvP to constantly face opponent
|  and to attack the instant you are within melee range
|  and then to immediately face away from opponent to get
|  out of range of their attack.  This requires you to already
|  have your opponent targetted.
|

#turbo
Sub Main

:Loop
   /face fast nopredict 
   /if n $target(distance)<10 /goto :Attack
|  ^^^^ n required for integer compare.
   /delay 1
   /if "$target()"=="TRUE" /goto :Loop
   /return

:Attack
   /attack on
   /face fast away
   /delay 20    |gives time to get away before facing again
   /attack off
   /goto :Loop

Last edited by lifewolf on Wed Dec 18, 2002 10:55 am, edited 2 times in total.

ashplayah
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Dec 10, 2002 5:55 pm

Post by ashplayah » Fri Dec 13, 2002 3:33 pm

You have an extra space in your if condition (MQ is very space sensitive) Your if should read

Code: Select all

/if $target(distance)<10 /goto :Attack

Vendor001
Cheezily Banned
Cheezily Banned
Posts: 78
Joined: Wed Nov 13, 2002 1:37 pm

Post by Vendor001 » Fri Dec 13, 2002 5:38 pm

Hmm...so is that why almost all of the macros in the depot have no space in there.

Thanks for the tip.