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

Nostalrius 7.7

Wow, your server seems awesome! ur so cool!

Too bad ur server wont be popular anyway :)
Enjoy programming.
I dont care about popularity of the server because I do it out of fondness for the old Tibia. For the people who want to experience this sentiment as well. The funds for the server and the www domain will come from my own resources. I'm thinking about free premium account. The server will be standing for years. The funds for the server and the www domain will come from my own resources. God bless me, I have good income and no family so no spendings. The server will be standing for years, probably as long as I am alive because I am absolutely degenerated nerd and do everything with unexpected precission.
 
I'm trying to compile and had this error. Someone know how to resolve?

1641686415446.png
 
Last edited:
Sorry for the noob question.

Doesn't come with executable .exe? How can I get one?

in tfs 1.5 i find an executable called theforgottenserver-x64.exe.
 
Sorry for the noob question.

Doesn't come with executable .exe? How can I get one?

in tfs 1.5 i find an executable called theforgottenserver-x64.exe.

You have to compile Nostalrius project to have an exe.
 
Hi there, I've managed to get the server up and running, get a client to connect to it but whenever I logout on the character I get this error:

Lua:
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 8,`group_id` = 1,`vocation` = 4,`health` = 185,`healthmax` = 185,`experience` = 4200,`lookbody` = 106,`lookfeet` = 95,`lookhead` = 78,`looklegs` = 58,`looktype` = 128,`maglevel` = 0,`mana` = 40,`manamax` = 40,`manaspent` = 0,
Message: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '☺,`lastlogin` = 1643481644,`lastip` = 16777343,`conditions` = '',`skulltime` ...' at line 1
Error while saving player: Boots

Can you help me fix this?
 
Hi there, I've managed to get the server up and running, get a client to connect to it but whenever I logout on the character I get this error:

Lua:
[Error - mysql_real_query] Query: UPDATE `players` SET `level` = 8,`group_id` = 1,`vocation` = 4,`health` = 185,`healthmax` = 185,`experience` = 4200,`lookbody` = 106,`lookfeet` = 95,`lookhead` = 78,`looklegs` = 58,`looktype` = 128,`maglevel` = 0,`mana` = 40,`manamax` = 40,`manaspent` = 0,
Message: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '☺,`lastlogin` = 1643481644,`lastip` = 16777343,`conditions` = '',`skulltime` ...' at line 1
Error while saving player: Boots

Can you help me fix this?
"sex" should be cast to int32_t on iologindata.cpp (saving part)
 
Sorry to bother you again, I seem to have come across a strange issue regarding OTClientV8, at the moment it does not have ping enabled(ping shows as ??) and I can play just fine, but once I go to features.lua and add this line of code:

Lua:
g_game.enableFeature(GameClientPing)

The ping works, it shows how high/low my ping is but it also kicks me out of the game after a few seconds, but the log on the console of the server does not show me as logged out.

Do I have to add something else in the source files of the actual server to enable ping? I've tried to reference from newer TFS to see if the code for ping is different but from what I can tell it's pretty much the same. Any help is appreciated. :)
 
Sorry to bother you again, I seem to have come across a strange issue regarding OTClientV8, at the moment it does not have ping enabled(ping shows as ??) and I can play just fine, but once I go to features.lua and add this line of code:

Lua:
g_game.enableFeature(GameClientPing)

The ping works, it shows how high/low my ping is but it also kicks me out of the game after a few seconds, but the log on the console of the server does not show me as logged out.

Do I have to add something else in the source files of the actual server to enable ping? I've tried to reference from newer TFS to see if the code for ping is different but from what I can tell it's pretty much the same. Any help is appreciated. :)

Here: Added better ping function - OTCV8
 
Got a question.

Is it possible to make a monster, that drops a Key with specyfic Key Number?
e.g. Minotaur drops me a "Golden Key" with 100% chance with "key number 6500" to open door with number 6500 key hole.

I tried it out with monster "KeyNumber/KeyId/Key.." etc, it wasnt work.
ActionId in monster xml works, i get Key with ActionId number..

