• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Prevent you getting hunt by pk by vip list?

epsilon2

New Member
Joined
Feb 20, 2009
Messages
47
Reaction score
4
Do this script work on a newer 7.72 server ?

LUA:
macro(2000, "Revisar VIP", function()
  for _, data in pairs(g_game.getVips()) do
    local name, online = data[_][name], data[_][online]
    if online then
             --Do whatever you want it to do here
          break
     end
   end
 
end)

i am on a 7.72 server

Data struct can be this.

Code:
---@class Vip
---@field name string
---@field status number
---@field description string
---@field iconId number
---@field notifyLogin boolean
Vip = {}

---@return table<[number, Vip]>
function getVips() end

or this

Code:
In The Forgotten Server 1.5 with LuaJIT 2.1.0-beta3, the g_game.getVips() function returns a Lua table with the following structure:

{
    [1] = {
        name = "Player1",
        online = true,
        level = 100,
        vocation = "Knight"
    },
    [2] = {
        name = "Player2",
        online = false,
        level = 80,
        vocation = "Sorcerer"
    },
    -- Additional VIP entries follow the same structure
}
 
LUA:
  for _, data in pairs(g_game.getVips()) do

    local name, online = data[1], data[2]

     if data[2]  == 1 then

        g_game.safeLogout()

        delay(1000)

        return "retry"

     end

 end

found it out.

works on tfs 1.5 downgrade 7.72. and is for cave function in cavebot
 
Back
Top