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
Tornhelm
Beginner


Joined: 24 Nov 2002
Posts: 20
Location: Australia

PostPosted: Sun Jan 18, 2004 6:52 pm   

A problem with an alias
 
I am having a little bit of a problem with an alias in a script im making, the general outline looks like this:

Alias: RecordPath
Value: #alias {%1} {#t+ walk;path=@recordpath;startwalk}}

The problem with the script is the path=@recordpath line. I want zmud to expand the variable so it looks roughly like:

path=n|ne|e|se|s|sw|w|sw|w|nw

For some reason, I can't think of any way to do this and always end up with "path=@recordpath" instead.

Yeah, I know this seems a bit petty in light of most of these other problems, so I kinda understand if it gets low priority.
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Sun Jan 18, 2004 7:40 pm   
 
Your current line Path=@RecordPath should set Variable Path to the current value of RecordPath, already.
At any rate, if you want to force expansion of a variable, you use <>:
Path=<@RecordPath>
Reply with quote
Tornhelm
Beginner


Joined: 24 Nov 2002
Posts: 20
Location: Australia

PostPosted: Sun Jan 18, 2004 7:58 pm   
 
On my home computer, where I am using 6.66 it does, but at this LAN i still use 6.16 because some of the scripts i use for an old mud i play don't translate over with the way the scripting changes after that, and since I only play that MUD when i am LANning with with my friends, I figured I might as well not upgrade here and just keep the scripts.
Reply with quote
Tornhelm
Beginner


Joined: 24 Nov 2002
Posts: 20
Location: Australia

PostPosted: Sun Jan 18, 2004 8:22 pm   
 
Just another quick question, is there a quick way to reverse the values in a variable, so @recordpath can be read either as e|ne|e|se or as se|e|ne|e?

PS. I know there are ways to add items onto the bottom of the variables, but I can't seem to find out how to do it, or if that feature only got implemented since after 6.16 and 6.40
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Sun Jan 18, 2004 9:20 pm   
 
I'm not sure if they made a new command to add to beginning of lists
You would need to make a script to reverse it:

#var revrecordpath {%null}
#forall @recordpath {#var revrecordpath {%concat(%i,"|",@revrecordpath)}}
#var @revrecordpath {%del(@revrecordpath,%len(@revrecordpath),1)}
Reply with quote
Kronas
Wanderer


Joined: 28 Dec 2003
Posts: 62
Location: Australia

PostPosted: Mon Jan 19, 2004 11:50 pm   
 
hmmmm ,thats sounds like a lot of work.I use zmud 6.62,have it all mapped out. So i f I want to go from a to b the room I want is in my favourates right click on save path to that room.Box appears to save path as an alias.Which I dont want.So I highlight that path excluding that dot you see at the begining, right cick....copy...close that window...goto actions on the mud window select record path...paste in the copy path name it and away I go .using slow walk. Simple
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Tue Jan 20, 2004 12:11 am   
 
Its quicker and easier using a script to do it. No messing around moving between windows etc. You can just parse your path to the script and have it do all the work for you.
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