User Tools

Site Tools


games:bsd:2004scape_localhost

Information

  • 2004Scape Server 1)
  • main Branch 2)
  • These notes provide a local singleplayer server for 2004Scape 3) on FreeBSD

Prerequisites

Resources

Web

Dependencies

Download Source

cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/2004Scape-Server/src' && git clone --branch 'main' --depth '1' --recurse-submodules 'https://github.com/2004Scape/Server.git' ~/'Projects/2004Scape-Server/src' && sync

Settings

ee ~/'Projects/2004Scape-Server/src/.env'
WEB_PORT=8888
NODE_PORT=44594
NODE_PRODUCTION=false
NODE_ALLOW_CHEATS=false
NODE_DEBUG=false
NODE_STAFF=Test

Desktop Launcher

2004Scape

mkdir -p ~/'.local/share/applications/' && nano ~/'.local/share/applications/2004Scape-localhost.desktop' && sed -i 's/'CHANGEME'/'$USER'/g' ~/'.local/share/applications/2004Scape-localhost.desktop' && update-desktop-database --quiet ~/'.local/share/applications'
[Desktop Entry]
Name=2004Scape
Categories=Game;
Exec='/bin/bash' -c "gio open 'http://localhost:8888'"
Type=Application
StartupNotify=false
Icon=/home/CHANGEME/Projects/2004Scape-Server/src/public/favicon.ico
Actions=Server;Update;Saves;Notes;

[Desktop Action Server]
Exec='/bin/bash' -c "xfce4-terminal --title='2004Scape localhost Server' --execute ~/'Projects/2004Scape-Server/localhost-server-start.sh'"
Name=Launch Local Server

[Desktop Action Update]
Exec='/bin/bash' -c "xfce4-terminal --title='2004Scape localhost Updater' --execute ~/'Projects/2004Scape-Server/localhost-server-update.sh'"
Name=Update Local Server

[Desktop Action Saves]
StartupNotify=false
Exec='/bin/bash' -c "~/'Projects/2004Scape-Server/localhost-save-backup.sh'"
Name=Save Data Back-up

[Desktop Action Notes]
StartupNotify=false
Exec='/bin/bash' -c "gio open 'https://wiki.realmofespionage.xyz/games;linux;2004scape_localhost'"
Name=Installation Notes

# End

Scripts

Server Start

nano ~/'Projects/2004Scape-Server/localhost-server-start.sh' && chmod +x ~/'Projects/2004Scape-Server/localhost-server-start.sh'
#!/bin/sh

cd ~/'Projects/2004Scape-Server/src'
npm start

# End

Server Update

nano ~/'Projects/2004Scape-Server/localhost-server-update.sh' && chmod +x ~/'Projects/2004Scape-Server/localhost-server-update.sh'
#!/bin/sh

git -C ~/'Projects/2004Scape-Server/src' reset --hard
git -C ~/'Projects/2004Scape-Server/src' pull origin 'main' --rebase

cd ~/'Projects/2004Scape-Server/src'
npm run 'clean'

read -n '1' -s -r -p 'Done! Press any key to exit.'

# End

Save Data Back-up

nano ~/'Projects/2004Scape-Server/localhost-save-backup.sh' && chmod +x ~/'Projects/2004Scape-Server/localhost-save-backup.sh'
#!/bin/sh

tar -cvzf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2004Scape-Server-localhost-Saves.tar.gz' -C ~/'Projects/2004Scape-Server/src/data' 'players'
sync
notify-send '2004Scape Save Data Backed-up Successfully to Downloads'
gio open ~/'Downloads/'

# End

Quick Commands

Execute

Server

cd ~/'Projects/2004Scape-Server/src' && npm start
~/'Projects/2004Scape-Server/localhost-server-start.sh'

Client

Update

git -C ~/'Projects/2004Scape-Server/src' reset --hard && git -C ~/'Projects/2004Scape-Server/src' pull origin 'main' --rebase && cd ~/'Projects/2004Scape-Server/src' && npm run 'clean'
~/'Projects/2004Scape-Server/localhost-server-update.sh'
xfce4-terminal --execute ~/'Projects/2004Scape-Server/localhost-server-update.sh'

Save Data Back-up

mkdir -p ~/'Projects/2004Scape-Server/src/data/players' && gio open ~/'Projects/2004Scape-Server/src/data/players'
~/'Projects/2004Scape-Server/localhost-save-backup.sh'

npm

  • Lists available npm commands
cd ~/'Projects/2004Scape-Server/src' && npm run

File Manager

Root

gio open ~/'Projects/2004Scape-Server/src'
3)
RSPS/RuneScape Private Server based on cache 225 from May 18th, 2004
/var/www/wiki/data/pages/games/bsd/2004scape_localhost.txt · Last modified: by Sean Rhone