I tried with that topic - Lua - Adding an item with an ActionID in monster loot (https://otland.net/threads/adding-an-item-with-an-actionid-in-monster-loot.199820/)

What Im looking for is that how to spell a "key number" in monster for a KEY item in monster loot or script, that generate me a key with key number in monster loot after kill :)
 
data/globalevents/globalevents.xml
XML:
<globalevent name="Player Save" interval="1800000" script="playersave.lua" />


data/globalevents/scripts/playersave.lua
Lua:
local function serverSave()
    Game.saveGameState()
    broadcastMessage("Server saved, next save in 30 minutes.", MESSAGE_STATUS_WARNING)
    return true
end

function onThink(interval, lastExecution, thinkInterval)
    broadcastMessage("Automatic Serversave in 10 seconds!", MESSAGE_STATUS_WARNING)
    addEvent(serverSave, 10000)
end


data/talkactions/scripts/saveserver.lua
Lua:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end

    Game.saveGameState()
    player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Server is now saved.")
end


data/talkactions/talkactions.xml
XML:
<talkaction words="/saveserver" script="saveserver.lua" />


src/luascript.cpp add on line 1635 ~

C++:
registerMethod("Game", "saveGameState", LuaScriptInterface::luaGameSaveGameState);
and add on line 3939 (after luaGameSetGameState)
C++:
int LuaScriptInterface::luaGameSaveGameState(lua_State* L)
{
    // Game.saveGameState()
    g_game.saveGameState();
    pushBoolean(L, true);
    return 1;
}

src/luascript.h add on line 538 ~
C++:
static int luaGameSaveGameState(lua_State* L);


enjoy

Does it save the house?
 
Does it save the house?
only that
<globalevent name="Progress Saving" interval="600000" script="serversaveprogress.lua" />
is not saving house, code you use in that point it is

i have like that:
globalevents.xml
HTML:
<globalevent name="Progress Saving" interval="600000" script="serversaveprogress.lua" />

code data\globalevents\scripts
Lua:
local shutdownAtServerSave = false
local cleanMapAtServerSave = false

local function serverSave()
    if shutdownAtServerSave then
        Game.setGameState(GAME_STATE_SHUTDOWN)
    else
        Game.setGameState(GAME_STATE_CLOSED)

        if cleanMapAtServerSave then
            cleanMap()
        end

        Game.setGameState(GAME_STATE_NORMAL)
    end
end


function onThink(interval)
    addEvent(saveData, 1000)
    return not shutdownAtServerSave
end
Post automatically merged:

maybe some one got clue or script for spears?
what it should do:

spear could not fall from hand (can disappear but it is not nessesary)
or
spear fall to the ground and I need action script for clicking it, counting how much is on the ground and move to hand
so player see :
spear on the ground -> click -> spear in hand

but 1 option is better for me actually :)
 
Last edited:
only that
<globalevent name="Progress Saving" interval="600000" script="serversaveprogress.lua" />
is not saving house, code you use in that point it is

i have like that:
globalevents.xml
HTML:
<globalevent name="Progress Saving" interval="600000" script="serversaveprogress.lua" />

code data\globalevents\scripts
Lua:
local shutdownAtServerSave = false
local cleanMapAtServerSave = false

local function serverSave()
    if shutdownAtServerSave then
        Game.setGameState(GAME_STATE_SHUTDOWN)
    else
        Game.setGameState(GAME_STATE_CLOSED)

        if cleanMapAtServerSave then
            cleanMap()
        end

        Game.setGameState(GAME_STATE_NORMAL)
    end
end


function onThink(interval)
    addEvent(saveData, 1000)
    return not shutdownAtServerSave
end
Post automatically merged:

maybe some one got clue or script for spears?
what it should do:

spear could not fall from hand (can disappear but it is not nessesary)
or
spear fall to the ground and I need action script for clicking it, counting how much is on the ground and move to hand
so player see :
spear on the ground -> click -> spear in hand

but 1 option is better for me actually :)

I tested it worked and saved the house.
it just gives a false "Player Save" message in the xml. everything else ok, i don't know about spear script in the code, in mine i left it as original, just reduced the chance of breaking spears and small stones.
 
Back
Top