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
Orang
Apprentice


Joined: 22 Jul 2004
Posts: 118
Location: USA

PostPosted: Tue Jul 26, 2005 2:09 pm   

help with #regex
 
i'm looking how to capture qp's earned from a global quest on aard onto a trig
thing is i dunno how to use regex :|

Code:
#regex {^Congratulations, that was one of the GLOBAL QUEST mobs~!$\n^(%d) quest points awarded.$} {#add qp_today %1;#add qp_total %1;#add qp_gained %1;#alarm +2 {QpToday;QpTotal;QpGained;#if (@qp_record < @qp_today) {#var qp_record {@qp_today};QpRecord}}}


i tried that it doesnt work? can someone good with this help me?
thanks
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Jul 26, 2005 4:35 pm   
 
Or you could have the msg you get when joining turn a variable to 1 and anytime u get 3 quest points awarded. (since it IS always 3 and nothing else) just have it add.
once the GQ is over set the var to 0

Check my Alerts post in finished scripts. Gives ya an idea of what i mean by variable 1 and 0 for the GQ's
_________________
http://www.Aardwolf.com
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Tue Jul 26, 2005 6:49 pm   
 
You nearly had it
Code:
#REGEX {^Congratulations, that was one of the GLOBAL QUEST mobs!$\n^(\d+) quest points awarded\.$} {#ADD qp_today %1;#ADD qp_total %1;#ADD qp_gained %1;#ALARM +2 {QpToday;QpTotal;QpGained;#IF (@qp_record < @qp_today) {#VARIABLE qp_record {@qp_today};QpRecord}}}


You need to use (\d+) instead of (%d), and \. instead of .
Reply with quote
Orang
Apprentice


Joined: 22 Jul 2004
Posts: 118
Location: USA

PostPosted: Tue Jul 26, 2005 7:57 pm   
 
Guinn wrote:
You nearly had it
Code:
#REGEX {^Congratulations, that was one of the GLOBAL QUEST mobs!$\n^(\d+) quest points awarded\.$} {#ADD qp_today %1;#ADD qp_total %1;#ADD qp_gained %1;#ALARM +2 {QpToday;QpTotal;QpGained;#IF (@qp_record < @qp_today) {#VARIABLE qp_record {@qp_today};QpRecord}}}


You need to use (\d+) instead of (%d), and \. instead of .
thanks guinn :) that works
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