Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FREE Multi-Floor Player Alert v1.0
#1
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.

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
Reply

#2
How can I make it ONLY scan +1 and -1? I can't seem to find the option, when I enable multifloor it also checks +2 and -2.
Reply

#3
Hello.

I've updated this code and now "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.
Reply

#4
Can you add 2 delay's to log in ? "If after 1 login same player then logout for "longer time" " ?
Reply

#5
I am trying to get this script to work since under alerts when I activate xlog and floor difference and try with two chars it wont xlog when char is below.

I get 21:16:02 - Core:Lua:ExecuteScript:Autlog +-1 floor: 4: '}' expected (to close '{' at line 2) near 'means' when running the script.

Any ideas?

Thanks!
Reply

#6
Hello.

You are making a bad change on the code. Send me your code by private message.
Reply

#7
Hello again, 

I got it to work finally Tongue 

Thanks anyways!
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016