Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[v0.1] Hunting Hud (Check your profit!)
#11
getting this error on my mage but not on my ek

any ideas?

13:36:17 - Core:Lua:ExecuteScript
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />oString:Hud01: 177: invalid arguments to method call
Reply

#12
Hello.

Did you made any changes on the script? Then post it here.
Reply

#13
nothing at all/. copied it directly from here and pasted into the script in HUD

Any chance i could get a simple 'supplies used' hud. dont care about profit.
The bot doesnt have an easy way to track how many supplies are left so its hard to know when to restock
Cheers
Reply

#14
Hello.

You can actually use itemcount to count supplies and openitem() to open next bps then reopen after all, so you can count exactly how many supplies you got.

Try this code. If this doesn't works then post the code that you are using.
--[[
      OTHER ITEMS
Those TABLES/LISTS must contain items that are not on healer, targeting or lootlist that you also want to be showed up on HUD.
Notice that it will not make Classictibia Bot count such items, but only display on this HUD.

To count different items, you will need to such the following functions:
--addhudloot(string item) [void]: Add (+1) an item's count to loot's counter.
--sethudloot(string item, number count) [void]: Set an item's count to loot's counter.
--addhuddropped(string item) [void]: Add (+1) an item's count to droppeds' counter.
--sethuddropped(string item, number count) [void]: Add an item's count to droppeds' counter.
--addhudsupply(string item) [void]: Add (+1) an item's count to supplies' counter.
--sethudsupply(string item, number count) [void]: Set an item's count to supplies' counter.
Functions & Variables' thread:
|Only Registered members can see download links. | Click here to buy subscription or here to register.

--]]

local OTHER_SUPPLIES_ITEMS = { 'hunting arrow' }
local OTHER_LOOTED_ITEMS = { '' }
local OTHER_DROPPED_ITEMS = { '' }

------------- Item's price ---------------
local itemsPrice = {
  [2148] = 1, --gold coin
  [2464] = 70 , --chain armor
  [2525] = 100, --dwarven shield
  [2378] = 80, --battle axe
  [2455] = 160, --crossbow
  [2483] = 75, --scale armor
  [2417] = 120, --battle hammer
  [2387] = 260, -- double axe
  [2457] = 293, -- steel helmet
  [2150] = 200, -- small amethyst
  [2513] = 95, -- battle shield
  [2376] = 25, -- sword
  [2398] = 30, -- mace
  [2543] = 1, -- bolt
  [3152] = 1, -- hunting bolt
  [2273] = 150, --ultimate healing rune
}

--------------- START VARS ---------------

local clientwindow = { left = 0, top = 0 }

setfontcolor('white')
setpen('black', 2)

local yPos = 65

------------- Hunt Informations ---------------


setfillcolor('#3d79b2')
addrect(clientwindow.left + 5, yPos, 190, 20)
addtextstroke('Hunt Information\'s', clientwindow.left + 45, yPos + 2)
yPos = yPos + 22

local timeHunting = runningtime()
if timeHunting > 0 then
  addtextstroke('Hunting time: ' .. string.format("%.2d:%.2d:%.2d", timeHunting/(60*60), timeHunting/60%60, timeHunting%60) .. ' hours', clientwindow.left + 15, yPos)
else
  addtextstroke('Hunting time: 00:00:00', clientwindow.left + 15, yPos)
end
yPos = yPos + 20

addtextstroke('Exp gained: ' .. format(expgained()) .. ' (' .. format(exphour()) .. ' k/h)', clientwindow.left + 15, yPos)
yPos = yPos + 20

------------- Supplies ---------------

setfillcolor('#3d79b2')
addrect(clientwindow.left + 5, yPos, 190, 20)
addtextstroke('Used Supplies', clientwindow.left + 55, yPos + 2)

yPos = yPos + 22

local usedSupplies = getsupplyitems()
local TOTAL_SUPPLY_ITEMS = 0
local TOTAL_SUPPLY_WORTH = 0

setfontstyle('Tahoma', 10, 'B')
setfontcolor('#D2B48C')

for _, supply in ipairs(usedSupplies) do

  ITEM_SUPPLY_QUANTITY = supply.count
  if ITEM_SUPPLY_QUANTITY > 0 then
      ITEM_VALUE = itemsPrice[supply.id] or 0
      ITEM_SUPPLY_WORTH = ITEM_VALUE * ITEM_SUPPLY_QUANTITY

      TOTAL_SUPPLY_ITEMS = TOTAL_SUPPLY_ITEMS + ITEM_SUPPLY_QUANTITY
      TOTAL_SUPPLY_WORTH = TOTAL_SUPPLY_WORTH + ITEM_SUPPLY_WORTH
      local item_name = supply.name
      if item_name == '' then
          item_name = itemname(supply.id):gsub("^%l", string.upper)
      else
          item_name = item_name:gsub("^%l", string.upper)
      end

      addtextstroke(item_name .. ': ' .. format(supply.count) .. ' (' .. string.format("%.2f", (ITEM_SUPPLY_WORTH / 100) / 10) .. 'K)', clientwindow.left + 15, yPos)
      yPos = yPos + 20
  end
