Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Churlant
Novice


Joined: 17 Oct 2002
Posts: 44
Location: USA

PostPosted: 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-<
Reply with quote
EdwinDroom
Wanderer


Joined: 25 Jan 2002
Posts: 77
Location: Ireland

PostPosted: 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
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
Churlant
Novice


Joined: 17 Oct 2002
Posts: 44
Location: USA

PostPosted: Wed Nov 13, 2002 8:43 pm   
 
Actually, it won't always be directions :( Some of the inputs will be other game commands...

>-Churlant-<
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
Lyriikka
Beginner


Joined: 02 Oct 2002
Posts: 21
Location: Finland

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net