Added 'Knife Fighting' and 'Unarmed' to output and updated instinct percent calculations

master
icecool 5 years ago
parent c956fc59d9
commit 9a11390016

@ -1,251 +1,253 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient> <!DOCTYPE muclient>
<muclient> <muclient>
<plugin <plugin
name="DTrackReports" author="Icecool" name="DTrackReports" author="Icecool"
id="05cd229ae24e869f9da3bf01" id="05cd229ae24e869f9da3bf01"
purpose="Plugin used to report DTRACK data" purpose="Plugin used to report DTRACK data"
language="Lua" date_written="2019-01-31 00:00:00" language="Lua" date_written="2019-01-31 00:00:00"
save_state="n" requires="0.00" version="1.00" > </plugin> save_state="n" requires="0.00" version="1.00" > </plugin>
<aliases> <aliases>
<alias regexp = "y" ignore_case="y" enabled="y" echo_alias="y" sequence="95" <alias regexp = "y" ignore_case="y" enabled="y" echo_alias="y" sequence="95"
match="^^dre(port)?\s?(?<command>\w+)?\s?(?<channel>\w+)?$$" match="^^dre(port)?\s?(?<command>\w+)?\s?(?<channel>\w+)?$$"
script="ALIAS_report"></alias> script="ALIAS_report"></alias>
</aliases> </aliases>
<triggers> <triggers>
<trigger <trigger
enabled="n" regexp="y" omit_from_output="y" sequence="100" send_to="12" group="dtrack_swings" enabled="n" regexp="y" omit_from_output="y" sequence="100" send_to="12" group="dtrack_swings"
match="^(.*?)$" match="^(.*?)$"
script="TRIGGER_process_dtrack_line" ></trigger> script="TRIGGER_process_dtrack_line" ></trigger>
<trigger <trigger
enabled="n" regexp="y" omit_from_output="y" sequence="100" send_to="12" group="dtrack_hits" enabled="n" regexp="y" omit_from_output="y" sequence="100" send_to="12" group="dtrack_hits"
match="^(.*?)$" match="^(.*?)$"
script="TRIGGER_process_hits_line" ></trigger> script="TRIGGER_process_hits_line" ></trigger>
</triggers> </triggers>
<!-- Get our standard constants --> <!-- Get our standard constants -->
<include name="constants.lua"/> <include name="constants.lua"/>
<!-- Script --> <!-- Script -->
<script> <script>
<![CDATA[ <![CDATA[
--[[ External Resources ]]-- --[[ External Resources ]]--
dofile(GetInfo(60) .. "aardwolf_colors.lua") -- Used to support Aard Colors for the cnote() function dofile(GetInfo(60) .. "aardwolf_colors.lua") -- Used to support Aard Colors for the cnote() function
-- Script Global variables -- Script Global variables
Debug = false Debug = false
-- Define Colors -- Define Colors
c_dividers = "@w" c_dividers = "@w"
c_primary = "@G" c_primary = "@G"
c_pnumber = "@W" c_pnumber = "@W"
c_inumber = "@Y" c_inumber = "@Y"
c_percent = "@R" c_percent = "@R"
c_prepend = "@C" c_prepend = "@C"
-- Basic print function that supports aard, xterm, and ANSI color codes [idea from Durel's Inventory script] -- Basic print function that supports aard, xterm, and ANSI color codes [idea from Durel's Inventory script]
function cnote(string) function cnote(string)
AnsiNote(stylesToANSI(ColoursToStyles(string))) AnsiNote(stylesToANSI(ColoursToStyles(string)))
end end
function dnote(str) function dnote(str)
if Debug then if Debug then
cnote("@R[DEBUG]: @w"..str.."@w") cnote("@R[DEBUG]: @w"..str.."@w")
end end
end end
function trim(s) function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1")) return (s:gsub("^%s*(.-)%s*$", "%1"))
end end
function returnStringPosition( item, start, arg ) -- Designed to save on some variable usage in commands function returnStringPosition( item, start, arg ) -- Designed to save on some variable usage in commands
local position, _ = string.find(arg, item, start, true) local position, _ = string.find(arg, item, start, true)
if position then if position then
return position return position
else else
return -1 return -1
end end
end end
dtrack = { channel="echo" } dtrack = { channel="echo" }
dtrack_track = { dtrack_track = {
["Swings Per Round"]="swings", ["Swings Per Round"]="swings",
["Hit Percentage"]="hitpercent", ["Hit Percentage"]="hitpercent",
["Damage Per Hit"]="dph", ["Damage Per Hit"]="dph",
["Average"]="trackedavg" ["Average"]="trackedavg"
} }
dtrack_hits = { dtrack_hits = {
["Hits"]=false, ["Hits"]=false,
["Primary Attack"]=false, ["Primary Attack"]=false,
["Second Attack"]=true, ["Second Attack"]=true,
["Third Attack"]=true, ["Third Attack"]=true,
["Fourth Attack"]=true, ["Fourth Attack"]=true,
["Fifth Attack"]=false, ["Fifth Attack"]=false,
["Sixth Attack"]=false, ["Sixth Attack"]=false,
["Dual Wield"]=true, ["Dual Wield"]=true,
["Second Dual"]=false, ["Second Dual"]=false,
["Third Dual"]=false, ["Third Dual"]=false,
["Haste Attacks"]=true, ["Haste Attacks"]=true,
["Lightspeed"]=false, ["Lightspeed"]=false,
["Unarmed"]=false ["Knife Attacks"]=true,
} ["Unarmed"]=false
--[[ dtrack swings logic ]]-- }
function isTrackedLine(argument) --[[ dtrack swings logic ]]--
return ((argument == "Tracked Spell") or (argument == "Tracked Skill")) function isTrackedLine(argument)
end return ((argument == "Tracked Spell") or (argument == "Tracked Skill"))
function returnTracked(argument) end
for index, value in pairs(dtrack_track) do function returnTracked(argument)
if index == argument then for index, value in pairs(dtrack_track) do
return value if index == argument then
end return value
end end
return -1 end
end return -1
function TRIGGER_process_dtrack_line(_, line, _, _) end
local columnone = trim(string.sub(line, returnStringPosition(":", 1, line)-12, returnStringPosition(":", 1, line)-1)) function TRIGGER_process_dtrack_line(_, line, _, _)
local columntwo = trim(string.sub(line, returnStringPosition(":", 30, line)-20, returnStringPosition(":", 30, line)-1)) local columnone = trim(string.sub(line, returnStringPosition(":", 1, line)-12, returnStringPosition(":", 1, line)-1))
if (trim(line) == "") then local columntwo = trim(string.sub(line, returnStringPosition(":", 30, line)-20, returnStringPosition(":", 30, line)-1))
return if (trim(line) == "") then
elseif (string.sub(line, 1, 1) == "-") then return
if not dtrack.regular.start then elseif (string.sub(line, 1, 1) == "-") then
dtrack.regular.start = true if not dtrack.regular.start then
elseif dtrack.regular.start then dtrack.regular.start = true
EnableTriggerGroup("dtrack_swings", false) elseif dtrack.regular.start then
reportSwings() EnableTriggerGroup("dtrack_swings", false)
end reportSwings()
elseif (isTrackedLine(trim(string.sub(line,1,13)))) then end
dtrack.regular["sname"] = trim(string.sub(line,returnStringPosition("(",1,line)+1,returnStringPosition("):",1,line)-1)) elseif (isTrackedLine(trim(string.sub(line,1,13)))) then
else dtrack.regular["sname"] = trim(string.sub(line,returnStringPosition("(",1,line)+1,returnStringPosition("):",1,line)-1))
if (returnTracked(columnone) ~= -1) then else
dnote(("@D[@GdTrack Reports@D]:@w returnTracked returned @R%s@w. The value found afterwards is @R%0.2f.@w"):format(returnTracked(columnone), tonumber(trim(string.sub(line, returnStringPosition("[", 1, line)+1, returnStringPosition("]", 1, line)-1))))) if (returnTracked(columnone) ~= -1) then
local value = ("%0.2f"):format(tonumber(trim(string.sub(line, returnStringPosition("[", 1, line)+1, returnStringPosition("]", 1, line)-1)))) dnote(("@D[@GdTrack Reports@D]:@w returnTracked returned @R%s@w. The value found afterwards is @R%0.2f.@w"):format(returnTracked(columnone), tonumber(trim(string.sub(line, returnStringPosition("[", 1, line)+1, returnStringPosition("]", 1, line)-1)))))
dtrack.regular[returnTracked(columnone)] = value local value = ("%0.2f"):format(tonumber(trim(string.sub(line, returnStringPosition("[", 1, line)+1, returnStringPosition("]", 1, line)-1))))
end dtrack.regular[returnTracked(columnone)] = value
if (returnTracked(columntwo) ~= -1) then end
dnote(("@D[@GdTrack Reports@D]:@w returnTracked returned @R%s@w. The value found afterwards is @R%0.2f.@w"):format(returnTracked(columntwo), tonumber(trim(string.sub(line, returnStringPosition("[", 30, line)+1, returnStringPosition("]", 30, line)-1))))) if (returnTracked(columntwo) ~= -1) then
local value = ("%0.2f"):format(tonumber(trim(string.sub( line, returnStringPosition("[", 30, line)+1, returnStringPosition("]", 30, line)-1)))) dnote(("@D[@GdTrack Reports@D]:@w returnTracked returned @R%s@w. The value found afterwards is @R%0.2f.@w"):format(returnTracked(columntwo), tonumber(trim(string.sub(line, returnStringPosition("[", 30, line)+1, returnStringPosition("]", 30, line)-1)))))
dtrack.regular[returnTracked(columntwo)] = value local value = ("%0.2f"):format(tonumber(trim(string.sub( line, returnStringPosition("[", 30, line)+1, returnStringPosition("]", 30, line)-1))))
end dtrack.regular[returnTracked(columntwo)] = value
end end
end end
--[[ dtrack hits logic ]]-- end
function isHitsAttack(argument) --[[ dtrack hits logic ]]--
local calculate=returnStringPosition(":",1,argument)-(returnStringPosition(":",1,argument)-1) function isHitsAttack(argument)
local command = trim(string.sub( argument, calculate, returnStringPosition(":",1,argument)-1)) local calculate=returnStringPosition(":",1,argument)-(returnStringPosition(":",1,argument)-1)
for index, value in pairs(dtrack_hits) do local command = trim(string.sub( argument, calculate, returnStringPosition(":",1,argument)-1))
if index == command then for index, value in pairs(dtrack_hits) do
return true, value, index if index == command then
end return true, value, index
end end
return false, false, index end
end return false, false, index
function returnAttackNumbers(argument) end
return returnHits(argument), returnInstincts(argument) function returnAttackNumbers(argument)
end return returnHits(argument), returnInstincts(argument)
function returnHits(argument) end
return tonumber(trim(string.sub(argument,returnStringPosition("[", 1, argument)+1,returnStringPosition("]", 1, argument)-1))) function returnHits(argument)
end return tonumber(trim(string.sub(argument,returnStringPosition("[", 1, argument)+1,returnStringPosition("]", 1, argument)-1)))
function returnInstincts(argument) end
return tonumber(trim(string.sub(argument,returnStringPosition("(Ins", 1, argument)+9,returnStringPosition(")", 1, argument)-1))) function returnInstincts(argument)
end return tonumber(trim(string.sub(argument,returnStringPosition("(Ins", 1, argument)+9,returnStringPosition(")", 1, argument)-1)))
function TRIGGER_process_hits_line(_, line, _, _) end
if (string.sub(line, 1, 1) == "-") then function TRIGGER_process_hits_line(_, line, _, _)
if not dtrack.hits.start then if (string.sub(line, 1, 1) == "-") then
dtrack.hits.start = true if not dtrack.hits.start then
elseif dtrack.hits.start then dtrack.hits.start = true
EnableTriggerGroup("dtrack_hits", false) elseif dtrack.hits.start then
reportHits() EnableTriggerGroup("dtrack_hits", false)
end reportHits()
elseif (trim(line) == "") or (not isHitsAttack(line)) then end
return -- Not a line we care about elseif (trim(line) == "") or (not isHitsAttack(line)) then
else return -- Not a line we care about
local is_attack, has_instinct, skill = isHitsAttack(line) else
if is_attack and not has_instinct then local is_attack, has_instinct, skill = isHitsAttack(line)
dtrack.hits[skill], _ = returnAttackNumbers(line) if is_attack and not has_instinct then
elseif is_attack and has_instinct then dtrack.hits[skill], _ = returnAttackNumbers(line)
dtrack.hits[skill], dtrack.hits["inst_"..skill] = returnAttackNumbers(line) elseif is_attack and has_instinct then
end dtrack.hits[skill], dtrack.hits["inst_"..skill] = returnAttackNumbers(line)
end end
end end
function returnPercent( instinct, total ) end
if (tonumber(instinct) or tonumber(total)) == nil then function returnPercent( instinct, total )
dnote( "returnPercent() cannot caluclate a percentage on the items provided." ) if (tonumber(instinct) or tonumber(total)) == nil then
return 0 dnote( "returnPercent() cannot caluclate a percentage on the items provided." )
end return 0
return (("%0.2f"):format(tonumber(instinct)/tonumber(total)*100)) end
end return (("%0.2f"):format(tonumber(instinct)/tonumber(total)*100))
function returnTotalInstinctHits() end
return (dtrack.hits["inst_Second Attack"]+dtrack.hits["inst_Third Attack"]+dtrack.hits["inst_Fourth Attack"]+dtrack.hits["inst_Dual Wield"]+dtrack.hits["inst_Haste Attacks"]) function returnTotalInstinctHits()
end return (dtrack.hits["inst_Second Attack"]+dtrack.hits["inst_Third Attack"]+dtrack.hits["inst_Fourth Attack"]+dtrack.hits["inst_Dual Wield"]+dtrack.hits["inst_Haste Attacks"]+dtrack.hits["inst_Knife Attacks"])
--[[ create report ]]-- end
function reportSwings() --[[ create report ]]--
-- Check to see if swing number was reported, if not make the entry = 0 function reportSwings()
for _, hit in pairs(dtrack_track) do -- Check to see if swing number was reported, if not make the entry = 0
if not tonumber(dtrack.regular[hit]) then for _, hit in pairs(dtrack_track) do
dnote(("reportSwings() - %s was reported as not a number. Setting it to 0."):format(hit)) if not tonumber(dtrack.regular[hit]) then
dtrack.regular[hit] = 0 dnote(("reportSwings() - %s was reported as not a number. Setting it to 0."):format(hit))
end dtrack.regular[hit] = 0
end end
local message = ("%s %s %sSwings/Round%s[%s%0.2f%s] %sHits%%%s[%s%0.2f%s] %sDPH%s[%s%0.2f%s]"):format( end
dtrack.channel, dtrack.regular.prepend, c_primary, c_dividers, c_pnumber, dtrack.regular.swings, c_dividers, c_primary, c_dividers, c_pnumber, dtrack.regular.hitpercent, c_dividers, c_primary, c_dividers, c_pnumber, dtrack.regular.dph, c_dividers) local message = ("%s %s %sSwings/Round%s[%s%0.2f%s] %sHits%%%s[%s%0.2f%s] %sDPH%s[%s%0.2f%s]"):format(
if dtrack.regular.sname then dtrack.channel, dtrack.regular.prepend, c_primary, c_dividers, c_pnumber, dtrack.regular.swings, c_dividers, c_primary, c_dividers, c_pnumber, dtrack.regular.hitpercent, c_dividers, c_primary, c_dividers, c_pnumber, dtrack.regular.dph, c_dividers)
message = ("%s %s%s%s(%s%0.2f%s)"):format(message, c_primary, dtrack.regular.sname, c_dividers, c_pnumber, dtrack.regular.trackedavg, c_dividers) if dtrack.regular.sname then
end message = ("%s %s%s%s(%s%0.2f%s)"):format(message, c_primary, dtrack.regular.sname, c_dividers, c_pnumber, dtrack.regular.trackedavg, c_dividers)
SendNoEcho( message ) end
dtrack.regular = nil SendNoEcho( message )
end dtrack.regular = nil
function reportHits() end
-- Check to see if instinct was reported, if not make the entry = 0 function reportHits()
if not tonumber(dtrack.hits["inst_Second Attack"]) then dtrack.hits["inst_Second Attack"] = 0 end -- Check to see if instinct was reported, if not make the entry = 0
if not tonumber(dtrack.hits["inst_Third Attack"]) then dtrack.hits["inst_Third Attack"] = 0 end if not tonumber(dtrack.hits["inst_Second Attack"]) then dtrack.hits["inst_Second Attack"] = 0 end
if not tonumber(dtrack.hits["inst_Fourth Attack"]) then dtrack.hits["inst_Fourth Attack"] = 0 end if not tonumber(dtrack.hits["inst_Third Attack"]) then dtrack.hits["inst_Third Attack"] = 0 end
if not tonumber(dtrack.hits["inst_Dual Wield"]) then dtrack.hits["inst_Dual Wield"] = 0 end if not tonumber(dtrack.hits["inst_Fourth Attack"]) then dtrack.hits["inst_Fourth Attack"] = 0 end
if not tonumber(dtrack.hits["inst_Haste Attacks"]) then dtrack.hits["inst_Haste Attacks"] = 0 end if not tonumber(dtrack.hits["inst_Dual Wield"]) then dtrack.hits["inst_Dual Wield"] = 0 end
-- Build command for SendNoEcho() if not tonumber(dtrack.hits["inst_Haste Attacks"]) then dtrack.hits["inst_Haste Attacks"] = 0 end
local command = ("%s %s %s%s%s(%s%d%s) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s) %s%s%s(%s%d%s) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s) %s| %sTotal Hits%s(%s%d%s/%s%d %s[%s%0.2f%%%s])"):format(dtrack.channel, dtrack.hits.prepend, c_primary, "Primary Attack", c_dividers, c_pnumber, dtrack.hits["Primary Attack"], c_dividers, c_primary, "Second Attack", c_dividers, c_pnumber, dtrack.hits["Second Attack"], c_dividers, c_inumber, dtrack.hits["inst_Second Attack"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Second Attack"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Third Attack", c_dividers, c_pnumber, dtrack.hits["Third Attack"], c_dividers, c_inumber, dtrack.hits["inst_Third Attack"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Third Attack"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Fourth Attack", c_dividers, c_pnumber, dtrack.hits["Fourth Attack"], c_dividers, c_inumber, dtrack.hits["inst_Fourth Attack"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Fourth Attack"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Dual Wield", c_dividers, c_pnumber, dtrack.hits["Dual Wield"], c_dividers, c_inumber, dtrack.hits["inst_Dual Wield"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Dual Wield"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Second Dual", c_dividers, c_pnumber, dtrack.hits["Second Dual"], c_dividers, c_primary, "Third Dual", c_dividers, c_pnumber, dtrack.hits["Third Dual"], c_dividers, c_primary, "Haste Attacks", c_dividers, c_pnumber, dtrack.hits["Haste Attacks"], c_dividers, c_inumber, dtrack.hits["inst_Haste Attacks"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Haste Attacks"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Lightspeed", c_dividers, c_pnumber, dtrack.hits["Lightspeed"], c_dividers, c_prepend, c_pnumber, c_dividers, c_pnumber, dtrack.hits["Hits"], c_dividers, c_inumber, returnTotalInstinctHits(), c_dividers, c_percent, returnPercent(returnTotalInstinctHits(), dtrack.hits["Hits"]), c_dividers ) if not tonumber(dtrack.hits["inst_Knife Attacks"]) then dtrack.hits["inst_Knife Attacks"] = 0 end
SendNoEcho( command ) -- Build command for SendNoEcho()
dtrack.hits = nil local command = ("%s %s %s%s%s(%s%d%s) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s) %s%s%s(%s%d%s) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s) %s%s%s(%s%d%s/%s%d %s[%s%0.2f%%%s]) %s%s%s(%s%d%s) %s| %sTotal Hits%s(%s%d%s/%s%d %s[%s%0.2f%%%s])"):format(dtrack.channel, dtrack.hits.prepend, c_primary, "Primary Attack", c_dividers, c_pnumber, dtrack.hits["Primary Attack"], c_dividers, c_primary, "Second Attack", c_dividers, c_pnumber, dtrack.hits["Second Attack"], c_dividers, c_inumber, dtrack.hits["inst_Second Attack"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Second Attack"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Third Attack", c_dividers, c_pnumber, dtrack.hits["Third Attack"], c_dividers, c_inumber, dtrack.hits["inst_Third Attack"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Third Attack"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Fourth Attack", c_dividers, c_pnumber, dtrack.hits["Fourth Attack"], c_dividers, c_inumber, dtrack.hits["inst_Fourth Attack"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Fourth Attack"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Dual Wield", c_dividers, c_pnumber, dtrack.hits["Dual Wield"], c_dividers, c_inumber, dtrack.hits["inst_Dual Wield"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Dual Wield"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Second Dual", c_dividers, c_pnumber, dtrack.hits["Second Dual"], c_dividers, c_primary, "Third Dual", c_dividers, c_pnumber, dtrack.hits["Third Dual"], c_dividers, c_primary, "Haste Attacks", c_dividers, c_pnumber, dtrack.hits["Haste Attacks"], c_dividers, c_inumber, dtrack.hits["inst_Haste Attacks"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Haste Attacks"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Lightspeed", c_dividers, c_pnumber, dtrack.hits["Lightspeed"], c_dividers, c_primary, "Knife Attacks", c_dividers, c_pnumber, dtrack.hits["Knife Attacks"], c_dividers, c_inumber, dtrack.hits["inst_Knife Attacks"], c_dividers, c_percent, returnPercent(dtrack.hits["inst_Knife Attacks"], dtrack.hits["Hits"] ), c_dividers, c_primary, "Unarmed", c_dividers, c_pnumber, dtrack.hits["Unarmed"], c_dividers, c_prepend, c_pnumber, c_dividers, c_pnumber, dtrack.hits["Hits"], c_dividers, c_inumber, returnTotalInstinctHits(), c_dividers, c_percent, returnPercent(returnTotalInstinctHits(), dtrack.hits["Hits"]), c_dividers )
end SendNoEcho( command )
--[[ ALIAS command ]]-- dtrack.hits = nil
function ALIAS_report(name, line, args) end
if not (args.command) then --[[ ALIAS command ]]--
cnote( "@CSyntax: @Gdreport @R<@wswings|hits@R> <@wchannel@R>@w" ) function ALIAS_report(name, line, args)
return if not (args.command) then
end cnote( "@CSyntax: @Gdreport @R<@wswings|hits@R> <@wchannel@R>@w" )
if args.command:lower() == "help" then return
DREPORT_Help() end
return if args.command:lower() == "help" then
elseif args.command:lower() == "debug" then DREPORT_Help()
Debug = not Debug return
cnote(("@D[@GdTrack Reports@D]:@w Debug mode is now %s@w."):format(Debug and "@Gon" or "@Roff")) elseif args.command:lower() == "debug" then
end Debug = not Debug
if not (args.channel) then cnote(("@D[@GdTrack Reports@D]:@w Debug mode is now %s@w."):format(Debug and "@Gon" or "@Roff"))
dtrack.channel = "echo" end
else if not (args.channel) then
dtrack.channel = args.channel dtrack.channel = "echo"
end else
if args.command:lower() == "swings" then dtrack.channel = args.channel
EnableTriggerGroup("dtrack_swings", true) end
dtrack.regular = { start=false, prepend="@C[dTrack Swings]:@w " } if args.command:lower() == "swings" then
SendNoEcho( "dtrack" ) EnableTriggerGroup("dtrack_swings", true)
elseif args.command:lower() == "hits" then dtrack.regular = { start=false, prepend="@C[dTrack Swings]:@w " }
EnableTriggerGroup("dtrack_hits", true) SendNoEcho( "dtrack" )
dtrack.hits = { start=false, prepend="@C[dTrack Hits]:@w " } elseif args.command:lower() == "hits" then
SendNoEcho( "dtrack hits" ) EnableTriggerGroup("dtrack_hits", true)
else dtrack.hits = { start=false, prepend="@C[dTrack Hits]:@w " }
DREPORT_Help() SendNoEcho( "dtrack hits" )
return else
end DREPORT_Help()
end return
--[[ Help File ]]-- end
function DREPORT_Help() end
cnote("@GdTrack Reports@w") --[[ Help File ]]--
cnote("@WUsage:@w") function DREPORT_Help()
cnote("@G dreport help @w:@W This menu@w") cnote("@GdTrack Reports@w")
cnote("@G dreport swings <channel> @w:@W Reports the 'dtrack' main screen to a channel@w") cnote("@WUsage:@w")
cnote("@G dreport hits <channel> @w:@W Reports teh 'dtrack hits' screen to a channel@w") cnote("@G dreport help @w:@W This menu@w")
Note() cnote("@G dreport swings <channel> @w:@W Reports the 'dtrack' main screen to a channel@w")
end cnote("@G dreport hits <channel> @w:@W Reports teh 'dtrack hits' screen to a channel@w")
--[[ MUSH Specific functions for saving/loading Plugin information ]]-- Note()
-- Anytime a variable (designed to save over) is modified, call SaveState() function afterwards. end
function OnPluginSaveState () --[[ MUSH Specific functions for saving/loading Plugin information ]]--
end -- function OnPluginSaveState -- Anytime a variable (designed to save over) is modified, call SaveState() function afterwards.
function OnPluginInstall () function OnPluginSaveState ()
cnote("@GdTrack Reports@w initialized. Check out 'dtrack help' for more information.@w") end -- function OnPluginSaveState
end -- function OnPluginInstall function OnPluginInstall ()
]]> cnote("@GdTrack Reports@w initialized. Check out 'dtrack help' for more information.@w")
end -- function OnPluginInstall
</script> ]]>
</muclient>
</script>
</muclient>
Loading…
Cancel
Save