Xinum
Never Give Up!
- Joined
- Dec 23, 2009
- Messages
- 578
- Reaction score
- 66
Professional HUD by MoS
Code:
local function addbordertext(text, color, xpos, ypos)
setfontcolor(rgbcolor(1, 1, 1))
addtext(text, xpos+1, ypos)
addtext(text, xpos-1, ypos)
addtext(text, xpos, ypos+1)
addtext(text, xpos, ypos-1)
setfontcolor(color)
addtext(text, xpos, ypos)
end
function addcommas(amount)
local formated = amount
while true do
formated, k = string.gsub(formated, "^(-?%d+)(%d%d%d)", '%1.%2')
if (k==0) then
break
end
end
return formated
end
function formatstaminaintotime(staminaAmount)
if staminaAmount == 0 then
return "00:00"
else
local nHours = string.format("%02.f", math.floor(staminaAmount/60))
local nMins = string.format("%02.f", math.floor(staminaAmount - (nHours*60)))
return nHours..":"..nMins
end
end
local walkthroughplayers = getsettings("Settings/CaveBot/Pathfinding/WalkThroughPlayers")
local yellow = rgbcolor(230, 255, 4)
local firstcolor = rgbcolor(127, 176, 219)
local white = rgbcolor(255, 255, 255)
local title = rgbcolor(207,181,43)
local green = rgbcolor(42, 156, 59)
local red = rgbcolor(216, 20, 23)
local orange = rgbcolor(255, 180, 4)
setposition(clientwin.left+10, worldwin.top+22)
addbordertext('CULTS - YALAHAR', title, 5,20)
addbordertext("CHARACTER INFO", orange, 5, 50)
addbordertext('Current Level', firstcolor, 5, 75)
addbordertext('Total Experience', firstcolor, 5, 91)
addbordertext('Health Points', firstcolor, 5, 107)
addbordertext('Mana Points', firstcolor, 5, 123)
addbordertext('Stamina', firstcolor, 5, 139)
addbordertext('Bank Balance', firstcolor, 5, 155)
addbordertext('Cursor ID', firstcolor, 5, 171)
addbordertext(': ' ..level, white, 140, 75)
addbordertext(': ' ..addcommas(exp), white, 140, 91)
addbordertext(': ' .. hp, white, 140, 107) addbordertext('/ ' .. maxhp, white, 180, 107)
addbordertext(': ' .. mp, white, 140, 123) addbordertext('/ ' .. maxmp, white, 180, 123)
if stamina >= 2400 then
addbordertext(': ' ..formatstaminaintotime(stamina), green, 140, 139)
elseif stamina < 2400 and stamina >= 840 then
addbordertext(': ' ..formatstaminaintotime(stamina), orange, 140, 139)
elseif stamina <= 840 then
addbordertext(': ' ..formatstaminaintotime(stamina), red, 140, 139)
end
addbordertext(': ' ..addcommas(balance), white, 140, 155)
addbordertext(': ' ..(cursorinfo().id), white, 140, 171)
addbordertext("BOTTING INFO", orange, 5, 196)
addbordertext('Exp/Hour (BOT)', firstcolor, 5, 221)
addbordertext('Exp/Hour (TIBIA)', firstcolor, 5, 237)
addbordertext('Experience Left', firstcolor, 5, 253)
addbordertext('Experience Today', firstcolor, 5, 269)
addbordertext('Time to Next Level', firstcolor, 5, 285)
addbordertext('Played Time', firstcolor, 5, 301)
addbordertext(': ' ..addcommas(exphour), white, 140, 221)
addbordertext(': ' ..addcommas(tibiaexphour), white, 140, 237)
addbordertext(': ' ..addcommas(exptolevel()), white, 140, 253)
addbordertext(': ' ..addcommas(expgained), white, 140, 269)
addbordertext(': ' ..timetolevel, white, 140, 285)
addbordertext(': ' ..timehunt, white, 140, 301)
addbordertext("ENGINES", orange, 5, 326)
addbordertext('Cavebot', firstcolor, 5, 351)
addbordertext('Targeting', firstcolor, 5, 367)
addbordertext('Looting', firstcolor, 5, 383)
addbordertext('Walk Through Players', firstcolor, 5, 399)
if cavebot then
addbordertext(': ' ..'ON', green, 140, 351)
else
addbordertext(': ' ..'OFF', red, 140, 351)
end
if targeting then
addbordertext(': ' ..'ON', green, 140, 367)
else
addbordertext(': ' ..'OFF', red, 140, 367)
end
if looting then
addbordertext(': ' ..'ON', green, 140, 383)
else
addbordertext(': ' ..'OFF', red, 140, 383)
end
if walkthroughplayers == 'yes' then
addbordertext(': ' ..'ON', green, 140, 399)
elseif walkthroughplayers == 'no' then
addbordertext(': ' ..'OFF', red, 140, 399)
end
addbordertext("POTIONS", orange, 5, 424)
addbordertext('Mana Potion', firstcolor, 5, 449)
addbordertext('Ultimate Health Potion', firstcolor, 5, 465)
addbordertext(': ' ..itemcount("mana potion"), white, 140, 449)
addbordertext(': ' ..itemcount("ultimate health potion"), white, 140, 465)
addbordertext("SKILLS", orange, 5, 490)
addbordertext('Axe', firstcolor, 5, 515)
addbordertext('Shielding', firstcolor, 5, 531)
addbordertext('Magic Level', firstcolor, 5, 547)
addbordertext(': ' ..axe, white, 140, 515)
addbordertext(': ' ..shielding, white, 140, 531)
addbordertext(': ' ..mlevel, white, 140, 547)
addbordertext('% ' ..axepc, white, 180, 515)
addbordertext('% ' ..shieldingpc, white, 180, 531)
addbordertext('% ' ..mlevelpc, white, 180, 547)