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


Joined: 22 Feb 2002
Posts: 48
Location: Latvia

PostPosted: Fri Sep 16, 2005 7:43 pm   

HowTo gag a part of line
 
Hi,

MUD give following line:

HP: 123/321 SP: 333/444>Some things going on here.

What I want to accomplish:
1) read 123,321,333 and 444 into different variables
2) gag following part: "HP: 123/321 SP: 333/444>"

Any ideas how to do this?

Thanks in advance,
Jurz
_________________
-Jurz
Reply with quote
xenapan
Wanderer


Joined: 26 May 2004
Posts: 68

PostPosted: Fri Sep 16, 2005 7:49 pm   
 
pattern: HP: &chp/&mhp SP: &csp/&msp>

#gag

that would be it.
_________________
Player on Realms of Despair. realms.game.org port 4000. Join us today!
Reply with quote
jurz
Novice


Joined: 22 Feb 2002
Posts: 48
Location: Latvia

PostPosted: Fri Sep 16, 2005 7:54 pm   
 
Well gag would remove the whole line, I need to remove just the part from > sign to left
_________________
-Jurz
Reply with quote
xenapan
Wanderer


Joined: 26 May 2004
Posts: 68

PostPosted: Fri Sep 16, 2005 8:08 pm   
 
then you need to change the pattern to

HP: &chp/&mhp SP: &csp/&msp> (*)

#sub %1
_________________
Player on Realms of Despair. realms.game.org port 4000. Join us today!
Reply with quote
jurz
Novice


Joined: 22 Feb 2002
Posts: 48
Location: Latvia

PostPosted: Fri Sep 16, 2005 8:14 pm   
 
Definately not working, even made my zmud hang
_________________
-Jurz
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Sep 16, 2005 9:40 pm   
 
Copy and paste this into your zmud command line (where you type mud commands)

#TRIGGER {HP: &chp/&mhp SP: &csp/&msp~>(*)} {#SUB %1} "" {prompt|nocr}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
jurz
Novice


Joined: 22 Feb 2002
Posts: 48
Location: Latvia

PostPosted: Sat Sep 17, 2005 2:29 pm   
 
Thanks, this indeed works. at least for most cases, I will figure out the rest myself.
_________________
-Jurz
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