Advertisement
Guest User

HUD by Revoltz v0.3

a guest
Jul 8th, 2012
2,055
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.93 KB | None | 0 0
  1. -- [[ General Info HUD by RevoltZ v0.3 ]]                              
  2.  
  3. -- [[ Settings ]]
  4. local RaphaelLibrary = false
  5.  
  6. -- [[ Botting Status by PV! ]]
  7. local showBotting = true
  8.  
  9. -- [[ Position ]]
  10. local showPosition = false
  11.  
  12. -- [[ Supplies Counter ]]
  13. local showSupplies = true
  14. local item1 = {name = "Strong Mana Potion", buy = 1200, min = 100}
  15. local item2 = {name = "Onyx Arrow", buy = 1400, min = 100}
  16. local item3 = {name = "Assassin Star", buy = 50, min = 0}
  17. local items = {item1, item2, item3}
  18.  
  19. -- [[ Supplies Wasted ]]
  20. local showSuppliesWasted = true
  21. local suppliesitems = {'strong mana potion'}
  22. local suppsvalue = {80}
  23.  
  24. -- [[ Items looted ]]
  25. local showLoots = true
  26. local lootitems = {"Gold Coin", "Platinum Coin", "Strong Health Potion", "Strong Mana Potion", "Great Health Potion", "Great Mana Potion", "Spiked Iron Ball", "Cursed Shoulder Spikes", "Corrupted Flag", "Lizard Scale", "Small Diamond", "Dragon Priest's Wandtip", "Tower Shield", "Lizard Leather", "Scale of Corruption", "Zaoan Shoes", "Zaoan Legs", "Zaoan Armor", "Zaoan Helmet", "High Guard Shoulderplates", "High Guard Flag", "Small Emerald", "Life Ring", "Small Amethyst", "Wand of Inferno", "Terra Rod", "Yellow Gem", "Zaoan Robe", "Focus Cape"}
  27. local lootsvalue = {1, 100, 0, 0, 0, 0, 100, 320, 700, 120, 300, 175, 8000, 150, 680, 5000, 14000, 14000, 45000, 130, 550, 250, 400, 200, 3000, 2000, 1000, 12000, 6000}
  28.  
  29. local myname = true -- DO NOT DISABLE, make your char stop healing :P
  30.  
  31. local fontsize = 10
  32. local fontspacing = fontsize+2
  33.  
  34. -- [[ ENGINE ]] -- do not change it below
  35.  
  36. local cont = 0
  37. local x = 5
  38. local y = 0
  39. local z = 0
  40. local totals = 0
  41. local totall = 0
  42. local total = 0
  43. local sub = 17
  44.  
  45. if clientwin.x ~= nil or clientwin.y ~= nil then
  46.    setposition(clientwin.x+13, clientwin.y+30)
  47. else
  48.    setposition(5, 20)
  49. end
  50.  
  51. setfontstyle("Tahoma", fontsize, "white")
  52. -- [[ Botting ]]
  53. if showBotting then
  54.    setfontcolor("white")
  55.    addtext('-----------------------------------------', 0, y)
  56.    setfontcolor("yellow")
  57.    y = y + 10
  58.    addtext('             [ Botting ]', 15, y)
  59.    y = y + 10
  60.    setfontcolor("white")
  61.    addtext('-----------------------------------------', 0, y)
  62.    y = y + 10
  63.    addtext('Exp Per Hour', x, y)
  64.    addtext('- ' .. exphour, 120, y)
  65.    y = y + 15
  66.    addtext('Exp Left', x, y)
  67.    addtext('- ' .. exptolevel(), 120, y)
  68.    y = y + 15
  69.    addtext('Exp Gained', x, y)
  70.    addtext('- ' .. expgained, 120, y)
  71.    y = y + 15
  72.    addtext('Time To Next Level', x, y)
  73.    addtext('- ' .. timetolevel, 120, y)
  74.    y = y + 15
  75.    addtext('Stamina', x, y)
  76.    addtext('- ', 120, y)
  77.    if stamina >= 2400 then
  78.       setfontcolor("green")
  79.    else if stamina < 2400 and (stamina > 840) then
  80.          setfontcolor("orange")
  81.       else if stamina <= 840 then
  82.          setfontcolor("red")
  83.          end
  84.       end
  85.    end
  86.    if RaphaelLibrary then
  87.       addtext(time(stamina), 130, y)
  88.    else
  89.       addtext(stamina, 130, y)
  90.    end
  91.    y = y + 15
  92.    setfontcolor("white")
  93.    addtext('Time Played', x, y)
  94.    addtext('- ' .. timehunt, 120, y)
  95.    y = y + 15
  96.    addtext('Cavebot', x, y)
  97.    addtext('- ', 120, y)
  98.    if cavebot then
  99.       setfontcolor("green")
  100.       addtext('ON', 130, y)
  101.    else
  102.       setfontcolor("red")
  103.       addtext('OFF', 130, y)
  104.    end
  105.    y = y + 15
  106.    setfontcolor("white")
  107.    addtext('- ', 120, y)
  108.    addtext('Targeting', x, y)
  109.    if targeting then
  110.       setfontcolor("green")
  111.       addtext('ON', 130, y)
  112.    else
  113.       setfontcolor("red")
  114.       addtext('OFF', 130, y)
  115.    end
  116.    y = y + 15
  117.    setfontcolor("white")
  118.    addtext('Looting', x, y)
  119.    addtext('- ', 120, y)
  120.    if looting then
  121.       setfontcolor("green")
  122.       addtext('ON', 130, y)
  123.    else
  124.       setfontcolor("red")
  125.       addtext('OFF', 130, y)
  126.    end
  127.    y = y + 15
  128.    setfontcolor("white")
  129.    addtext('Walk Through', x, y)
  130.    addtext('- ', 120, y)
  131.    if getsettings("Settings/CaveBot/Pathfinding/WalkThroughPlayers") == 'yes' then
  132.       setfontcolor("green")
  133.       addtext('ON', 130, y)
  134.    elseif getsettings("Settings/CaveBot/Pathfinding/WalkThroughPlayers") == 'no' then
  135.       setfontcolor("red")
  136.       addtext('OFF', 130, y)
  137.    else
  138.       setfontcolor("yellow")
  139.       addtext('???', 130, y)
  140.    end
  141.    y = y + 15
  142.    setfontcolor("white")
  143.    addtext('Balance', x, y)
  144.    addtext('- ', 120, y)
  145.    if balance == -1 then
  146.       addtext('?', 130, y)
  147.    else
  148.       addtext(balance, 130, y)
  149.    end
  150.    y = y + 10
  151. end
  152.  
  153. -- [[ Position ]]
  154.  
  155. if showPosition then
  156.    setfontcolor("white")
  157.    addtext('-----------------------------------------', 0, y)
  158.    setfontcolor("yellow")
  159.    y = y + 10
  160.    addtext('            [ Position ]', 15, y)
  161.    y = y + 10
  162.    setfontcolor("white")
  163.    addtext('-----------------------------------------', 0, y)
  164.    y = y + 10
  165.    addtext("Position X ", x, y)
  166.    addtext("- "..posx, 120, y)
  167.    y = y + 15
  168.    addtext("Position Y ", x, y)
  169.    addtext("- "..posy, 120, y)
  170.    y = y + 15
  171.    addtext("Position Z ", x, y)
  172.    addtext("- "..posz, 120, y)
  173.    y = y + 15
  174.    addtext("Cursor ID", x, y)
  175.    addtext('- '..cursorinfo().id, 120, y)
  176.    y = y + 10
  177. end
  178.  
  179. -- [[ Supplies ]]
  180.  
  181. if showSupplies then
  182.    setfontcolor("white")
  183.    addtext('-----------------------------------------', 0, y)
  184.    setfontcolor("yellow")
  185.    y = y + 10
  186.    addtext('            [ Supplies ]', 15, y)
  187.    y = y + 10
  188.    setfontcolor("white")
  189.    addtext('-----------------------------------------', 0, y)
  190.    y = y + 10
  191.    for i, j in pairs(items) do
  192.       if itemid(items[i].name) == ammo then
  193.          cont = itemcount(items[i].name) + ammoamount
  194.       elseif itemid(items[i].name) == weapon then
  195.          cont = itemcount(items[i].name) + weaponamount
  196.       else
  197.          cont = itemcount(items[i].name)
  198.       end
  199.       addtext(items[i].name, x, y)
  200.       addtext('-', 120, y)
  201.       if cont <= items[i].min then
  202.          setfontcolor("red")
  203.       elseif cont <= (items[i].buy/2) then
  204.          setfontcolor("yellow")
  205.       elseif cont < items[i].buy then
  206.          setfontcolor("white")
  207.       else
  208.          setfontcolor("green")
  209.       end
  210.       if itemid(items[i].name) == ammo then
  211.          addtext(cont, 130, y)
  212.       elseif itemid(items[i].name) == weapon then
  213.          addtext(cont, 130, y)
  214.       else
  215.          addtext(cont, 130, y)
  216.       end
  217.       setfontcolor("white")
  218.       y = y + 15
  219.    end
  220.    y = y - 5
  221. end
  222.  
  223. -- [[ Supplies Wasted ]]
  224.  
  225. if showSuppliesWasted then
  226.    setfontcolor("white")
  227.    addtext('-----------------------------------------', 0, y)
  228.    y = y + 10
  229.    setfontcolor("yellow")
  230.    addtext('       [ Supplies wasted ]', 15, y)
  231.    y = y + 10
  232.    setfontcolor("white")
  233.    addtext('-----------------------------------------', 0, y)
  234.    y = y + 10
  235.    local supps = getitems(unpack(suppliesitems))
  236.    local qtds = supps.count-1
  237.    for i=0,qtds do
  238.       if string.len(supps[i].name) > 17 then
  239.          addtext(string.sub((supps[i].name), 1, sub).."...", x, y)
  240.       else
  241.          addtext(supps[i].name, x, y)
  242.       end
  243.       addtext("- "..supps[i].usage.." ("..(math.floor(supps[i].usage*suppsvalue[i+1] / 100)/10).."k)", 120, y)
  244.       totals = totals + supps[i].usage*suppsvalue[i+1]
  245.       y = y + 15
  246.    end
  247.    addtext("Total", x, y)
  248.    addtext("-", 120, y)
  249.    addtext(totals.." GPs", 130, y)
  250.    y = y + 10
  251. end
  252.  
  253. -- [[ Loots ]]
  254.  
  255. if showLoots then
  256.    setfontcolor("white")
  257.    addtext('-----------------------------------------', 0, y)
  258.    setfontcolor("yellow")
  259.    y = y + 10
  260.    addtext('         [ Items looted ]', 15, y)
  261.    y = y + 10
  262.    setfontcolor("white")
  263.    addtext('-----------------------------------------', 0, y)
  264.    y = y + 10
  265.    local loots = getitems(unpack(lootitems))
  266.    local qtdl = loots.count-1
  267.    for i=0,qtdl do
  268.       if loots[i].loot > 0 then
  269.          if string.len(loots[i].name) > 17 then
  270.             addtext(string.sub(loots[i].name, 1, sub).."..", x, y)
  271.          else
  272.             addtext(loots[i].name, x, y)
  273.          end
  274.          addtext("- "..loots[i].loot.." ("..(math.floor(loots[i].loot*lootsvalue[i+1] / 100)/10).."k)", 120, y)
  275.          totall = totall + loots[i].loot*lootsvalue[i+1]
  276.          y = y + 15
  277.       end
  278.    end
  279.    addtext("Total", x, y)
  280.    addtext("-", 120, y)
  281.    addtext(totall.." GPs", 130, y)
  282.    y = y + 10
  283. end
  284.  
  285. if showSuppliesWasted and showLoots then
  286.    setfontcolor("white")
  287.    addtext('-----------------------------------------', 0, y)
  288.    y = y + 10
  289.    total = totall - totals
  290.    if totall-totals > 0 then
  291.       setfontcolor("green")
  292.       addtext("PROFIT:", x, y)
  293.    else
  294.       setfontcolor("red")
  295.       addtext("WASTE:", x, y)
  296.    end
  297.    setfontcolor("white")
  298.    addtext(total.." GPs ("..(math.floor((total/(tosec(timehunt)/3600))/100)/10).."k/h)", x + 50, y)
  299.    y = y + 10
  300. end
  301.  
  302. setfontcolor("white")
  303. addtext('-----------------------------------------', 0, y)
  304. if myname then
  305.    setfontcolor("yellow")
  306.    y = y + 10
  307.    addtext('          [ HUD by RevoltZ ]', 5, y)
  308.    y = y + 10
  309.    setfontcolor("white")
  310.    addtext('-----------------------------------------', 0, y)
  311. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement