HUD SCRIPTS Skill Timer
-
Quem Está Navegando 0 membros estão online
Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
Por Tricoder
Persistent init start local function getsecs(msg) local times, temp = {m = 60, h = 3600, s = 1}, 0 for n, t in msg:gmatch('(%d+)%s(%a)') do temp = temp + (tonumber(n) * times[t] or 0) end return temp end -- SCRIPT VERSION: 1.1.0 init end auto(1000) -- do not change it! if not softTime then if $feet.id == 3549 then contextmenu("Look", $feet.id, "feet") waitping() end foreach newmessage m do if m.type == MSG_INFO then local name, duration = m.content:match(REGEX_ITEM_DURATION) if duration then softTime = getsecs(duration) end end end end if $feet.id ~= 3549 then softTime = false end if softTime then softTime = softTime - 1 end HUDinit start local fontsize = 7 local fontspacing = fontsize + 6 setfontstyle("Tahoma", fontsize, 99, 0xE4B31B, 1) setmaskcolorxp(0) setposition($clientwin.left + 7, $worldwin.top + 5) init end softDuration = time(softTime) or 0 drawtext("Soft Duration: "..softDuration or 0, 2, 2 + fontspacing) Créditos: tibiawindbot -
Por Tricoder
init start -- local SCRIPT_VERSION = '1.0.0' local header, closeButton, closed, moving local cursorPosition = {} local engines = {'Cavebot', 'Looting', 'Targeting', 'Spell Healer', 'Potion Healer', 'Condition Healer', 'Mana Trainer'} filterinput(false, true, false, false) function inputevents(e) if e.type == IEVENT_LMOUSEUP then if e.elementid == closeButton then closed = true return end for _, v in ipairs(engines) do if e.elementid == v.shape then toggle(v.name:gsub(' ', '') .. '/Enabled') return end end elseif e.elementid == header then if e.type == IEVENT_MMOUSEDOWN then moving = true cursorPosition.x = $cursor.x cursorPosition.y = $cursor.y return elseif e.type == IEVENT_MMOUSEUP then moving = false return end end end -- Taken from Sirmate's MMH local blueGradient = {0.0, color(36, 68, 105, 20), 0.23, color(39, 73, 114, 20), 0.76, color(21, 39, 60, 20)} local blackGradient = {0.0, color(75, 75, 75, 20), 0.23, color(45, 45, 45, 20), 0.76, color(19, 19, 19, 20)} local redGradient = {0.0, color(136, 35, 12, 20), 0.23, color(139, 37, 13, 20), 0.76, color(92, 6, 6, 20)} local greenGradient = {0.0, color(65, 96, 12, 20), 0.23, color(67, 99, 13, 20), 0.76, color(36, 52, 6, 20)} for k, v in ipairs(engines) do engines[k] = { name = v, shape = nil } end setposition($clientwin.right - 424, $worldwin.top + 300) setfontstyle('Tahoma', 8, 75, 0xFFFFFF, 1, 0x000000) setfillstyle('gradient', 'linear', 2, 0, 0, 0, 21) setbordercolor(color(0, 0, 0, 50)) setantialiasing(true) init end auto(100) if moving then auto(10) local curPosition = getposition() setposition( curPosition.x + ($cursor.x - cursorPosition.x), curPosition.y + ($cursor.y - cursorPosition.y) ) cursorPosition.x = $cursor.x cursorPosition.y = $cursor.y end if closed then return end addgradcolors(table.unpack(blueGradient)) header = addshape('roundrect', 0, 0, 150, 20, 3, 3) addtext('ENGINE STATES', 24, 3) addgradcolors(table.unpack(blackGradient)) closeButton = addshape('roundrect', 130, 0, 20, 20, 3, 3) addtext('X', 137, 3) local isEnabled for k, v in ipairs(engines) do addgradcolors(table.unpack(blackGradient)) addshape('roundrect', 0, k * 23, 150, 20, 3, 3) addtext(v.name, 6, k * 23 + 3) isEnabled = get(v.name:gsub(' ', '') .. '/Enabled') == 'yes' addgradcolors(table.unpack(tern(isEnabled, greenGradient, redGradient))) engines[k].shape = addshape('roundrect', 120, k * 23, 30, 20, 3, 3) addtext(tern(isEnabled, 'ON', 'OFF'), 126 + tern(isEnabled, 2, 0), k * 23 + 3) end Créditos: tibiawindbot -
Por Tricoder
setfontstyle('Tahoma', 7, 75, 0xFFFFFF, 1, color(0, 0, 0, 20)) setposition($clientwin.right - 130 , $worldwin.top) if $hppc < 100 then drawtext($hppc..'%', 17, 119) else drawtext($hppc..'%', 15, 119) end if $mppc < 100 then drawtext($mppc..'%', 17, 134) else drawtext($mppc..'%', 15, 133) end Créditos: tibiawindbot -
Por Tricoder
init start -- Hultin's Hud v2.0.0 -- Last update: 8th April 2014 -- Script author - This is where you put your name. -- The rest of the script info is entered into Cavebot->Edit useroptions. local ScriptAuthor = "Hultin" -- Set to true if you are developing a script. Remember to set to false when you release/sell it. local Development = false -- Configuration for width/height local FieldConfig = { Height = 22, -- Optimized for 22px. Sizes lower than 20 looks weird and narrow, keep that in mind if you set the height lower. Width = 260, -- Total width of the HUD. Value/Field widths are automatically calculated. } -- You can add more color points to create a gradient. The current implementation is just a flat gradient. -- First value is graident point, color(r, g, b, a) -- Alpha is 0-100, 0 is non-transparent 100 is fully see through (no color!) local Colors = { HeaderColor = {1, color(41, 79, 109, 10)}, HeaderInnerBorder = color(58, 106, 140, 10), FieldColor = {1, color(40, 40, 40, 10)}, FieldInnerBorder = color(74, 74, 74, 10), ValueNeutral = {1, color(158, 104, 0, 10)}, NeutralInnerBorder = color(166, 124, 44, 10), ValuePositive = {1, color(67, 99, 13, 10)}, PositiveInnerBorder = color(94, 119, 53, 10), ValueNegative = {1, color(139, 37, 13, 10)}, NegativeInnerBorder = color(150, 72, 54, 10), Transparent = {1, color(0, 0, 0, 100)}, NoInnerBorder = color(0, 0, 0, 100) } -- This value configures the width of the valuefield. FieldConfig.ValueWidth = FieldConfig.Width/2.2 -- This variables controlls the "Toggle all on/off" button & it's text local AllOn = true -- Enginestates are treated and created diffrently than other elements are. local Engines = { {Name = 'Cavebot', Element = 0}, {Name = 'Looting', Element = 0}, {Name = 'Targeting', Element = 0}, {Name = 'Spell Healer', Element = 0}, {Name = 'Potion Healer', Element = 0}, {Name = 'Condition Healer', Element = 0} } -- Toggles all state on/off. function togglestates(state) for _, e in ipairs(Engines) do setsetting(e.Name:gsub(' ', '') .. '/Enabled', state) end end -- Input events. -- Keys, Mouseclicks, Mousemoves, Stealfocus filterinput(false, true, false, false) -- Allows interaction with hud, aswell as adds the ability to move the HUD. function inputevents(e) if e.type == IEVENT_LMOUSEUP then for _, v in ipairs(Engines) do print(v) print(e.elementid) if e.elementid == v.Element then toggle(v.Name:gsub(' ', '') .. '/Enabled') return end end if(e.elementid == Toggleall) then if(AllOn) then togglestates("no") AllOn = false else togglestates("yes") AllOn = true end end end end local Elements = {} init end --[[ Functions ]]-- -- Returns a formated textstring for your vip and such. function viptext() local total = 0 local online = 0 foreach vipentry v do total = total +1 if(v.isonline) then online = online + 1 end end return total..' ('..online..')' end -- Works like PHPs ucfirst() -- http://www.php.net/manual/en/function.ucfirst.php function firstToUpper(str) return (str:gsub("^%l", string.upper)) end -- Credit to SIRMATE function WeaponSkill() local SkillTypes = { ['axe'] = {type = 'axe', skill = $axe, skillpc = $axepc}, ['club'] = {type = 'club', skill = $club, skillpc = $clubpc}, ['sword'] = {type = 'sword', skill = $sword, skillpc = $swordpc}, ['bow'] = {type = 'distance', skill = $distance, skillpc = $distancepc}, ['distance weapon'] = {type = 'distance', skill = $distance, skillpc = $distancepc}, ['no weapon'] = {type = 'fist', skill = $fist, skillpc = $fistpc}, ['rod'] = {type = 'magic', skill = $mlevel, skillpc = $mlevelpc}, ['wand'] = {type = 'magic', skill = $mlevel, skillpc = $mlevelpc}, } return SkillTypes[findweapontype()] end -- String used for Weaponskill/Magiclevel section of the HUD. local TypeSkill = WeaponSkill() or {type = 'magic', skill = $mlevel, skillpc = $mlevelpc} -- Default values to not leave any field/values blank. local ScriptName = getuseroption('scriptname') local ScriptVersion = getuseroption('scriptversion') if(string.len(ScriptName) == 0) then ScriptName = 'Script name' end if(string.len(ScriptVersion) == 0) then ScriptVersion = "1.0.0" end -- Sections, you can add/remove elements as you please. local Sections = { { Name = ScriptName, Display = true, Items = { {"Created by", ScriptAuthor}, {"Version", ScriptVersion} } }, { Name = "Engine states", Display = true, Items = { -- This category is special, uses Engines table for Items. } }, { Name = "Character stats", Display = true, Items = { {"Experience", num($exp)..' exp'}, {"Experience/hour", num($exphour)}, {"Experience left", num(exptolevel())..' exp'}, {"Experience gained", num($expgained)..' exp'}, {"Time online", time(math.floor($timems / 1000))}, {"Time to level", time(timetolevel())}, {"Ping", $ping .. ' (avg: ' .. $pingaverage .. ')'}, } }, { Name = "Botting stats", Display = true, Items = { {"Level", $level .. ' (' .. 100 - math.floor(($exp - expatlvl($level)) * 100 / (expatlvl($level + 1) - expatlvl($level))) .. '%)'}, {firstToUpper(TypeSkill.type)..' level', TypeSkill.skill .. ' (' .. 100 - TypeSkill.skillpc .. '%)'}, {"Balance", num($balance)}, {"Stamina", time($stamina)}, {"Softboots duration", 0}, {"Vip (Online)", viptext()} } }, { Name = "Development toolkit", Display = Development, Items = { {"Position", $posx..'/'..$posy..'/'..$posz}, {"Mouseover item", $cursorinfo.id}, {"Mouse position", $cursorinfo.x..'/'..$cursorinfo.y..'/'..$cursorinfo.z} } } } --[[ Functions ]]-- function y(v) return v + (FieldConfig.Height + 5) end -- Weapon skills function WeaponSkill() local SkillTypes = { ['axe'] = {type = 'axe', skill = $axe, skillpc = $axepc}, ['club'] = {type = 'club', skill = $club, skillpc = $clubpc}, ['sword'] = {type = 'sword', skill = $sword, skillpc = $swordpc}, ['bow'] = {type = 'distance', skill = $distance, skillpc = $distancepc}, ['distance weapon'] = {type = 'distance', skill = $distance, skillpc = $distancepc}, ['no weapon'] = {type = 'fist', skill = $fist, skillpc = $fistpc}, ['rod'] = {type = 'magic', skill = $mlevel, skillpc = $mlevelpc}, ['wand'] = {type = 'magic', skill = $mlevel, skillpc = $mlevelpc}, } return SkillTypes[findweapontype()] end -- Creates a header function DrawHeader(posx, posy) addgradcolors(table.unpack(Colors.Transparent)) setbordercolor(color(0, 0, 0, 10)) drawrect(posx, posy, FieldConfig.Width+2, FieldConfig.Height+2) addgradcolors(table.unpack(Colors.HeaderColor)) setbordercolor(Colors.HeaderInnerBorder) drawrect(posx+1, posy+1, FieldConfig.Width, FieldConfig.Height) end -- Creates a field function DrawField(posx, posy) posx = posx addgradcolors(table.unpack(Colors.Transparent)) setbordercolor(color(0, 0, 0, 10)) drawrect(posx, posy, (FieldConfig.Width-FieldConfig.ValueWidth)-1, FieldConfig.Height+2) addgradcolors(table.unpack(Colors.FieldColor)) setbordercolor(Colors.FieldInnerBorder) drawrect(posx+1, posy+1, FieldConfig.Width-FieldConfig.ValueWidth-3, FieldConfig.Height) end -- Creates a value function DrawValue(posx, posy, valueType) if(valueType == "positive") then Border = Colors.PositiveInnerBorder Background = Colors.ValuePositive elseif(valueType == "negative") then Border = Colors.NegativeInnerBorder Background = Colors.ValueNegative else Border = Colors.NeutralInnerBorder Background = Colors.ValueNeutral end addgradcolors(table.unpack(Colors.Transparent)) -- This will not show, anyways. setbordercolor(color(0, 0, 0, 10)) drawrect(FieldConfig.Width-FieldConfig.ValueWidth+posx, posy, FieldConfig.ValueWidth+2, FieldConfig.Height+2) addgradcolors(table.unpack(Background)) setbordercolor(Border) return drawrect((FieldConfig.Width-FieldConfig.ValueWidth)+1+posx, posy+1, FieldConfig.ValueWidth, FieldConfig.Height) end -- Draws special buttons - used for toggle all & show/hide function DrawButton(posx, posy, valueType, Width) local Width = Width or FieldConfig.ValueWidth if(valueType == "positive") then Border = Colors.PositiveInnerBorder Background = Colors.ValuePositive elseif(valueType == "negative") then Border = Colors.NegativeInnerBorder Background = Colors.ValueNegative else Border = Colors.NeutralInnerBorder Background = Colors.ValueNeutral end addgradcolors(table.unpack(Colors.Transparent)) -- This will not show, anyways. setbordercolor(color(0, 0, 0, 10)) drawrect(FieldConfig.Width-FieldConfig.ValueWidth+posx, posy, Width, FieldConfig.Height+2) addgradcolors(table.unpack(Background)) setbordercolor(Border) return drawrect((FieldConfig.Width-FieldConfig.ValueWidth)+1+posx, posy+1, Width, FieldConfig.Height) end -- Draws text function DrawText(text, x, y, fieldtype) -- Field type is shorthand functionality to place it over the VALUE elements. if(fieldtype == "value") then x = ((FieldConfig.Width-FieldConfig.ValueWidth)+x) end addtext(text, x+6, y+6) end -- Hud definitions setposition($clientwin.left + 5, $worldwin.top+2) setfontstyle('Tahoma', 8, 75, 0xcfebfd, 1, 0x000000) setfillstyle('gradient', 'linear', 2, 0, 0, 0, 21) setantialiasing(true) -- local yPos = 0 local isEnabled = nil -- Loop fields/values for _, s in ipairs(Sections) do if(s.Display) then DrawHeader(0, yPos) DrawText(s.Name, 0, yPos) if(s.Name == 'Engine states') then -- Toggle all local ToggleallState = tern(AllOn, "negative", "positive") local ToggleallText = tern(AllOn, "TOGGLE ALL OFF", "TOGGLE ALL ON") Toggleall = DrawButton(0, yPos, ToggleallState) DrawText(ToggleallText, 0+10, yPos, "value") --yPos = y(yPos) for i, engine in ipairs(Engines) do yPos = y(yPos) local F, V = engine.Name isEnabled = get(F:gsub(' ', '') .. '/Enabled') == 'yes' fieldColor = tern(isEnabled, "positive", "negative") Value = tern(isEnabled, "ON", "OFF") xOffset = tern(isEnabled, (FieldConfig.ValueWidth/2)-12, (FieldConfig.ValueWidth/2)-14) DrawField(0, yPos) Engines[i].Element = DrawValue(0, yPos, fieldColor) DrawText(F, 0 ,yPos) DrawText(Value, 0+xOffset, yPos, "value") end else for k, v in ipairs(s.Items) do local Field, Value = v[1], v[2] local fieldColor = nil local xOffset = 0 yPos = y(yPos) -- Increment yPos if(Field == "Stamina") then if($stamina > 40*60) then fieldColor = "positive" end DrawValue(0, yPos, fieldColor) else DrawValue(0, yPos) end DrawField(0, yPos) DrawText(Field, 0 ,yPos) DrawText(Value, 0+xOffset, yPos, "value") end end yPos = y(yPos) end end -- Footer should NEVER be edited or changed. It's theft if you do so without permission! DrawHeader(0, yPos) DrawText("Hultin's HUD", 0, yPos) DrawText("v2.0.0", FieldConfig.Width-45, yPos) -- Thank you for using Hultin's Hud V2. Créditos: tibiawindbot -
Por Tricoder
init start -- local SCRIPT_VERSION = '1.2.1' local function deleteSpecialAreaCall(menu) removespecialarea(menu.specialAreaName) end local function moveSpecialAreaName() if resizedSP == nil then return tern(draggedSP == nil, 'Move Special Area', 'Stop Moving') end end local function moveSpecialAreaCall(menu) if draggedSP == nil then draggedSP = menu.specialArea else draggedSP = nil end end local function resizeSpecialAreaName() if draggedSP == nil then return tern(resizedSP == nil, 'Resize Special Area', 'Stop Resizing') end end local function resizeSpecialAreaCall(menu) if resizedSP == nil then resizedSP = menu.specialArea else resizedSP = nil end end registermessagehandler('contextMenu_specialArea', moveSpecialAreaName, moveSpecialAreaCall) registermessagehandler('contextMenu_specialArea', resizeSpecialAreaName, resizeSpecialAreaCall) registermessagehandler('contextMenu_specialArea', 'Delete Special Area', deleteSpecialAreaCall) registermessagehandler('contextMenu_specialArea', MENU_SEPARATOR, nil) local worldWidth, worldHeight, x, y, z, width, height, avoidance, name, policy, areaType local specialAreaRect = {} local innerRect = {} local function gettilepos(x, y, z) local tile = getobjectarea(x, y, z) if tile == nil then local xDiff, yDiff = x - $posx, y - $posy if math.abs($posx - x) <= 7 then tile = getobjectarea(x, $posy, $posz) xDiff = 0 elseif math.abs($posy - y) <= 5 then tile = getobjectarea($posx, y, $posz) yDiff = 0 else tile = getobjectarea($posx, $posy, $posz) end -- Some strange stuff happens when you go from 0 to -1, so I'm -- adding this as a precaution. if tile ~= nil then local width, height = $worldwin.width, $worldwin.height tile.left = tile.left + (width * xDiff) tile.right = tile.right + (width * xDiff) tile.centerx = tile.centerx + (width * xDiff) tile.top = tile.top + (height * yDiff) tile.bottom = tile.bottom + (height * yDiff) tile.centery = tile.centery + (height * yDiff) end end return tile end local function getAreaRect(x, y, w, h) local ret = {x = 0, y = 0, w = 0, h = 0} local topLeftTilePos = gettilepos(x, y, $posz) local botRightTilePos = gettilepos(x + w - 1, y + h - 1, $posz) if topLeftTilePos and botRightTilePos then ret.x = math.max(topLeftTilePos.left, 0) ret.y = math.max(topLeftTilePos.top, 0) ret.w = math.min(botRightTilePos.right, worldWidth) - ret.x ret.h = math.min(botRightTilePos.bottom, worldHeight) - ret.y end return ret end local function drawInnerRect(areaType, x, y, width, height) innerRect = {w = 0, h = 0} if areaType == 'Square (Border Only)' then innerRect = getAreaRect(x + 1, y + 1, width - 2, height - 2) elseif areaType == 'Square (Double Border)' then innerRect = getAreaRect(x + 2, y + 2, width - 4, height - 4) end if innerRect.w > 0 and innerRect.h > 0 then setfillstyle('color', 0xFF000000) drawroundrect(innerRect.x, innerRect.y, innerRect.w, innerRect.h, 10, 10) end end useworldhud() init end setfontstyle('Arial', 8, 75, 0xFFFFFF, 1, 0x000000) worldWidth, worldHeight = $worldwin.width - 2, $worldwin.height - 2 foreach settingsentry e 'Cavebot/SpecialAreas' do x, y, z = getsetting(e, 'Coordinates'):match('.-(%d+).-(%d+).-(%d+)') x, y, z = tonumber(x), tonumber(y), tonumber(z) if z == $posz then width, height = getsetting(e, 'Size'):match('(%d+).-(%d+)') width, height = tonumber(width), tonumber(height) specialAreaRect = getAreaRect(x, y, width, height) if specialAreaRect.w > 0 and specialAreaRect.h > 0 then avoidance = tonumber(getsetting(e, 'Avoidance')) areaType = getsetting(e, 'Type') name = getsetting(e, 'Name') policy = getsetting(e, 'Policy'):gsub('[^A-Z]', '') setfillstyle('color', color(255, 0, 0, math.round(100 - (avoidance / 4)))) drawroundrect(specialAreaRect.x, specialAreaRect.y, specialAreaRect.w, specialAreaRect.h, 10, 10) drawInnerRect(areaType, x, y, width, height) if specialAreaRect.w > 10 then drawtext( string.fit(name, specialAreaRect.w - 10, '...', true), specialAreaRect.x + 5, specialAreaRect.y + 3 ) drawtext( string.fit(policy, specialAreaRect.w - 10, '...', true), specialAreaRect.x + 5, specialAreaRect.y + 15 ) end end end end if contextmenuinfo() == nil then if draggedSP then set(draggedSP, 'Coordinates', string.format('x:%i, y:%i, z:%i', $cursorinfo.x, $cursorinfo.y, $cursorinfo.z)) elseif resizedSP then local x, y = get(resizedSP, 'Coordinates'):match(REGEX_COORDS) x, y = tonumber(x), tonumber(y) set(resizedSP, 'Size', string.format('%i x %i', math.max(1, 1 + ($cursorinfo.x - x)) , math.max(1, 1 + ($cursorinfo.y - y)))) end end Créditos: tibiawindbot
-
Posts Recomendados
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.