|  | 
	
	
		| omaek193 Novice
 
 
 Joined: 10 Oct 2002
 Posts: 30
 Location: Italy
 
 | 
			
			  |  Posted: Mon Jun 30, 2003 8:38 am 
 Expand directions in alias/triggers.
 
 |  
				| in my mud some commands needs complete words for directions. if i send to mud "throw weapon e mob" the command can be bad interpreted, so i must send "throw weapon eAST mob", if i send "open door e" is the same thing and i must send "open door east".
 how i can write in the command line only "e" and send to the mud "east" in commands with more words like throw and open?
 it's the same thing with all other directions...
 
 how can i create aliases or triggers that expands one-letter directions in complete directions?
 thanks in advance
 
 omaek193
 |  | 
	
	  |  | 
	
		|  | 
	
		| Brujah Wanderer
 
 
 Joined: 13 Nov 2002
 Posts: 88
 Location: USA
 
 | 
			
			  |  Posted: Mon Jun 30, 2003 9:30 am 
 |  
				| while im sure a guru will reply and tell you what you want to know... the easiest way to do this strikes me as making something like this 
 #AL {twe} {throw weapon east %1}
 #AL {oe} {open door east}
 
 but this is how us little guys get around in zmud.
 |  | 
	
	  |  | 
	
		|  | 
	
		| omaek193 Novice
 
 
 Joined: 10 Oct 2002
 Posts: 30
 Location: Italy
 
 | 
			
			  |  Posted: Mon Jun 30, 2003 9:57 am 
 |  
				| thankz brujah, easiest way is always the best way   by the way, i wondered if there's a solution to do the "e=east, n=north, ecc.." first, because the real matter is for me write one letter that expands in the complete word in a group of words.
 
 omaek193
 |  | 
	
	  |  | 
	
		|  | 
	
		| Dortayl Newbie
 
 
 Joined: 07 Jun 2003
 Posts: 4
 Location: Canada
 
 | 
			
			  |  Posted: Mon Jun 30, 2003 11:55 am 
 |  
				| Well... simply enough, you can do it the same way. 
 Make an alias for "e" and have it take the value of "east"
 
 So
 
 #AL {e} {east}
 
 When you hit e, and only e by itself.
 
 Like #7 e, it will transform into 7 "east"s
 
 Or, for instance...
 
 "throw weapon e mob"
 will turn into "throw weapon east mob"]
 
 
 You can use that #AL from above and replace n for north, w for west, s for south, and they will follow the same format.
 |  | 
	
	  |  | 
	
		|  | 
	
		| Kjata GURU
 
  
 Joined: 10 Oct 2000
 Posts: 4379
 Location: USA
 
 | 
			
			  |  Posted: Mon Jun 30, 2003 12:14 pm 
 |  
				| Well, aliases are expanded only at the start of a line, so using them for substitution wouldn't work. You can also use TAB completion. For example, if you add "east" to the TAB completion list with a command like: #TAB east
 
 you can then write an e, hit TAB and zMUD will fill in the rest of the word.
 |  | 
	
	  |  | 
	
		|  | 
	
		| omaek193 Novice
 
 
 Joined: 10 Oct 2002
 Posts: 30
 Location: Italy
 
 | 
			
			  |  Posted: Mon Jun 30, 2003 1:49 pm 
 |  
				| so probably Kjata offers me the best solution i can apply when i don't want to use aliases/triggers. thank you all
   
 omaek193
 |  | 
	
	  |  | 
	
		|  | 
	
		| zex0s Wanderer
 
 
 Joined: 29 Jun 2003
 Posts: 64
 
 
 | 
			
			  |  Posted: Wed Jul 02, 2003 7:09 pm 
 |  
				| the input trigger could also be of some use, u could use '* ({E|W|N|S}) *' as the input trigger.. and then use case to find out which dir was used, and then expand it properly.  Only problem would be if you ended a line with one of those, then the trigger would not fire. 
 Zex0s
 |  | 
	
	  |  | 
	
		|  | 
	
		|  | 
	
		|  |