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


Joined: 06 Nov 2000
Posts: 80
Location: USA

PostPosted: Mon Nov 12, 2001 1:45 am   

Capturing info
 
How do I capture this:
[HP: 603/603] Enemy: (None)
Into hp, maxhp, and enemy, and this:
[HP: 362/603] Enemy: Barbarian Warri~ (bad)
Into hp, maxhp, enemy, and enemycon.


Master, seventh circle of idling
Reply with quote
Berion
Newbie


Joined: 10 Nov 2001
Posts: 8
Location: Norway

PostPosted: Mon Nov 12, 2001 2:29 am   
 
You can do it like this, with two triggers.

Trigger pattern: ~[HP: (%d)/(%d)~] Enemy: ~(None~)
#VARIABLE hp %1
#VARIABLE maxhp %1
#VARIABLE enemy None
#VARIABLE enemycon None

Trigger pattern: ~[HP: (%d)/(%d)~] Enemy: (%*) ~((%w)~)
#VARIABLE hp %1
#VARIABLE maxhp %2
#VARIABLE enemy {%3}
#VARIABLE enemycon %4

The {%3} is to get both words in it.

Maybe there is a nifty way to do it with just one trigger, but this worked for me..
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