<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Wednesday, July 19, 2006, 1:29 AM -->
<!-- MuClient version 3.74 -->

<!-- Plugin "Aardwolf_Learned_ReportLUA" generated by Plugin Wizard -->

<muclient>
<plugin
   name="Aardwolf_Learned_ReportLUA"
   author="Onoitsu2"
   id="17ba3491d955283658d90de6"
   language="Lua"
   purpose="Reports Learned Skills in Mastery Catagories"
   save_state="y"
   date_written="2006-07-19 01:26:00"
   requires="3.65"
   version="1.1"
   >
<description trim="n">
<![CDATA[
Aardwolf_Learned_ReportLUA Helpfile
Usage:
-----------

learnrep                     - Shows the Categorized Learned List
learnrep help                - Shows this help screen

]]>
</description>

</plugin>


<!--  Get our standard constants -->

<include name="constants.lua"/>

<!--  Triggers  -->

<triggers>
  <trigger
   enabled="n"
   group="LearnReport"
   match="^\[Enter key for more or \'q\' to stop\]$"
   name="LearnRepRet"
   omit_from_output="y"
   regexp="y"
   send_to="12"
   sequence="1"
  >
  <send>world.SendNoEcho("")</send>
  </trigger>
  
  <trigger
   enabled="n"
   group="LearnReport"
   keep_evaluating="y"
   match="^(Skill/Spell name           Prac  Bonus  Level|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-  \-\-\-\-  \-\-\-\-\-  \-\-\-\-\-)$"
   name="LearnRep3"
   omit_from_output="y"
   regexp="y"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="n"
   group="LearnReport"
   ignore_case="y"
   match="(.*?):(.*?)(\d{1,3})\%(.*?)"
   name="LearnRep1"
   omit_from_output="y"
   regexp="y"
   script="LRFormat"
   send_to="12"
   sequence="100"
  >
  </trigger>
  <trigger
   enabled="n"
   group="LearnReport"
   match="^You have (\d{1,}) practice sessions left."
   name="LearnRep2"
   omit_from_output="y"
   regexp="y"
   script="LRReport"
   send_to="12"
   sequence="100"
  >
  </trigger>
</triggers>

<!--  Aliases  -->

<aliases>
  <alias
   match="^learnrep$"
   enabled="y"
   expand_variables="y"
   group="LearnReport"
   omit_from_command_history="y"
   regexp="y"
   send_to="12"
   script="LRQuery"
   omit_from_output="y"
   ignore_case="y"
   sequence="100"
  >
  </alias>
</aliases>

<!--  Plugin help  -->

<aliases>
  <alias
   script="OnHelp"
   match="learnrep help"
   enabled="y"
  >
  </alias>
</aliases>

<script>
<![CDATA[


function LRFormat(sName,sLine,wildcards)
if tonumber(wildcards[3]) < 10 then
SetVariable("LearnRep_count_crap",GetVariable("LearnRep_count_crap")+1)
SetVariable("LearnRep_count_total",GetVariable("LearnRep_count_total")+1)

elseif tonumber(wildcards[3]) >= 10 and tonumber(wildcards[3]) < 75 then
SetVariable("LearnRep_count_10to74",GetVariable("LearnRep_count_10to74")+1)
SetVariable("LearnRep_count_total",GetVariable("LearnRep_count_total")+1)

elseif tonumber(wildcards[3]) >= 75 and tonumber(wildcards[3]) < 85 then
SetVariable("LearnRep_count_75to84",GetVariable("LearnRep_count_75to84")+1)
SetVariable("LearnRep_count_total",GetVariable("LearnRep_count_total")+1)

elseif tonumber(wildcards[3]) >= 85 and tonumber(wildcards[3]) < 100 then
SetVariable("LearnRep_count_85to99",GetVariable("LearnRep_count_85to99")+1)
SetVariable("LearnRep_count_total",GetVariable("LearnRep_count_total")+1)

elseif (tonumber(wildcards[3]) == 100) then
SetVariable("LearnRep_count_100",GetVariable("LearnRep_count_100")+1)
SetVariable("LearnRep_count_total",GetVariable("LearnRep_count_total")+1)
end -- if
end -- LRFormat

function LRQuery(sName,sLine,wildcards)
EnableTrigger("LearnRep3",true)
EnableTrigger("LearnRep2",true)
EnableTrigger("LearnRep1",true)
EnableTrigger("LearnRepRet",true)

SetVariable("LearnRep_count_crap",0)
SetVariable("LearnRep_count_10to74",0)
SetVariable("LearnRep_count_75to84",0)
SetVariable("LearnRep_count_85to99",0)
SetVariable("LearnRep_count_100",0)
SetVariable("LearnRep_count_total",0)

DoAfterSpecial(1,'SendNoEcho("learned")',12)
end -- LRQuery

function LRReport(sName,sLine,wildcards)
Note(GetVariable("LearnRep_count_total") .. " Total Skills")
Note(GetVariable("LearnRep_count_crap") .. " Skills From 1% to 9%")
Note(GetVariable("LearnRep_count_10to74") .. " Skills From 10% to 74%")
Note(GetVariable("LearnRep_count_75to84") .. " Skills From 75% to 84%")
Note(GetVariable("LearnRep_count_85to99") .. " Skills From 85% to 99%")
Note(GetVariable("LearnRep_count_100") .. " Skills At 100%")

SetVariable("LearnRep_count_crap",0)
SetVariable("LearnRep_count_10to74",0)
SetVariable("LearnRep_count_75to84",0)
SetVariable("LearnRep_count_85to99",0)
SetVariable("LearnRep_count_100",0)
SetVariable("LearnRep_count_total",0)

EnableTrigger("LearnRep3",false)
EnableTrigger("LearnRep2",false)
EnableTrigger("LearnRep1",false)
EnableTrigger("LearnRepRet",false)
end -- LRReport

function OnPluginInstall()
OnHelp()
end -- OnPluginInstall

function OnHelp (sName, sLine, wildcards)
  Note(world.GetPluginInfo(world.GetPluginID(), 3))
end -- OnHelp
]]>
</script> 

</muclient>
