HK
HK
function changeReconnect(enable)
local rwPanel = g_ui.getRootWidget():getChildById('charactersWindow')
local buttonsPanel = rwPanel:getChildById('autoReconnect')
if rwPanel and buttonsPanel then
if buttonsPanel:isOn() ~= enable then
buttonsPanel:onClick()
end
warn('auto reconnect '..(buttonsPanel:isOn() and 'on' or 'off'))
end
end
followName = "autofollow"
if not storage[followName] then storage[followName] = { player = 'name'} end
local toFollowPos = {}
UI.Separator()
UI.Label("Auto Follow")
UI.Separator()
onPlayerPositionChange(function(newPos, oldPos)
if followChange:isOff() then return end
if (g_game.isFollowing()) then
tfollow = g_game.getFollowingCreature()
if tfollow then
if tfollow:getName() ~= storage[followName].player then
followTE:setText(tfollow:getName())
storage[followName].player = tfollow:getName()
end
end
end
end)
setDefaultTab("Tools")
local logoutDeaths = 5
if type(storage["death"]) ~= "table" then storage["death"] = { count = 0 } end
local deathCount = storage["death"].count
UI.Separator()
deathLabel = UI.Label("Death count: " .. deathCount)
onTextMessage(function(mode, text)
if macroDeathCount.isOff() then return end
if text:lower():find("you are dead") then
storage["death"].count = storage["death"].count + 1
deathLabel:setText("Death count: " .. storage["death"].count)
modules.client_entergame.CharacterList.doLogin()
end
end)
UI.Separator()
local openMin = addSwitch("openMin", "Open Minimised", function(widget)
widget:setOn(not widget:isOn())
storage.openMin = widget:isOn()
end, parent)
openMin:setOn(storage.openMin)
onContainerOpen(function(container, previousContainer)
if openMin:isOn() then
if not previousContainer then
local containerPanel = modules.game_interface.getContainerPanel()
local containerWindow = containerPanel:getChildById('container' ..
container:getId())
if containerWindow then
if containerWindow:getId() == "container0" then
containerWindow:setContentHeight(34)
else
containerWindow:minimize()
end
end
end
end
end)
local monstrosIgnorados = {
['% emberwing'] = true,
}
else
-- Há jogadores por perto, não lance a magia
print("Há jogadores por perto, não lançando magia.")
end
local specAmount = 0
if not g_game.isAttacking() then
return
end
for i,mob in ipairs(getSpectators()) do
if (getDistanceBetween(player:getPosition(), mob:getPosition()) <=
distance and mob:isMonster()) then
specAmount = specAmount + 1
end
end
if (specAmount >= amountOfMonsters) then
say(multiTargetSpell)
else
say(singleTargetSpell)
end
end))
-- START CONFIG
local macroName = "Alarm PK"
local ignoreParty = true
local onlyIfAttacked = true -- true = alert if someone attacks you // false = alert
if any pk appear on screen
-- end of basic config
local flashClient = true
local windowText = "Player Attack"
local soundStyle = "/sounds/alarm.ogg"
-- END CONFIG
-- vBot scripting services: F.Almeida#8019
-- if you like it, consider making a donation:
-- https://www.paypal.com/donate/?
business=8XSU4KTS2V9PN&no_recurring=0&item_name=OTC+AND+OTS+SCRIPTS¤cy_code=U
SD
-- ATTENTION:
-- Don't edit below this line unless you know what you're doing.
-- ATENÇÃO:
-- Não mexa em nada daqui para baixo, a não ser que saiba o que está fazendo.
-- ATENCIÓN:
-- No cambies nada desde aquí, solamente si sabes lo que estás haciendo.
macro(100,macroName,function()
for s, spec in pairs(getSpectators(false)) do
if spec ~= player and spec:isPlayer() then
if spec:isTimedSquareVisible() or (not onlyIfAttacked and spec:getSkull() >
2) then
if not ignoreParty or spec:getShield() < 3 then
if modules.game_bot.g_app.getOs() == "windows" and flashClient then
g_window.flash() end
g_window.setTitle(player:getName() .. " - "..windowText)
playSound(soundStyle)
delay(6000)
break
end
end
end
end
end)
--[[Esconder MAGIAS(SPRITES)]]--
sprh = macro(100, "Escode Sprite Magias", function() end)
onAddThing(function(tile, thing)
if sprh.isOff() then return end
if thing:isEffect() then
thing:hide()
end
end)
--[[Esconder Danos]]--
oant = macro(100, "Esconder Danos", function() end)
onAnimatedText(function(thing, text)
if oant.isOff() then return end
thing:hide()
end)
onTextMessage(function(mode, text)
if mode == 18 or mode == 19 or mode == 20 then
modules.game_textmessage.clearMessages()
end
end)
onMissle(function(missle)
missle:hide()
end)
say('exura ico')
useWith(7643, player) -- Use a potion
say('exura vita')
useWith(238, player) -- Use a potion
end
end)