General Class Scripts

From Fortress Forever Wiki
Revision as of 15:58, 12 July 2009 by Gibz (talk | contribs) (→‎Spawn with a specific weapon)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Below you will find general scripts that can / should be used by one or more classes. Instructions for where to place these scripts can be found with the associated script, however generally you will want to place these scripts into your userconfig.cfg.

Name Announcement 1

Script by Dr.Satan

Instructions

For this script you will need to place each script in the specified <classname>.cfg

To change the key, replace the following line with your desired key:

bind "rightarrow" "<class_n>"


An example using the "f" key:

bind "f" "scout_n"


File:Note.png Note: For this particular script you will need to change this line in each of the classname.cfg's.


Name Announcement Using One Key
Put this code in your userconfig.cfg
//     -----
//---- Names ----
//     -----

alias demo_n "say_team Now playing demo!"
alias engy_n "say_team Now playing engy!"
alias hw_n "say_team Now playing hw!"
alias med_n "say_team Now playing medic!"
alias pyro_n "say_team Now playing pyro!"
alias scout_n "say_team Now playing scout!"
alias sniper_n "say_team Now playing sniper!"
alias solly_n "say_team Now playing solly!"
alias spy_n "say_team Now playing spy!"

Put this code in your demoman.cfg

//put in demoman.cfg
bind rightarrow "demo_n"

Put this code in your engineer.cfg

//put in engineer.cfg
bind rightarrow "engy_n"

Put this code in your hwguy.cfg

//put in hwguy.cfg
bind rightarrow "hw_n"


Put this code in your medic.cfg

//put in medic.cfg
bind rightarrow "med_n"

Put this code in your pyro.cfg

//put in pyro.cfg
bind rightarrow "pyro_n"


Put this code in your scout.cfg

//put in scout.cfg
bind rightarrow "scout_n"

Put this code in your sniper.cfg

//put in sniper.cfg
bind rightarrow "sniper_n"


Put this code in your soldier.cfg

//put in soldier.cfg
bind rightarrow "solly_n"


Put this code in your spy.cfg

//put in spy.cfg
bind rightarrow "spy_n"


Name Announcement 2

Script by Dr.Satan

Instructions

For this script you will need to place the following code into your userconfig.cfg

To use the script press enter on the keypad and then the coresponding key for each class.


Name Announcement Using Key Pad
Put this code in your userconfig.cfg
//     -----
//---- Names ----
//     -----

alias demo_n "say_team Now playing demo!; u_all"
alias engy_n "say_team Now playing engy; u_all"
alias hw_n "say_team Now playing hw!; u_all"
alias med_n "say_team Now playing medic!; u_all"
alias pyro_n "say_team Now playing pyro!; u_all"
alias scout_n "say_team Now playing scout!; u_all"
alias sniper_n "say_team Now playing sniper!; u_all"
alias solly_n "say_team Now playing solly!; u_all"
alias spy_n "say_team Now playing spy!; u_all"

alias namebind "bind KP_END scout_n; bind KP_DOWNARROW sniper_n; bind KP_PGDN solly_n; 
bind KP_LEFTARROW demo_n; bind KP_5 medic_n; bind KP_RIGHTARROW hw_n; bind KP_HOME pyro_n; 
bind KP_UPARROW spy_n; bind KP_PGUP engy_n; echos"

alias echos "echo 1) Scout; echo 2) Sniper; echo 3) Soldier; echo 4) Demoman; echo 5) Medic;
 echo 6) HWGuy; echo 7) Pyro; echo 8) Spy; echo 9) Engineer"

alias u_all "unbind KP_END; unbind KP_DOWNARROW; unbind KP_PGDN; unbind KP_LEFTARROW;
 unbind KP_5; unbind KP_RIGHTARROW; unbind KP_HOME; unbind KP_UPARROW; unbind KP_PGDN"

bind KP_ENTER "namebind"

Quick Weapon Switch

Script by Dr.Satan

Instructions For this script you will need to place each script in the specified <classname>.cfg


Quick Weapon Switch
Put this code in your userconfig.cfg
//put in userconfig.cfg
bind KEY "quickweapon"

File:Note.png Note: Replace KEY with the key you plan on using.


Put this code in your demoman.cfg

//Quick Weapon - put in demoman.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot5; wait; alias quickweapon quick1"
alias quickweapon quick1


