====== Information ======
* 2009Scape Server ((https://gitlab.com/2009scape/2009scape))
* ''master'' Branch ((https://gitlab.com/2009scape/2009scape/-/tree/master?ref_type=heads))
===== Prerequisites =====
* [[bsd:freebsd_14.1_xfce|FreeBSD 14.1 (Xfce)]]
====== Dependencies ======
* https://gitlab.com/2009scape/2009scape#prerequisites
su -l
pkg install git git-lfs openjdk17
====== Git LFS ======
* From normal user and not ''su''
git lfs 'install'
====== Download Source ======
****
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/2009Scape-Server/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://gitlab.com/2009scape/2009scape.git' ~/'Projects/2009Scape-Server/src' && sync
====== Initial Build ======
* [[https://gitlab.com/2009scape/2009scape/-/blob/master/build?ref_type=heads#L19|build script flags]]
cd ~/'Projects/2009Scape-Server/src/Server' && ~/'Projects/2009Scape-Server/src/Server/mvnw' 'clean'
cd ~/'Projects/2009Scape-Server/src/Server' && ~/'Projects/2009Scape-Server/src/Server/mvnw' 'package'
====== Settings ======
* Last commit: [[https://gitlab.com/2009scape/2009scape/-/commit/317b4e9b5c330c6492663631d3edca9794dfc2f9|August 10, 2024]] ''317b4e9b''
* [[https://gitlab.com/2009scape/2009scape/-/commits/master/Server/worldprops/default.conf?ref_type=heads|New commits check]]
* [[https://gitlab.com/2009scape/2009scape/-/blob/master/Server/worldprops/default.conf?ref_type=heads|Upstream worldprops/default.conf]] ([[https://gitlab.com/2009scape/2009scape/-/raw/master/Server/worldprops/default.conf?ref_type=heads|raw]])
rm -v -f ~/'Projects/2009Scape-Server/src/Server/worldprops/default.conf'
ee ~/'Projects/2009Scape-Server/src/Server/worldprops/default.conf'
[server]
# Server
log_level = "verbose"
write_logs = true
msip = "localhost"
secret_key = "2009scape_development"
preload_map = false
# Accounts
use_auth = false
persist_accounts = false
noauth_default_admin = false
daily_accounts_per_ip = 3
# Watchdog
watchdog_enabled = false
connectivity_check_url = "localhost"
connectivity_timeout = 500
[database]
# MySQL
database_address = "localhost"
database_port = "3306"
database_name = "2009scape"
database_username = "2009scape"
database_password = "x"
[integrations]
# Grafana Analytics?
grafana_logging = false
grafana_log_path = "@data/logs"
grafana_log_ttl_days = 1
[world]
# localhost
motw_text = "Welcome to your localhost server!"
show_rules = false
new_player_announcement = false
allow_token_purchase = false
autostock_ge = false
bots_influence_ge_price = false
enable_doubling_money_scammers = false
personalized_shops = false
enable_default_clan = false
# Jagex-like
i_want_to_cheat = false
default_xp_rate = 1.0
runecrafting_formula_revision = 530
allow_slayer_reroll = false
better_agility_pyramid_gp = false
better_dfs = false
skillcape_perks = false
jad_practice_enabled = false
# Holiday (only enable one or none)
force_halloween_randoms = false
force_christmas_randoms = true
# PVP
pvp = false
wild_pvp_enabled = false
enhanced_deep_wilderness = true
revenant_population = 30
# Server config
debug = false
dev = false
start_gui = false
daily_restart = false
smartpathfinder_bfs = true
enable_botting = false
motw_identifier = "0"
ge_announcement_limit = 500
increased_door_time = false
enable_castle_wars = false
verbose_cutscene = false
holiday_event_randoms = true
enable_bots = false
max_adv_bots = 100
new_player_location = "2524,5002,0"
home_location = "3222,3218,0"
# World
name = "2009Scape (::1)"
world_id = "1"
country_id = "0"
members = true
name_ge = "2009Scape"
activity = "2009Scape Classic."
[paths]
# Paths
data_path = "data"
bot_data = "@data/botdata"
cache_path = "@data/cache"
configs_path = "@data/configs"
eco_data = "@data/eco"
grand_exchange_data_path = "@data/eco"
logs_path = "@data/logs"
object_parser_path = "@data/ObjectParser.xml"
save_path = "@data/players"
store_path = "@data/serverstore"
# Drop Tables
rare_drop_table_path = "@data/configs/shared_tables/RDT.xml"
gem_drop_table_path = "@data/configs/shared_tables/GDT.xml"
herb_drop_table_path = "@data/configs/shared_tables/HDT.xml"
cele_drop_table_path = "@data/configs/shared_tables/CELEDT.xml"
allotment_seed_drop_table_path = "@data/configs/shared_tables/ASDT.xml"
uncommon_seed_drop_table_path = "@data/configs/shared_tables/USDT.xml"
rare_seed_drop_table_path = "@data/configs/shared_tables/RSDT.xml"
# End
====== Scripts ======
===== Server Start =====
* [[games:bsd:rt4_client_runescape_530#scape_localhost|RT4 Client Desktop Action Server]]
mkdir -p ~/'Projects/2009Scape-Server/scripts' && ee ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh' && chmod +x ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh'
#!/bin/sh
cd ~/'Projects/2009Scape-Server/src/Server'
java -jar ~/'Projects/2009Scape-Server/src/Server/target/server-'*'-jar-with-dependencies.jar'
# End
~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh'
===== Server Update =====
* [[https://gitlab.com/2009scape/2009scape/-/commits/master|Commits History]]
* [[games:bsd:rt4_client_runescape_530#scape_localhost|RT4 Client Desktop Action Server-Update]]
mkdir -p ~/'Projects/2009Scape-Server/scripts' && ee ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh' && chmod +x ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh'
#!/bin/sh
git -C ~/'Projects/2009Scape-Server/src' reset --hard
git -C ~/'Projects/2009Scape-Server/src' pull origin 'master' --rebase
cd ~/'Projects/2009Scape-Server/src/Server'
~/'Projects/2009Scape-Server/src/Server/mvnw' 'clean'
~/'Projects/2009Scape-Server/src/Server/mvnw' 'package'
notify-send '2009Scape worldprops copy/paste in 3 seconds...'
sleep '3'
gio open 'https://wiki.realmofespionage.xyz/servers:bsd:games:2009scape_localhost#settings'
rm -f ~/'Projects/2009Scape-Server/src/Server/worldprops/default.conf'
ee ~/'Projects/2009Scape-Server/src/Server/worldprops/default.conf'
# End
~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh'
===== Save Data Back-up =====
* [[games:bsd:rt4_client_runescape_530#scape_localhost|RT4 Client Desktop Action Saves]]
mkdir -p ~/'Projects/2009Scape-Server/scripts' && ee ~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh' && chmod +x ~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh'
#!/bin/sh
tar -cvzf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2009Scape-Server-localhost-Saves.tar.gz' -C ~/'Projects/2009Scape-Server/src/Server/data' 'players'
sync
notify-send '2009Scape Save Data Backed-up Successfully to Downloads'
# End
~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh'
====== Quick Commands ======
===== Execute =====
==== Server ====
cd ~/'Projects/2009Scape-Server/src/Server' && java -jar ~/'Projects/2009Scape-Server/src/Server/target/server-'*'-jar-with-dependencies.jar'
~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh'
xfce4-terminal --title='2009Scape Server' -e ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh'
===== Update =====
* [[https://gitlab.com/2009scape/2009scape/-/commits/master|Commits History]]
git -C ~/'Projects/2009Scape-Server/src' reset --hard && git -C ~/'Projects/2009Scape-Server/src' pull origin 'master' --rebase && cd ~/'Projects/2009Scape-Server/src/Server' && mvn 'clean' && cd ~/'Projects/2009Scape-Server/src' && ~/'Projects/2009Scape-Server/src/build' -g -c 'g' -q && cd ~ && sync
~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh'
xfce4-terminal --title='2009Scape Updater' -e ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh'
===== Save Data Back-up =====
tar -cvzf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2009Scape-Server-localhost-Saves-manual.tar.gz' -C ~/'Projects/2009Scape-Server/src/Server/data' 'players'
~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh'
mkdir -p ~/'Projects/2009Scape-Server/src/Server/data/players' && gio open ~/'Projects/2009Scape-Server/src/Server/data/players'
===== File Manager =====
==== Root ====
****
gio open ~/'Projects/2009Scape-Server/src'
==== Saves ====
****
gio open ~/'Projects/2009Scape-Server/src/Server/data/players'
====== Resources/TODOs ======
* https://github.com/2009scape/2009Scape-mobile/issues/13
* https://gitlab.com/2009scape/2009scape/-/raw/master/Server/worldprops/default.conf?ref_type=heads
* https://gitlab.com/2009scape/singleplayer/windows/-/raw/master/game/worldprops/default.conf
* https://gitlab.com/2009scape/2009scape/-/blob/master/Server/src/main/core/game/system/config/ServerConfigParser.kt#L66
* https://gitlab.com/2009scape/2009scape/-/blob/master/Server/src/main/core/game/world/GameSettings.kt#L120
* ''noauth_default_admin'' to ''true'' if ''::to'' needed/stuck
* Pest Control and Mining Star bots auto-still appear with bots disabled in conf (bots disabled stops auto-spawn bots at Lumbridge/seemingly general areas)