Hello.
That's a Multi-Floor Player Alert.
You must enable each option that you wanna do when the alert is triggered.
"MultiFloor" must be a number value which is the maximum floor difference to detect players.
MultiFloor = 0 means detect players on same floor;
MultiFloor = 1 means detect players on same floor and +1 or -1;
MultiFloor = 2 means same floor, +1 or -1, +2 or -2.
That's a Multi-Floor Player Alert.
You must enable each option that you wanna do when the alert is triggered.
"MultiFloor" must be a number value which is the maximum floor difference to detect players.
MultiFloor = 0 means detect players on same floor;
MultiFloor = 1 means detect players on same floor and +1 or -1;
MultiFloor = 2 means same floor, +1 or -1, +2 or -2.
local SafeList = { "Player1", "Player2", "Player3" }
local Action = {
MultiFloor = 0, -- Whats the max floor difference that it should detect players?
Visible = false, -- Does player must be visible? It can detect players one sqm OUT of your screen.
PlaySound = false, -- Should it PLAY SOUND if detect a player?
FlashClient = false, -- Should it FLASH CLIENT if detect a player?
FocusClient = false, -- Should it FOCUS CLIENT if detect a player?
Logout = false, -- Should it LOGOUT if detect a player?
Screenshot = false, -- Should it TAKE A SCREENSHOT if detect a player?
XLog = false, -- Should it XLOG (it also tries to logout first!) if detect a player?
PauseBot = false, -- Should it PAUSE BOT if detect a player?
DisableTools = false, -- Should it disable listed tools below BOT if detect a player?
EnableTools = false, -- Should it enable listed tools below BOT if DON'T detect a player?
LogPlayers = false, -- Should it LOG every player that appears on your screen?
PrintConsole = false, -- Should it LOG every player that appears on your screen?
}
local Tools = {
'Cavebot/Enabled',
'Targeting/Enabled',
'Looter/Enabled',
'Healer/Enabled',
'Runemaker/Enabled'
}
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ Multi-Floor Player Alert v1.0 by Arkilys --]]
--[[ https://forums.otbots.com/ --]]
TOOLS_PAUSED = TOOLS_PAUSED or false
local Creatures = getcreatures('p')
local alertFired = false
if #Creatures > 0 then
local player_name = name()
local player_z = posz()
for i,j in pairs(Creatures) do
if table.find(SafeList, j.name) == nil and j.name ~= player_name then
if Action.MultiFloor == 0 or math.abs(j.posz - player_z) <= Action.MultiFloor then
if Action.Visible == false or (Action.Visible and j.visible) then
alertFired = true
if Action.PrintConsole then
print(j.name)
end
if Action.LogPlayers then
file.writeline(player_name .. " - PlayersOnScreen", date() .. " - " .. formattedtime() .. ": " .. j.name)
end
if Action.FocusClient then
focusclient()
end
if Action.PlaySound then
playsound("alert_playeronscreen")
end
if Action.FlashClient then
flashclient()
end
if Action.Screenshot then
screenshot()
end
if Action.Logout then
logout()
end
if Action.XLog then
xlog()
end
if Action.DisableTools then
for k = 1, #Tools do
setsettings(Tools[k], false)
end
end
if Action.PauseBot then
pausebot(true)
end
end
end
end
end
end
if not alertFired and Action.EnableTools then
for k = 1, #Tools do
setsettings(Tools[k], true)
end
end