It'll show the amount of killed monsters selected on your screen and the totals.
Configuration
To configurate this script simply use the right mouse click, this will open a menu with all the options available.
Show All: Show all the monsters in a separated line.
Show Total Only: Show the total amount of monsters only.
Reset Monsters: This will set all monsters killed amount to 0. If you're using killCount by Raphael, it'll reset all the monsters on your database too.
Reset Timer: Restarts the timer.
Reset Both: Resets both timer and monsters.
Add Monster: This will ask for a monster name and will add its amount on the display.
Remove Monster: This will remove a monster name and its information from the display, this doesn't restart the count of the monster.
Scan Targeting: This will pick all the monsters from your targeting list and insert on the display. This will remove any custom monster you inserted with Add Monster option.
local tempPos = $chardb:getvalue('TaskHelper', 'Position')
if tempPos then
tempPos = tempPos:explode(":")
hud.pos = {tonumber(tempPos[1]), tonumber(tempPos[2])}
end
TaskHelper.Monsters = {}
if not $chardb:getvalue("TaskHelper", "Monsters") then
foreach settingsentry e 'Targeting/Creatures' do
local mname = get(e, 'Name')
table.insert(TaskHelper.Monsters, mname:lower())
end
table.sort(TaskHelper.Monsters)
$chardb:setvalue("TaskHelper", "Monsters", table.tostring(TaskHelper.Monsters))
else
TaskHelper.Monsters = $chardb:getvalue("TaskHelper", "Monsters"):totable()
end
function inputevents(e)
if e.type == IEVENT_MMOUSEDOWN then
hud.moving, hud.aux = true, {$cursor.x - hud.pos[1], $cursor.y - hud.pos[2]}
end
if e.type == IEVENT_MMOUSEUP then
hud.moving = false
$chardb:setvalue('TaskHelper', 'Position', table.concat(hud.pos, ':'))
end
if e.type == IEVENT_RMOUSEUP then
requestmenu(0)
requestmenuitem(tern(TaskHelper.ShowAll, "Show Total Only", "Show All"))
requestmenuitem("Reset Timer")
requestmenuitem("Reset Monsters")
requestmenuitem("Reset Both")
requestmenuitem("Add Monster")
requestmenuitem("Remove Monster")
requestmenuitem("Scan Targeting")
end
if e.type == IEVENT_REQUESTMENU then
if e.value1 == 0 then
if e.value2 == 'Show Total Only' or e.value2 == 'Show All' then
TaskHelper.ShowAll = not TaskHelper.ShowAll
end
if e.value2 == 'Reset Timer' or e.value2 == 'Reset Both' then
$chardb:setvalue("TaskHelper", "Timer", tosec(os.date("%X")))
end
if e.value2 == 'Reset Monsters' or e.value2 == 'Reset Both' then
for k, v in pairs(TaskHelper.Monsters) do
$chardb:setvalue('TH MonstersKilled', v, 0)
if killCount then
killCount.set(0, v)
end
end
end
if e.value2 == 'Scan Targeting' then
TaskHelper.Monsters = {}
foreach settingsentry e 'Targeting/Creatures' do
local mname = get(e, 'Name')
if not table.find(TaskHelper.Monsters, mname:lower()) then
table.insert(TaskHelper.Monsters, mname:lower())
end
end
table.sort(TaskHelper.Monsters)
$chardb:setvalue("TaskHelper", "Monsters", table.tostring(TaskHelper.Monsters))
end
if e.value2 == 'Add Monster' then
requesttext(1, 'Name the monster you want to add:')
end
if e.value2 == 'Remove Monster' then
requestmenu(2)
for _, v in pairs(TaskHelper.Monsters) do
requestmenuitem(v:capitalizeall())
end
end
end
if e.value1 == 2 then
local t = table.find(TaskHelper.Monsters, e.value2:lower())
if t then
table.remove(TaskHelper.Monsters, t)
$chardb:setvalue("TaskHelper", "Monsters", table.tostring(TaskHelper.Monsters))
end
end
end
if e.type == IEVENT_REQUESTTEXT then
if e.value1 == 1 then
if not table.find(TaskHelper.Monsters, e.value2:lower()) then
table.insert(TaskHelper.Monsters, e.value2:lower())
$chardb:setvalue("TaskHelper", "Monsters", table.tostring(TaskHelper.Monsters))
end
end
end
end
local tempTime = tosec(os.date("%X"))
if $chardb:getvalue("TaskHelper", "Timer") then
if tempTime - $chardb:getvalue("TaskHelper", "Timer") >= 293^2 then
$chardb:setvalue("TaskHelper", "Timer", tempTime)
end
else
$chardb:setvalue("TaskHelper", "Timer", tempTime)
end
if hud.moving then
auto(10)
hud.pos = {$cursor.x - hud.aux[1], $cursor.y - hud.aux[2]}
end
if killCount and killCount.lastRan <= 10000 then
foreach $chardb:sectionvalue sec 'TH MonstersKilled' do
$chardb:setvalue('TH MonstersKilled', sec.name, killCount.get(sec.name))
end
else
foreach newmessage m do
if m.type == MSG_INFO then
local monster = m.content:match("Loot of a?n? (.+): .-")
if monster then
monster = (monster:match("the (.+)") or monster):lower()
$chardb:setvalue('TH MonstersKilled', monster, ($chardb:getvalue('TH MonstersKilled', monster) or 0) + 1)
end
end
end
end
local Total, Line = 0, 0
local msg = "TASK HELPER"
local strwidth, strheight = measurestring(msg)
hud.width, hud.height = math.max(hud.width, strwidth or 0), math.max(hud.height, strheight or 0)
Lol, i started this script and somehow my windbot stopped responding, i mean, it kept working but i couldnt click inside the bot, the UI of the bot was inoperative
01-06-2015, 11:36 PM
Leonardo
Fixed problem with negative values.
The crashes are something by far unfixable, it's a Windows problem. If you have the crash or bot doesn't responding problem please drawback to v2.x.x