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


Joined: 15 Nov 2001
Posts: 39

PostPosted: Sun Nov 25, 2001 10:09 am   

assign values from mud output?
 
Output:
HP: [257/257] CONC: [311/311]

Question:
How do I load the values of HP and CONC into variables?
eg. @hp @maxhp @conc @maxconc

Thanks.



--------
In life, not all questions are answered; but all answers are questioned.
Reply with quote
decantor
Apprentice


Joined: 14 Nov 2001
Posts: 100

PostPosted: Sun Nov 25, 2001 10:44 am   
 
#trigger {HP: [(%d)/(%d)] CONC: [(%d)/(%d)]} {#VAR hp %1;#VAR maxhp %2;#VAR conc %3;#var maxconc %4}

You might have to put ~ before the ['s... i forget how zmud looks at them during a trigger... but i don't think you need to.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Nov 25, 2001 11:58 pm   
 
quote:

#trigger {HP: [(%d)/(%d)] CONC: [(%d)/(%d)]} {#VAR hp %1;#VAR maxhp %2;#VAR conc %3;#var maxconc %4}

You might have to put ~ before the ['s... i forget how zmud looks at them during a trigger... but i don't think you need to.



Yep, you need to. the [] are special characters that equate to rangefinders. While the special characters probably won't correctly match anything, any non-special characters would match and thus provide a pattern match for the []. [abcd] will match any one-word equivalent string of any combination of 'a', 'b', 'c', or 'd'.

Match found
abcd
a
b
c
d
abc
ab
abcdabcd
abdc

Match not found
abcx
az

li'l shmoe of Dragon's Gate MUD
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