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
remus
Wanderer


Joined: 06 Jul 2002
Posts: 53
Location: Australia

PostPosted: Wed Apr 14, 2004 8:58 am   

Problem with very simple trigger
 
Ok I am having a problem with a simple capture info trigger.

1) #tr {{a|the|an} * &target, *}
for capturing
a cloaked humanoid, may be a thief wields a chipped knife
works and captures humanoid to the variable target

BUT
2) #tr {{a|the|an} * %w, *} {#var target %2}
justs captures an empty variable. If the variable isnt defined it
says Variable undefined and doesnt create one.

This would be ok if I just used the top one except I am planning on adding a #addi to the second and I am sure I did alot of triggers like 2 before.

Any ideas?
Here is a chunk of text from the mud surrounding what I want to capture. The reasoning behind the #addi addition is plain when seen this way. I am planning on capturing both/all mobs to a string and using them in a speed menu.

Behind the Large Tent - Circus in Shadow Forest
Standing out behind the tent you can see the animals in their cages. They are
waiting to go inside and perform. A tiger paces up and down his enclosure
staring out at you. Sun streams down from above reflecting of the bars of the
cages. A small stream runs along the western side giving fresh water.
Exits: West, East

a cloaked humanoid, may be a thief wields a chipped knife
a high wire act, is practicing

You have the following animals trained,
at your side, baby white dragon lv(1) Dmg(311) HP(1995) tnl(1950)
at your side, red dummy lv(64) Dmg(264) HP(339) tnl(339)


As I said I am sure that (2) did work.

Zmud- Client of the Gods "Version 7.05"

Thanks
*Remus*
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Apr 14, 2004 11:35 am   
 
You need parenthesis to tell zMud to capture that part of the pattern, and the %nn values are assigned in order of capture. Since this is the first of the trigger it should be %1.
#tr {{a|the|an} * (%w), *} {#var target {%1}}
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