Source Code Ragnarok Origin[Full] Source 

i found way how to fix errors some files and folders have premisson only read (uncheck all folders & files)
 

Attachments

  • Screenshot 2024-05-25 024648.webp
    14.4 KB · Views: 162
  • Screenshot 2024-05-25 024654.webp
    14.5 KB · Views: 183
####################################
### Server Build for Windows
####################################
IDE: Visual Studio 2019

Code:
cd roserver
del /F /Q /A rogamelibs
mklink /j rogamelibs ..\rogamelibs
rmdir /S /Q winproject

mkdir winproject
cd winproject

# Config 32-Bit
cmake ../ -G "Visual Studio 16 2019" -A Win32 -DCMAKE_BUILD_TYPE=Debug -DASAN=Off -DUSE_POOL=Off -DUSE_TCMALLOC=Off

# Config 64-bit
cmake ../-G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Debug -DASAN=Off -DUSE_POOL=Off -DUSE_TCMALLOC=Off

####################################
### Project Setting
####################################
Open the project using Visual Studio

Click on each project and right-click [Properties] settings

Upper Left [Configuration:] choose [All Configurations]

[C/C++]->[All Options]->[Additional Options]
All set to: /bigobj %(AdditionalOptions)

[Linker]->[Input]->[Additional Dependencies] Each project has different settings, follow the settings below:

audioserver:
Code:
common.lib;ws2_32.lib;libprotobuf.lib;libiconv.lib;zlib.lib;iocp.lib;%(AdditionalDependencies)

authserver:
Code:
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)

battleserver:
Code:
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)

controlserver:
Code:
network.lib;ws2_32.lib;libprotobufd.lib;libiconv.lib;zlibwapi.lib;mysqlclient.lib;mysql_d.lib;iocp.lib;log4cxx_d.lib;%(AdditionalDependencies)

dbserver:
Code:
zlib.lib;libiconv.lib;common.lib;ws2_32.lib;mysqlclient.lib;libprotobuf.lib;mysql.lib;iocp.lib;log4cxx_d.lib;%(AdditionalDependencies)

fmserver:
Code:
ws2_32.lib;libprotobufd.lib;libiconv.lib;zlibwapi.lib;mysqlclient.lib;mysql_d.lib;iocp.lib;libcurld.lib;winmm.lib;wldap32.lib;rocommongamelibs.lib;rogamelibs.lib;lua51.lib;common_new.lib;iocp_d.lib;log4cxx_d.lib;%(AdditionalDependencies)

gameserver:
Code:
common.lib;ws2_32.lib;libprotobuf.lib;libiconv.lib;zlib.lib;mysqlclient.lib;mysql.lib;iocp.lib;libcurl.lib;toluapp.lib;lua51.lib;log4cxx_d.lib;%(AdditionalDependencies)

gateserver:
Code:
common.lib;ws2_32.lib;libprotobuf.lib;libiconv.lib;zlib.lib;iocp.lib;kcp.lib;log4cxx_d.lib;%(AdditionalDependencies)

idipserver:
Code:
libhttp.lib;common.lib;mysqlclient.lib;ws2_32.lib;libprotobuf.lib;libiconv.lib;zlib.lib;iocp.lib;log4cxx_d.lib;%(AdditionalDependencies)

loginserver:
Code:
libcurl.lib;common.lib;ws2_32.lib;libprotobuf.lib;libiconv.lib;zlib.lib;mysqlclient.lib;iocp.lib;log4cxx_d.lib;%(AdditionalDependencies)

masterserver:
Code:
ws2_32.lib;libprotobufd.lib;libiconv.lib;zlibwapi.lib;mysqlclient.lib;mysql_d.lib;iocp.lib;libcurld.lib;toluapp.lib;lua51.lib;common_new.lib;iocp_d.lib;log4cxx_d.lib;%(AdditionalDependencies)

payserver:
Code:
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)

