Question.

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

Moderator: MacroQuest Developers

Ariain
a ghoul
a ghoul
Posts: 88
Joined: Fri Oct 11, 2002 10:35 am

Question.

Post by Ariain » Sun Oct 13, 2002 5:57 pm

I am new to this so most likely this is dumb but why doesnt this take me to my preset loc? I start amcro with this /macro toloc 0 0 I shoiuld then run to loc 0 0 but instead it just ends.

Code: Select all

#define gotoY v1
#define gotoX v2 
#define myX v3 
#define myY v4 


Sub Main
   /varset gotoX $p0
   /varset gotoY $p1   
   /varset myX $char(x) 
   /varset myY $char(y) 
   /face loc $gotoY,$gotoX 
   /if n $myX!=$gotoX /if $myY!=$gotoY /call run
   /if n $myX==$gotoX /if $myY==$gotoY /call endmacro
/return

Sub run
/sendkey up
/return

Sub endmacro
/endmacro

User avatar
ap50
a snow griffon
a snow griffon
Posts: 425
Joined: Sun Aug 18, 2002 2:29 pm

Post by ap50 » Sun Oct 13, 2002 6:14 pm

Just as a cursory glance, add :LOOP before your /face command and /goto :LOOP before the /return in your sub_main.
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sun Oct 13, 2002 7:07 pm

Salutations,

Code: Select all

/sendkey up
needs to be

Code: Select all

/sendkey down up
... I would also suggest trying not to make yourself exactly on the point, go within 5...

User avatar
ap50
a snow griffon
a snow griffon
Posts: 425
Joined: Sun Aug 18, 2002 2:29 pm

Post by ap50 » Mon Oct 14, 2002 3:19 am

I saw that too Liz, but I wasn't sure if just pressing the up key once like that would move you (albeit jerkily).

In that case he'll need a /sendkey up up in his sub endmacro.
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Oct 14, 2002 4:10 am

Salutations,
/endmacro does bring the key up eventually... so that isn't a problem... As soon as i get up tomorrow mornin' (or tomorrow evening) I'll post my walking macro for ya'll...

Catt
a lesser mummy
a lesser mummy
Posts: 76
Joined: Mon Sep 16, 2002 2:49 am

Post by Catt » Mon Oct 14, 2002 6:09 am

or you could search a little and find:

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

which has a working example and some discussion on the topic.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Oct 14, 2002 6:32 am

Salutations,
well.. I'm still posting my macro as soon as i wake up...