Scripts

From The MegaTF/TeamFortress Wiki!
Jump to: navigation, search

General scripts that any class can access should go in config.cfg located in ../quake/fortress/. Class based scripts can go in specific class configs (eg. ../quake/fortress/soldier.cfg)

Generally these scripts are supported by EzQuake.

Grenade Timer

Basic Grenade Script + Timer

Place the following in your config file.

bind  x             "primeone;play gren"
bind  c             "primetwo;play gren"
bind  f             "throwgren"

Place gren.wav in your quake/fortress/sound folder.

2-Touch Grenade Script + Timer

tp_forceTriggers 1
alias gren1prime "primeone; bind x gren1throw"
alias gren1throw "throwgren; bind x gren1prime"
alias gren2prime "primetwo; bind c gren2throw"
alias gren2throw "throwgren; bind c gren2prime"
alias grentime "play gren.wav"
msg_trigger grentime "renade primed"
alias cleargrens "bind x gren1prime; bind c gren2prime"
alias f_death cleargrens
bind x gren1prime
bind c gren2prime

Download grenade timer: GREN.zip

add more styles

add other styles

Generic Zoom Script

This can be applied anywhere, for example in each class config, with custom values, or as an overall zoom script in your main config.cfg

alias z20 "fov 20;wait;sensitivity 0.6;wait;bind mouse2 z105"
alias z105 "fov 105;wait;sensitivity 5;wait;bind mouse2 z20"
bind mouse2 "z20"

Taunts (very important)

alias gogogo "yell;wait;impulse 7;wait;yell;wait;impulse 7;wait;yell;wait;impulse 7;wait;yell;wait;impulse 7;wait;yell;wait;impulse 7;wait;yell;wait;impulse 7;wait;"
bind "yourkey" gogogo
alias pathetic "taunt;wait;impulse 8;wait;taunt;wait;impulse 8;wait;taunt;wait;impulse 8;wait;taunt;wait;impulse 8;wait;taunt;wait;impulse 8;wait;"
bind "yourkey" pathetic

Quick Cell Drop

//Cell drop script. Useful for Quick Sentry Gun Building technique
alias celldrops "dropammo;wait;impulse 4;wait;dropammo;wait;impulse 4;wait;dropammo;wait;impulse 4;wait;dropammo;wait;impulse 4;wait;dropammo;wait;impulse 4;wait;dropammo;wait;impulse 4;wait;dropammo;wait;impulse 4;wait;dropammo;wait;impulse 4;wait;dropammo;wait;impulse 4"
bind "key" celldrops

Team Colored Cross-hair

This script will change your cross-hair color to whatever color team you're on. Put the following in your config.cfg.

if $team = "Blue" then crosshaircolor 0 255 255
if $team = "Red" then crosshaircolor 255 0 0
if $team = "Gren" then crosshaircolor 0 255 0
if $team = "Yell" then crosshaircolor 255 255 0
if $team = "blue" then crosshaircolor 0 255 255
if $team = "red" then crosshaircolor 255 0 0
if $team = "gren" then crosshaircolor 0 255 0
if $team = "yell" then crosshaircolor 255 255 0

Map-Specific Skybox Loader

You can create a config for each map, and add a skybox loading command to each map config -- but having them all consolidated into one list makes things more manageable. Just add "exec skyboxes" to the top of each individual class config (ie, soldier.cfg, demoman.cfg, etc) and this will do the rest:

// Simple Automatic SkyBox loader, by Aphasia
// add as many customized map-skybox combos as you like below
// note that setting it to 'none' will unload the skybox, forcing ezq to use original map sky textures as built

// default skybox - set to none in order to default to map's built-in sky textures when one is not specified below
set newskybox "none"

// if you want ezquake to alwayse use a certain skybox when not otherwise specified, ignoring all maps'
// built-in sky textures, uncomment the following line and specify the skybox you want as default:
// set newskybox "null_plainsky512"

// Set all of your map-specific skyboxes here, comment out or delete ones you do not line, add as necessary:
if $mapname == "2fort4"		then set newskybox "null_plainsky512"
if $mapname == "2fort5"		then set newskybox "null_plainsky512"
if $mapname == "2fort5r"	then set newskybox "null_plainsky512"
if $mapname == "skydomez" 	then set newskybox "frozendusk"
if $mapname == "beer2" 		then set newskybox "dejavu512"
if $mapname == "hell99" 	then set newskybox "none"
if $mapname == "haloween" 	then set newskybox "none"
if $mapname == "lodge5" 	then set newskybox "bone-chill512"
if $mapname == "tater2" 	then set newskybox "mercury512"
if $mapname == "bam4" 		then set newskybox "moondust-lf512"
if $mapname == "canyon1" 	then set newskybox "hg512"
if $mapname == "mbases" 	then set newskybox "seeingred512"
if $mapname == "bases" 		then set newskybox "seeingred512"
if $mapname == "gods" 		then set newskybox "badomen512"
//if $mapname == "town2" 	then set newskybox "urbansp512"
//if $mapname == "spacetf" 	then set newskybox "xenzone"

// == DO NOT CHANGE ==
// only load a skybox if the currently set skybox differs from specified above for current map...
if ("$newskybox" == "none") then unset r_skyname
if ("$r_skyname" != "$newskybox") and ("$newskybox" != "none") then loadsky $newskybox 
// == END ==