This is a very extensive level tracker. It tracks, levels, exp, and gold gained per hour and reports them every hour. It also sends a message to the user per level/pup noting time since last level/pup, gains made this level, the level, gold, kills, exp, exp / kill, and bonus stats.
It has a set of variables to track on a level basis, and hourly basis, a mort basis, and an alltime basis.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, July 01, 2006, 1:37 AM -->
<!-- MuClient version 3.73 -->
<!-- Plugin "LevelTracker" generated by Plugin Wizard -->
<!--
This script also creates and maintains a variable, ""@alevel"", is your ""actual level"" in terms of equipment/weapon/spell/skill useage. No idea yet how to make this variable useful.
-->
<muclient>
<plugin
name="LevelTracker"
author="NeoFryBoy(Tealos)"
id="d133b9cf9f4fa22a35791a54"
language="VBscript"
purpose="To track levels/trains/stats gained across morts, and through pups as well."
save_state="y"
date_written="2006-07-01 01:35:05"
requires="3.73"
version="1.0"
>
</plugin>
<!-- Get our standard constants -->
<include name="constants.vbs"/>
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
match="^You gain a bonus (\w+) point!$"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "bstats", (world.getvariable("bstats") & Chr(Asc("%1")) & "@w, @W")
world.setvariable "MortR" & Chr(Asc("%1")), (clng(world.getvariable("MortR" & Chr(Asc("%1")))) + 1)
world.setvariable "AllTimeR" & Chr(Asc("%1")), (clng(world.getvariable("AllTimeR" & Chr(Asc("%1")))) + 1)</send>
</trigger>
<trigger
group="FingerInfo"
match="^\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- Player \: (.*?) \(Online\) \-\-\-\-\-\-\-\-\-\-\-\-\-\-$"
regexp="y"
send_to="9"
sequence="100"
variable="player_name"
>
<send>%1</send>
</trigger>
<trigger
expand_variables="y"
group="FingerInfo"
match="^\w+ online since \: .*"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.ansinote ansi(31) & ansi(1) & "Done. Thank you, @player_name."
world.ansinote ansi(32) & ansi(1) & "Current level is: " & ansi(36) & ansi(1) & "@clevel"
world.ansinote ansi(32) & ansi(1) & "Total classes: " & ansi(36) & ansi(1) & "@classes"
world.ansinote ansi(32) & ansi(1) & "Total tiers: " & ansi(36) & ansi(1) & "@tiers"
if "@clevel" = "201" then
world.ansinote ansi(32) & ansi(1) & "Total levels gained: " & ansi(36) & ansi(1) & ((@clevel - 2) + (@tiers * 1393) + ((@classes - 1) * 199)) & ansi(33) & ansi(1) & " (" & ansi(32) & (13930 - ((@clevel - 2) + (@tiers * 1393) + ((@classes - 1) * 199))) & " to go!" & ansi(33) & ansi(1) & ")"
else
world.ansinote ansi(32) & ansi(1) & "Total levels gained: " & ansi(36) & ansi(1) & ((@clevel - 1) + (@tiers * 1393) + ((@classes - 1) * 199)) & ansi(33) & ansi(1) & " (" & ansi(32) & (13930 - ((@clevel - 1) + (@tiers * 1393) + ((@classes - 1) * 199))) & " to go!" & ansi(33) & ansi(1) & ")"
end if
If world.getvariable("InstallTime") = "" then
world.setvariable "InstallTime", Now
world.setvariable "LevelTime", Now
world.setvariable "ResetTime", Now
world.setvariable "MortRGold", "0"
world.setvariable "MortRExp", "0"
world.setvariable "MortRKills", "0"
world.setvariable "MortRLevels", "0"
world.setvariable "MortRTrains", "0"
world.setvariable "MortRBTrains", "0"
world.setvariable "MortRBTrainsPup", "0"
world.setvariable "MortRTrainsPup", "0"
world.setvariable "MortRPups", "0"
world.setvariable "MortRD", "0"
world.setvariable "MortRS", "0"
world.setvariable "MortRW", "0"
world.setvariable "MortRL", "0"
world.setvariable "MortRI", "0"
world.setvariable "MortRC", "0"
world.setvariable "HourRGold", "0"
world.setvariable "HourRExp", "0"
world.setvariable "HourRKills", "0"
world.setvariable "HourRLevels", "0"
world.setvariable "HourRPups", "0"
world.setvariable "LevelRBonusExp", "0"
world.setvariable "LevelRExp", "0"
world.setvariable "LevelRKills", "0"
world.setvariable "AllTimeRLevels", "0"
world.setvariable "AllTimeRTrains", "0"
world.setvariable "AllTimeRBTrains", "0"
world.setvariable "AllTimeRBTrainsPup", "0"
world.setvariable "AllTimeRTrainsPup", "0"
world.setvariable "AllTimeRPups", "0"
world.setvariable "AllTimeRD", "0"
world.setvariable "AllTimeRS", "0"
world.setvariable "AllTimeRW", "0"
world.setvariable "AllTimeRL", "0"
world.setvariable "AllTimeRI", "0"
world.setvariable "AllTimeRC", "0"
world.setvariable "pupbonustrains", "0"
world.setvariable "bonustrains", "0"
End if
if cint(world.getvariable("clevel")) >= 200 then
world.setvariable "pupping", "1"
else
world.setvariable "pupping", "0"
end if
'This is the hourly report timer
world.addtimer "LevelInfo_HourlyReport", 1, 0, 0, "", 1, "ExecExpHour"
world.EnableTriggerGroup "FingerInfo", False</send>
world.savestate
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^INFO\: (\w+) has been reborn as .*\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>If "@player_name" = "%1" then
world.setvariable "pupping", "0"
world.setvariable "clevel", "1"
world.setvariable "Classes", (@classes + 1)
world.setvariable "alevel", (1 + (@tiers * 10))
world.execute "lvlavgb"
world.execute "lvlavgr"
end if</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^Lucky\! You gain an extra (\d+) training session(|s)\!$"
regexp="y"
send_to="12"
sequence="100"
>
<send>if world.getvariable("pupping") = "1" then
world.setvariable "pupbonustrains", "%1"
world.setvariable "MortRBTrainsPup", (@MortRBTrainsPup + %1)
world.setvariable "AllTimeRBTrainsPup", (@AllTimeRBTrainsPup + %1)
else
world.setvariable "bonustrains", "%1"
world.setvariable "MortRBTrains", (@MortRBTrains + %1)
world.setvariable "AllTimeRBTrains", (@AllTimeRBTrains + %1)
end if</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^The immortals cringe as they realize (\w+) will be here for another 1407 levels\!$"
regexp="y"
send_to="12"
sequence="100"
>
<send>If "@player_name" = "%1" then
world.setvariable "pupping", "0"
world.setvariable "clevel", "1"
world.setvariable "Classes", "1"
world.setvariable "tiers", (@tiers + 1)
world.setvariable "alevel", (1 + ((@tiers + 1) * 10))
world.execute "lvlavgb"
world.execute "lvlavgr"
end if</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^There is a brilliant burst of lightning throughout the skies as (\w+) is stripped of power and starts a new life.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>If "@player_name" = "%1" then
world.setvariable "pupping", "0"
world.setvariable "clevel", "1"
world.setvariable "Classes", "1"
world.setvariable "tiers", (@tiers + 1)
world.setvariable "alevel", (1 + ((@tiers + 1) * 10))
world.execute "lvlavgb"
world.execute "lvlavgr"
end if</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^You receive (.*) experience points.$"
regexp="y"
keep_evaluating="y"
send_to="12"
sequence="100"
>
<send>if eval("%1") > "0" then
world.setvariable "HourRexp", (@HourRexp + eval("%1"))
world.setvariable "MortRexp", (@MortRexp + eval("%1"))
world.setvariable "LevelRexp", (@LevelRexp + eval("%1"))
world.setvariable "LevelRKills", (@LevelRKills + 1)
world.setvariable "HourRKills", (@HourRkills + 1)
world.setvariable "MortRKills", (@MortRkills + 1)
world.savestate
end if</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^You receive (\d+) bonus experience"
regexp="y"
keep_evaluating="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "HourRExp", (@HourRExp + %1)
world.setvariable "MortRExp", (@MortRExp + %1)
world.setvariable "LevelRBonusExp", (@LevelRBonusExp + %1)
</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^You receive (\d+) gold"
regexp="y"
keep_evaluating="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "HourRGold", (@HourRGold + %1)
world.setvariable "MortRGold", (@MortRGold + %1)</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^You get (\d+) gold coins"
regexp="y"
keep_evaluating="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "HourRGold", (@HourRGold + %1)
world.setvariable "MortRGold", (@MortRGold + %1)</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^\w+ gives you (\d+) gold coins"
regexp="y"
keep_evaluating="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "HourRGold", (@HourRGold + %1)
world.setvariable "MortRGold", (@MortRGold + %1)</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^You are taxed (\d+) by your clan\!$"
regexp="y"
keep_evaluating="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "HourRGold", (@HourRGold - %1)
world.setvariable "MortRGold", (@MortRGold - %1)</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^(.*?) split(|s) (\d+) gold coins. Your share is (\d+) gold.$"
regexp="y"
keep_evaluating="y"
send_to="12"
sequence="100"
>
<send>if "%1" = "You" then
world.setvariable "HourRGold", ((@HourRGold - %3) + %4)
world.setvariable "MortRGold", ((@MortRGold - %3) + %4)
else
world.setvariable "HourRGold", (@HourRGold + %4)
world.setvariable "MortRGold", (@MortRGold + %4)
end if</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^You receive 8,000 gold from the full moon.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "HourRGold", (@HourRGold + 8000)
world.setvariable "MortRGold", (@MortRGold + 8000)</send>
</trigger>
<trigger
group="FingerInfo"
match="^Level (\d+) (none|male|female) .* \(Tier (\d)\)\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "clevel", "%1"
world.setvariable "tiers", "%3"
world.setvariable "alevel", (%1 + (%3 * 10))</send>
</trigger>
<trigger
group="FingerInfo"
match="Remort\:( .* \/){1,7}"
regexp="y"
send_to="12"
sequence="100"
>
<send>dim Classes1
Classes1 = Split("%1", " /")
world.setvariable "Classes", (UBound(Classes1) + 1)
'If this script never goes off, then they are a SC,
'and the variable is already set to reflect that.
</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^You gain (\d+) hit points\, (\d+) mana\, (\d+) moves\, (\d+) practices and (\d+) trains\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "clevel", (@clevel + 1)
world.setvariable "alevel", (@alevel + 1)
world.setvariable "HourRLevels", (@HourRLevels + 1)
world.setvariable "MortRLevels", (@MortRLevels + 1)
world.setvariable "AllTimeRLevels", (@AllTimeRLevels + 1)
world.setvariable "bonustrains", "0"
world.setvariable "bstats", ""
world.setvariable "MortRTrains", (@MortRTrains + %5)
world.setvariable "AllTimeRTrains", (@AllTimeRTrains + %5)
'TimerNames don't like numbers. Phooey.
var1 = "%1"
var2 = "%2"
var3 = "%3"
var4 = "%4"
var5 = "%5"
world.AddTimer "LeveledTimer", 0, 0, 1.5, "", 5, "RegLevelReport"</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
match="^You gain (\d+) trains\.$"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "pupbonustrains", "0"
world.setvariable "bstats", ""
world.setvariable "MortRTrainsPup", (@MortRTrainsPup + %1)
world.setvariable "AllTimeRTrainsPup", (@AllTimeRTrainsPup + %1)
world.setvariable "MortRPups", (@MortRPups + 1)
world.setvariable "AllTimeRPups", (@AllTimeRPups + 1)
world.setvariable "HourRPups", (@HourRPups + 1)
var1 = "%1"
world.AddTimer "PuppedTimer", 0, 0, 1.5, "", 5, "RegLevelReport"</send>
</trigger>
</triggers>
<!-- Aliases -->
<aliases>
<alias
match="lvlt"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if "@LevelRKills" = "0" then
world.sendnoecho "@lvlchannel @@RS@@rince @@rL@@Rast @@RL@@revel@@w: @@c" & LevelTimer(world.getvariable("LevelTime"),Now) & "@@w|@@w 0 @@ckills @@w|@@w 0 @@cexp@@w/@@ckill@@w."
else
world.sendnoecho "@lvlchannel @@RS@@rince @@rL@@Rast @@RL@@revel@@w: @@c" & LevelTimer(world.getvariable("LevelTime"),Now) & "@@w|@@w @LevelRKills @@ckills @@w|@@w " & FormatNumber(((cint(world.getvariable("LevelRExp")) + 0 + cint(world.getvariable("LevelRBonusExp"))) / cint(world.getvariable("LevelRKills"))), 3, vbFalse, vbUseDefault, vbFalse) & " @@cexp@@w/@@ckill@@w."
end if</send>
</alias>
<alias
match="exphl"
enabled="y"
send_to="12"
sequence="100"
>
<send>If world.getvariable("LastHourR") = "" then
world.ansinote ansi(31) & ansi(1) & "Nothing to report."
else
world.sendnoecho world.getvariable("lvlchannel") & " " & world.getvariable("LastHourR")
end if</send>
</alias>
<alias
match="exph"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if "@HourRKills" = "0" then
world.ansinote ansi(31) & ansi(1) & "Nothing to report."
else
world.sendnoecho "@lvlchannel @@RS@@ro @@rF@@Rar @@RT@@rhis @@RH@@rour@@w: @@W@HourRExp @@cexp@@w, @@W@HourRKills @@ckills@@w, @@W@HourRLevels @@clevel(s), @@W@HourRPups @@cpups@@w@@w, @@W" & FormatNumber((@HourRExp / @HourRKills), 3, vbFalse, vbUseDefault, vbFalse) & " @@cexp/kill@@w. @@Y@HourRGold @@cgold@@w, @@Y" & FormatNumber((@HourRGold / @HourRKills), 3, vbFalse, vbUseDefault, vbFalse) & " @@cgold/kill@@w."
End if</send>
</alias>
<alias
match="exphour"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if "@HourRKills" = "0" then
world.setvariable "LastHourR", "@@RL@@rast @@rR@@Reported @@rH@@Rour@@w: @@W@HourRExp @@cexp@@w, @@W@HourRKills @@ckills@@w, @@W@HourRLevels @@clevel(s), @@W@HourRPups @@cpups@@w@@w, @@W0 @@cexp/kill@@w. @@Y@HourRGold @@cgold@@w, @@Y0 @@cgold/kill@@w."
world.sendnoecho "@lvlchannel @@RT@@rhe @@rP@@Rrevious @@rH@@Rour@@w: @@W@HourRExp @@cexp@@w, @@W@HourRKills @@ckills@@w, @@W@HourRLevels @@clevel(s), @@W@HourRPups @@cpups@@w@@w, @@W0 @@cexp/kill@@w. @@Y@HourRGold @@cgold@@w, @@Y0 @@cgold/kill@@w."
else
world.setvariable "LastHourR", "@@RL@@rast @@rR@@Reported @@rH@@Rour@@w: @@W@HourRExp @@cexp@@w, @@W@HourRKills @@ckills@@w, @@W@HourRLevels @@clevel(s), @@W@HourRPups @@cpups@@w@@w, @@W" & FormatNumber((@HourRExp / @HourRKills), 3, vbFalse, vbUseDefault, vbFalse) & " @@cexp/kill@@w. @@Y@HourRGold @@cgold@@w, @@Y" & FormatNumber((@HourRGold / @HourRKills), 3, vbFalse, vbUseDefault, vbFalse) & " @@cgold/kill@@w."
world.sendnoecho "@lvlchannel @@RT@@rhe @@rP@@Rrevious @@rH@@Rour@@w: @@W@HourRExp @@cexp@@w, @@W@HourRKills @@ckills@@w, @@W@HourRLevels @@clevel(s), @@W@HourRPups @@cpups@@w@@w, @@W" & FormatNumber((@HourRExp / @HourRKills), 3, vbFalse, vbUseDefault, vbFalse) & " @@cexp/kill@@w. @@Y@HourRGold @@cgold@@w, @@Y" & FormatNumber((@HourRGold / @HourRKills), 3, vbFalse, vbUseDefault, vbFalse) & " @@cgold/kill@@w."
end if
world.setvariable "HourRGold", "0"
world.setvariable "HourRExp", "0"
world.setvariable "HourRKills", "0"
world.setvariable "HourRLevels", "0"
world.setvariable "HourRPups", "0"</send>
</alias>
<alias
match="lvlsetup"
enabled="y"
send_to="12"
sequence="100"
>
<send>dim dummyvar
Dummyvar = Inputbox("Enter the channel on which the report shows.", "Tealos' LevelScript", world.getvariable("lvlchannel"))
if dummyvar = "" then
else
world.setvariable "lvlchannel", dummyvar
if msgbox("Would you like reports to show all gains (Yes), or just pracs + trains + stats (No)", vbYesNo) = vbYes then
world.setvariable "shortreport", "0"
else
world.setvariable "shortreport", "1"
end if
world.EnableTriggerGroup "FingerInfo", True
world.setvariable "Classes", "1"
world.send "finger"
end if</send>
</alias>
<alias
match="llvl"
enabled="y"
send_to="12"
sequence="100"
>
<send>If world.getvariable("lastlevel") = "" then
world.ansinote ansi(31) & ansi(1) & "Nothing to report."
else
world.sendnoecho world.getvariable("lvlchannel") & world.getvariable("lastlevel")
end if</send>
</alias>
<alias
match="whogr*"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>
world.send "swho 12%1 " & (@clevel - 9) & " " & (@clevel + 9)</send>
</alias>
<alias
match="lvlhelp"
enabled="y"
send_to="12"
sequence="100"
>
<send>world.ansinote ansi(37) & ansi(1) & "/~/~" & ansi(36) & ansi(1) & " Original " & ansi(37) & ansi(1) & "Level Info script v3.2 written by Atreidess ~\~\"
world.ansinote ansi(37) & ansi(1) & "~/~/ Parts of Atreidess' script were adapted from Ninja's ~\~\"
world.ansinote ansi(0) & "-=" & ansi(36) & "[ " & ansi(31) & ansi(22) & ansi(40) & "Remake for " & ansi(33) & ansi(1) & ansi(40) & "MUSHClient" & ansi(31) & ansi(22) & ansi(40) & " done by " & ansi(31) & ansi(1) & ansi(40) & "T" & ansi(31) & ansi(22) & ansi(40) & "ealos." & ansi(36) & " ]" & ansi(0) & "=-"
world.ansinote ansi(31) & ansi(1) & ansi(40) & "I removed aliases I deemed unnecessary, or didn't feel like adding. This is MY version of Atreidess script."
world.ansinote ansi(22) & vbnewline
world.ansinote ansi(36) & ansi(1) & "Configuration commands:"
world.ansinote ansi(32) & ansi(1) & "-=: lvlsetup :=- " & ansi(33) & ansi(1) & " Configure options for the script, and automatically gets level, remorts, and tiers."
world.ansinote ansi(31) & ansi(1) & "* with no parameters, these will show your current settings and 'total level'"
world.ansinote ansi(22) & vbnewline
world.ansinote ansi(36) & ansi(1) & "Report commands:"
world.ansinote ansi(32) & ansi(1) & "-=: exph :=-" & ansi(33) & ansi(1) & " Displays last hour info."
world.ansinote ansi(32) & ansi(1) & "-=: exphl :=-" & ansi(33) & ansi(1) & " Displays last reported hour info."
world.ansinote ansi(32) & ansi(1) & "-=: exphour :=-" & ansi(33) & ansi(1) & " Resets current hour's timer and reports as if timer had gone off."
world.ansinote ansi(32) & ansi(1) & "-=: llvl :=-" & ansi(33) & ansi(1) & " Displays last level info."
world.ansinote ansi(32) & ansi(1) & "-=: lvlt :=-" & ansi(33) & ansi(1) & " Reports time since last level."
world.ansinote ansi(32) & ansi(1) & "-=: lvlavg :=-" & ansi(33) & ansi(1) & " Displays gains averages this mort."
world.ansinote ansi(32) & ansi(1) & "-=: lvlavga :=-" & ansi(33) & ansi(1) & " Displays alltime gains averages."
world.ansinote ansi(32) & ansi(1) & "-=: lvlavgb :=-" & ansi(33) & ansi(1) & " Lucky bonus stats info."
world.ansinote ansi(32) & ansi(1) & "-=: pupavg :=-" & ansi(33) & ansi(1) & " Pup averages this mort."
world.ansinote ansi(32) & ansi(1) & "-=: pupavga :=-" & ansi(33) & ansi(1) & " Pup averages alltime."
world.ansinote ansi(31) & ansi(1) & "* report commands are reported to the channel chosen during setup, or to screen."
world.ansinote ansi(22) & vbnewline
world.ansinote ansi(36) & ansi(1) & "Miscellaneous commands:"
world.ansinote ansi(32) & ansi(1) & "-=: lvlavgr :=-" & ansi(33) & " Resets the script. (Doesn't reset alltime reports, and " & ansi(31) & ansi(1) & "DOES NOT" & ansi(33) & " display a warning."
world.ansinote ansi(32) & ansi(1) & "-=: whogr [argument] :=-" & ansi(33) & ansi(1) & " Do a who for people +/- 9 levels from your current level."
world.ansinote ansi(31) & ansi(1) & "The argument is optional, so you can use 'whogr', 'whogr evil friend', 'whogr chaos', etc."
world.ansinote ansi(0) & vbnewline
world.ansinote ansi(31) & ansi(1) & "This script uses the same variable as my Potion Tracker script to hold the player's name, and a different variable from Huan's script to track player level."
world.ansinote ansi(31) & ansi(1) & "Note" & ansi(37) & ansi(1) & ": The script counts levels *gained* as 199 per mort or 1393 per tier, because levels 1 and 201 are basically freebies, so you only actually raise your character 199 levels of experience per mort. If you don't like this reasoning, then simply add 14 levels per tier, two levels per complete mort, and one level per unfinished mort."</send>
</alias>
<alias
match="lvlavgr"
enabled="y"
send_to="12"
sequence="100"
>
<send> world.setvariable "MortRGold", "0"
world.setvariable "MortRExp", "0"
world.setvariable "MortRKills", "0"
world.setvariable "MortRLevels", "0"
world.setvariable "MortRTrains", "0"
world.setvariable "MortRBTrains", "0"
world.setvariable "MortRBTrainsPup", "0"
world.setvariable "MortRTrainsPup", "0"
world.setvariable "MortRPups", "0"
world.setvariable "MortRD", "0"
world.setvariable "MortRS", "0"
world.setvariable "MortRW", "0"
world.setvariable "MortRL", "0"
world.setvariable "MortRI", "0"
world.setvariable "MortRC", "0"
world.setvariable "LevelRBonusExp", "0"
world.setvariable "LevelRExp", "0"
world.setvariable "LevelRKills", "0"
world.setvariable "LevelTime", Now
world.setvariable "ResetTime", Now
world.ansinote ansi(36) & ansi(1) & "-=+ " & ansi(31) & ansi(1) & "LevelInfo Script Reset " & ansi(36) & ansi(1) & "+=-"</send>
</alias>
<alias
match="lvlavgb"
enabled="y"
send_to="12"
sequence="100"
>
<send>world.ansinote ansi(0) & "-=: " & ansi(35) & ansi(1) & world.getvariable("MortRLevels") & " levels since " & world.getvariable("ResetTime") & " (this mort)" & ansi(0) & " :=-"
world.ansinote ansi(36) & ansi(1) & "Bonus stats: " & ansi(37) & ansi(1) & (cint(world.getvariable("MortRS")) + cint(world.getvariable("MortRD")) + cint(world.getvariable("MortRI")) + cint(world.getvariable("MortRL")) + cint(world.getvariable("MortRC")) + cint(world.getvariable("MortRW")))
world.ansinote ansi(35) & ansi(1) & "----------------"
world.ansinote ansi(32) & ansi(1) & "Strength: " & ansi(33) & ansi(1) & world.getvariable("MortRS")
world.ansinote ansi(32) & ansi(1) & "Intelligence: " & ansi(33) & ansi(1) & world.getvariable("MortRI")
world.ansinote ansi(32) & ansi(1) & "Wisdom: " & ansi(33) & ansi(1) & world.getvariable("MortRW")
world.ansinote ansi(32) & ansi(1) & "Dexterity: " & ansi(33) & ansi(1) & world.getvariable("MortRD")
world.ansinote ansi(32) & ansi(1) & "Constitution: " & ansi(33) & ansi(1) & world.getvariable("MortRC")
world.ansinote ansi(32) & ansi(1) & "Luck: " & ansi(33) & ansi(1) & world.getvariable("MortRL")</send>
</alias>
<alias
match="lvlavg"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if "@MortRLevels" = "0" then
world.ansinote ansi(31) & ansi(1) & "Nothing to report."
else
world.sendnoecho "@lvlchannel @@CSince @@w@ResetTime@@Y (this mort): @@w@MortRLevels @@clevels@@w,@@W @MortRTrains @@ctrains@@w,@@W @MortRBTrains @@cbonus trains@@w.@@W " & (@MortRS + @MortRI + @MortRW + @MortRD + @MortRC + @MortRL) & "@@cbonus stats@@w,@@W " & FormatNumber((@MortRTrains / @MortRLevels), 3, vbFalse, vbUseDefault, vbFalse) & " @@ctrains per level@@w,@@W " & FormatNumber((@MortRBTrains / @MortRLevels), 3, vbFalse, vbUseDefault, vbFalse) & "@@c bonus trains per level@@w,@@W " & FormatNumber(((@MortRS + @MortRI + @MortRW + @MortRD + @MortRC + @MortRL) / @MortRLevels), 3, vbFalse, vbUseDefault, vbFalse) & "@@c bonus stats per level@@w,@@W " & FormatNumber(((@MortRTrains + @MortRBTrains) / @MortRLevels), 3, vbFalse, vbUseDefault, vbFalse) & " @@ctotal trains per level."
End if
</send>
</alias>
<alias
match="lvlavga"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if "@AllTimeRLevels" = "0" then
world.ansinote ansi(31) & ansi(1) & "Nothing to report."
else
world.sendnoecho "@lvlchannel @@CSince @@w@InstallTime@@Y (installed): @@w@AllTimeRLevels @@clevels@@w,@@W @AllTimeRTrains @@ctrains@@w,@@W @AllTimeRBTrains @@cbonus trains@@w.@@W " & (@AllTimeRS + @AllTimeRI + @AllTimeRW + @AllTimeRD + @AllTimeRC + @AllTimeRL) & "@@cbonus stats@@w,@@W " & FormatNumber((@AllTimeRTrains / @AllTimeRLevels), 3, vbFalse, vbUseDefault, vbFalse) & " @@ctrains per level@@w,@@W " & FormatNumber((@AllTimeRBTrains / @AllTimeRLevels), 3, vbFalse, vbUseDefault, vbFalse) & "@@c bonus trains per level@@w,@@W " & FormatNumber(((@AllTimeRS + @AllTimeRI + @AllTimeRW + @AllTimeRD + @AllTimeRC + @AllTimeRL) / @AllTimeRLevels), 3, vbFalse, vbUseDefault, vbFalse) & "@@c bonus stats per level@@w,@@W " & FormatNumber(((@AllTimeRTrains + @AllTimeRBTrains) / @AllTimeRLevels), 3, vbFalse, vbUseDefault, vbFalse) & " @@ctotal trains per level."
end if
</send>
</alias>
<alias
match="pupavg"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if "@MortRPups" = "0" then
world.ansinote ansi(31) & ansi(1) & "Nothing to report."
else
world.sendnoecho "@lvlchannel @@CSince @@w@ResetTime@@Y (this mort): @@W@MortRPups@@C pups@@w, @@W@MortRTrainsPup@@Ctrains@@w, @@W@MortRBTrainsPup@@C bonus trains@@w. " & FormatNumber((@MortRTrainsPup / @MortRPups), 3, vbFalse, vbUseDefault, vbFalse) & " @@Ctrains per pup@@w, @@W" & FormatNumber((@MortRBTrainsPup / @MortRPups), 3, vbFalse, vbUseDefault, vbFalse) & "@@C bonus trains per pup@@w, @@W" & FormatNumber(((@MortRTrainsPup + @MortRBTrainsPup) / @MortRPups), 3, vbFalse, vbUseDefault, vbFalse) & " @@ctotal trains per pup."
end if</send>
</alias>
<alias
match="pupavga"
enabled="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if "@AllTimeRPups" = "0" then
world.ansinote ansi(31) & ansi(1) & "Nothing to report."
else
world.sendnoecho "@lvlchannel @@CSince @@w@InstallTime@@Y (installed): @@W@AllTimeRPups@@C pups@@w, @@W@AllTimeRTrainsPup@@Ctrains@@w, @@W@AllTimeRBTrainsPup@@C bonus trains@@w. " & FormatNumber((@AllTimeRTrainsPup / @AllTimeRPups), 3, vbFalse, vbUseDefault, vbFalse) & " @@Ctrains per pup@@w, @@W" & FormatNumber((@AllTimeRBTrainsPup / @AllTimeRPups), 3, vbFalse, vbUseDefault, vbFalse) & "@@C bonus trains per pup@@w, @@W" & FormatNumber(((@AllTimeRTrainsPup + @AllTimeRBTrainsPup) / @AllTimeRPups), 3, vbFalse, vbUseDefault, vbFalse) & " @@ctotal trains per pup."
end if</send>
</alias>
</aliases>
<!-- Variables -->
<variables>
<variable name="lvlchannel">gt</variable>
</variables>
<!-- Script -->
<script>
<![CDATA[
dim var1,var2,var3,var4,var5
Function LevelTimer (Date1, Date2)
Dim seconds, min, hours, days
seconds = (DateDiff("s", Date1, Date2) - 1)
min = (seconds \ 60)
seconds = (seconds / 60) - (seconds \ 60)
seconds = Round(seconds * 60)
hours = (min \ 60)
min = (min / 60) - (min \ 60)
min = Round(min * 60)
days = (hours \ 24)
hours = (hours / 24) - (hours \ 24)
hours = Round(hours * 24)
LevelTimer = days & "d " & hours & "h " & min & "m " & seconds & "s"
End Function
Sub ExecExpHour(name)
world.execute "exphour"
End Sub
Sub RegLevelReport(name)
If len(world.getvariable("bstats")) > 1 then
If InStrRev(world.getvariable("bstats"), "@w, @W") = (Len(world.getvariable("bstats")) - 5) Then
world.setvariable "bstats", Left(world.getvariable("bstats"), Len(world.getvariable("bstats")) - 6)
End If
end if
If world.getvariable("LevelRKills") = "0" then
world.sendnoecho world.getvariable("lvlchannel") & " Sorry, but an error occured marking kills this level as 0 so you'll recieve this report instead."
world.sendnoecho world.getvariable("lvlchannel") & " @RL@reveled@R!@w: @C" & world.getvariable("clevel") & "@w: @W" & var1 & "@chp@W " & var2 & "@cmn@W " & var3 & "@cmv@W " & var4 & " @cpracs@w " & var5 & "@C+@W" & (world.getvariable("bonustrains") + 0) & " @ctrains@w | {@RB@ronus S@Rtat(s)@w} @W " & world.getvariable("bstats") & " @w|@c " & LevelTimer(world.getvariable("LevelTime"),Now) & " @w|@R " & world.getvariable("LevelRKills") & "@c kills.@w"
else
if world.getvariable("pupping") = "1" then
if world.getvariable("shortreport") = "1" then
world.sendnoecho world.getvariable("lvlchannel") & " @RP@rupped@R!@w:@W " & var5 & "@C+@W" & (cint(world.getvariable("pupbonustrains")) + 0) & " @ctrains@w. {@RB@ronus S@Rtat(s)@w} @W " & world.getvariable("bstats") & " @w|@W " & LevelTimer(world.getvariable("LevelTime"),Now) & " @w|@R " & world.getvariable("LevelRKills") & "@c kills@w averaging " & FormatNumber(0 + (cint(world.getvariable("LevelRExp")) / cint(world.getvariable("LevelRKills"))), 3, vbFalse, vbUseDefault, vbFalse) & " @cexp@W/@ckill@w."
world.setvariable "lastlevel", " @RL@rast @RP@rup@w: @W" & var5 & "@c+@w" & (world.getvariable("pupbonustrains") + 0) & " @ctrains@w| {@RB@ronus S@Rtat(s)@w} @W " & world.getvariable("bstats") & " @w|@c " & LevelTimer(world.getvariable("LevelTime"),Now) & " @w|@R " & world.getvariable("LevelRKills") & "@c kills@w averaging " & FormatNumber(((cint(world.getvariable("LevelRExp")) + cint(world.getvariable("LevelRBonusExp"))) / cint(world.getvariable("LevelRKills"))), 3, vbFalse, vbUseDefault, vbFalse) & " @cxp@W/@ckill@w."
else
world.sendnoecho world.getvariable("lvlchannel") & " @RP@rupped@R!@w: @W" & var1 & "@chp@W " & var2 & "@cmn@W " & var3 & "@cmv@W " & var4 & " @cpracs@w " & var5 & "@C+@W" & (cint(world.getvariable("pupbonustrains")) + 0) & " @ctrains@w. {@RB@ronus S@Rtat(s)@w} @W " & world.getvariable("bstats") & " @w|@W " & LevelTimer(world.getvariable("LevelTime"),Now) & " @w|@R " & world.getvariable("LevelRKills") & "@c kills@w averaging " & FormatNumber(0 + (cint(world.getvariable("LevelRExp")) / cint(world.getvariable("LevelRKills"))), 3, vbFalse, vbUseDefault, vbFalse) & " @cexp@W/@ckill@w."
world.setvariable "lastlevel", " @RL@rast @RP@rup@w: @W" & var1 & "@chp@W " & var2 & "@cmn@W " & var3 & "@cmv@W " & var4 & " @cpracs@w " & var5 & "@C+@w" & (world.getvariable("pupbonustrains") + 0) & " @ctrains@w| {@RB@ronus S@Rtat(s)@w} @W " & world.getvariable("bstats") & " @w|@c " & LevelTimer(world.getvariable("LevelTime"),Now) & " @w|@R " & world.getvariable("LevelRKills") & "@c kills@w averaging " & FormatNumber(((cint(world.getvariable("LevelRExp")) + cint(world.getvariable("LevelRBonusExp"))) / cint(world.getvariable("LevelRKills"))), 3, vbFalse, vbUseDefault, vbFalse) & " @cxp@W/@ckill@w."
end if
else
if world.getvariable("shortreport") = "1" then
world.sendnoecho world.getvariable("lvlchannel") & " @RL@reveled@R!@w: @C" & world.getvariable("clevel") & "@w: @W" & var5 & "@c+@w" & (world.getvariable("bonustrains") + 0) & " @ctrains@w| @w{@RBonus @rStat(s)@w}@W " & world.getvariable("bstats") & " @w|@c " & LevelTimer(world.getvariable("LevelTime"),Now) & "@w|@r " & world.getvariable("LevelRKills") & "@c kills@w averaging " & FormatNumber(((cint(world.getvariable("LevelRExp")) + 0 + cint(world.getvariable("LevelRBonusExp"))) / cint(world.getvariable("LevelRKills"))), 3, vbFalse, vbUseDefault, vbFalse) & " @cxp@W/@ckill@w."
world.setvariable "lastlevel", " @RL@rast @RL@revel@w: @C" & world.getvariable("clevel") & "@w: @W" & var5 & "@c+@w" & (world.getvariable("bonustrains") + 0) & " @ctrains@w| @cB@ronus @cS@rtat(s)@w:@W " & world.getvariable("bstats") & " @w|@c " & LevelTimer(world.getvariable("LevelTime"),Now) & " @w|@r " & world.getvariable("LevelRKills") & "@c kills@w averaging " & FormatNumber(((cint(world.getvariable("LevelRExp")) + 0 + cint(world.getvariable("LevelRBonusExp"))) / cint(world.getvariable("LevelRKills"))), 3, vbFalse, vbUseDefault, vbFalse) & " @cxp@W/@ckill@w."
else
world.sendnoecho world.getvariable("lvlchannel") & " @RL@reveled@R!@w: @C" & world.getvariable("clevel") & "@w: @W" & var1 & "@chp@W " & var2 & "@cmn@W " & var3 & "@cmv@W " & var4 & " @cpracs@w " & var5 & "@C+@W" & (world.getvariable("bonustrains") + 0) & " @ctrains@w | {@RB@ronus S@Rtat(s)@w} @W " & world.getvariable("bstats") & " @w|@c " & LevelTimer(world.getvariable("LevelTime"),Now) & " @w|@R " & world.getvariable("LevelRKills") & "@c kills@w averaging " & FormatNumber(((cint(world.getvariable("LevelRExp")) + 0 + cint(world.getvariable("LevelRBonusExp"))) / cint(world.getvariable("LevelRKills"))), 3, vbFalse, vbUseDefault, vbFalse) & " @cxp@W/@ckill@w."
world.setvariable "lastlevel", " @RL@rast @RL@revel@w: @C" & world.getvariable("clevel") & "@w: @W" & var1 & "@chp@W " & var2 & "@cmn@W " & var3 & "@cmv@W " & var4 & " @cpracs@W " & var5 & "@C+@W" & (world.getvariable("bonustrains") + 0) & " @ctrains@w | {@RB@ronus S@Rtat(s)@w} @W " & world.getvariable("bstats") & " @w|@c " & LevelTimer(world.getvariable("LevelTime"),Now) & " @w| @R" & world.getvariable("LevelRKills") & "@c kills@w averaging " & FormatNumber(((cint(world.getvariable("LevelRExp")) + 0 + cint(world.getvariable("LevelRBonusExp"))) / cint(world.getvariable("LevelRKills"))), 3, vbFalse, vbUseDefault, vbFalse) & " @cxp@W/@ckill@w."
end if
end if
end if
world.setvariable "LevelRBonusExp", "0"
world.setvariable "LevelRExp", "0"
world.setvariable "LevelRKills", "0"
world.setvariable "bstats", "0"
world.setvariable "pupbonustrains", "0"
world.setvariable "bonustrains", "0"
if cint(world.getvariable("clevel")) >= 200 then
world.setvariable "pupping", "1"
else
world.setvariable "pupping", "0"
end if
'Set the new level time
world.setvariable "leveltime", Now
world.savestate
End Sub
Sub OnPluginInstall()
world.note "Type lvlhelp for help, and then lvlsetup to begin."
if not world.getvariable("timeleft") = "" then
Dim seconds, min
seconds = world.getvariable("timeleft")
min = (seconds \ 60)
seconds = (seconds / 60) - (seconds \ 60)
seconds = Round(seconds * 60)
min = (min / 60) - (min \ 60)
min = Round(min * 60)
world.addtimer "LevelInfo_HourlyReport", 0, min, seconds, "", 1, "ExecExpHour"
end if
End Sub
sub OnPluginClose
world.setvariable "timeleft", world.gettimerinfo("LevelInfo_HourlyReport",13)
world.savestate
end sub
]]>
</script>
</muclient>
|