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
Thalir
Novice


Joined: 10 Aug 2002
Posts: 35
Location: USA

PostPosted: Mon May 16, 2005 9:16 pm   

Help please-trigger from text but ignore certain words
 
How do you set up a trigger to capture text but ignore certain words and punctuation so the trigger will fire correctly.

example Mud Text

[Shadow Caves.]

The sloping passage constricts as you trek southward. Movement causes dirt to drift from the low ceiling. The bone rings narrow, and there are curious bumps in the floor of the cave. There is little doubt that you are traveling the length of the skeletal beast's tail.

This room is not illuminated.
You see the 1st small shadow and the 1st shadow spawn.
Obvious exits: northeast southwest.


Basicly i'd like to enter a room and claw whatever i see first.
In this example i'd CLAW SHADOW then once the shadow is dead LOOK see the shadow spawn there and then automaticly CLAW SPAWN
(caps used only to show you the mud command i would type)

I've tried a few different things and cant capture the text correctly
first i looked saw a mob and fired the trigger without a noun leaving me with

This room is not illuminated.
You see the 1st shadow spawn.
claw
Obvious exits: east.
>
You need to supply a noun to use this command!


then i tried another trigger and it captured the entire string leaving me with this.

This room is not illuminated.
You see the 1st shadow spawn the 2nd shadow spawn and the 1st small shadow.
claw 1st shadow spawn the 2nd shadow spawn and the 1st small shadow.
Obvious exits: east.
>
I dont see what you're referring too.


now the keywords to attack the targets are shadow and spawn how do i trim the fat as it were and only capture the first keyword or mob you see in the room at a time
Reply with quote
Maelstrom
Apprentice


Joined: 10 Feb 2005
Posts: 158

PostPosted: Mon May 16, 2005 9:45 pm   
 
Try something like this:
first variable is a list containing the mobs from the mud output and the second is a list which gives you the name you need to use when attacking.

#VARIABLE MobList {shadow spawn|small shadow}
#VARIABLE MobName {spawn|shadow}

#TRIGGER {^You see the 1st ({MobList})} {#SEND {claw %item(@MobName,%ismember(@MobList,%1))}}
Reply with quote
Maelstrom
Apprentice


Joined: 10 Feb 2005
Posts: 158

PostPosted: Mon May 16, 2005 9:45 pm   
 
Stupid PHP error =) please ignore this one...
EDITED
Reply with quote
Thalir
Novice


Joined: 10 Aug 2002
Posts: 35
Location: USA

PostPosted: Mon May 16, 2005 10:01 pm   
 
i can't seem to get this to work.

when i type LOOK while there is a shadow is in the room it does not
CLAW SHADOW

any thoguhts to what i'm doing wrong?
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Tue May 17, 2005 4:19 am   
 
#TRIGGER {^You see the 1st (*){.| the| and}} {#IF (%1="shadow spawn") {CLAW SHADOW};#IF (%1="small shadow") {CLAW SPAWN}}
#COND {Text when mob is dead} {LOOK}

Maybe that will fire as you need.
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