Hello, how can you turn this script into one showing me whats the highest hit dealt on me, and due to whom.
The script is a total copy of one regaring a max hit counter.
Code:
init start
local BEST_HIT = {
POSITION = {$clientwin.left + 10, $worldwin.top - 55},
-- do not edit below
BEST = 0,
CREATURE = ""
}
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local messageDealt = {m.content:match(REGEX_DMG_DEALT)}
if unpack(messageDealt) then
if tonumber(messageDealt[2]) > BEST_HIT.BEST then
BEST_HIT.BEST = tonumber(messageDealt[2])
BEST_HIT.CREATURE = messageDealt[1]
end
end
end
end
if BEST_HIT.BEST == 0 then
drawtext('Best hit: -')
else
setfontcolor(BEST_HIT_FONT.white)
drawtext(BEST_HIT.BEST .. ' to ' .. string.capitalizeall(BEST_HIT.CREATURE), BEST_HIT.POSITION[1] + 37)
end
03-13-2015, 10:47 PM
mistgun
Quote:
Originally Posted by popolord
Hello, how can you turn this script into one showing me whats the highest hit dealt on me, and due to whom.
The script is a total copy of one regaring a max hit counter.
Code:
init start
local BEST_HIT = {
POSITION = {$clientwin.left + 10, $worldwin.top - 55},
-- do not edit below
BEST = 0,
CREATURE = ""
}
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local messageDealt = {m.content:match(REGEX_DMG_DEALT)}
if unpack(messageDealt) then
if tonumber(messageDealt[2]) > BEST_HIT.BEST then
BEST_HIT.BEST = tonumber(messageDealt[2])
BEST_HIT.CREATURE = messageDealt[1]
end
end
end
end
im so suck at huds but i've found free time today and did some extra shit.
init start
local BestHit = {
Position = {300, 10},
CharName = function() return $name end,
-- do not edit below :)
Best = 0,
Taken = 0,
Creature = "",
Attacker = ""
}
local showTimers = true -- will show time from last best damages
local showLast = true -- if true then it will show timer of last any damage, otherwise it will show time of best given/taken
local lastTaken, lastDealt = $timems, $timems
local Timer = {
Dealt = function() return timeshort($timems - lastDealt) end,
Taken = function() return timeshort($timems - lastTaken) end
}
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local creatureName, damageDealt = m.content:match(REGEX_DMG_DEALT)
local damageTaken, _, creName = m.content:match(REGEX_DMG_TAKEN)
if damageDealt then
if showLast then
lastDealt = $timems
end
if tonumber(damageDealt) > BestHit.Best then
BestHit.Best = tonumber(damageDealt)
BestHit.Creature = creatureName
lastDealt = $timems
end
elseif damageTaken then
if showLast then
lastTaken = $timems
end
if tonumber(damageTaken) > BestHit.Taken then
BestHit.Taken = tonumber(damageTaken)
BestHit.Attacker = creName
lastTaken = $timems
end
end
end
end
if BestHit.Taken ~= 0 then
setfontcolor(Colors.BestHitTimerColor)
drawtext(Timer.Taken(), 285, BestHit.Position[2] + 42)
end
end
03-17-2015, 01:53 AM
popolord
thats was insane, i cannot find a proper way to thank you, id buy you a sandwich lmao, but i cannot.
thank you very much
03-17-2015, 01:58 AM
popolord
im sorry, but on the best hit already,
omg im such an asker :D
instead of the best hit already>"when:" can it show how much time has gone since the LAST bloodhit?, not since the last max hit
i love you
ps:i love you
ps2: thanks alot
03-17-2015, 01:13 PM
mistgun
Quote:
Originally Posted by popolord
im sorry, but on the best hit already,
omg im such an asker :D
instead of the best hit already>"when:" can it show how much time has gone since the LAST bloodhit?, not since the last max hit
i love you