• 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

Guys, im trying to compile this server, but i got so many errors... Wich version o TFS-SDK and Boost libraries should i use to compile it? Im linking everything correctly... Wich version of VS should i use?

@EDIT:
Now i followed every single step from VCPKG tutorial, and got this:
1>------ Compilação iniciada: Projeto: theforgottenserver, Configuração: Release x64 ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
1>otpch.cpp
1>actions.cpp
1>ban.cpp
1>baseevents.cpp
1>bed.cpp
1>behaviourdatabase.cpp
1>chat.cpp
1>combat.cpp
1>commands.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\actions.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\baseevents.cpp)
1>condition.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\chat.cpp)
1>configmanager.cpp
1>connection.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\connection.cpp)
1>container.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\configmanager.cpp)
1>creature.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\combat.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\bed.cpp)
1>creatureevent.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\commands.cpp)
1>cylinder.cpp
1>database.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\behaviourdatabase.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\creatureevent.cpp)
1>databasemanager.cpp
1>databasetasks.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\database.cpp)
1>depotlocker.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\condition.cpp)
1>fileloader.cpp
1>game.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\databasemanager.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\container.cpp)
1>globalevent.cpp
1>groups.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\creature.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\globalevent.cpp)
1>guild.cpp
1>house.cpp
1>housetile.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\depotlocker.cpp)
1>ioguild.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\guild.cpp)
1>iologindata.cpp
1>iomap.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\housetile.cpp)
1>iomapserialize.cpp
1>item.cpp
1>items.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\game.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\iologindata.cpp)
1>luascript.cpp
1>mailbox.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\iomap.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\items.cpp)
1>map.cpp
1>monster.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\house.cpp)
1>monsters.cpp
1>movement.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\item.cpp)
1>networkmessage.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\luascript.cpp)
1>npc.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\map.cpp)
1>otserv.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\mailbox.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\monster.cpp)
1>outputmessage.cpp
1>party.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\monsters.cpp)
1>player.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\iomapserialize.cpp)
1>position.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\player.cpp)
1>protocol.cpp
1>protocolgame.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\movement.cpp)
1>protocollogin.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\networkmessage.cpp)
1>raids.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\raids.cpp)
1>rsa.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\npc.cpp)
1>scheduler.cpp
1>script.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\otserv.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\party.cpp)
1>scriptmanager.cpp
1>server.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\protocollogin.cpp)
1>spawn.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\scriptmanager.cpp)
1>spells.cpp
1>protocolstatus.cpp
1>talkaction.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\protocolstatus.cpp)
1>tasks.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\protocolgame.cpp)
1>teleport.cpp
1>thing.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\server.cpp)
1>tile.cpp
1>tools.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\spawn.cpp)
1>vocation.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\spells.cpp)
1>waitlist.cpp
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\waitlist.cpp)
1>wildcardtree.cpp
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\talkaction.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\tasks.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\teleport.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\configmanager.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\tools.cpp)
1>c:\nostalgia7.4\nostalrius-master\src\luascript.h(23): fatal error C1083: Não é possível abrir arquivo incluir: 'lua.hpp': No such file or directory (compilando arquivo de origem ..\src\tile.cpp)
1>Projeto de compilação pronto "theforgottenserver.vcxproj" -- FALHA.
========== Compilar: 0 com êxito, 1 com falha, 0 atualizados, 0 ignorados ==========

Change 'lua.hpp' to 'luajit/lua.hpp' :)
 
Guys, im trying to compile this server, but i got so many errors... Wich version o TFS-SDK and Boost libraries should i use to compile it? Im linking everything correctly... Wich version of VS should i use?

I compiled successfully using the old 1.2 method and sdk
 
hello, does someone has bugs on desert quest library tile that removes a wall? sometimes it stop removing wall
 
Change 'lua.hpp' to 'luajit/lua.hpp' :)
Worked... I guess its the only problem with the VCPKG method.
1>Projeto de compilação pronto "theforgottenserver.vcxproj".
========== Compilar: 1 com êxito, 0 com falha, 0 atualizados, 0 ignorados ==========
 
error copiling help me
Linux Ubuntu Server 16.04