end
for _, itemSupply in ipairs(OTHER_SUPPLIES_ITEMS) do
  local supplyId = itemid(itemSupply)
  ITEM_SUPPLY_QUANTITY = gethudsupply(supplyId)
  if ITEM_SUPPLY_QUANTITY > 0 then
      ITEM_VALUE = itemsPrice[supplyId] or 0
      ITEM_SUPPLY_WORTH = ITEM_VALUE * ITEM_SUPPLY_QUANTITY

      TOTAL_SUPPLY_ITEMS = TOTAL_SUPPLY_ITEMS + ITEM_SUPPLY_QUANTITY
      TOTAL_SUPPLY_WORTH = TOTAL_SUPPLY_WORTH + ITEM_SUPPLY_WORTH

      local item_name = itemname(itemSupply):gsub("^%l", string.upper)

      addtextstroke(item_name .. ': ' .. format(ITEM_SUPPLY_QUANTITY) .. ' (' .. string.format("%.2f", (ITEM_SUPPLY_WORTH / 100) / 10) .. 'K)', clientwindow.left + 15, yPos)
      yPos = yPos + 20
  end
end

if TOTAL_SUPPLY_ITEMS == 0 then
  addtextstroke('-none-', clientwindow.left + 15, yPos)
  yPos = yPos + 20
else
  setfontcolor('#FFFFFF')
  addtextstroke('Total: ' .. TOTAL_SUPPLY_ITEMS .. ' items' .. ' (' .. string.format("%.2f", (TOTAL_SUPPLY_WORTH / 100) / 10) .. 'K)', clientwindow.left + 15, yPos)
  yPos = yPos + 20
end


------------- Loots ---------------
setfillcolor('#3eb27a')
setfontcolor('#FFFFFF')
addrect(clientwindow.left + 5, yPos, 190, 20)
addtextstroke('Looted Items', clientwindow.left + 55, yPos + 2)

yPos = yPos + 22

local lootItems = getlootitems()
local TOTAL_LOOTED_ITEMS = 0
local TOTAL_LOOTED_WORTH = 0

setfontstyle('Tahoma', 10, 'B')
setfontcolor('#D2B48C')

for _, loot in ipairs(lootItems) do

  ITEM_LOOTED_QUANTITY = loot.count
  if ITEM_LOOTED_QUANTITY > 0 then
      ITEM_VALUE = itemsPrice[loot.id] or 0
      ITEM_LOOTED_WORTH = ITEM_VALUE * ITEM_LOOTED_QUANTITY

      TOTAL_LOOTED_ITEMS = TOTAL_LOOTED_ITEMS + ITEM_LOOTED_QUANTITY
      TOTAL_LOOTED_WORTH = TOTAL_LOOTED_WORTH + ITEM_LOOTED_WORTH

      local item_name = loot.name
      if item_name == '' then
          item_name = itemname(loot.id):gsub("^%l", string.upper)
      else
          item_name = item_name:gsub("^%l", string.upper)
      end

      addtextstroke(item_name .. ' (' .. loot.id .. '): ' .. format(loot.count) .. ' (' .. string.format("%.2f", (ITEM_LOOTED_WORTH / 100) / 10) .. 'K)', clientwindow.left + 15, yPos)
      yPos = yPos + 20
  end
end
for _, itemLoot in ipairs(OTHER_LOOTED_ITEMS) do

  local lootId = itemid(itemLoot)
  ITEM_LOOTED_QUANTITY = gethudloot(lootId)
  if ITEM_LOOTED_QUANTITY > 0 then
      ITEM_VALUE = itemsPrice[lootId] or 0
      ITEM_LOOTED_WORTH = ITEM_VALUE * ITEM_LOOTED_QUANTITY

      TOTAL_LOOTED_ITEMS = TOTAL_LOOTED_ITEMS + ITEM_LOOTED_QUANTITY
      TOTAL_LOOTED_WORTH = TOTAL_LOOTED_WORTH + ITEM_LOOTED_WORTH

      local item_name = itemLoot
      if type(item_name) == 'number' then
        item_name = itemname(itemLoot):gsub("^%l", string.upper)
      end
      item_name = item_name:gsub("^%l", string.upper)

      addtextstroke(item_name .. ' (' .. lootId .. '): ' .. format(ITEM_LOOTED_QUANTITY) .. ' (' .. string.format("%.2f", (ITEM_LOOTED_WORTH / 100) / 10) .. 'K)', clientwindow.left + 15, yPos)
      yPos = yPos + 20
  end
end

if TOTAL_LOOTED_ITEMS == 0 then
  addtextstroke('-none-', clientwindow.left + 15, yPos)
  yPos = yPos + 20
else
  setfontcolor('#FFFFFF')
  addtextstroke('Total: ' .. TOTAL_LOOTED_ITEMS .. ' items' .. ' (' .. string.format("%.2f", (TOTAL_LOOTED_WORTH / 100) / 10) .. 'K)', clientwindow.left + 15, yPos)
  yPos = yPos + 20
