How to install roCORD
Thanks Vegas for providing a server setup for me!
It is important to use a supported rAthena version else this could fail. If you have problems ask here or in rAthena forum and please provide an error log.
SRC PART
Go into your home directory.
$ cdClone the repo.
$ git clone https://github.com/Normynator/Ragnarok.gitGo to your rAthena installation. Replace /path/to/your/rathena with the path to your rAthena folder. And go into the src area.
$ cd /path/to/your/rathena/
$ cd src/map/Create backups of the modified files in case something bad happens!
$ cp channel.cpp channel.cpp.bk
$ cp script.cpp script.cpp.bk
$ cp mob.cpp mob.cpp.bkSince we have backups no we don't need to worry about modifiying your src files and just apply the provided diffs.
$ patch channel.cpp ~/Ragnarok/rA_mods/discordbot/diffs/channel.diff
$ patch script.cpp ~/Ragnarok/rA_mods/discordbot/diffs/script.diff
$ patch mob.cpp ~/Ragnarok/rA_mods/discordbot/diffs/mob.diffsrc modification was done in the previous step. Now we are going to add the discordbot to our src files.
$ cp ~/Ragnarok/rA_mods/discordbot/discordbot.h .
$ cp ~/Ragnarok/rA_mods/discordbot/discordbot.cpp .src changes are finally done. Let's go back to the rAthena root folder.
$ cd ../../First we need to check if the server is still running.
$ ./athena-start statusIf see this output you can go to "Recompile".
'login-server' seems to be down
'char-server' seems to be down
'map-server' seems to be down
else stop your rAthena server.
$ ./athena-start stopRecompile:
Now it's time to recompile your rAthena server.
$ ./configure
$ make server(* if you have an compile ERROR post it in forum.*)
(* you can ignore WARNINGS for now. *)
BRIDGE PART
Make sure to have an updateted system and install nodejs and npm.
$ sudo apt-get update
$ sudo apt-get install npm
$ sudo apt-get install curl
$ sudo apt-get install screen
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ mkdir bridge
$ cd bridge
$ cp ~/Ragnarok/rA_mods/discordbot/bridge/*.js* .
$ npm install
$ # Please ignore all "WARN" warnings for now!DISCORD PART
To generate a discord bot you have to visit: https://discordapp.com/developers/applications/me
Click on new app to create a bot. Choose the name of your bot and continue.
Next you have to scroll down to create an actual bot user.
To get your token click on "click to reveal". You will need your token later (keep it secret).
Now to give the bot some permission click on "Generate OAuth2 URL".
Here you can choose the permissions for your bot and when your are done, go and copy that link!
Follow your saved link and you'll be able to add your bot to a server!
As a last step you need to choose a channel and get it's ID.

For the last step you will need the Channel ID and your secret token.
FINAL PART
Go back to your server.
$ vi index.jsNow use Secret Token, Channel ID and Channel Name as shown in the picture. (Channel name without #)
$ screen
$ node index.jsThan press Ctrl + A + D and start your rAthena server.
Done!




