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
Logic
Beginner


Joined: 30 May 2002
Posts: 17
Location: Denmark

PostPosted: Sun Nov 02, 2003 9:58 pm   

Trigger & varlable
 
hi

I like to capture the name of the mob Iam trying to backstab.

You plunge your dagger deep into A Dealer 's back!
You plunge your dagger deep into a Rent-a-Cop 's back!
You plunge your dagger deep into The Gambler's back!
You plunge your dagger deep into a mini-dragon's back!

#TRIGGER {You plunge your dagger deep into (%w)'s back!} {#VARIABLE mob %1}

I have try with %w,%x and (%w),(%x) but I can only get a 'a' or 'the'
or nothing

What iam doing worng ?
Reply with quote
Arcane_of_Discworld
Wanderer


Joined: 29 Jan 2002
Posts: 99
Location: UK

PostPosted: Sun Nov 02, 2003 10:02 pm   
 
Your problem is that the %w only captures one word.. to capture more than that use:

#TRIGGER {You plunge your dagger deep into (*)'s back!} {#VARIABLE mob %1}

Arcane
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Nov 03, 2003 10:43 am   
 
And since it may be more than one word, be sure to use delimiters with the #VAR command.
#TR {You plunge your dagger deep into (*)'s back!} {#VAR mob {%1}}
Reply with quote
Logic
Beginner


Joined: 30 May 2002
Posts: 17
Location: Denmark

PostPosted: Mon Nov 03, 2003 6:05 pm   
 
Thanks for the fast reply Arcane and LightBulb for the extra help, the {%1} did it all :)
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