Sei sulla pagina 1di 8

Create a TF2 Server on DigitalOcean + Metamod +

Sourcemod + Halloween Auto Farm Teleport


To setup timed automatic cycled teleporting to Halloween gifts, you will require at least 2 plugins.
The first is a teleport plugin for sourcemod the second is a cron like plugin for sourcemod which can
repeat the commands to teleport over and over on a timed loop.
The teleport plugin is available here: https://forums.alliedmods.net/showthread.php?t=219358
Server crontab v1.0.1.2 can be used to repeat commands:
https://forums.alliedmods.net/showthread.php?p=523298?p=523298
I also recommend the following plugins.
classenforcer v0.2.1: https://forums.alliedmods.net/showthread.php?t=87748?t=87748
This will allow you to force a class, useful because heavy has a big hitbox and if I am not mistaken
it's easier for him to pick up gifts.
godmode v2.3.1: https://forums.alliedmods.net/showthread.php?p=979550?p=979550
Allows godmode, so people don't kill each other.
thirdperson v2.1.0: https://forums.alliedmods.net/showthread.php?p=1694178?p=1694178
Allows thirdperson view, easier to see the gift.

There isn't an easy way to download from the forum via wget, I recommend to do it on your local OS
and create a custom .tar.gz file which you can then upload to your server and easily extract inside
your tf2 directory. It makes this process far easier.
You can use 7zip to first make a .tar file by selecting tar under Archive format and then compress
the tar file with gzip under Archive format to make a .tar.gz file.
Now once you've downloaded all the plugins and files the directory structure will need looks like
this.
/tf/addons/sourcemod/plugins/class_enforcer.smx

/tf/addons/sourcemod/plugins/Godmode.smx
/tf/addons/sourcemod/plugins/sc.smx
/tf/addons/sourcemod/plugins/sc_module.smx
/tf/addons/sourcemod/plugins/teleport.smx
/tf/addons/sourcemod/plugins/ThirdPerson.smx
Also for crontab you will need the .cfg files
/tf/cfg/sc_jobs.cfg
/tf/cfg/sc_module.cfg
I don't believe the .sp files are needed webhosting as they are the source files for the scripts (correct
me if I am wrong), but if you want you can include them as well in the correct folder structure.
I have found the positions for koth_lakeside_event map gift drops, however you will need to find your
own for other maps. The sc_jobs.cfg for koth_lakeside_event looks like this:
sc_addjob ? ? ? ? ? ? "sm_teleport @all -1126.240478 -1818.691894 6.971355" // 01
sc_addjob ? ? ? ? ? ? "wait 200; sm_teleport @all -974.335449 -1155.431884 -203.901336" // 02
sc_addjob ? ? ? ? ? ? "wait 400; sm_teleport @all -566.475830 -873.728576 -174.271972" // 03
sc_addjob ? ? ? ? ? ? "wait 600; sm_teleport @all -341.459259 -1081.812500 16.031250" // 04
sc_addjob ? ? ? ? ? ? "wait 800; sm_teleport @all -0.682400 -907.488830 48.031250" // 05
sc_addjob ? ? ? ? ? ? "wait 1000; sm_teleport @all 317.792114 -1090.607421 16.031250" // 06
sc_addjob ? ? ? ? ? ? "wait 1200; sm_teleport @all 568.532653 -876.659301 -174.46414" // 07
sc_addjob ? ? ? ? ? ? "wait 1400; sm_teleport @all 969.528076 -1127.955688 -206.488876" // 08
sc_addjob ? ? ? ? ? ? "wait 1600; sm_teleport @all 1126.398925 -1804.132202 7.879253" // 09
sc_addjob ? ? ? ? ? ? "wait 1800; sm_teleport @all -9.570353 -1834.422119 16.031250" // 10
sc_addjob ? ? ? ? ? ? "wait 2000; sm_teleport @all -949.383056 0.075070 -228.994049" // 11
sc_addjob ? ? ? ? ? ? "wait 2200; sm_teleport @all -515.741088 -38.765487 -173.965255" // 12
sc_addjob ? ? ? ? ? ? "wait 2400; sm_teleport @all -424.613220 -4.912599 -15.968750" // 13
sc_addjob ? ? ? ? ? ? "wait 2600; sm_teleport @all -292.190338 -547.924743 -140.329330" // 14
sc_addjob ? ? ? ? ? ? "wait 2800; sm_teleport @all -192.416305 -528.865417 -15.968750" // 15

