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

[7.72] OTHire 0.0.3

Hello folks,

Can anyone update the compiling guide for linux distributions?

Thanks in advance :)
 
Added some fixes today, if any users can test them it would be nice. Also if anyone wanna tackle a good problem: TwistedScorpio/OTHire (https://github.com/TwistedScorpio/OTHire/milestone/2)

Anyone with a live server updating to the current death penalty fixes need to add this login script to fix old promoted characters and characters with blessings. Make sure to change updateDay to your update day unixtimestap (Unix Time Stamp - Epoch Converter (https://www.unixtimestamp.com/)).

Lua:
function onLogin(cid)
    local lastLogin = getPlayerLastLogin(cid)
    local updateDay = 1608418480
    if not (lastLogin ~= 0) or (lastLogin > updateDay) then
        -- it's fine
        return true
    end

    promoted = false
    if getPlayerVocation(cid) > 4 then
        promoted = true
    end

    local blesses = 0
    while i <= 5 do
        if getPlayerBless(cid, i) == true then
            blesses = blesses + 1
        end
        i = i + 1
    end
        
    local value = 100
    if promoted == true then
        value = value - 30
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Now this promoted character has reduced death penalty.")
    end
    if blesses >= 1 then
        value = value - 10 * blesses
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "This character has " .. blesses .. " blessings, that now properly reduce level, magic level and skill losses on death by 1% each. ")
    end
    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, value)
    doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, value)
    doPlayerSetLossPercent(cid, PLAYERLOSS_SKILL, value)
    doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 10)
    doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 100)

    return true
end
 
Last edited by a moderator:
Is it possible to give monsters attacks/spells an interval? I remember reading something about it but i dont think it got implemented?

Also if someone could check this bug out, i would appreciate it [OTHire 7.72] Attack speed bug while enemy is not moving. (https://otland.net/threads/othire-7-72-attack-speed-bug-while-enemy-is-not-moving.274360/)
maybe related to this:
 
Compiled with vs2010 followed windows compiling tutorial to a t. I get unresolved external symbol errors. Does anyone know what im missing?
 
Compiled with vs2010 followed windows compiling tutorial to a t. I get unresolved external symbol errors. Does anyone know what im missing?
You need to add additional dependencies to Linker -> input or additional libraries udner linker -> general, maybe both. Compilers confuse the fuck out of me.
 
I added all libraries. Usually symbol errors are related to needing .dll files linked to the compiler. I did try to link the dll's but it didn't help anything. Thanks for the reply though.

Edit nvm, I did miss the last step in adding the libs.
 
Last edited:
There is any way to get a bid system for this distribution? I have the website fully working, but i guess i should handle the bid system from startup.lua...can't find anything on otland, only for tfs 1.0.
 
Last edited:
I got some reports that players dont save house info / items on server save, this is my global server save script that im using, maybe is something bad here?

Lua:
local function globalSave(minutes)
    local minutes = minutes or 0
    if minutes <= 0 then
        doSaveServer(true)
        doSetGameState(GAME_STATE_CLOSED)
        doSetGameState(GAME_STATE_SHUTDOWN)
        os.exit(0)
        return true
    end
    if minutes == 1 then
        doBroadcastMessage("Global server save in " .. minutes .. " minute, please go to safe zone and logout.")
    else
        doBroadcastMessage("Global server save in " .. minutes .. " minutes, please go to safe zone.")
    end
    globalEvent = addEvent(globalSave, 60000, minutes - 1)
    return true
end

function onTime(interval, lastExecution)
    return globalSave(math.abs(math.ceil(5)))
end

@Peonso <3
 
Last edited:
I got some reports that players dont save house info / items on server save, this is my global server save script that im using, maybe is something bad here?

Lua:
local function globalSave(minutes)
    local minutes = minutes or 0
    if minutes <= 0 then
        doSaveServer(true)
        doSetGameState(GAME_STATE_CLOSED)
        doSetGameState(GAME_STATE_SHUTDOWN)
        os.exit(0)
        return true
    end
    if minutes == 1 then
        doBroadcastMessage("Global server save in " .. minutes .. " minute, please go to safe zone and logout.")
    else
        doBroadcastMessage("Global server save in " .. minutes .. " minutes, please go to safe zone.")
    end
    globalEvent = addEvent(globalSave, 60000, minutes - 1)
    return true
end

function onTime(interval, lastExecution)
    return globalSave(math.abs(math.ceil(5)))
end

@Peonso <3
I used default one I think
Code:
local shutdownAtServerSave = true

local function serverSave()
    if shutdownAtServerSave then
        doSetGameState(GAME_STATE_CLOSED)
        doSaveServer(true)
        doSetGameState(GAME_STATE_SHUTDOWN)
    else
        doSetGameState(GAME_STATE_CLOSED)
        doSaveServer(true)
        doSetGameState(GAME_STATE_NORMAL)
    end
end

local function secondServerSaveWarning()
    broadcastMessage("Server is saving game in one minute. Please logout.", MESSAGE_STATUS_WARNING)
    addEvent(serverSave, 60000)
end

local function firstServerSaveWarning()
    broadcastMessage("Server is saving game in 3 minutes. Please logout.", MESSAGE_STATUS_WARNING)
    addEvent(secondServerSaveWarning, 120000)
end

function onTime(interval)
    broadcastMessage("Server is saving game in 5 minutes. Please logout.", MESSAGE_STATUS_WARNING)
    doSetGameState(GAME_STATE_STARTUP)
    addEvent(firstServerSaveWarning, 120000)
    return true
end
Once had a bug that I couldn't track that house by last ID was having issues, I create a new house on GM island to have the last ID and it worked, no idea why.
 
Last edited:
Back
Top