Faklop
Towarzysz Stalin
- Joined
- Mar 9, 2013
- Messages
- 170
- Reaction score
- 2
HUDs by Balkarynd
Code:
WarnItems = {"Magma Boots","Wand of Inferno","Dragon Hammer","Dragon Shield","Dragonbone Staff","Fire Sword","Tower Shield","Dragon Slayer","Royal Helmet","Dragon Lord Trophy","Dragon Scale Mail"}
MaxLootMessages = 10
ShowLastLoots = true
Engine = {"CaveBot", "Targeting", "Looting", "Healer"} --You can add/remove what you want. It must be exactly like in the iBot Settings.
ExpH = "tibia" --Exp/h, options are "Tibia", "Bot", "All"
Spacing = 15 --Spacing between lines
FontSize = 9 --Font Size
x = 10 --HUD Position X
y = 70 --HUD Position Y
x2 = 100 --Information Position X
-- ##### DO NOT EDIT BELOW THIS LINE #####
HUD = {"Level", "Exp/h", "Exp Left", "Time to Level", "Exp Gained", "Time Online", "Stamina", "Balance"}
if string.upper(ExpH)=="ALL" then
ExpH=Misc.FormatNumber(tibiaexphour).." (Tibia) / "..Misc.FormatNumber(exphour).." (Bot)"
TimeNextLevel=string.format("%02s", math.floor(exptolevel()/exphour))..":"..string.format("%02s", math.floor(60*(exptolevel()/exphour-math.floor(exptolevel()/exphour))))..":"..string.format("%02s", math.floor(60*(60*(exptolevel()/exphour-math.floor(exptolevel()/exphour))-math.floor(60*(exptolevel()/exphour-math.floor(exptolevel()/exphour))))))
elseif string.upper(ExpH)=="TIBIA" then
ExpH=Misc.FormatNumber(tibiaexphour)
TimeNextLevel=string.format("%02s", math.floor(exptolevel()/tibiaexphour))..":"..string.format("%02s", math.floor(60*(exptolevel()/tibiaexphour-math.floor(exptolevel()/tibiaexphour))))..":"..string.format("%02s", math.floor(60*(60*(exptolevel()/tibiaexphour-math.floor(exptolevel()/tibiaexphour))-math.floor(60*(exptolevel()/tibiaexphour-math.floor(exptolevel()/tibiaexphour))))))
else
ExpH=Misc.FormatNumber(exphour)
TimeNextLevel=string.format("%02s", math.floor(exptolevel()/exphour))..":"..string.format("%02s", math.floor(60*(exptolevel()/exphour-math.floor(exptolevel()/exphour))))..":"..string.format("%02s", math.floor(60*(60*(exptolevel()/exphour-math.floor(exptolevel()/exphour))-math.floor(60*(exptolevel()/exphour-math.floor(exptolevel()/exphour))))))
end
Info = {level.." ("..string.format("%0.2f", (6*exp-100*level^3+600*level^2-1700*level+1200)/(3*level^2-9*level+12)).."%)", ExpH, Misc.FormatNumber(exptolevel()).." ("..string.format("%0.2f", 100-(6*exp-100*level^3+600*level^2-1700*level+1200)/(3*level^2-9*level+12)).."%)", TimeNextLevel, expgained, timehunt, math.floor(stamina/60)..":"..string.format("%02s", (stamina-60*math.floor(stamina/60))), Misc.FormatNumber(balance)}
local function addtextshadow(text, color, shadowcolor, xpos, ypos)
setfontcolor(shadowcolor)
addtext(text, xpos+1, ypos+1)
setfontcolor(color)
addtext(text, xpos, ypos)
end
local function addtextcontour(text, color, contourcolor, xpos, ypos)
setfontcolor(contourcolor)
addtext(text, xpos+1, ypos)
addtext(text, xpos-1, ypos)
addtext(text, xpos, ypos+1)
addtext(text, xpos, ypos-1)
addtext(text, xpos-1, ypos-1)
addtext(text, xpos+1, ypos+1)
addtext(text, xpos+1, ypos-1)
addtext(text, xpos-1, ypos+1)
setfontcolor(color)
addtext(text, xpos, ypos)
end
setfontstyle("Trebuchet MS", FontSize+5, "B")
addtextcontour("BALKA SCRIPTS", rgbcolor(0,150,255), rgbcolor(0,90,151),x+2,30)
setfontstyle("Tahoma", FontSize-1, "B")
addtextcontour("balkascripts@gmail.com", "DeepSkyBlue", rgbcolor(1,75,100),x+2,50)
for i = 1, table.getn(HUD) do
setfontstyle("Verdana", FontSize, "B")
addtextshadow(HUD[i]..":", "Gold", rgbcolor(1,1,1),x,y+Spacing*(i-1))
setfontstyle("CenturyGothic", FontSize, "B")
if (HUD[i]=="Stamina") then
if (stamina < 840) then addtextshadow(Info[i], rgbcolor(255,0,0), rgbcolor(50,1,1), x2+x,y+Spacing*(i-1))
elseif (stamina >= 2400) then addtextshadow(Info[i], rgbcolor(0,250,0), rgbcolor(1,50,1), x2+x,y+Spacing*(i-1))
else addtextshadow(Info[i], rgbcolor(230,150,0), rgbcolor(50,25,1), x2+x,y+Spacing*(i-1)) end
else
addtextshadow(Info[i], "White", rgbcolor(1,1,1), x2+x, y+Spacing*(i-1))
end
end
for i = 1, table.getn(Engine) do
setfontstyle("Verdana", FontSize, "B")
addtextshadow(Engine[i]..":", "Gold", rgbcolor(1,1,1), x,y+Spacing*(table.getn(HUD)+i-1/2))
setfontstyle("CenturyGothic", FontSize-1, "B")
if (getsettings("Settings\\"..Engine[i].."\\Enabled")=="yes") then
addtextcontour("ON", rgbcolor(0,250,0), rgbcolor(1,80,1), x2+x,y+Spacing*(table.getn(HUD)+i-1/2))
else
addtextcontour("OFF", rgbcolor(250,0,0), rgbcolor(80,1,1), x2+x,y+Spacing*(table.getn(HUD)+i-1/2))
end
end
if ShowLastLoots then
setfontstyle("Tahoma", FontSize-1, "B")
local index = 0
local msgs = getmessages("Server Log")
local qtd = msgs.count-1
for i=0,qtd do
if msgs[qtd-i].type == 19 and msgs[qtd-i].text:find('Loot of ') then
local colorm = false
local l = 0
for l=1, table.getn(WarnItems) do
if msgs[qtd-i].text:find(WarnItems[l]:lower()) then
colorm = true
break
end
end
if colorm then
colorLastLoot = rgbcolor(255,0,0)
else
colorLastLoot = rgbcolor(0,239,0)
end
addtextshadow(msgs[qtd-i].text, colorLastLoot, rgbcolor(1,1,1), worldwin.left+12,worldwin.bottom+15-(index*Spacing))
index=index+1
if index == MaxLootMessages then
break
end
end
end
end