About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
Glinka
Wanderer


Joined: 20 Dec 2000
Posts: 53
Location: USA

PostPosted: Wed Feb 04, 2004 1:37 am   

lil #temp help please?
 

oki, on my mud, if a player has a long name, like
Aelesenthrial..you can type: smile at ae
and it will execute: Glinka smiles at Aelesenthrial

but when i try and use a trigger for things, i get hung up.

Alias: sa
Value: smi at %1 and lean your head on %1 's shoulder

this gives me this output
sa ae
glinka smiles at Aelesenthrial and leans her head on ae 's shoulder.

I am trying to use a variable and temp trig to capture the whole
name , but can't get the syntax right.
***************************
I type diag ae
mud output: you examine Aelesenthrial the anthian
**************************
Alias: sa
Value:

diag %1
#temp {You examine(%w)} {targ=(%1)}
smi at %1 softly, leaning your head on @targ 's shoulder

I'm trying to use the diagnose thing from the mud,
capture the Whole Name in a variable, and use that for my actions.

so if i type sa ae
the ae gets put into the @targ variable as Aelesenthrial

so far it's close, but the (%w) part is hilighted in zmud
in yellow, what does this mean please?

Thanks for any...
G.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Feb 04, 2004 4:17 am   
 
#tr {^you examine (%x)} {targ=%1}
#al sa {smi at @targ and lean your head on @{targ}'s shoulder}

Sounds like it would be the simplest way
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Wed Feb 04, 2004 7:10 am   
 
#alias sa {diag %1;#temp {You examine (%w)} {smi at %%1 softly, leaning your head on %%1 's shoulder}}
Reply with quote
Valint
Wanderer


Joined: 12 Nov 2003
Posts: 70
Location: USA

PostPosted: Wed Feb 04, 2004 7:27 pm   
 
As a separate issue, I recommend generally naming temp triggers. Why? It stops you from potentially ending up with multiple temp triggers all going off at once.

For example, in the above situation, if the person leaves the room before the diagnose executes, the temp trigger will stick around. The next time you perform the sa alias and the diagnosis works, you will smile twice. If you name the temp trigger, then creating a second one overwrites the first one.

So, #ALIAS sa {diag %1;#TEMP "saTemp" {You examine (%x)} {smi at %%1 softly, leaning your head on %%1 's shoulder}}
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