sc_addjob ? ? ? ? ? ? "wait 3000; sm_teleport @all 192.169799 -538.893310 -15.968750" // 16


sc_addjob ? ? ? ? ? ? "wait 3200; sm_teleport @all 295.673522 -545.523742 -141.005065" // 17
sc_addjob ? ? ? ? ? ? "wait 3400; sm_teleport @all 416.960571 1.562003 -15.968750" // 18
sc_addjob ? ? ? ? ? ? "wait 3600; sm_teleport @all 519.202514 -4.683027 -173.946090" // 19
sc_addjob ? ? ? ? ? ? "wait 3800; sm_teleport @all 934.588012 -28.897510 -228.69720" // 20
sc_addjob ? ? ? ? ? ? "wait 4000; sm_teleport @all -874.714355 1038.539428 -207.968750" // 21
sc_addjob ? ? ? ? ? ? "wait 4200; sm_teleport @all 884.925842 1045.615356 -207.961746" // 22
sc_addjob ? ? ? ? ? ? "wait 4400; sm_teleport @all 1.585826 596.587768 16.031250" // 23
sc_addjob ? ? ? ? ? ? "wait 4600; sm_teleport @all -1126.240478 -1818.691894 6.971355" // 01
sc_addjob ? ? ? ? ? ? "wait 4800; sm_teleport @all -974.335449 -1155.431884 -203.901336" // 02
sc_addjob ? ? ? ? ? ? "wait 5000; sm_teleport @all -566.475830 -873.728576 -174.271972" // 03
sc_addjob ? ? ? ? ? ? "wait 5200; sm_teleport @all -341.459259 -1081.812500 16.031250" // 04
sc_addjob ? ? ? ? ? ? "wait 5400; sm_teleport @all -0.682400 -907.488830 48.031250" // 05
sc_addjob ? ? ? ? ? ? "wait 5600; sm_teleport @all 317.792114 -1090.607421 16.031250" // 06
sc_addjob ? ? ? ? ? ? "wait 5800; sm_teleport @all 568.532653 -876.659301 -174.46414" // 07
sc_addjob ? ? ? ? ? ? "wait 6000; sm_teleport @all 969.528076 -1127.955688 -206.488876" // 08
sc_addjob ? ? ? ? ? ? "wait 6200; sm_teleport @all 1126.398925 -1804.132202 7.879253" // 09
sc_addjob ? ? ? ? ? ? "wait 6400; sm_teleport @all -9.570353 -1834.422119 16.031250" // 10
sc_addjob ? ? ? ? ? ? "wait 6600; sm_teleport @all -949.383056 0.075070 -228.994049" // 11
sc_addjob ? ? ? ? ? ? "wait 6800; sm_teleport @all -515.741088 -38.765487 -173.965255" // 12
sc_addjob ? ? ? ? ? ? "wait 7000; sm_teleport @all -424.613220 -4.912599 -15.968750" // 13
sc_addjob ? ? ? ? ? ? "wait 7200; sm_teleport @all -292.190338 -547.924743 -140.329330" // 14
sc_addjob ? ? ? ? ? ? "wait 7400; sm_teleport @all -192.416305 -528.865417 -15.968750" // 15
sc_addjob ? ? ? ? ? ? "wait 7600; sm_teleport @all 192.169799 -538.893310 -15.968750" // 16
sc_addjob ? ? ? ? ? ? "wait 7800; sm_teleport @all 295.673522 -545.523742 -141.005065" // 17
sc_addjob ? ? ? ? ? ? "wait 8000; sm_teleport @all 416.960571 1.562003 -15.968750" // 18

sc_addjob ? ? ? ? ? ? "wait 8200; sm_teleport @all 519.202514 -4.683027 -173.946090" // 19


