Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Dko
Beginner


Joined: 25 May 2004
Posts: 13

PostPosted: Tue Aug 29, 2006 5:26 pm   

A newbie trying to understand how to extract text
 
Hello I was wondering what the best way to put information given by the mud into a variable would be? Like if I had the string "<Life(82) Ki(4) PL(585.3k/260.0k)>" and wanted the 4 sets of numbers here each in its own variable and updated every chance it gets?
Reply with quote
Vodoc
Apprentice


Joined: 11 Apr 2003
Posts: 119
Location: Sweden

PostPosted: Tue Aug 29, 2006 7:02 pm   
 
Start with using zMUD. CMUD is still a beta software in heavy development. Secondly, what you are describing are called "triggers" and you should read the help files regarding that. Then come to the zMUD forum if you need more help.
Reply with quote
Dko
Beginner


Joined: 25 May 2004
Posts: 13

PostPosted: Tue Aug 29, 2006 8:33 pm   
 
Well I have done very simple triggers with zMud. Im just not sure of the best way to make one that takes the variables and filles them with text given by a mud.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Tue Aug 29, 2006 8:56 pm   
 
Try;
#trigger {~<Life~((%d)~) Ki~((%d)~) PL~((*)k/(*)k~)~>} {
life = %1
ki = %2
plmin = %3
plmax = %4
} "" {prompt}
Reply with quote
Dko
Beginner


Joined: 25 May 2004
Posts: 13

PostPosted: Tue Aug 29, 2006 9:03 pm   
 
Ahh kewl. that looks preaty easy to decipher from what I know of Z/Cmud scripting. Thanks
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Tue Aug 29, 2006 9:07 pm   
 
Dko wrote:
Ahh kewl. that looks preaty easy to decipher from what I know of Z/Cmud scripting. Thanks

A good helpfile to look at is the one about patterns;
http://forums.zuggsoft.com/modules/mx_kb/kb.php?page=3&mode=doc&k=627
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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