rankserver:
Code:
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)

tradeserver:
Code:
netowrk.lib;ws2_32.lib;libprotobufd.lib;libiconv.lib;zlibwapi.lib;mysqlclient.lib;mysql_d.lib;iocp.lib;libcurld.lib;toluapp.lib;lua51.lib;log4cxx_d.lib;%(AdditionalDependencies)


[Linker]->[Input]->[Ignore Specific Default Library]
Only the following projects are set to: LIBCMTD.lib

controlserver, dbserver, fmserver, gameserver, idipserver, loginserver, masterserver, tradeserver

After completing the settings, you can directly right-click Build Project.

####################################
### CLI Build
####################################
MSBuild Install
89a316010d0382bd15ead0852aa4f52380301bea.png

Then set the environment variables
PATH add C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin

## Build
Code:
cd winproject
msbuild dbserver\dbserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild controlserver\controlserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild gameserver\gameserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild gateserver\gateserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild loginserver\loginserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild masterserver\masterserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild tradeserver\tradeserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild battleserver\battleserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild battleserver\battleserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild audioserver\audioserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
msbuild payserver\payserver.vcxproj /t:build /p:Configuration=Debug;Platform=Win32
i can't follow your guide! can you make documents with ss what guide you say?
 
View attachment 260904
Debug compilation will result in login authentication errors, Release compilation allows login, but a 306 error message appears when entering the game


Have you solved it? I also encountered the same problem

I have said that it does lack web auth files, RO mobile, they are popularly known as ROAPI
The client sends an HTTP request and lets roapi respond with json data.
roapi already exists in ROM EP5.0 Midnight Party.

On some private servers I also collect HTTP JSON data.
03B9o8d.png


Without those files you cannot log into the game normally.


123.png


I think the biggest problem lies with the client, because the compiled apk does not send http or any packet requests to the server. Obviously we have fully opened the Server port.
At this time, I have to wonder whether the version settings or domain/IP settings in config.json are in other places or blocked.

Maybe the channel setting ro_inner is wrong.
Because I saw that the configuration of other private servers is:

Code:
config
{
    "bundleId" : "com.gravity.ragnarokorigin.aos",
    "channel"  : "ro_kr_cbt",
    "area"     : 3,
    "language" : 0,
    "availableLanguage" : [
        3
    ],
    "apiDomain"         : "http://xxxxx.com:18443",
    "intraVersion"      : "20240306105449601",
    "pingXingPkgVersion" : 4,
    "mode"               : {
        "appMode" : 8,
        "zipMode" : 2,
        "abMode"  : 2
    },
    "version"            : {
        "ChannelVersion" : 2,
        "ProgramVersion" : 23,
        "InnerVersion"   : 1,
        "SourceVersion"  : 37
    },
    "programUpdate"      : {
        "type" : 1,
        "serverUrl" : "{0}/check-update?game_code=ro&channel_code={1}&current_version={2}&system={3}&device_id={4}&pkg_env=formal",
        "preServerUrl" : "{0}/check-update?game_code=ro&channel_code={1}&current_version={2}&system={3}&device_id={4}&pkg_env=test",
        "channelId"    : "ro_kr_cbt"
    },
    "hotUpdate"          : {
        "type" : 1,
        "serverUrl" : "{0}/check-update?game_code=ro&channel_code={1}&current_version={2}&system={3}&device_id={4}&pkg_env=formal",
        "preServerUrl" : "{0}/check-update?game_code=ro&channel_code={1}&current_version={2}&system={3}&device_id={4}&pkg_env=test",
        "channelId"    : "ro_kr_cbt"
    },
    "sdkList"            : "FirebaseCrashReport,FirebasePushNotification,FirebaseStatistics,JoyyouPay,JoyyouLogin,JoyyouShare,CdnPkgDownloader,AdjustTracker,WeTestCrashReport,AndroidDevice,MInternalFixer,DefaultAnnounce,MUniWebView",
    "androidNativeSdkList" : "JoyyouSDK,PkgDownloader",
    "fileServer"           : "http://ro-gm-config-ready.123u.com",
    "sign"                 : "54c4be67fb6ef6e71b3f53cc2045ca6d33e7dafe"
}
 
