|
green2swing Beginner
Joined: 20 Jun 2005 Posts: 10
|
Posted: Mon Jun 20, 2005 2:42 am
Variables within Aliases |
I was wanting to set up an alias that had 2 diff. variables in it, such as :
#ALIAS n@door1@door2 {narr @doorname1 S W W NW E @doorname2}
I will have the vars set but am wondering if an alias like this can be done
Thanks |
|
|
|
demoneyoungblood Apprentice
Joined: 16 Dec 2002 Posts: 114 Location: USA
|
Posted: Mon Jun 20, 2005 4:36 am |
Don't think you can quite do it like that.... might be easier if we knew what you were trying to do, n@door1@door2 ? how exactly did you want it to work.. im not understanding your goal for the alias.. paste a bit more info please.
|
|
_________________ -Demone YoungBlood |
|
|
|
green2swing Beginner
Joined: 20 Jun 2005 Posts: 10
|
Posted: Mon Jun 20, 2005 5:28 am |
OK - there are paths from door to door that change every reboot, I know the patterns they use and would like to set up a script that would allow me to sharing them fastly. So when I find the door names for this reboot I would to type n@door1@door2 as the alias and @door1 would be "m" @door2 would be "w" so it would be typed nmw and it would narr the path tho m and w would not always be the same
|
|
|
|
demoneyoungblood Apprentice
Joined: 16 Dec 2002 Posts: 114 Location: USA
|
Posted: Mon Jun 20, 2005 9:49 am |
so far as i know, the only way you would be able to do it would be the following, there might be a more effective way, but I don't know of one personally:
Code: |
#alias nmw { narr @door1;@navigate;@door2 }
#alias door1 { #var door1 $1 }
#alias door2 { #var door2 $2 }
#alias navigate { #var nagivate $1 }
|
then to use it, you would set the door1, 2 and navigate properties each time you determine it...
ie:
door1 doorname - sets door1 to doorname
door2 doorname - sets door2 to doorname
navigate directions-sets navigate to directions
now, you might want to remember that for it to be a speedwalk path, you use the . to invoke a speedwalk. that is about the best solution I can come up with for ya. [/code] |
|
_________________ -Demone YoungBlood |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Mon Jun 20, 2005 10:06 am |
I don't think you can put variables into the names of aliases. You could create an oninput trigger though, which will work like an alias to a point.
Code: |
#ONINPUT {n{@door1}{@door2}} {#GAG;narr @doorname1 S W W NW E @doorname2} |
Guinn |
|
|
|
green2swing Beginner
Joined: 20 Jun 2005 Posts: 10
|
Posted: Wed Jun 22, 2005 8:38 pm |
OK lets say @door1=c @door2=w @doorname1=Chaindoor @doorname2=Woodendoor
I should be able to type ncw and it would narr Chaindoor S W W NW E Woodendoor
It is not doing that can someone help? |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Wed Jun 22, 2005 11:04 pm |
Might have been that I was gagging the output because I was showing a say instead of sending something
The following works fine for me
At the command line:
Code: |
#ONINPUT {n{@door1}{@door2}} {narr @doorname1 S W W NW E @doorname2}
door1=c
door2=w
doorname1=Chaindoor
doorname2=Woodendoor |
Then type 'ncw'
and it sends 'narr Chaindoor S W W NW E Woodendoor' |
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
|
green2swing Beginner
Joined: 20 Jun 2005 Posts: 10
|
Posted: Thu Jun 23, 2005 4:48 am |
got it to work but had to do it like this
#ONINPUT {n(@door1)(@door2)} {narr @doorname1 S W W NW E @doorname2}
Thanks |
|
|
|
|
|