sc_addjob ? ? ? ? ? ? "wait 8400; sm_teleport @all 934.588012 -28.897510 -228.69720" // 20
sc_addjob ? ? ? ? ? ? "wait 8600; sm_teleport @all -874.714355 1038.539428 -207.968750" // 21
sc_addjob ? ? ? ? ? ? "wait 8800; sm_teleport @all 884.925842 1045.615356 -207.961746" // 22
sc_addjob ? ? ? ? ? ? "wait 9000; sm_teleport @all 1.585826 596.587768 16.031250" // 23
sc_addjob ? ? ? ? ? ? "wait 9200; sm_teleport @all -173.608474 -1046.205932 16.031250; wait 9400;
sm_teleport @all 165.538299 -1012.248413 16.031250" // 24
sc_addjob ? ? ? ? ? ? "wait 9999"
You should also create a custom server.cfg file which should be in /tf/cfg/server.cfg, here is an
example some commands are from the plugins above. You'll need to do research to make this
perfect.
Very important go read about tf_server_identity stuff, you'll need this for quickplay and halloween
drops (if I am not mistaken): https://support.steampowered.com/kb_article.php?ref=2825-AFGJ-3513
// Server Name
hostname "Koth_Lakeside_Event Gift Farm Teleport Server" //Name of your server, change it
tf_forced_holiday "2" //Halloween mode
tf_server_identity_account_id ##### //Make sure to change this
tf_server_identity_token "#####" //Make sure to change this
// Sourcemod
sm_ce_enable 1 //Enable class enforcer plugin
sm_ce_blue heavy //Forced class for the blue team
sm_ce_red heavy //Forced class for the red team
sm_ce_admin //Override forced class for admins with slay
sm_godmode_spawn 1 //Enable godmode on spawn
// Rcon Cvars
rcon_password "" //Make sure to change this, remote control password
sv_rcon_banpenalty 0 //Number of minutes to ban users who fail rcon authentication
sv_rcon_log 0 //Enable/disable rcon logging

sv_rcon_maxfailures 3 //Max number of times a user can fail rcon authentication before being
banned
sv_rcon_minfailures 5 //Number of times a user can fail rcon authentication in
sv_rcon_minfailuretime before being banned
sv_rcon_minfailuretime 10 //Number of seconds to track failed rcon authentications
// Server Password
sv_password "" //Password protects server, no one can join without password
mapcyclefile "cfg/mapcycle.txt"
// Server Cvars
tf_avoidteammates_pushaway 0 //Controls player collision, 1 = allow (default), 0 = off (players walk
through each other)
mp_allowspectators 0 //Toggles whether the server allows spectator mode or not
mp_forceautoteam 1 //Automatically put players on a team upon joining game
mp_defaultteam 0 //Controls which team mp_forceautoteam will make players join, 0 = random
mp_humans_must_join_team any //Can be set so that humans can only join a certain team (any, blue,
red, spectator)
mp_idledealmethod 0
mp_autocrosshair 0
mp_autoteambalance 0 //Toggles server autoteambalance
mp_respawnwavetime 0
mp_disable_respawn_times 1
mp_bonusroundtime 5 //Time in seconds after round win until round restarts
mp_chattime 5 //amount of time in seconds players can chat after the game is over
mp_decals 1
mp_disable_autokick 1 //Prevents a userid from being auto-kicked
mp_enableroundwaittime 0 //Enable timers to wait between rounds.
mp_fadetoblack 0 //fade a player's screen to black when he dies
mp_falldamage 0 //Amount of damage players sustains from a fall

mp_flashlight 0 //Toggles flashlight on or off


mp_footsteps 1 //Toggles footsteps on or off
mp_forcecamera 0 //Restricts spectator modes for dead players
mp_forcerespawn 1
mp_fraglimit 0
mp_idlemaxtime 999999 //Max time a player is allowed to be idle (in minutes)
mp_maxrounds 999999 //Max number of rounds to play before server changes maps
mp_teams_unbalance_limit 0 //Teams are unbalanced when one team has this many more players
than the other team. (0 disables check)
mp_time_between_capscoring 0 //Delay between scoring of owned capture points.
mp_timelimit 999999 //Game time per map in minutes
mp_winlimit 999999 //Max number of rounds one team can win before server changes maps
sv_allow_color_correction 1 //Allow web host or disallow clients to use color correction on this
server.
sv_allow_wait_command 1 //Allow or disallow the wait command on clients connected to this server.
sv_allowdownload 1 //Allow clients to download files
sv_allowupload 0 //Allow clients to upload customizations files
sv_alltalk 1 //Players can hear all other players, no team restrictions
sv_alternateticks 0 //If set, server only simulates entities on even numbered ticks.
sv_autosave 0 //Set to 1 to autosave game on level transition. Does not affect autosave triggers.
sv_bonus_challenge 0 //Set to values other than 0 to select a bonus map challenge type.
sv_cacheencodedents 1 //If set to 1, does an optimization to prevent extra SendTable_Encode calls.
sv_cheats 0 //Allow cheats on server
sv_clearhinthistory 0 //Clear memory of server side hints displayed to the player.
sv_consistency 0 //Whether the server enforces file consistency for critical files
sv_contact "" //Contact email for server sysop
sv_downloadurl "" //Location from which clients can download web host missing files