Code:
/home/mau/Nostalrius/src/combat.cpp: In static member function ‘static bool Combat::closeAttack(Creature*, Creature*, fightMode_t, bool)’:
/home/mau/Nostalrius/src/combat.cpp:887:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
    if (hit || -totalDamage > defense && (randTest == 5 * (randTest / 5))) {
                                      ^
/home/mau/Nostalrius/src/combat.cpp: In static member function ‘static bool Combat::rangeAttack(Creature*, Creature*, fightMode_t)’:
/home/mau/Nostalrius/src/combat.cpp:1040:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (rand() % distance <= skillValue) {
                         ^
/home/mau/Nostalrius/src/combat.cpp: In static member function ‘static bool Combat::canUseWeapon(Player*, Item*)’:
/home/mau/Nostalrius/src/combat.cpp:1246:72: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (!player->hasFlag(PlayerFlag_HasInfiniteMana) && player->getMana() < weapon->getManaConsumpti                                                                        ^

Code:
/home/mau/Nostalrius/src/player.cpp: In member function ‘uint32_t Player::checkPlayerKilling()’:
/home/mau/Nostalrius/src/player.cpp:2746:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (lastDay >= g_config.getNumber(ConfigManager::KILLS_DAY_BANISHMENT) ||
              ^
/home/mau/Nostalrius/src/player.cpp:2747:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   lastWeek >= g_config.getNumber(ConfigManager::KILLS_WEEK_BANISHMENT) ||
            ^
/home/mau/Nostalrius/src/player.cpp:2748:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   lastMonth >= g_config.getNumber(ConfigManager::KILLS_MONTH_BANISHMENT)) {
             ^
/home/mau/Nostalrius/src/player.cpp:2752:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (lastDay >= g_config.getNumber(ConfigManager::KILLS_DAY_RED_SKULL) ||
              ^
/home/mau/Nostalrius/src/player.cpp:2753:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   lastWeek >= g_config.getNumber(ConfigManager::KILLS_WEEK_RED_SKULL) ||
            ^
/home/mau/Nostalrius/src/player.cpp:2754:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   lastMonth >= g_config.getNumber(ConfigManager::KILLS_MONTH_RED_SKULL)) {
             ^

Code:
/home/mau/Nostalrius/src/protocolgame.cpp: In member function ‘void ProtocolGame::AddCreature(NetworkMessage&, const Creature*, bool, uint32_t)’:
/home/mau/Nostalrius/src/protocolgame.cpp:1789:47: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  if (!creature->isInvisible() || !otherPlayer && player->canSeeInvisibility()) {
                                               ^

Compiled on Jun 27 2019 08:22:07 for platform x64

A server developed by Alejandro Mujica
Visit our forum for updates, support, and resources: OTLand (http://otland.net/).

> Loading config
> Establishing database connection... MySQL 5.7.26
> Running database manager
No tables were optimized.
> Loading vocations
> Loading items
> Loading script systems
> Loading monsters
> Checking world type... PVP
> Loading map
Map size: 65000x65000.
Terminado (killed)
root@hiires:/home/mau/Nostalrius#
 
Last edited:
EDITED:

You can place the by:
Home = [32347,32229,7]

Thats new to me. ahahaha


I was bored so I made NPC where you can buy or sell (40% of the price) items like weapons, shields, helmets, armors, legs, boots or amulets.
Useful for people that playing alone or in small group of people.

You can find him in Thais depot.
View attachment 34587

How can i Import npcs to MAP EDITOR? it is not .xml and i cant import it 0o
 
I feel like I should know this......but I'm just getting around to using the map editor.

What are these blue tiles covering each town?

and what are these speech bubbles and how do I remove them?
37384
 
I feel like I should know this......but I'm just getting around to using the map editor.

What are these blue tiles covering each town?

and what are these speech bubbles and how do I remove them?
1. refreshable tiles
2. tooltips, press Y
 
Ok.

What do you mean by refreshable tiles? What is their purpose? How do you add/remove them?

I never knew tooltips were a thing. How do you add new ones? I do not see an option anywhere.
 
Quest chest with item rewards are made thru the map editor @Kuantikum
Go check Black knight quest for an example
Just dont use a actionid/unique id that is used before.
 
Do you know how to add new quests chests ?

Im looking it on actions but i dont get it yet :/
right click the item and set the quest chest value to one that is not already taken, then add the content you wish to it.

you can see the code in actions/scripts/misc/chests.lua
 
right click the item and set the quest chest value to one that is not already taken, then add the content you wish to it.

you can see the code in actions/scripts/misc/chests.lua

Quest chest with item rewards are made thru the map editor @Kuantikum
Go check Black knight quest for an example
Just dont use a actionid/unique id that is used before.

Thanks guys, love you :D
 
Server save system by globalevents in interval of 15 minutes for exemple, and a /save command to GMs.

I was trying some scripts of others distro but dont works :S


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
 
Back
Top