Put this code in your engineer.cfg

//Quick Weapon - put in engineer.cfg
alias quick1 "slot1; wait; alias quickweapon quick2"
alias quick2 "slot2; wait; alias quickweapon quick3"
alias quick3 "slot3; wait; alias quickweapon quick1"
alias quickweapon quick1


Put this code in your hwguy.cfg

//Quick Weapon - put in hwguy.cfg
alias quick1 "slot5; wait; alias quickweapon quick2"
alias quick2 "slot3; wait; alias quickweapon quick1"
alias quickweapon quick1


Put this code in your medic.cfg

//Quick Weapon - put in medic.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot3; wait; alias quickweapon quick1"
alias quickweapon quick1


Put this code in your pyro.cfg

//Quick Weapon - put in pyro.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot5; wait; alias quickweapon quick1"
alias quickweapon quick1


Put this code in your scout.cfg

//Quick Weapon - put in scout.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot2; wait; alias quickweapon quick1"
alias quickweapon quick1


Put this code in your sniper.cfg

//Quick Weapon - put in sniper.cfg
alias quick1 "slot4; wait; alias quickweapon quick2"
alias quick2 "slot3; wait; alias quickweapon quick1"
alias quickweapon quick1


Put this code in your soldier.cfg

//Quick Weapon - put in soldier.cfg
alias quick1 "slot3; wait; alias quickweapon quick2"
alias quick2 "slot5; wait; alias quickweapon quick1"
alias quickweapon quick1


Empty Number Keys Fix

Script by Gibz

Description Not much of a script at all, but still pretty useful. This makes it so that you do not have number keys that do nothing. For instance, as a Soldier, you have no weapon in slot4. Pressing 4 does nothing as a Soldier, and you have to press 5 to select your RPG. With these binds, pressing 4 will select your RPG, instead of 5.

Number keys to not skip slots
Put this code in your userconfig.cfg
//Number keys default
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"


Put this code in your scout.cfg

//Number key binds
bind "3" slot4"
bind "4" slot5"

Put this code in your soldier.cfg

//Number key binds
bind "4" "slot5"

Put this code in your demoman.cfg

//Number key binds
bind "3" "slot4"
bind "4" "slot5"
bind "5" "slot6"

Put this code in your hwguy.cfg

//Number key binds
bind "4" "slot5"

Put this code in your pyro.cfg

//Number key binds
bind "3" "slot4"
bind "4" "slot5"


Discard On Jump

Script by Gibz

Description This causes you to discard your extra ammo whenever you jump, only while playing as Scout or Medic.

Discard on jump
Put this code in your userconfig.cfg
bind "space" "+jump"

Put this code in your scout.cfg

//Discard on jump
bind "space" "+jump;discard"

Put this code in your medic.cfg

//Discard on jump
bind "space" "+jump;discard"

Spawn with a specific weapon

Script by Gibz

Description First, open NotePad and create a .cfg file. Name it autoexec.cfg Save it to your Fortress Forever CFG directory. This is the file you will be using. This allows you to choose what weapon you want to spawn with selected. Say I want to always spawn with my Super Shotgun equipped whenever I spawn as an Engineer. I would add the command for it (cl_spawnweapon_engineer supershotgun) into my autoexec.cfg file and it would always spawn me with my Super Shotgun equipped, whenever I play as an Engineer. Below is a list of every possible weapon you can specify.

Spawn with specified weapons selected
Put this code in your autoexec.cfg
//Spawn weapons
cl_spawnweapon_scout crowbar/shotgun/nailgun
cl_spawnweapon_sniper crowbar/autorifle/sniperrifle/nailgun
cl_spawnweapon_soldier crowbar/shotgun/supershotgun/rpg
cl_spawnweapon_demoman crowbar/shotgun/grenadelauncher/pipelauncher
cl_spawnweapon_medic medkit/shotgun/supershotgun/supernailgun
cl_spawnweapon_heavy crowbar/shotgun/supershotgun/ac
cl_spawnweapon_pyro crowbar/shotgun/flamethrower/ic
cl_spawnweapon_spy knife/tranqgun/supershotgun/nailgun
cl_spawnweapon_engineer spanner/railgun/supershotgun
cl_spawnweapon_civilian umbrella