1. Click here to join our community discord server.

Want shortcuts to your items to your buy menu in PR servers?

Discussion in '[L4D2] Points Reloaded' started by Nerfarious, Dec 25, 2011.

Tags:
  1. Nerfarious

    Nerfarious MG Donor

    Tired of typing !buy and then hitting a number to get to what item you want to buy?
    Getting tired of buying your items a second too late?
    Want to press only one button on the keyboard and your item is bought or show a menu by just a press of a button?

    Worry no more. This guide will help you bind your keyboard key's to an assigned item or menu.

    I know this topic was brought up in the past but I thought I should go more in depth with binding keys to buy menu items as well.
    http://mgftw.com/showthread.php/5770-fast-buy.-Binding-tutorial?daysprune=365
    This even works on the PR VS servers as well. I've got a couple people watching me as I play L4D2 and they always ask if I'm admin. I assure you I'm not admin I binded my keyboard keys to specific items from the buy menu. I just happen to have enough bounty at the right time. (Note: Pressing the same key over very fast is abusing the menu system and will get you kicked. ) How do I know this because I have tried this myself. I bought the same item by pressing the key too fast and before I know it I got kicked. Whoops :x

    Update: it will not get you kicked I just tried to abuse it with all my bind keys and it came up with this message.
    [​IMG]
    I suppose a number of times of pressing the same button will get you kicked just keep that in mind as you're playing.

    A user can assign a key by doing the following in your console window.

    To open your console window
    [​IMG]

    Enable it if it's not enabled yet.
    [​IMG]

    This is what your console window will look like.

    [​IMG]
    If you're wondering how I spawn my items so quick in the game with the amount of bounty required for each item its because I binded my keys. I'm not an admin lol. I just have enough bounty at the right moment and time.

    There are those times where I got tired of typing !buy, press 4 then press 3 to buy a first aid kit. If you wanted to buy an item by a press of a key now you can. For example if you had bounty and you have the buff called Negotiator like I do you can bind it in the console window

    To bring up the console window hit the ~ key by not holding shift.
    Here is a solution
    First Aid Kit Example Binded to F5 type the following in the console window
    Code:
    bind "F5" "say /buy; menuselect 4; menuselect 3"
    Hit enter after.
    After you hit F5 while in game you spawn a First Aid Kit if you have the enough bounty.

    Why say you ask?
    say uses your chat box instead of the console window and uses whatever code you wrote.
    You can bind it to any unassigned key.
    [TABLE="width: 580"]
    [TR]
    [TD]Keys that are in use.

    Vote System
    F1=Yes
    F2=No

    Change Server
    F3=Accept

    Character Movement
    ASWD=Movement Keys
    E=Use Key
    Q=Switch Primary to Secondary Weapon
    R=Reload
    Y=Chat
    U=Chat
    T=Custom Spray
    F=Flashlight
    H=Message Window
    Z=Survivor Saying
    X=Extra Survivor Sayings
    C=Mic
    Spacebar=Jump
    Shift=Walk
    Ctrl=Crouch
    Tab=Scoreboard[/TD]
    [TD]Keys That are Unassigned
    F5
    F6
    F7
    F8
    F9
    F10
    F11
    I
    O
    P
    [
    ]
    \
    G
    J
    K
    L
    ;
    '
    V
    B
    N
    M
    ,
    .
    /
    -
    =
    0 <= zero[/TD]
    [/TR]
    [/TABLE]
    Keys that cannot be used. (Note: I've tried and tested and it doesn't work on Backspace, Home, Pause, Scroll Lock, PrtScrn, Home, Insert, Page Up, Page Down, Delete, End, Arrow Keys, NumLock, KeyPad Numbers)

    For NonSteam Users the bind keys will not be saved once you start L4D2 again unless there is a way to save it when shutting down L4D2 by all means share your info and reply to this post. How do I know this? I use to have a non-steam version of L4D2 with Garena. I bought my copy at Walmart for $20 at the time and transferred my stats over.

    For legit steam users your bind keys will be saved on the current computer. If you download from another computer you will have to set the bind keys again. I'm a legit steam user and I've only binded them once. Updates do occur to HonorCode's mod every now and then and all you need to do is unbind that assigned key in the console window and rebind them in the appropriate order to your liking.
    Just as an example to unbind in the console type
    Code:
    unbind F5
    Hit enter after. Above code Unbinds the key

    If you happen to use the command "unbind all" by accident you have to click on the options in the main menu, then click on keyboard/mouse, click on edit keys/buttons and click on set it to defaults. If you're in game when this happens and while doing this hit Esc instead and then go to options.

    I took the liberty of writing down what each key will do in the buy menu so that way players can assign their own buying needs to their own keys. I will make an example for each one that will any user will understand this guide to binding keys.

    Remember only use the unassigned keys otherwise if you use an assigned key while playing you will end up flooding the server. If you really need to but the same weapon count every other second.
    There are 29 unassigned keys you can use for the buy menu, quest menu, guild menu and the control panel.

    Lets say if you wanted to see the quest items you have for your inventory.
    Type this in the console window.
    Code:
    bind "F11" "say /qt; menuselect 2"
    Hit Enter after. the above code in game when F11 is hit shows the quest inventory menu.
    Example Picture:

    [​IMG]
    If you just want to show the menu all you have to do is type
    Code:
    bind "F11" "say /qt"
    Hit Enter after. the above only shows quest menu
    Hit F11 in game it shows the quest menu.

    Another example is !tankhp but i use /tankhp
    Type this in console and hit enter.
    Code:
    bind "k" "say /tankhp"
    Example Pic in chatbox:
    [​IMG]
    Hit K while in game and shows tank's hp if there are tanks.
    If there are no tanks nothing will show in the chat box.

    When !buy or /buy is typed in the chat box
    [TABLE]
    [TR]
    [TD]1. Ranged Weapons
    2. Melee Weapons
    3. Upgrades & Throws
    4. Health Items
    5. Misc[/TD]
    [/TR]
    [/TABLE]
    [TABLE="width: 739"]
    [TR]
    [TD]If (1) Ranged Weapons is selected...
    [/TD]
    [TD]If (1) Pistols is selected...
    [/TD]
    [TD]If (2) Rifles is selected...
    [/TD]
    [TD]If (3) Shotguns are selected...
    [/TD]
    [TD]If (4) Smg's are selected...
    [/TD]
    [TD]If (5) Snipers are selected...
    [/TD]
    [/TR]
    [TR]
    [TD]1. Pistols
    2. Rifles
    3. Shotguns
    4. SMG's
    5. Snipers
    [/TD]
    [TD]
    1. Pistol
    2. Desert
    [/TD]
    [TD]
    1. M16
    2. AK47
    3. Desert Rifle (3 shot rifle)
    4. M60
    5. SG552 (Zooms in)
    [/TD]
    [TD]
    1. Auto Shotgun
    2. Pump
    3. Chrome
    4. Spas
    [/TD]
    [TD]
    1. Uzi
    2. Mp5
    3. Uzi Silenced
    [/TD]
    [TD]
    1. Hunting
    2. AWP
    3. Military
    4. Scout
    [/TD]
    [/TR]
    [/TABLE]
    Lets say I wanted to bind the m16.
    Type this in the console window
    Code:
    bind "b" "sat /buy; menuselect 1; menuselect 2; menuselect 1"
    Hit Enter after.
    By pressing just B in game and you have enough bounty for it ill get you an M16. Pick your weapon by just changing the menuselect number according to the above chart. Remember if you don't like hitting B for your setup type this in the console window for example
    Code:
    unbind b
    Hit Enter after. [TABLE="width: 329"]
    [TR]
    [TD]If (2) Melee is selected...[/TD]
    [TD]9. Next Page[/TD]
    [/TR]
    [TR]
    [TD]
    1. Bat
    2. Chainsaw
    3. Cricket Bat
    4. Crowbar
    5. Guitar
    6. Axe
    7. Pan
    [/TD]
    [TD]
    1. Golf Club
    2. Katana
    3. Machete
    4. Tonfa
    Sadly no Counter Strike Knife can be bought
    [/TD]
    [/TR]
    [/TABLE]
    Some campaigns don't carry the Katana like Death Toll for example. I wait until I save 6 bounty and buy a machete instead. Instead of typing !buy and then hitting 2 then 9 then 3.
    Type this in the following console window to get machete.
    For example
    Code:
    bind "[" "say /buy; menuselect 2; menuselect 9; menuselect 3" 
    Hit Enter after.
    Hitting [ in game spawns a machete if the player has enough bounty.

    The spaces are important to each menuselect otherwise if its like this
    Code:
    bind "[" "say /buy; menuselect2;menuselect9; menuselect3" 
    this does nothing accept it will probably just open the buy menu and not buy anything but show the melee weapons or just the buy menu.
    [TABLE="width: 583"]
    [TR]
    [TD]If (3) Upgrades & Throws is selected...[/TD]
    [TD]If (1) Throwables is selected...[/TD]
    [TD]If (2) upgrades is selected...[/TD]
    [/TR]
    [TR]
    [TD]1. Throwables
    2. Upgrades[/TD]
    [TD]1. Molo
    2. Pipe
    3. Vomit
    [/TD]
    [TD]1. Ammo
    2. Explosive Ammo
    3. Explosive Ammo Pack
    4. Fire Ammo
    5. Fire Ammo Pack
    6. Laser Sight
    (LOL)
    [/TD]
    [/TR]
    [/TABLE]
    Tired of hitting those keys to get that favorite molo huh?
    In the console window type for example
    Code:
    bind "." "say /buy; menuselect 3; menuselect 1; menuselect 1"
    Hit Enter after.
    Hit the . key in game and you spawn a molo if you have enough bounty.
    The above bind code gets molo. Remember use any unassigned key to your liking.
    To unassign its unbind.
    [TABLE="width: 213"]
    [TR]
    [TD]If (4) Health Items is selected...[/TD]
    [/TR]
    [TR]
    [TD]1. Adrenaline
    2. Defibrillator
    3. First Aid
    4. Full Health
    5. Pills
    [/TD]
    [/TR]
    [/TABLE]
    Those tough situations where the tank just won't die in the safe room.
    If you have Negotiator like me I binded my first aid kit. Everytime I had 17 bounty i just bought it fighting the tank.
    For instance in the console window type
    Code:
    bind "F10" "say /buy; menuselect 4; menuselect 3"
    Hit Enter after.
    If F10 is hit in game it will spawn a Medkit if player has enough bounty.
    [TABLE="width: 180"]
    [TR]
    [TD]If (5) Misc is selected...[/TD]
    [/TR]
    [TR]
    [TD]1. Fireworks Crate
    2. Gas Can
    3. Gnome
    4. Grenade Launcher
    5. Oxygen Tank
    6. Propane Tank
    [/TD]
    [/TR]
    [/TABLE]
    There are those times where in a situation you got so much bounty you want to buy a grenade launcher.
    Type this in the console window
    Code:
    bind "'" "say /buy; menuselect 5; menuselect 4"
    Hit Enter after.
    the above code buys a grenade launcher when enough bounty is collected.
    Btw its the ' key above.

    Current Commands that work:
    type
    ! or / and command after

    !cp (control panel)
    !qt (quests)
    !gp (guild panel)
    !usepoints (buy menu)
    !up (buy menu)
    !buy (buy menu)
    !rebuy (buys the last item bought again)
    !laseron (puts laser on your current weapon)
    !afk (away from keyboard and will get you out of weird spots if stuck)
    !stuck (if you're really stuck this command will get you out if it doesn't work use !afk)
    !saveme (saves your stats)
    !teams (switch teams in versus)
    !players (shows how many players are playing and who's playing)
    !votesilence (can't type anymore if successful)
    !votemute (can't speak through mic if successful)
    !votekick (vote kicks the person out successful)
    !donor (special donor privileges. purchase a premium account and find out)
    !join (joins current game)
    !js (joingame)
    !jointeam1 (spec)
    !jointeam2 (joins survivors)
    !jointeam3 (joins infected)
    !tankhp (shows Tank's Health and how many tanks current on the field)

    Well just as a template I'll show you what keys I binded on my Keyboard.
    (Note: / is for silent and doesn't show in the chat box. ! shows in the chatbox when using this command.)
    You can use my setup if you want or assign your own bind keys to your liking.
    This is my setup every time I play L4D2.
    [TABLE="width: 601"]
    [TR]
    [TD]F Keys
    F5 First Aid Kit
    F6 Defib
    F7 Pills
    F8 Gem Market
    F9 /qt
    F10 /players
    F11 /gp[/TD]
    [TD]Letter Keys
    g Gem Craft
    n Lottery
    v /votekick
    m SG552
    b m16
    o /donor
    p /cp
    i /buy
    j /rebuy
    k /tankhp
    l /laseron[/TD]
    [TD]Other Keys
    = Fireworks Crate
    / /join
    \ m60
    - /teams
    0 /saveme (zero)
    ] bile
    [ molo
    ' /csm (csm is for donors and admins only)[/TD]
    [/TR]
    [/TABLE]
    My secret is out oh knows... D:
    If you forget your bind keys. Write them on a sticky note like I do and put it on your Computer Monitor as you play. The more I play with the same bind keys the easier it was to remember. I have showed you more than 3 examples. Now have fun binding your items and menus to your keyboard.

    Btw if you would like to play in third person mode type this in the console window while playing. Open the console window by hitting the ~ key without pressing shift.
    Code:
    thirdpersonshoulder
    the above code puts you in third person. Its not utilized fully and the aim is a little off. Its too bad Valve could've made this a better aiming system. To go back in first person type this in the console window.
    Code:
    firstperson
    You can bind thirdpersonshoulder and firstperson too. :3
    For example type this in console
    Code:
    bind - c_thirdpersonshoulderoffset 0;  c_thirdpersonshoulderaimdist 720; c_thirdpersonshoulderheight 10;  cam_ideallag 0; thirdpersonshoulder
    Credit given to Teh R3aper


    For example for first person
    Code:
    bind = firstperson
    Aiming Fix for third person
    http://mgftw.com/showthread.php/604...rial-and-thirdpersonshoulder-fix-for-campaign
    Example Pics it's not perfect but it will do. The bullet shoots down from the center rather than offset from the left before.
    [​IMG]
    [​IMG]
    Have fun, play hard and Merry Christmas everybody. :D
     
  2. ?

    ? Guest

    Good job, that must have took plenty of time. What is this >>> / /join should it have 2 back slashes? CSM only works for donors, not admins as far as i know. I'll try it out later to confirm.

    Edit: Btw, you can re-type thirdpersonshoulder in the console again to go back in the first person mode so just press the up arrow key to show what you typed before in the console (thirdpersonshoulder) and press enter..
     
  3. Nerfarious

    Nerfarious MG Donor

    i have my key / /join instead of !join

    this took me about 10 minutes to put it together as I ate Christmas dinner :3
     
  4. LOL, such an enormous guide for just a few binds.

    Also, shouldn't items that you need be on keys closer to you? Like this:
    bind "F4" "say_team /cp"
    bind "F5" "say_team /gp"
    bind "F6" "say_team /inv"
    bind "F7" "say_team /surv"
    bind "F8" "say_team /inf"
    bind "F9" "say_team /afk"
    bind "F10" "say_team /players"
    bind "F11" "say_team /votekick"
    bind "C" "say_team /laseron"
    bind "V" "say_team /buy"
    bind "B" "say_team /rebuy"
    bind "N" "say_team /buy; menuselect 1; menuselect 2; menuselect 1" // M16
    bind "M" "say_team /buy; menuselect 1; menuselect 5; menuselect 1" // Hunting Rifle
    bind "," "say_team /buy; menuselect 1; menuselect 2; menuselect 4" // M60
    bind "." "say_team /buy; menuselect 2; menuselect 9; menuselect 3" // Machete
    bind "G" "say_team /tankhp"
    bind "H" "say_team /buy; menuselect 3; menuselect 1; menuselect 1" // Molotov
    bind "J" "say_team /buy; menuselect 3; menuselect 1; menuselect 3" // Bile
    bind "K" "say_team /buy; menuselect 4; menuselect 2" // Defibrillator
    bind "L" "say_team /buy; menuselect 4; menuselect 3" // First Aid Kit
    bind "I" "say_team /buy; menuselect 4; menuselect 5" // Pills
    bind "O" "exec afk"
    bind "P" "exec afk2"
    bind "[" "say_team /saveme"
    bind "]" "disconnect"

    All in all, good guide.

    Another also, I want your server browser button.
     
  5. Nerfarious

    Nerfarious MG Donor

    I have ran into computer illiterates before in real life. It's best if I just show them every step. Someone had trouble adding there custom helms deep into the addons folder... (facepalm) It's better to be detailed then not.

    The openserverbrowser was a mod I found at omgot.org. I'll upload all the mods I have for L4D2 and make another thread in the mod topic. First I have to organize them. They are scattered all over my computer. lawl

    I made a thread a while ago regarding modding skins and Heads up displays.
    It's the omgot link.
    http://mgftw.com/showthread.php/4766-Tutorials-different-Skins-Music-Tank-Music-Gun-Sounds-Etc.

    Server Browser Mod
    http://www.omgot.org/forums/cgi-bin/yabb2/YaBB.pl?num=1289935564/0#0

    If the download link is down. I'll upload it here.
     
  6. ?

    ? Guest

    Tsunami, you don't have to use "say_team" .. "Say /gp" also works..
     
  7. Beasty Ribs

    Beasty Ribs Guest

    as long as you are using the / instead of the ! it wont show in chat.
     
  8. rickhunter

    rickhunter Guest

    NIce work. How did you get the player to be display on the left hand? My is on the whole bottom. :)
     
  9. Raised in Hell

    Raised in Hell Senior Member

    Thats omgots HUD
     
  10. Badger

    Badger Guest

    Here's something to add to the above:

    If you want to auto-close the menu after buying something, add this to the end of the buy command:

    Code:
    wait 15; slot0
    That'll essentially click the "0" because "menuselect 0" doesn't seem to work. For example:

    Code:
    alias "buyM60" "say_team /buy; menuselect 1; menuselect 2; menuselect 4; wait 15; slot0"
    Sometimes the wait time needs to be tuned, so you can make it into an alias, and then tag it to the end of every menu command:

    Code:
    alias "closemenu" "wait 40; slot0"
    
    alias "buyM60" "say_team /buy; menuselect 1; menuselect 2; menuselect 4; closemenu"
    
     
  11. Would you guys like me to add a quick buy menu where the most popular menu items are placed?

    Something like !qb (quick buy) with the following:
    - Pills
    - Medkit
    - Molotov
    - Heal

    Idk what else xD
     
  12. szSteam_76561198049914430

    szSteam_76561198049914430 Last Online: 39 hrs, 42 mins ago

    Bile and firework crate :D (well the last one its for set the tank on fire :P) and defib (alex , avil and funky brother would be so happy lol)

    Few ppl buy heal (it's expensive and doesnt cure black and white :/) so u should discard it from the list.
     
  13. Badger

    Badger Guest

    Is there really a need for a separate quick buy? What about just parameterizing the buy command, such as (for an M60):

    Code:
    say_team /buy 1 2 4
    Or if that'd be too much parsing, enumerating commands like:

    Code:
    say_team /buy 124
    or even

    Code:
    say_team /buy124
    .

    That way we can just bind keys to the commands rather than sift through menus. With plenty of keys on the keyboard, I'd avoid the menus altogether if I could. Hell, over 90.00% of the menu items nobody will buy anyway under any circumstances, especially useless garbage like cricket bats or tier-1 shotguns. The only time I've ever bought something like the the SCAR (desert rifle) is because I thought the menu had closed and I tried to switch to a throwable.

    On another note, and to extend the menu subject, what about just getting rid of some of the items from the menus altogether? I can't find any reason why people would buy melee weapons other than the axe (cheaper slashing melee), machete, katana (if on Dead Air), or maybe the tonfa (fastest swinging tank killer in vanilla); that would shorten the melee menu to a single page. The same thing with tier-1 shotguns (eliminate that submenu altogether), the SCAR rifle, and the regular UZI (though not the silenced one).
     
  14. zackno

    zackno MG Donor

    Nerfarious guide works just fine for me

    type in console, not chat window ;P
    one example for Molotov type: bind "1" "say /buy; menuselect 3; menuselect 1; menuselect 1"

    thx Nerfarious!
     
  15. erik

    erik MG Donor

    General on-topic question.

    I have a friend whose "binds" seem to be reset every time he's in-game.

    I see him on every few days, if not daily.

    Any reasons why this would happen?
     
  16. LEGEND

    LEGEND Senior Member

    Go here:

    C:\Program Files (x86)\Steam\steamapps\common\left 4 dead 2\left4dead2\cfg

    There should be autoexec.cfg or config.cfg.
    Tell him to add the binds, on separate lines, in both files so that they load up on game start.

    Eg:
    bind "slot2" "say /buy; menuselect 3; menuselect 1; menuselect 1"
    bind "slot3" "say /buy; menuselect 3; menuselect 1; menuselect 4"