|
einar Wanderer
Joined: 06 Nov 2000 Posts: 80 Location: USA
|
Posted: Tue Feb 19, 2002 6:08 am
Going through an area |
How would I make a macro to go to the next room in an area, following a given path?
Here is the path:
> > walk e
> > walk 2s
> > walk s
> > walk s
> > walk 4s w
> > walk e N w 3s
> > walk 4s
> > walk 5w
> > walk W
> > walk s
> > walk E n W 5n
> > walk 2n
> > walk 3s
> > walk s
> > walk 4n w s
> > walk S e
> > walk 4e
> > walk 3e
> > walk E
> > walk 3n
> > walk 3n
> > walk N W n 6w
> > walk W s 3e
> > walk E s
> > walk 3s w
> > walk N W
> > walk e
> > walk n E S 5w
> > walk 2n
> > walk n e
> > walk e
> > walk e 2s
> > walk 2n w s
> > walk 2w 2w w s
> > wakj 3n
> > walk s
> > walk s w
> > walk 2n
> > walk 3s
> > walk w N e
Ignore the > >
Now I want to start in the first room, hit a macro (which should "walk e") then kill stuff in there.
The next time I hit the move macro, I want it to "walk 2s" then I can kill stuff in there.
So how would I do that? Have all the dirs in a list, and then have the macro move onto the next dir after it's done with each one?
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Feb 19, 2002 1:12 pm |
Yup, that would work:
#VAR path {e|2s|s|s|4s w||e N w 3s|4s|5w|W|s|E n W 5n|2n|3s|s|4n w s|S e|4e|3e|E|3n|3n|N W n 6w|W s 3e|E s|3s w|N W|e|n E S 5w|2n|n e|e|e 2s|2n w s|2w 2w w s|3n|s|s w|2n|3s|w N e}
#VAR pos 1
#KEY F12 {walk %item(@path, @pos);#ADD pos 1;#IF (@pos > %numitems(@path)) {#VAR pos 1}}
Kjata |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|