|
Orang Apprentice
Joined: 22 Jul 2004 Posts: 118 Location: USA
|
Posted: 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 |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: 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 |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: 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 . |
|
|
|
Orang Apprentice
Joined: 22 Jul 2004 Posts: 118 Location: USA
|
Posted: 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 |
|
|
|
|
|