|
Anders Novice
Joined: 14 Jul 2003 Posts: 31 Location: USA
|
Posted: 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? |
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Tue Dec 13, 2005 7:00 pm |
%replace
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
Anders Novice
Joined: 14 Jul 2003 Posts: 31 Location: USA
|
Posted: Wed Dec 14, 2005 8:59 am |
Thank you for your answers.
|
|
|
|
|
|