Last edited:
View attachment 260904
Debug compilation will result in login authentication errors, Release compilation allows login, but a 306 error message appears when entering the game


Have you solved it? I also encountered the same problem
check your redis settings in 2 places. one is /roserver/exe/gsconf/serveronly/game_redis_conf.json. the other is login_conf. if you don't configure password for your redis, just leave it as blank.
 
[INFO] 2024-05-25 22:22:38,040 LoginServer - SetRecommandGateInfo(rpcc2i_querygateipnew.cpp:24) query gate return recommand server[192.168.200.100:10110]

View attachment 260908
Is there an error in my database settings?


View attachment 260910


It seems that there is an issue with masterserver,login error 306
if 192.168.200.100 is your server's ip, then it should be OK.

I helped another guy with login issue a couple of days ago. He got the same issue as yours. TSS error and ERR_LOGIN_VERIFY_FAILED. After removing tss, and correcting the redis settings in 2 places I posted, he can login game now. I think someone had posted how to remove the tss, maybe you can have a look.
 
#####################################
### Build Server on Debian 10
#####################################
## Build GCC 9.2.0


## Build MySQL 5.6


## Build Server Linrary


## Clear Devel Library Package
sudo apt-get --purge remove libevent-dev libevhtp-dev

## Install Build Dependencies
sudo apt-get install screen libssl-dev libcurl4-nss-dev liboauth-dev