end

------------- Dropped ---------------
setfillcolor('#f7886f')
setfontcolor('#FFFFFF')
addrect(clientwindow.left + 5, yPos, 190, 20)
addtextstroke('Dropped Items', clientwindow.left + 55, yPos + 2)

yPos = yPos + 22

local droppedItems = getdroppeditems()
local TOTAL_DROPPED_ITEMS = 0
local TOTAL_DROPPED_WORTH = 0

setfontstyle('Tahoma', 10, 'B')
setfontcolor('#D2B48C')

for _, dropped in ipairs(droppedItems) do
  ITEM_DROPPED_QUANTITY = dropped.count
  if ITEM_DROPPED_QUANTITY > 0 then
      ITEM_VALUE = itemsPrice[dropped.id] or 0
      ITEM_DROPPED_WORTH = ITEM_VALUE * ITEM_DROPPED_QUANTITY

      TOTAL_DROPPED_ITEMS = TOTAL_DROPPED_ITEMS + ITEM_DROPPED_QUANTITY
      TOTAL_DROPPED_WORTH = TOTAL_DROPPED_WORTH + ITEM_DROPPED_WORTH

      local item_name = dropped.name
      if item_name == '' then
          item_name = itemname(dropped.id):gsub("^%l", string.upper)
      else
          item_name = item_name:gsub("^%l", string.upper)
      end

      addtextstroke(item_name .. ' (' .. dropped.id .. '): ' .. format(ITEM_DROPPED_QUANTITY) .. ' (' .. string.format("%.2f", (ITEM_DROPPED_WORTH / 100) / 10) .. 'K)', clientwindow.left + 15, yPos)
      yPos = yPos + 20
  end
end
for _, itemDropped in ipairs(OTHER_DROPPED_ITEMS) do

  local droppedId = itemid(itemLoot)
  ITEM_DROPPED_QUANTITY = gethuddropped(droppedId)
  if ITEM_DROPPED_QUANTITY > 0 then
      ITEM_VALUE = itemsPrice[droppedId] or 0
      ITEM_DROPPED_WORTH = ITEM_VALUE * ITEM_DROPPED_QUANTITY

      TOTAL_DROPPED_ITEMS = TOTAL_DROPPED_ITEMS + ITEM_DROPPED_QUANTITY
      TOTAL_DROPPED_WORTH = TOTAL_DROPPED_WORTH + ITEM_DROPPED_WORTH

      local item_name = itemname(dropped.id):gsub("^%l", string.upper)


      addtextstroke(item_name .. ' (' .. droppedId .. '): ' .. format(ITEM_DROPPED_QUANTITY) .. ' (' .. string.format("%.2f", (ITEM_DROPPED_WORTH / 100) / 10) .. 'K)', clientwindow.left + 15, yPos)
      yPos = yPos + 20
  end
end

if TOTAL_DROPPED_ITEMS == 0 then
  addtextstroke('-none-', clientwindow.left + 15, yPos)
  yPos = yPos + 20
else
  setfontcolor('#FFFFFF')
  addtextstroke('Total: ' .. TOTAL_DROPPED_ITEMS .. ' items' .. ' (' .. string.format("%.2f", (TOTAL_DROPPED_WORTH / 100) / 10) .. 'K)', clientwindow.left + 15, yPos)
  yPos = yPos + 20
end

setfontstyle('Tahoma', 10, 'B')
local HUNT_CALC = TOTAL_DROPPED_WORTH + TOTAL_LOOTED_WORTH - TOTAL_SUPPLY_WORTH
local HUNT_CALC_K = string.format("%.2f", (HUNT_CALC / 100) / 10)
if HUNT_CALC >= 0 then
  setfontcolor('#3cb231')
  addtextstroke('PROFIT: ' .. HUNT_CALC_K .. 'K (' .. string.format("%.2f", ((((HUNT_CALC * 3600) / runningtime()) / 100) / 10)) .. ' Ks/H)', clientwindow.left + 15, yPos)
else
  setfontcolor('#b23131')
  addtextstroke('WASTE: ' .. HUNT_CALC_K .. 'K (' .. string.format("%.2f", ((((HUNT_CALC * 3600) / runningtime()) / 100) / 10)) .. ' Ks/H)', clientwindow.left + 15, yPos)
end
yPos = yPos + 20
Reply

#15
that one seems to be working. how do you reset it?
Reply

#16
resethud() [void]: Reset entire HUD. Which means running time, looted items, dropped items and supplies.
resethudloot() [void]: Reset looted items.
resethudsupply() [void]: Reset supplies.
resethuddropped() [void]: Reset dropped items.
resetrunningtime() [void]: Reset running time.
resetexp() [void]: Reset exp hour calculator.
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#17
where do you do that though?
Reply

#18
Hello.

That depends on you. If you wanna clear hud after refilling or so. This will work on any tool that runs lua script.
Reply

#19
what if i just want to do it manually? like when i start the bot running?

|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#20
Create a hotkey on Hotkeys tab, setup as LUA Script and run the functions according what you wanna reset.
Or just run on Console.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016