#CLASS {Time} #ALIAS settime {#var year {%time(y)} #MATH year {20@year} #variable %1 {%time(m)/%time(d)/@year %time(h):%time(n):%time(s)}} #ALIAS getsecdiff {#noop VBScript #mss {SecDiff = DateDiff(~"s~", ~"%2~", ~"%3~")} #var %1 {%mss(SecDiff)}} #ALIAS getminutediff {#noop VBScript #mss {MinuteDiff = DateDiff(~"n~", ~"%2~", ~"%3~")} #var %1 {%mss(MinuteDiff)}} #ALIAS gethourdiff {#noop VBScript #mss {HourDiff = DateDiff(~"h~", ~"%2~", ~"%3~")} #var %1 {%mss(HourDiff)}} #VAR year {0} {0} #CLASS 0 #CLASS {XpCounter} #ALIAS xpinit {#VAR XpGained 0 settime XpStartTime #T- {XpCounter|Compute} #T+ {XpCounter|Init} score brief} #ALIAS resetxp {#VAR TotXpTime 0 #VAR XpGained 0 #VAR XpStart 0 #VAR TotXpStart 0 #VAR TotXpGained 0 xpinit #SHOW {%char(10)%ansi(bold,cyan)XP Counters Reset.}} #ALIAS xphelp {#SHOW {%char( 10)%ansi( bold, yellow)xpinit: %ansi( bold, green)Start counting your Exp gain} #SHOW {%ansi( bold, yellow)xprate: %ansi( bold, green)Display your Exp rate statistics} #SHOW {%ansi( bold, yellow)resetxp: %ansi( bold, green)Reset all of the Xp variables.%char( 10) This will zero out the total Xp gained.%char( 10) Generally, just use xpinit again to start counting again for a new zone%char( 10)%ansi( bold, yellow)xp ~: %ansi( bold, green)Send your current xp gain and xp/min to specified channel%char( 10)%ansi( bold, yellow)xptot ~: %ansi( bold, green)Send your total xp gain and xp/hour to specified channel%char( 10)%ansi( bold, yellow)xpoff:%ansi( bold, green) Turn off xp tracking. Use xpinit to reenable xp tracking.%char( 10)~(c~)Kernighans Scripts 2005 Version 1.9%char( 10)~Modified to be used on Discworld by Ohm 2007%char( 10)}} #ALIAS xp {settime TempXpTime getsecdiff TempTime @XpStartTime @TempXpTime #MATH XpPerMin @XpGained/@TempTime*60 xpmintext %-1} #ALIAS xpmintext {%1 ~ at ~<%format("&.0n",@XpPerMin) XP/minute~> in ~<%eval(@TempTime/3600)hr:%mod(@TempTime/60,60)min:%mod(@TempTime,60)sec~>} #ALIAS xptot {settime TotXpTempTime getsecdiff TotTempTime @TotXpTime @TotXpTempTime #MATH TotXpPerHour @TotXpGained/@TotTempTime*3600 xphourtext %-1} #ALIAS xphourtext {%1 ~ at ~<%format("&.0n",@TotXpPerHour) XP/hour~> in ~<%eval(@TotTempTime/3600)hr:%mod(@TotTempTime/60,60)min:%mod(@TotTempTime,60)sec~>} #ALIAS xpoff {#VAR TotXpTime 0 #VAR TotXpStart 0 #VAR TotXpGained 0 #T- {XpCounter|Init} #T- {XpCounter|Compute} #SHOW {%char(10)%ansi(bold,cyan)XP Counter disabled.}} #ALIAS xprate {#SHOW {%ansi( bold, blue)Exp Gained: %ansi( white)%format( "&.0n", @TotXpGained) %ansi( bold, blue)~[%ansi( white)%eval( @TotTempTime/3600)hr%ansi( bold, yellow):%ansi( white)%mod( @TotTempTime/60, 60)min%ansi( bold, yellow):%ansi( white)%mod( @TotTempTime, 60)sec%ansi( bold, blue)~] ~[XP/Hour: %ansi( white)%format( "&.0n", @TotXpPerHour)%ansi( bold, blue)~] ~[XP/Min: %ansi( white)%format( "&.0n", @XpPerMin)%ansi( bold, blue)~]%cr%ansi( bold, cyan)}} #VAR XpGained {0} #VAR XpStart {0} #VAR XpStartTime {0} #VAR TotXpStart {0} #VAR TotXpGained {0} #VAR TotXpTime {0} #VAR TempTime {0} {0} #VAR TempXpTime {0} {0} #VAR TotTempTime {0} {0} #VAR TotXpTempTime {0} {0} #VAR XpPerMin {0} #VAR TotXpPerHour {0} #VAR TotXpPerSec {0} #VAR XpPerSec {0} #VAR PlusIn {0} {0} #VAR XpLeft {0} {0} #STAT {Xp/Hr %format("&.0n",@TotXpPerHour)} #CLASS 0 #CLASS {XpCounter|Init} #TRIGGER {^Hp: * Gp: * Xp: %1 Burden: %d%$} {#VAR XpStart {%1} #VAR XpStart {@XpStart} #IF (@TotXpStart=0) {#VAR TotXpStart {@XpStart}} #IF (@TotXpTime=0) {#VAR TotXpTime {@XpStartTime}} #T+ {XpCounter|Compute} #T- {XpCounter|Init}} #CLASS 0 #CLASS {XpCounter|Compute} #ALIAS computeXPRate {#VAR XpGained {%1} #VAR XpGained {@XpGained} #VAR TotXpGained {@XpGained} #MATH XpGained @XpGained-@XpStart #MATH TotXpGained @TotXpGained-@TotXpStart settime TempXpTime getsecdiff TempTime @XpStartTime @TempXpTime settime TotXpTempTime getsecdiff TotTempTime @TotXpTime @TotXpTempTime #MATH XpPerSec %float( @XpGained)/%float( @TempTime) #MATH XpPerMin @XpPerSec*60 #MATH TotXpPerSec %float( @TotXpGained)/%float( @TotTempTime) #MATH TotXpPerHour @TotXpPerSec*3600} #TRIGGER {^Your current experience is %1 and} {computeXPRate %1} #TRIGGER {^Hp: * Gp: * Xp: %1 Burden: %d%$} {computeXPRate %1} #TRIGGER {^Hp: * Gp: * Xp: &%d{XpGained}$} {computeXPRate %1} #CLASS 0