Siema dodaje pare fajnych skryptów
-WIDZIMY NIEWIDOCZNE WARLOCKI
-- config
local pvpSafe = true
-- do not change below
local lastUse
local m = macro(5000, "stone shower on warlock", function() end)
onCreatureDisappear(function(creature)
if m.isOff() then return end
if creature:getName() ~= "Warlock" then return end
if creature:getHealthPercent() == 0 then return end
local pos = creature:getPosition()
if pos.z ~= posz() then return end
local tile = g_map.getTile(pos)
local tilePos = tile:getPosition()
local pPos = player:getPosition()
if not tile then return end
if math.abs(pPos.x-tilePos.x) >= 8 or math.abs(pPos.y-tilePos.y) >= 6 then return end
if (not pvpSafe or isSafe(8)) and tile:canShoot() and (not lastUse or now - lastUse > 500) then
for i=0,2 do
schedule(i*200, function()
useWith(3175, tile:getTopThing())
lastUse = now
end)
end
end
end)
onAddThing(function(tile, thing)
if m.isOff() then return end
if thing:getId() ~= 13 then return end
if tile:hasCreature() then return end
if (not pvpSafe or isSafe(8)) and tile:canShoot() and (not lastUse or now - lastUse > 500) then
for i=0,2 do
schedule(i*200, function()
useWith(3175, tile:getTopThing())
lastUse = now
end)
end
end
end)
-Pokazuje % HP
local showhp = macro(20000, "Monster HP %", function() end)
onCreatureHealthPercentChange(function(creature, healthPercent)
if showhp:isOff() then return end
if creature:isMonster() or creature:isPlayer() and creature:getPosition() and pos() then
if getDistanceBetween(pos(), creature:getPosition()) <= 5 then
creature:setText(healthPercent .. "%")
else
creature:clearText()
end
end
end)
-POKAZUJE POZYCJE PO UZYCIU CTRL+PPM > LOOK
onTextMessage(function(mode, text)
if mode == 20 and text:find("You see") then
if not modules.game_interface.gameMapPanel.mousePos then return end
local tile = modules.game_interface.gameMapPanel:getTile(modules.game_interface.gameMapPanel.mousePos)
if tile then
local loc = tile:getPosition()
error("Position: " .. loc.x.. ", "..loc.y..", "..loc.z) -- remove this if you don't want it showing on bot
if not modules.game_textmessage then return end
modules.game_textmessage.displayMessage(16, "position: " .. loc.x.. ", "..loc.y..", "..loc.z)
end
end
end)
-SPRAWDZANIE PINGU (MAX WARTOSCI W RAZIE DDOSOW)
-- Edit these values
minPing = 100 -- logs pings over this amount
clearPingList = 500 -- clears list after 500 entries set to 0 to disable
-- Edit these values
pingLst = {}
local pingPanel = nil
local pingLabel = nil
local uia = modules.game_stats.ui
pingPanel = uia:getChildById("pingPanel")
pingPanel = pingPanel or setupUI([[
Panel
id: pingPanel
height: 17
anchor-bottom: parent.bottom
anchor-left: parent.left
anchor-right: parent.right
Label
id: pingLabel
color: green
background-color: #494949
font: verdana-11px-rounded
id: pingLabel
text-auto-resize: true
text: Ping Max: 0 ms (#0)
]], uia)
pingLabel = pingPanel.pingLabel
if pingLabel then
local ping = g_game.getPing()
macro(500, 'Ping Monitor', function()
if clearPingList > 0 and #pingLst > clearPingList then
pingLst = {}
end
ping = g_game.getPing()
if g_proxy and g_proxy.getPing() > 0 then
ping = g_proxy.getPing()
end
if ping > minPing then
table.insert(pingLst, {time = os.time(), ping = ping})
table.sort(pingLst, function(a, b) return a.ping < b.ping end)
end
local color
if ping >= 500 then
color = 'red'
elseif ping >= 250 or ping < 0 then
color = 'yellow'
else
color = 'green'
end
pingLabel:setText("Ping Max: "..pingLst[#pingLst].ping.." ms (#"..(#pingLst)..')')
pingLabel:setColor(color)
end, leftPanel)
table.insert(pingLst, {time = os.time(), ping = ping})
end
UI.Button("Export Pings", function()
for i, ping in ipairs(pingLst) do
print( os.date('%d-%m-%Y %H:%M:%S',ping.time) .. ' - '.. ping.ping)
end
end)
-Skills Hud (STAMINA,FISHING,LVL W LEWYM DOLNYM ROGU)
local panelName = "tcSkills"
local tcSkillPanel = setupUI([[
OutlineLabel < Label
height: 12
background-color: #00000044
opacity: 0.89
text-auto-resize: true
font: verdana-11px-rounded
anchors.left: parent.left
$first:
anchors.top: parent.top
$!first:
anchors.top: prev.bottom
Panel
id: skillPanel
height: 50
width: 50
anchors.left: parent.left
anchors.bottom: parent.bottom
margin-bottom: 5
margin-left: 5
]], modules.game_interface.getMapPanel())
local skills = {
{ name = "Fist", data = {}, id = 0, enabled = true, highlight = 'white' },
{ name = "Club", data = {}, id = 1, enabled = true },
{ name = "Sword", data = {}, id = 2, enabled = false },
{ name = "Axe", data = {}, id = 3, enabled = false },
{ name = "Distance", data = {}, id = 4, enabled = true },
{ name = "Shielding", data = {}, id = 5, enabled = true },
{ name = "Fishing", data = {}, id = 6, enabled = true },
{ name = "Crit Chance", data = {}, id = 7, enabled = false },
{ name = "Crit Damage", data = {}, id = 8, enabled = false },
{ name = "Life Leech Chance", data = {}, id = 9, enabled = false },
{ name = "Life Leech Amount", data = {}, id = 10, enabled = false },
{ name = "Mana Leech Chance", data = {}, id = 11, enabled = false },
{ name = "Mana Leech Amount", enabled = true , data = {}, id = 12, enabled = false },
{ name = "Level", data = {}, id = 13, enabled = true, color = '#aba71e', highlight = 'orange' },
{ name = "Magic Level", data = {}, id = 14, enabled = true , color = '#4fc3f7', highlight = 'green'},
{ name = "Stamina", data = {}, id = 15, enabled = true },
}
local firstSkill, lastSkill = 1, 13
local levelSkill = 14
local magicSkill = 15
local stamSkill = 16
function calcStamina()
local stam = stamina()
local hours = math.floor(stam / 60)
local minutes = stam % 60
if minutes < 10 then
minutes = '0' .. minutes
end
local percent = math.floor(100 * stam / (42 * 60))
return hours.. ':'.. minutes, ' ('..percent..'%)'
end
function checkStamina()
local skill = skills[stamSkill]
if skill and skill.enabled then
local label = tcSkillPanel[stamSkill] or UI.createWidget("OutlineLabel", tcSkillPanel)
label:setId(stamSkill)
local sta, per = calcStamina()
label:setColoredText({
'~ '..skill.name..': ', (skill.color or 'white'),
sta,(skill.highlight or 'green'),
per, (skill.color or 'white'),
})
end
end
function checkMagicLevel()
local skill = skills[magicSkill]
if skill.enabled then
local label = tcSkillPanel[magicSkill] or UI.createWidget("OutlineLabel", tcSkillPanel)
label:setId(magicSkill)
label:setColoredText({
'~ '..skill.name..': ', (skill.color or 'white'),
player:getMagicLevel(),(skill.highlight or 'green'),
' ('..player:getMagicLevelPercent().. '%)', (skill.color or 'white'),
})
end
end
function checkSkill(num)
local skill = skills[num]
if skill and skill.enabled and skill.id then
local label = tcSkillPanel[skill.id] or UI.createWidget("OutlineLabel", tcSkillPanel)
label:setId(skill.id)
local t = {
'~ '..skill.name..': ', (skill.color or 'white'),
player:getSkillLevel(skill.id), (skill.highlight or 'green'),
' ('..player:getSkillLevelPercent(skill.id).. '%)', (skill.color or 'white'),
}
label:setColoredText(t)
end
end
function checkLevel()
local skill = skills[levelSkill]
if skill.enabled then
local label = tcSkillPanel[levelSkill] or UI.createWidget("OutlineLabel", tcSkillPanel)
label:setId(levelSkill)
label:setColoredText({
'~ '..skill.name..': ', (skill.color or 'white'),
level(), (skill.highlight or 'green'),
' ('.. player:getLevelPercent().. '%)', (skill.color or 'white'),
})
end
end
function checkAll()
checkLevel()
checkMagicLevel()
for i = firstSkill, lastSkill do
checkSkill(i, true)
end
checkStamina()
tcSkillPanel:setHeight((tcSkillPanel:getChildCount()*13))
end
local checkSkills = macro(2000, 'Check Skills', function()
checkAll()
end)
checkAll()
-RAINBOW OUTFIT
local rainbowOutfitTime = 1
rainbowOutfit = macro(rainbowOutfitTime, "Rainbow Outfit", function ()
rainbowOutfit()
end)
function rainbowOutfit()
local randomColor = math.random(1,132)
local pOutfit = player:getOutfit()
local rainbowOutfit = { type = pOutfit.type, head = math.random(1,132), body = math.random(1,132), legs = math.random(1,132), feet = math.random(1,132), addons = pOutfit.addons}
setOutfit(rainbowOutfit)
return true
end