Skip to content

Instantly share code, notes, and snippets.

@ldesgoui
Last active May 24, 2020 18:19
Show Gist options
  • Save ldesgoui/94a5ff780d5f561c1ca38a32ccaff1e8 to your computer and use it in GitHub Desktop.
Save ldesgoui/94a5ff780d5f561c1ca38a32ccaff1e8 to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install lib32z1 libncurses5:i386 libbz2-1.0:i386 lib32gcc1 lib32stdc++6 libtinfo5:i386 libcurl3-gnutls:i386 htop p7zip tmux
#!/bin/sh
set -euo pipefail
cd $(mktemp -d)
pwd
# https://www.sourcemm.net/downloads.php?branch=stable
curl -Lo mmsource.tar.gz "https://mms.alliedmods.net/mmsdrop/1.10/mmsource-1.10.7-git971-linux.tar.gz" &
# https://www.sourcemod.net/downloads.php?branch=stable
curl -Lo sourcemod.tar.gz "https://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6488-linux.tar.gz" &
# https://tftrue.esport-tools.net/
curl -LO "http://tftrue.esport-tools.net/TFTrue.zip" &
# https://github.com/peace-maker/DHooks2/releases
curl -Lo dhooks.zip "https://github.com/peace-maker/DHooks2/releases/download/v2.2.0-detours10/dhooks-2.2.0-detours10-sm110.zip" &
# https://github.com/ldesgoui/tf2-comp-fixes/releases
curl -LO "https://github.com/ldesgoui/tf2-comp-fixes/releases/download/v1.8.0/tf2-comp-fixes.zip" &
# https://github.com/Lange/SOAP-TF2DM
curl -Lo soap.zip "https://github.com/Lange/SOAP-TF2DM/archive/master.zip" &
for job in $(jobs -p); do
wait $job
done
tar -xzf mmsource.tar.gz
tar -xzf sourcemod.tar.gz
7z x TFTrue.zip addons/TFTrue.vdf addons/TFTrue.so
7z x dhooks.zip
7z x tf2-comp-fixes.zip
ln -s . SOAP-TF2DM-master
7z x soap.zip SOAP-TF2DM-master/{addons,cfg}
mkdir -p tf2ds/tf
mv addons cfg tf2ds/tf
7z a addons.7z ./tf2ds
realpath addons.7z
#!/bin/sh
set -euo pipefail
cd $(mktemp -d)
for map in cp_badlands.bsp \
cp_granary_pro_rc8.bsp \
cp_gullywash_final1.bsp \
cp_process_final.bsp \
cp_reckoner_rc2.bsp \
cp_snakewater_final1.bsp \
cp_sunshine.bsp \
koth_product_rcx.bsp
do
curl -LO "https://fakkelbrigade.eu/maps/$map" &
done
for job in $(jobs -p); do
wait $job
done
mkdir -p tf2ds/tf/maps
mv *.bsp tf2ds/tf/maps
7z a maps.7z ./tf2ds
realpath maps.7z
#!/bin/sh
set -euo pipefail
DEPOTDOWNLOADER="https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.3.3/depotdownloader-2.3.3.zip"
cd $(mktemp -d)
curl -Lo- $DEPOTDOWNLOADER | unzip -
chmod +x depotdownloader
cat > files.txt <<END
bin/\w+.so
hl2/hl2_misc_\w+.vpk
srcds_linux
srcds_run
steam_appid.txt
tf/bin/\w+.so
tf/cfg/pure_server_full.txt
tf/cfg/pure_server_minimal.txt
tf/cfg/trusted_keys_base.txt
tf/gameinfo.txt
tf/maps/itemtest.bsp
tf/scripts/items/items_game.txt
tf/scripts/items/items_game.txt.sig
tf/scripts/protodefs/proto_defs.vpd
tf/scripts/protodefs/proto_defs.vpd.sig
tf/steam.inf
tf/tf2_misc_\w+.vpk
END
./depotdownloader -app 232250 -dir tf2ds -filelist files.txt
chmod +x tf2ds/srcds_run tf2ds/srcds_linux
7z a tf2ds.7z ./tf2ds
realpath tf2ds.7z
tftrue_no_hats 0
tftrue_logs_accuracy 1
tftrue_logs_apikey "TODO"
sm_fix_sticky_delay 1
sm_fix_ghost_crossbow_bolts 1
sm_remove_medic_attach_speed 1
sm_projectiles_ignore_teammates 1
#!/bin/sh
set -euo pipefail
cd $HOME/tf2ds
export LD_LIBRARY_PATH=".:bin:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
tmux attach -t tf2ds && exit
tmux new-s -s tf2ds \
./srcds_linux \
-game tf \
-sv_pure 2 \
+map itemtest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment