Purposes:
- When you're playing on some server, and you don't have the next map on the list, you can minimize the game, start up this script and get the map without long wait using in-game download.
- You want to get the map without starting the game.
- When properly modified, you can steal maps from other servers directly to your server, no need to upload anything! (doubt that's gonna work with a gameserver... unless they allow u to install packages and execute shell scripts)
Not really sure... though on Ubuntu 12.10 i had to get this:
- Korn Shell (preferably AT&T) - won't work properly in Ubuntu's DASH (lack of some things LOL)
Spoiler
Show
https://dl.dropboxusercontent.com/u/19656788/fast2dl.sh (since tabs get turned into spaces on here ._.)
or
or
Code: Select all
#!/bin/ksh
# ^ THIS IS SUPPOSED TO BE RUN ON KORN SHELL
# This will download and extract map from fastdl servers (in case if ingame download fails).
# By Xseba360
# 16/05/2013 22:06:11
# functions
askurl () {
if [ -f "/tmp/.fastdl_cfg/url.txt" ]; then
askurl2
else
usenew
fi
}
askurl2 () {
echo "Do you wish to use last used FastDL url?"
read answer
case $answer in
yes|Yes|y|Y|ya|yea|Yea)
useold
;;
no|No|n|N|nah|Nah|Nope|nope|nop|Nop)
usenew
;;
q*|Q*)
exit
;;
*)
echo "This is not a correct answer, let's try this again."
askurl2
;;
esac
}
usenew () {
cd "/tmp" && mkdir -p ".fastdl_cfg" && cd ".fastdl_cfg"
echo "Type the FastDL url gotten from sv_downloadurl and press [ENTER]"
echo ""
echo "the 'http://' is not required"
echo "Example: http://www.example.com/fastdl"
echo "Example: www.example.com/hl2mp"
echo ""
read urldir
echo "$urldir">url.txt
getname
}
useold () {
cd "/tmp/.fastdl_cfg/"
read -r urldir<url.txt
getname
}
getname () {
echo "Type the map name below and press [ENTER]:"
echo "Example: dm_lockdown"
read map
getmap
}
getmap () {
cd "/tmp" && mkdir -p ".fastdlmaps" && cd ".fastdlmaps"
echo "Getting map file..."
wget -q "$urldir/maps/$map.bsp" || wget -q "$urldir/maps/$map.bsp.bz2"
unbz2
}
unbz2 () {
if [ -f "/tmp/.fastdlmaps/$map.bsp" ]; then
echo "Map file not compressed."
movemap
elif [ -f "/tmp/.fastdlmaps/$map.bsp.bz2" ]; then
echo "Extracting map file..."
bunzip2 -q "$map.bsp.bz2"
movemap
else
echo "File not found! Re-check url and map name!"
fi
}
movemap () {
mv -f "$map.bsp" "/home/$USER/.steam/steam/SteamApps/common/Half-Life 2 Deathmatch/hl2mp/maps/" && echo "Moving map file..."
echo "Done!"
}
# checksteamdir begin
if [ -d "/home/$USER/.steam/steam/SteamApps/" ]; then
askurl
else
echo "I don't know where your steam folder is! Sorry."
fi
Spoiler
Show
- Grab cygwin installer from here: http://cygwin.com/setup.exe
- Open the file and press 'Next >' 5 times, unless you use a proxy you can leave everything on default settings.
- Select mirror, doesn't matter which. Press next.
- Installer will start to download more setup files...
- Package downloader will show up. In search box type: ksh
- From Shells category select 'mksh: MirBSD Korn Shell' by clicking on 'Skip' text once.
- In search box type: wget
- From Web category select 'wget: Utility to retrieve ...' by clicking on 'Skip' text once.
- Packages will start to download. When it's done, press 'Next >'
- You can ignore the error. Press 'Next >'
- You may wish to create dekstop shortcut, you better do so because it might be handy in other step then click 'Finish'
- Now go to start menu and start Cygwin Terminal. You might find the shortcut you created in previous step handy.
- After some seconds the files inside our home folder should be ready then you can close the Terminal.
- WinXP: (you need administrator account for this) Open up CMD by pressing Win+R keys and typing in: cmd
WinVista/7: Start menu -> in Search bar type -> cmd -> rightclick on search result and select Run as administrator - Navigate to your /home/<username> folder inside cygwin installation folder like this: cd "C:/cygwin/home/<username>/"
example:
cd "C:/cygwin/home/xseba360" - Then do:
mkdir .steam
and then:
cd .steam - And then do Then do: mklink /d Steam "<steam main folder>"
example:
mklink /d Steam "C:/Program Files (x86)/Steam"
OR if you're WinXP user check this out:
http://technet.microsoft.com/en-us/sysi ... 96768.aspx - Download this: https://dl.dropboxusercontent.com/u/19656788/fast2dl.sh and put it in C:/cygwin/home/<username> (don't try copypasting the script from upper part of this post and paste it into windows notepad. it wont work... believe me)
- Open cygwin terminal and type: sh fast2dl.sh
- You're done! Everything should work like this: http://youtu.be/RJxk5QZHl2Q