|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Jul 20, 2008 10:13 pm
Not sure what's going on... |
I'm going to keep this as short and simple an explanation as I possibly can.
I have a level report script. It's an hourly tracker, as well. It'll tell me how many mobs I've killed in that hour, the exp gained that hour, and a couple of other things.
Works well, except whenever the hour comes up and I've killed something, not only does it display the correct hour report, but it displays the hour report AFTER it's been reset.
Here's the script...
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<class name="LevelInfo">
<class name="LIVars">
<var name="hourreport" type="Record">gold=0|double=0|mobkill=0|exp=0</var>
<var name="lirep">echo</var>
<var name="lastlevelrep" type="Record">gold=0|double=263|timespent="0|0|11|18|0|38"|mobkill=86|exp=4436</var>
<var name="lasthourrep" type="Record">gold=0|double=0|mobkill=0|exp=0</var>
</class>
<class name="LIAliases">
<alias name="hourreport">
<value>#SEND {%if( %-1, %-1, @lirep) "Hourly Report @w: @GTotals@w: "@hourreport.mobkill%if( @hourreport.mobkill=1, " @GMob", " @GMobs")" Killed@w, "@hourreport.exp" Exp@w, "@hourreport.double" Double @R(@w"%eval( @hourreport.exp+@hourreport.double)" @wtotal@R)@w. @GAverages@w: "%format( 2, %eval( (%float( @hourreport.exp)+%float( @hourreport.double))/%float( @hourreport.mobkill)))" Exp per Mob@w."}</value>
</alias>
</class>
</class>
</cmud>
|
The script fires every hour, and this is what I have for on the hour reporting:
Code: |
<trigger name="onHour" type="Alarm" priority="3130" id="380">
<pattern>*:00:00</pattern>
<value>hourreport
#raiseevent onHour
#ADDKEY TimeData LastWeekDay @dayofweek(%time(aaa))
#ADDKEY TimeData LastYear %time(yyyy)
#ADDKEY TimeData LastMonth %time(mm)
#ADDKEY TimeData LastDay %time(dd)
#ADDKEY TimeData LastHour %time(hh)
#ADDKEY lasthourrep mobkill %db(@hourreport, mobkill)
#ADDKEY lasthourrep gold %db(@hourreport, gold)
#ADDKEY lasthourrep exp %db(@hourreport, exp)
#ADDKEY lasthourrep double %db(@hourreport, double)
#ADDKEY hourreport mobkill 0
#ADDKEY hourreport gold 0
#ADDKEY hourreport exp 0
#ADDKEY hourreport double 0</value>
</trigger>
|
I don't see any place where the hourreport should fire twice just because it's populated. But perhaps someone else sees an error. Appreciate it! By the way, v. 2.32, but has been doing this since 2.30.
Charneus |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Jul 25, 2008 9:09 am |
This seemed to work fine for me in a blank session when I let the alarm trigger on it's own or I manually clicked to 'Execute Script' in the package editor. i suspect that the alarm has been duplicated somewhere, or you have some other trigger re-echoing the information.
First try choosing to execute the script from the package editor by right clicking on the alarm. If it only fires once, then you likely have a duplicate. Use #ALARM with no parameters to see the list of all alarms in your system.
If it's still firing twice, use the debugger to see what other triggers are running after the alarm script is run. |
|
_________________ Asati di tempari! |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Fri Jul 25, 2008 12:09 pm |
I'll probably have to go for the debug route. It's odd, because it does it at random times. I've done a search for anything remotely related to the script, and everything is as it should be. There is no duplicate onhour alarm, there is no duplicate hourreport, there isn't any place in my entire package that should cause it to fire twice.
I did do the execute script 20 times just now, and it still did not repeat the message. Guess I'll be opening up the debugger and leaving it on all day. :\
Charneus |
|
|
|
|
|
|
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
|
|