|
Churlant Novice
Joined: 17 Oct 2002 Posts: 44 Location: USA
|
Posted: Wed Nov 13, 2002 8:22 pm
Storing Multiple Commands in a Variable |
This is likely an easy question... I want to store multiple commands on one variable, so if I use @direction_backyard it will give me say n;e;e;ne;e;n etc...
>-Churlant-< |
|
|
|
EdwinDroom Wanderer
Joined: 25 Jan 2002 Posts: 77 Location: Ireland
|
Posted: Wed Nov 13, 2002 8:41 pm |
Will it always be directions? If so, check out paths...
"I've got an allergy to Perrier, daylight and responsibility" - Marillion
Check out Moral Decay on 131.247.113.1 3003 |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Nov 13, 2002 8:41 pm |
This is called a path. Click on the Paths button, click on New, enter a name for the path and then the directions.
To call the path just enter this into the command line:
.pathName
Note: Diagonal directions have a one-letter command assigned to them. They are: nw = h, ne = j, sw = k, se = l
Kjata |
|
|
|
Churlant Novice
Joined: 17 Oct 2002 Posts: 44 Location: USA
|
Posted: Wed Nov 13, 2002 8:43 pm |
Actually, it won't always be directions :( Some of the inputs will be other game commands...
>-Churlant-< |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Nov 13, 2002 8:45 pm |
Then, like you said, put all of the commands (separated by ;) in a variable. To execute the commands you do:
#EXEC @varName
Kjata |
|
|
|
Lyriikka Beginner
Joined: 02 Oct 2002 Posts: 21 Location: Finland
|
Posted: Thu Nov 14, 2002 11:32 am |
You can put these kinds of things there too.
#var castle_xx_route {3 e;n;sw;#var target mouse|s;w;e;#var target bird|2 s}
#key f8 {#exec %item( @area_route, @step);#add step 1}
make some way to set to set that route on @area_route and to set @step to 1.
#al castle_xx {#var area_route @castle_xx_route;#var step 1}
Lyriikka the GenTnLadyLover
batmud.bat.org:23 |
|
|
|
|
|