• 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!

Need some help with LUA, i can pay.

SalvaART

TriasOT.online
Joined
May 1, 2017
Messages
208
Solutions
1
Reaction score
122
Location
USA
Hello everyone i need some help with lua, i can pay for help, its very important for me.

TFS 1.5 8.60 by nekiro

1. Globalevent ( i dont know why, but my global server save didnt work, didnt reset serwer.

globalevents.xml
XML:
<?xml version="1.0" encoding="UTF-8"?>
<globalevents>
    <globalevent type="startup" name="ServerStartup" script="startup.lua" />
    <globalevent type="record" name="PlayerRecord" script="record.lua" />
    <globalevent name="Server Save" time="09:55:00" script="serversave.lua" />
    <!--
    <globalevent name="timer_example" time="12:00:00" script="my_script.lua" />
    -->
</globalevents>

serversave.lua
Lua:
local function ServerSave()
    if configManager.getBoolean(configKeys.SERVER_SAVE_SHUTDOWN) then
        Game.setGameState(GAME_STATE_SHUTDOWN)
    else
        local closeAtServerSave = configManager.getBoolean(configKeys.SERVER_SAVE_CLOSE)
        if closeAtServerSave then
            Game.setGameState(GAME_STATE_CLOSED)
        end

        saveServer()

        if configManager.getBoolean(configKeys.SERVER_SAVE_CLEAN_MAP) then
            cleanMap()
        end

        if closeAtServerSave then
            Game.setGameState(GAME_STATE_NORMAL)
        end
    end
end

local function ServerSaveWarning(time)
    local remaningTime = tonumber(time) - 60000

    if configManager.getBoolean(configKeys.SERVER_SAVE_NOTIFY_MESSAGE) then
        Game.broadcastMessage("Server is saving game in " .. (remaningTime/60000) .."  minute(s). Please logout.", MESSAGE_STATUS_WARNING)
    end

    if remaningTime > 60000 then
        addEvent(ServerSaveWarning, 60000, remaningTime)
    else
        addEvent(ServerSave, 60000)
    end
end

function onTime(interval)
    local remaningTime = configManager.getNumber(configKeys.SERVER_SAVE_NOTIFY_DURATION) * 60000
    if configManager.getBoolean(configKeys.SERVER_SAVE_NOTIFY_MESSAGE) then
        Game.broadcastMessage("Server is saving game in " .. (remaningTime/60000) .."  minute(s). Please logout.", MESSAGE_STATUS_WARNING)
    end

    addEvent(ServerSaveWarning, 60000, remaningTime)
    return not configManager.getBoolean(configKeys.SERVER_SAVE_SHUTDOWN)
end

2. I need script like right click on blue nutes to buy 100x runes/100x potions
1650878737855.png

3. How i can make VIP Doors/VIP TP only for VIP Players? i use this VIP System
- VIP System [The Forgotten Server 1.0] (https://otland.net/threads/vip-system-the-forgotten-server-1-0.224910/)

4. Script manarune + removeonuse + show mana percent when use like " +370 mana "
 
Back
Top