/variable {XPGained} {0} {xpcounter} /variable {XPNeeded} {0} {xpcounter} /variable {XPRate} {0} {xpcounter} /variable {XPStart} {0} {xpcounter} /variable {XPStartTime} {0} {xpcounter} /action {Experience Points: %1 To Level: %2} {StripCommasInNumbers @RTrim($1);/var XPCurrent $StripCommasEnd;StripCommasInNumbers @RTrim($2);/var XPNeeded $StripCommasEnd} /action {Experience Points: %9 To Level: %3} {StripCommasInNumbers @RTrim($9);/var XPGained {@Math($StripCommasEnd-$XPStart)}} /alias {InsertCommasInNumbers %0} {/if {@Len($0)>=4 && @Len($0)<=6} {/var InsertCommas {@Left($0,@Math(@Len($0)-3)),@Right($0,3)}} {/if {@Len($0)>=7 && @Len($0)<=9} {/var InsertCommas {@Left($0,@Math(@Len($0)-6)),@Mid($0,@Math(@Len($0)-6),3),@Right($0,3)}} {/if {@Len($0)>=10 && @Len($0)<=12} {/var InsertCommas {@Left($0,@Math(@Len($0)-9)),@Mid($0,@Math(@Len($0)-9),3),@Mid($0,@Math(@Len($0)-6),3),@Right($0,3)}}}}} {CommasInNumbers} /alias {StripCommasInNumbers %0} {/if {@IsEmpty($0)==1} {/showme {@AnsiBold()@ForeYellow()"StripCommasInNumbers " Answer is in var "StripCommasEnd"@AnsiReset()}} {/var StripCommasStart {$0};/empty StripCommasEnd;/loop {@Len($StripCommasStart),1} {/if {"@Left($StripCommasStart,1)"!="," && @Len($StripCommasStart)>1} {/var {StripCommasEnd} {@ConCat($StripCommasEnd,@Left($StripCommasStart,1))};/var StripCommasStart {@Right($StripCommasStart,@Math(@Len($StripCommasStart)-1))}} {/if {@Len($StripCommasStart)>1 && "@Left($StripCommasStart,1)"==","} {/var StripCommasStart {@Right($StripCommasStart,@Math(@Len($StripCommasStart)-1))}} {/var StripCommasEnd {@ConCat($StripCommasEnd,$StripCommasStart)}}}}}} {CommasInNumbers} /alias {xpinit} {/variable XPGained 0;/variable {XPStartTime} {@Time()};sc l} /alias {xprate %0} {/variable TempTime {@Math(@Time()-$XPStartTime)};/variable XPRate @Math($XPGained/$TempTime);$0 @Chr(10) @AnsiBold()@ForeRed()XP Data Report:@Chr(10);BOXSHOW Total $XPGained;BOXSHOW Needed $XPNeeded;$0 @AnsiBold()@ForeGreen() ETA: @Chr(10) @AnsiBold()@ForeBlue()[@AnsiBold()@ForeWhite()@Math(($XPNeeded/$XPRate)/60/60/24/7/52) Year@AnsiBold()@ForeRed():@AnsiBold()@ForeWhite()@Math(((($XPNeeded/$XPRate)/60)/60)/24) Day@AnsiBold()@ForeRed():@AnsiBold()@ForeWhite()@Math((($XPNeeded/$XPRate)/60/60)%24) Hr@AnsiBold()@ForeRed():@AnsiBold()@ForeWhite()@Math(($XPNeeded/$XPRate)/60%60) Min@AnsiBold()@ForeBlue()] @Chr(10) @AnsiBold()@ForeGreen()Timer Length: @Chr(10) @AnsiBold()@ForeBlue()[@AnsiBold()@ForeWhite()@Math((@Time()-$XPStartTime)/60/60/24/7/52) Year@AnsiBold()@ForeRed():@AnsiBold()@ForeWhite()@Math((@Time()-$XPStartTime)/60/60/24) Day@AnsiBold()@ForeRed():@AnsiBold()@ForeWhite()@Math(((@Time()-$XPStartTime)/60/60)%24) Hr@AnsiBold()@ForeRed():@AnsiBold()@ForeWhite()@Math((@Time()-$XPStartTime)/60%60) Min@AnsiBold()@ForeBlue()] @Chr(10) @AnsiBold()@ForeGreen()Ratios:;BOXSHOW Second $XPRate;BOXSHOW Minute @Math($XPRate*60);BOXSHOW Hour @Math(($XPRate*60)*60);BOXSHOW Day @Math((($XPRate*60)*60)*24);BOXSHOW Year @Math((((($XPRate*60)*60)*24)*7)*52)} /alias {BOXSHOW %6} {showme @AnsiBold()@ForeBlue() [@AnsiBold()@ForeWhite()@PadRight(@Word($6,1), ,@Math(9-@Len(@Word($6,1))))@AnsiBold()@ForeBlue()][@AnsiBold()@ForeWhite()@PadLeft(@Commatize(@Word($6,2)), ,@Math(15-@Len(@Commatize(@Word($6,2)))))@AnsiBold()@ForeBlue()]} /event {XpRate} {1500} {/writegroup {/data/XpRate.dat} {xpcounter}} /read /data/XpRate.dat