sv_enableoldqueries 1 //Enable support for old style (HL1) server queries


sv_pausable 0 //Is the server pausable.
// Lan or internet play, Server region cvars
sv_lan 0 //Server is a lan server ( no heartbeat, no authentication, no non-class C addresses )
sv_region 255 // Region Codes: 0 - US East coast, 1 - US West coast, 2 - South America, 2 - South
America, 3 - Europe, 4 - Asia, 5 - Australia, 6 - Middle East, 7 - Africa, 255 - world
//server Logging
sv_log_onefile 0 //Log server information to only one file.
sv_logbans 1 //Log server bans in the server logs.
sv_logblocks 0 //If true when log when a query is blocked (can cause very large log files)
sv_logecho 0 //Echo log information to the console.
sv_logfile 0 //Log server information in the log file.
sv_logflush 0 //Flush the log file to disk on each write (slow).
sv_logsdir "logs" //Folder in the game directory where server logs will be stored.
//Server Rates
sv_maxcmdrate 0 //(If sv_mincmdrate is > 0), this sets the maximum value for cl_cmdrate.
sv_maxrate 40000 //Max bandwidth rate allowed on server, 0 == unlimited
sv_maxreplay 2 //Maximum replay time in seconds
sv_maxupdaterate 105 //Maximum updates per second that the server will allow
sv_mincmdrate 0 //This sets the minimum value for cl_cmdrate. 0 == unlimited.
sv_minrate 0 //Min bandwidth rate allowed on server, 0 == unlimited
sv_minupdaterate 100 //Minimum updates per second that the server will allow
You may also want to edit /tf/cfg/motd_default.txt this is the message users first see when they
connect, also known as the message of the day.
Once you gather all the files and make them in the correct folder structure make it a tar.gz file via
7zip as described before and upload to a server if you have one, if not you can probably use dropbox
or anywhere else web web host host which has direct linking to files. Make sure it's somewhat
secure and you can remove it after, since you will have your rcon password in here, unless you leave
important stuff out and later edit via nano inside the server terminal. Another method is via secure

copy (scp) but requires time/research to setup, beyond the scope of this guide.
Once you have your tar.gz file for example tf.tar.gz go into your /opt/steam/tf2/tf/ directory and wget
the file for your server then extract it, for example: tar xzf tf.tar.gz
You should be good at this point, here is a way to start your server for koth_lakeside_event map.
./srcds_run -game tf -hostport 27015 +fps_max 60 +maxplayers 12 +map koth_lakeside_event
Modifying teleports.
Creating cycled teleporting for other maps to get gifts is possible as well, but will take time and you
will web host need to rewrite the sc_jobs.cfg file.
You will need to go to the exact part of the map where the gift spawns and use sm_getloc to get the
location number
For example if sm_getloc reports -974.335449 -1155.431884 -203.901336
You will need to make a new script with, the wait command is what determines the order of cycle
and wait time. The wait time is not determined by time in seconds, but by server fps in time. So if
server gets 60 fps a second, a wait of 120 will execute in 2 seconds. Server fps can fluctuate so
unfortunately it's not an exact timer sometimes.
sc_addjob ? ? ? ? ? ? "wait 120; sm_teleport @all -974.335449 -1155.431884 -203.901336"
I hope this explains the basics and good luck, if I made any mistakes please correct me in the
comments. This part took me a while to figure out last year, so this overview should help many of
you.