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
Anders
Novice


Joined: 14 Jul 2003
Posts: 31
Location: USA

PostPosted: Tue Dec 13, 2005 6:09 pm   

Automapper and directions hjkl
 
I am trying to use this to show the exits that are unknown.

#FORALL %roomexit( %mapvnum( )) {
#IF (%i) {
#IF (%roomlink( %mapvnum( ), %i)=-2) {
#echo %i
#noop
}
}
}

What can I do to make it work with diagonals?
%roomexit gives out a list like n|e|h|j|u but %roomlink only gets it if you use ne se and the like. How do I convert to that?
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Tue Dec 13, 2005 7:00 pm   
 
%replace
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Dec 14, 2005 8:52 am   
 
#FUNCTION DirConvertS {%replace(%replace(%replace(%replace("%1","h","nw"),"l","se"),"j","ne"),"k","sw")}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Anders
Novice


Joined: 14 Jul 2003
Posts: 31
Location: USA

PostPosted: Wed Dec 14, 2005 8:59 am   
 
Thank you for your answers.
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