|
|
|
@ -29,8 +29,17 @@
|
|
|
|
|
<![CDATA[
|
|
|
|
|
--[[ External Resources ]]--
|
|
|
|
|
dofile(GetInfo(60) .. "aardwolf_colors.lua") -- Used to support Aard Colors for the cnote() function
|
|
|
|
|
-- Basic print function that supports aard, xterm, and ANSI color codes [idea from Durel's Inventory script]
|
|
|
|
|
-- Script Global variables
|
|
|
|
|
Debug = false
|
|
|
|
|
-- Define Colors
|
|
|
|
|
c_dividers = "@w"
|
|
|
|
|
c_primary = "@G"
|
|
|
|
|
c_pnumber = "@W"
|
|
|
|
|
c_inumber = "@Y"
|
|
|
|
|
c_percent = "@R"
|
|
|
|
|
c_prepend = "@C"
|
|
|
|
|
|
|
|
|
|
-- Basic print function that supports aard, xterm, and ANSI color codes [idea from Durel's Inventory script]
|
|
|
|
|
function cnote(string)
|
|
|
|
|
AnsiNote(stylesToANSI(ColoursToStyles(string)))
|
|
|
|
|
end
|
|
|
|
@ -169,17 +178,10 @@ function reportSwings()
|
|
|
|
|
dtrack.regular[hit] = 0
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local message = ("%s %s Swings/Round[%0.2f] Hits%%[%0.2f] DPH[%0.2f]"):format(
|
|
|
|
|
dtrack.channel,
|
|
|
|
|
dtrack.regular.prepend,
|
|
|
|
|
dtrack.regular.swings,
|
|
|
|
|
dtrack.regular.hitpercent,
|
|
|
|
|
dtrack.regular.dph)
|
|
|
|
|
dnote( message )
|
|
|
|
|
local message = ("%s %s %sSwings/Round%s[%s%0.2f%s] %sHits%%%s[%s%0.2f%s] %sDPH%s[%s%0.2f%s]"):format(
|
|
|
|
|
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)
|
|
|
|
|
if dtrack.regular.sname then
|
|
|
|
|
message = ("%s %s(%0.2f)"):format(message, dtrack.regular.sname, dtrack.regular.trackedavg)
|
|
|
|
|
dnote( message )
|
|
|
|
|
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)
|
|
|
|
|
end
|
|
|
|
|
SendNoEcho( message )
|
|
|
|
|
dtrack.regular = nil
|
|
|
|
@ -192,7 +194,7 @@ function reportHits()
|
|
|
|
|
if not tonumber(dtrack.hits["inst_Dual Wield"]) then dtrack.hits["inst_Dual Wield"] = 0 end
|
|
|
|
|
if not tonumber(dtrack.hits["inst_Haste Attacks"]) then dtrack.hits["inst_Haste Attacks"] = 0 end
|
|
|
|
|
-- Build command for SendNoEcho()
|
|
|
|
|
local command = ("%s %s %s(%d) %s(%d/%d [%0.2f%%]) %s(%d/%d [%0.2f%%]) %s(%d/%d [%0.2f%%]) %s(%d/%d [%0.2f%%]) %s(%d) %s(%d) %s(%d/%d [%0.2f%%]) %s(%d) | Total Hits(%d/%d [%0.2f%%])"):format( dtrack.channel, dtrack.hits.prepend, "Primary Attack", dtrack.hits["Primary Attack"], "Second Attack", dtrack.hits["Second Attack"], dtrack.hits["inst_Second Attack"], returnPercent(dtrack.hits["inst_Second Attack"], dtrack.hits["Hits"] ), "Third Attack", dtrack.hits["Third Attack"], dtrack.hits["inst_Third Attack"], returnPercent(dtrack.hits["inst_Third Attack"], dtrack.hits["Hits"] ), "Fourth Attack", dtrack.hits["Fourth Attack"], dtrack.hits["inst_Fourth Attack"], returnPercent(dtrack.hits["inst_Fourth Attack"], dtrack.hits["Hits"] ), "Dual Wield", dtrack.hits["Dual Wield"], dtrack.hits["inst_Dual Wield"], returnPercent(dtrack.hits["inst_Dual Wield"], dtrack.hits["Hits"] ), "Second Dual", dtrack.hits["Second Dual"], "Third Dual", dtrack.hits["Third Dual"], "Haste Attacks", dtrack.hits["Haste Attacks"], dtrack.hits["inst_Haste Attacks"], returnPercent(dtrack.hits["inst_Haste Attacks"], dtrack.hits["Hits"] ), "Lightspeed", dtrack.hits["Lightspeed"], dtrack.hits["Hits"], returnTotalInstinctHits(), returnPercent(returnTotalInstinctHits(), dtrack.hits["Hits"]) )
|
|
|
|
|
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 )
|
|
|
|
|
SendNoEcho( command )
|
|
|
|
|
dtrack.hits = nil
|
|
|
|
|
end
|
|
|
|
@ -216,11 +218,11 @@ function ALIAS_report(name, line, args)
|
|
|
|
|
end
|
|
|
|
|
if args.command:lower() == "swings" then
|
|
|
|
|
EnableTriggerGroup("dtrack_swings", true)
|
|
|
|
|
dtrack.regular = { start=false, prepend="[dTrack Swings]: " }
|
|
|
|
|
dtrack.regular = { start=false, prepend="@C[dTrack Swings]:@w " }
|
|
|
|
|
SendNoEcho( "dtrack" )
|
|
|
|
|
elseif args.command:lower() == "hits" then
|
|
|
|
|
EnableTriggerGroup("dtrack_hits", true)
|
|
|
|
|
dtrack.hits = { start=false, prepend="[dTrack Hits]: " }
|
|
|
|
|
dtrack.hits = { start=false, prepend="@C[dTrack Hits]:@w " }
|
|
|
|
|
SendNoEcho( "dtrack hits" )
|
|
|
|
|
else
|
|
|
|
|
DREPORT_Help()
|
|
|
|
|