## Download Build Library
tar zxvf libevhtp.tar.gz
copy libevhtp/include/* to roserver/common/include/
copy libevhtp/lib-debian-openssl-1.1/libevhtp.a to roserver/lib/

## 9.2.0 Environment Variable
sudo ln -sf ../bin/cpp /usr/local/gcc-9.2.0/lib/cpp
sudo ln -sf ../lib/gcc/x86_64-linux-gnu/lib64/libgcc_s.so.1 /usr/local/gcc-9.2.0/lib64/libgcc_s.so.1
sudo ln -sf libgcc_s.so.1 /usr/local/gcc-9.2.0/lib64/libgcc_s.so
sudo ln -sf /usr/local/gcc-9.2.0/lib/gcc/x86_64-linux-gnu/9.2.0/libstdc++.so.6.0.27 /usr/local/gcc-9.2.0/lib64/libstdc++.so.6.0.27
sudo ln -sf libstdc++.so.6.0.27 /usr/local/gcc-9.2.0/lib64/libstdc++.so.6
sudo ln -sf libstdc++.so.6 /usr/local/gcc-9.2.0/lib64/libstdc++.so

GCC_VER=9.2.0
GCC_ROOT=/usr/local/gcc-9.2.0
GCC_PATH=${GCC_ROOT}/bin
GCC_MANPATH=${GCC_ROOT}/share/man
GCC_INFOPATH=${GCC_ROOT}/share/info

export PATH=${GCC_PATH}:${PATH}
export MANPATH=${GCC_MANPATH}:${MANPATH}
export INFOPATH=${GCC_MANPATH}:${INFOPATH}
export PCP_DIR=${GCC_ROOT}
export PKG_CONFIG_PATH=${GCC_ROOT}/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
export LD_LIBRARY_PATH=${GCC_ROOT}/lib64:${GCC_ROOT}/lib:${LD_LIBRARY_PATH}

#####################################
### Build Release ServerFile
#####################################
ln -sf ../rogamelibs rogamelibs
ln -sf ../rogamelibs/buildtool/Server/lib/librogamelibs.a lib/librogamelibs.a
ln -sf ../rogamelibs/buildtool/Server/lib/librogamelibs_release.a lib/librogamelibs_release.a
ln -sf ../rogamelibs/table/buildtool/Server/lib/libconfiglib.a lib/libconfiglib.a

rm -rf Build
mkdir -p Build/Release/bin

install -D -m644 /usr/local/gcc-9.2.0/lib64/libstdc++.so.6 Build/Release/bin/lib/libstdc++.so.6
install -D -m644 /usr/local/gcc-9.2.0/lib64/libgcc_s.so.1 Build/Release/bin/lib/libgcc_s.so.1
install -D -m644 /usr/lib/x86_64-linux-gnu/libcurl-nss.so.4 Build/Release/bin/lib/libcurl-nss.so.4
install -D -m644 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 Build/Release/bin/lib/libssl.so.1.1
install -D -m644 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 Build/Release/bin/lib/libcrypto.so.1.1

cp exe/server.xml Build/Release/bin/
cp exe/conf_create.py Build/Release/bin/
cp exe/dropdb.py Build/Release/bin/

cp -r exe/conf Build/Release/bin/
cp -r exe/loginconf Build/Release/bin/
cp -r exe/dbconf Build/Release/bin/
cp -r exe/gateconf Build/Release/bin/
cp -r exe/gsconf Build/Release/bin/
cp -r exe/audioconf Build/Release/bin/
cp -r exe/versionconf Build/Release/bin/

cd Build/Release

# cmake config
cmake -DCMAKE_BUILD_TYPE=Release \
-DASAN=Off -DUSE_POOL=Off -DUSE_TCMALLOC=Off \
-DGCC=${GCC_VER} -DCMAKE_C_COMPILER=$GCC_PATH/gcc -DCMAKE_CXX_COMPILER=$GCC_PATH/g++ \
-DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=1' \
../..

# Build Server File
DIRNAME=("payserver" "gameserver" "gateserver" "controlserver" "dbserver" "masterserver" "loginserver" "tradeserver" "audioserver" "battleserver" "idipserver" "rankserver" "authserver" "fmserver")
for DIRS in ${DIRNAME[@]}
do
cd ${DIRS}
make -j$(nproc)
strip --strip-debug ../bin/${DIRS}
cd ..
done

mv bin ../../ServerFile
cd ../../

3DgRlTq.png
I follow your tutorial on installing GCC9.2.0. Unfortunately I got an error during perform make -j$(nproc).

What should I do? still can't install GCC9.2.0.

1716702429146.webp


1716702346858.webp
 
The 98G version and the 20G version seem to be different, with the 98G version being 2.7.4
 
The 98G version and the 20G version seem to be different, with the 98G version being 2.7.4
There is a problem with the 20GB client source code
You compile it into an apk and install it in the emulator.
You can use smsniff to try to collect packets.
As a result, I found that the client made no request at all.
Because I changed the domain of other private servers, it still did not request packets.
In other words, HTTP does not respond.
 
There is a problem with the 20GB client source code
You compile it into an apk and install it in the emulator.
You can use smsniff to try to collect packets.
As a result, I found that the client made no request at all.
Because I changed the domain of other private servers, it still did not request packets.
In other words, HTTP does not respond.
Maybe it's because the private server is different from our server
 
I have a problem with my Build\Androad project. I need to re-download it to fix it. It's stuck on check version.
 
I have a problem with my Build\Androad project. I need to re-download it to fix it. It's stuck on check version.
You need to place the config folder in the same level directory of the Unity project and edit sys_env.json to avoid the need to download again

if 192.168.200.100 is your server's ip, then it should be OK.

I helped another guy with login issue a couple of days ago. He got the same issue as yours. TSS error and ERR_LOGIN_VERIFY_FAILED. After removing tss, and correcting the redis settings in 2 places I posted, he can login game now. I think someone had posted how to remove the tss, maybe you can have a look.
Thank you, that's it. I have successfully entered the game
 
Last edited:
Back