Buy Scripts (Sticky)

RiX

BattleForums Senior Member
Joined
Sep 26, 2002
Messages
1,435
Reaction score
0
Location
Vancouver, B.C.
Website
thelazyshopper.wwdb.biz
Buy Scripts is what everyone needs and usually wants =) so here we go.

IMPORTANT PLEASE READ THROUGH THE WHOLE EFFIN THING BEFORE YOU ASK DUMB QUESTIONS IN WHICH I WILL FLAME YOU FOR!

Lets Go Through Some Vocabulary =)

(Taken From Mr. AzRed From CS Forums Only the Vocab)

Autoexec.cfg: This file, user created, will automatically execute upon entering a CS game.

To create it, go into Notepad. Save the file as "autoexec.cfg" (with the quotes). Make sure you select "All Files (*.*)" in the drop-down menu where it says "Save As".

Config.cfg: This file contains all the binds and settings. It is automatically generated by CS if deleted, with all default settings and binds. Generally, it is not wise to put scripts in this file; however, binds may go in here.

alias: The core of any script. The alias command basically allows the stacking of multiple commands. The following is a use of the alias command to say "Hello World!"


alias hello "say Hello World!" //The alias command combines everything in the quotes into one neat little command, as seen in the next line.

bind "h" "hello"



Bind: A bind is basically mapping your key to perform a command. For instance:


bind "mouse1" "+attack"



This basically says, "When you hit mouse1, it should use command +attack". When you release "mouse1" you'll automaticly execute the "-attack" command, stopping your fire.

wait: A wait, when inserted into script, simply pauses the script for one frame. So in order to wait one second you have to have as many waits as you have Frames Per Second.

slot10: This closes all menus. The waits and slot10s are usually used together to close menus in buyscripts. See my tutorial on buyscripts, coming soon.

developer #: Developer lets the user see information about his game in the top-left corner, without opening the console.

It is normally set to 0, so nothing is shown. When developer is set to 1, you can use the "echo" command (more on that later) to convey information to the user.


developer 1; echo hi; developer 0"



This will activate developer mode, say hi on the top left corner of the screen, and deactivate it. We always make sure to deactivate it so no information other than what we want gets to the user; it would get extremely annoying for most people to see when someone died at the top left, in text.

echo: An echo is used in conjunction with the developer commands. When you use an echo, it will convey information into the console. When developer is activated, the echo will convey information at the top left hand corner of the screen.
Now, different basic methods of scripting:

Aliasing: Aliasing is simply grouping commands together into 1, easy to use command:



alias w00t "say w00t; say w00t!"



This type of script is the core to more complex scripts, as it condenses scripts greatly. If the aliasing method did not exist, it would be a horrible pain in the ass to even bind something!

Toggle: A toggle script consists of three lines: 1 line which will perform a function, 1 line which will perform another function, and 1 last line to do the "toggling". Example:


alias toggle "toggle1"
alias toggle1 "say This is toggle1; alias toggle toggle2"
alias toggle2 "say This is toggle2; alias toggle toggle1"



Confused? Basically, the "toggle" line has another command inserted into it. The "toggle" line, as you should notice, will always perform another command, and is never used to combine commands. Rather, it simply executes the line in quotes.

The line in quotes in this case, toggle1, is executed. The player will say "This is toggle1." Then, there is the alias command again. We have already learned that the alias command is used to group commands; it can also be used to change the functionsof existing commands. In this case, the "toggle" line's new definition is changed to "toggle2".

You can also use toggles for binds, not just aliases:


alias flashon "flashlight"
alias flashlight "bind f impulse 101; alias flashon flashoff"
alias flashoff "unbind f; alias flashon flashlight



If you trigger "flashon", the script will bind F to your flashlight. If you trigger it again, the button will be unbound.

+/-: The +/- script basically has 2 lines. One line will execute when the key is pressed (+); the other line will execute when the key is released (-). Example:


alias +hi "say hello"
alias -hi "say i am scripting!"

bind "h" "+hi"



The + and - MUST BOTH be defined, or the script will not work properly.

When you push and hold H, the first line will be executed. When you release, the second line will be executed.

Cycle: Much like the toggle, the cycle script has an alias that does nothing except use other lines of code. The key difference is that the cycle can use more than 3 lines of coding. The alias command is also used alot.

There is not much different from a toggle script; it's the same principle. You're just not defining the "alias toggle" into the same 2 all the time. There could be 3, 4, or even 20. Take the following example:


alias graph "graph1"
alias graph1 "net_graph 1; alias graph graph2"
alias graph2 "net_graph 2; alias graph graph3"
alias graph3 "net_graph 3; alias graph graph4"
alias graph4 "net_graph 0; alias graph graph1"

bind "v" "graph"



Note that the "alias graph" at the end of each line redefines "graph" to a new alias. It's like an "advanced toggler".
Just like the toggle, you can also use a cycle to bind.
Now we're going to use what we've learned, and make a 3-shot bursting script that can be turned off.

First, let's write the +/- firing script itself:


alias 1shot "+attack; wait; -attack"
alias 3shot "1shot; wait; 1shot; wait; 1shot"


What we've done so far is make a pair of aliases that will shoot 3 times when executed.


alias shoot "shoot1"
alias shoot1 "bind mouse1 3shot; alias shoot shoot2"
alias shoot2 "bind mouse1 +attack; alias shoot shoot1"



We can rebind AND realias using toggles. They're extremely useful little codes to know.

Once you understand the 4 above scripts, the examples, the final 3-shot burst we've created, and how they work, you can go on to some more advanced scripting.

Meta-binds: A meta-bind is a script that binds one or several keys to multiple commands, like the above toggle example. They can be both "+/-" scripts, or toggles, it is up to you to decide what works best in any situation.
Using a meta-bin can be useful if you're trying to save keyboard space, as you can get twice as many commands bound by only using one extra key. Here's an example of the "+/-" variant:


alias +shooter "bind mouse1 +3shot"
alias -shooter "bind mouse1 +attack"



When the button is held (+shooter), the mouse1 key will be rebound to the 3shot script we just made. When the +shooter button is released (-shooter), the mouse1 will be bound to +attack, its normal command.

Meta-binds don't have to be used just for binds. The buyscript I created uses a meta-cfg, where another .cfg file is executed on the pressing of the button. Just remember, a meta-bind is simply a toggle, except it binds.

The .cfg Method: You don't need to keep all your scripts in autoexec.cfg. In fact, I advise against it. It gets too big, unreadable, etc. There will be more about this method towards the end of this guide.

Now, for the actual script. Some cvars, such as names, require quotes to be used (name "I am w00t!"). However, you cannot have more than 1 pair of quotes inside an alias at a time. Then how would you change your name using a cool script?

By using the .cfg method, we can execute a seperate file with the line of code that we want. Look at this example:



//Autoexec.cfg//
alias rename "exec rename.cfg"

//rename.cfg//
name "I am w00t!"



By using the .cfg method, you can save space, organize scripts, and do things you can't do with just 1 script.


These Should All Be Created In Your..

If You Have Half-Life:

Example 1: C:/Program Files/Sierra/Half-Life/CStrike Folder
Example 2: D:/Program Files/Sierra/Half-Life/CStrike Folder

Or Where-Ever Your Directory Is

If You Have CS Retail

Example 1: C:/Program Files/Sierra/Counter-Strike/CStrike Folder
Example 2: D:/Program Files/Sierra/Counter-Strike/CStrike Folder

Step 1: Create a file called autoexec.cfg
- To do go about doing this you must make a new .txt file if you don't know how to do this you shouldn't be here reading this. Go To Save As> and call the .txt file "autoexec.cfg"

Step 2: Create a file called scriptnamehere.cfg
- Basically the same way you do Step 1
- Example "rixscript.cfg"

IMPORTANT Notice!! Remember the " " =)

Step 3: In The autoexec.cfg put exactly > > > exec scriptnamehere.cfg

Step 4: Now onto the buy scripts. Open Up scriptnamehere.cfg and time for the alias's.

- Next is a following of Scripts ONLY BUY The MOST USED Guns
 

RiX

BattleForums Senior Member
Joined
Sep 26, 2002
Messages
1,435
Reaction score
0
Location
Vancouver, B.C.
Website
thelazyshopper.wwdb.biz
continued i surpassed 1000 chars

AK/COLT

alias +rifle "buy; menuselect 4; menuselect 1; buy; menuselect 4; menuselect 3; buy; menuselect 6"
alias -rifle "slot10; wait; wait; slot10"

USP

alias +usp "buy; menuselect 1; menuselect 1; buy; menuselect 7"
alias -usp "slot10; wait; wait; slot10"

AWP

alias +awp "buy; menuselect 4; menuselect 6; buy; menuselect 6"
alias -awp "slot10; wait; wait; slot10"

AMMO

alias +ammo "buy; menuselect 6; buy; menuselect 7"
alias -ammo "slot10; wait; wait; slot10"

GRENADES/FLASHES

alias +gren "buy; menuselect 8; menuselect 4; buy; menuselect 8; menuselect 3; buy; menuselect 8; menuselect 3; mclr"
alias -gren "slot10; wait; wait; slot10"

*Note These Scripts Have NOT BEEEN TESTED AS OF TODAY June 19/03 I Will Test Them Later On because a virus hit my computer causing me to reformat

If you request a Script Please Reply To This Thread and I Will Reply Within The Next 24 Hours

Last Step MOST IMPORTANT:

In Your CS Folder A File Name config.cfg Open It And Time To Add Your Binds

i have these within me config.cfg

If You Are Gonna Use My alias's

just add this

bind "F3" "+awp"
bind "F12" "+rifle"
bind "F8" "+usp"
bind "F9" "+gren"
bind "F4" "+ammo"


remember YOU CANNOT BIND F1 and F2

Frequently Requested Scripts ( Brought To You By EnglishBOB )

First, we have the walk/run toggle:
This makes you walk when pressed ( not held down ) and run again when pressed again.
Much better than to have to hold down SHIFT or whatever buttons you use.

alias Do_Walk "+speed; developer 1; echo Walking; developer 0; alias Walk_Toggle Stop_Walk"
alias Stop_Walk "-speed; developer 1; echo Running; developer 0; alias Walk_Toggle Do_Walk"
Stop_Walk

bind "?" "Walk_Toggle"

To change this into a "silent walk/run" (toggle) script, add/change this to the "config.cfg".
If you do not want the toggle, just add this and have a key bound to "walk".
cl_movespeedkey "0.56"


Then, a jump-duck script
Making you jump and duck at the same time, for those who can't time the pressing of
two buttons at once ;). And NO, it isn't as good as doin' it the manual way.

alias +DuckJump "+jump; +duck"
alias -DuckJump "-duck; -jump"

bind "?" "+DuckJump"


Duck-toggle script
Makes u cruch all the time when active.... No more explainations needed ( I hope )

alias duck_on "+duck; developer 1; echo Ducking Toggle *ON*; developer 0; alias toggle_duck duck_off"
alias duck_off "-duck; developer 1; echo Ducking Toggle *OFF*; developer 0; alias toggle_duck duck_on"
alias toggle_duck "duck_on"

bind "?" "toggle_duck"


Burst-fire script, click to shoot in bursts
Should be simple enough, click youre fire button to fire about 5 bullets with any
fully automatic weapon.
PS: If they do not shoot the desired amount of shots, add a couple more waits at the end of the "ss" alias.

alias d1 "developer 1"
alias d0 "developer 0"
alias ss "+attack;wait;-attack;wait"
alias 5s "ss;ss;ss;ss;ss"
alias burst "unbind mouse1;5s;bind mouse1 burst"
alias bursttog "burst+"
alias burst+ "bind mouse1 burst;d1;echo ***Burst Fire On***;d0; alias bursttog burst-"
alias burst- "bind mouse1 +attack;d1;echo ***Normal Fire On***;d0; alias bursttog burst+"

bind "?" bursttog

And here for 3 shots:

alias d1 "developer 1"
alias d0 "developer 0"
alias ss "+attack;wait;-attack;wait"
alias 3s "ss;ss;ss"
alias burst "unbind mouse1;3s;bind mouse1 burst"
alias bursttog "burst+"
alias burst+ "bind mouse1 burst;d1;echo ***Burst Fire On***;d0; alias bursttog burst-"
alias burst- "bind mouse1 +attack;d1;echo ***Normal Fire On***;d0; alias bursttog burst+"

bind "?" bursttog


Stop reloading script
For those situations where you "accidentally" pressed the Reload
button, and want your gun back FAST

alias reload_stop "weapon_knife; wait; wait; wait; lastinv"

bind "?" "reload_stop"


Help-me-my-menus-wont-close script
EVERYBODY needs this one. When they find out, they come to this forum and starts screaming.
STOP IT!!

Add this to your autoexec:

alias mcl "slot10;wait;wait;slot10;wait;slot10;wait;slot10"

Then add the "mcl" command at the end of
your buy/radio script

Or you could do it this way:

alias +cforward "+forward;slot10"
alias -cforward "-forward;slot10"
alias +cback "+back;slot10"
alias -cback "-back;slot10"
alias +cmoveleft "+moveleft;slot10"
alias -cmoveleft "-moveleft;slot10"
alias +cmoveright "+moveright;slot10"
alias -cmoveright "-moveright;slot10"
alias +cjump "+jump;slot10"
alias -cjump "-jump;slot10"

bind "?" "+cforward"
bind "?" "+cback"
bind "?" "+cmoveleft"
bind "?" "+cmoveright"
bind "?" "+cjump"

This constantly closes menus when you move.

Me-want-to-buy-ak/colt-script
For some reason, most people want an AK-47 or a Colt Commando every round.....
Not my problem, though... This tiny script buys the gun, kevlar, ammo, and then closes
the menus ( if you followed the abowe instructions )

alias +ak_colt "buy; menuselect 4; menuselect 1; buy; menuselect 4; menuselect 3; buyequip; menuselect 2; buy; menuselect 6"
alias -ak_colt "mcl"

bind "?" "+ak_colt"

Ahhh I'll better add the Buymp5 as well... That seems to be the only other weapon they want..... :rolleyes:

alias +mp5 "buy; menuselect 3; menuselect 1; buyequip; menuselect 2; buy; menuselect 6"
alias -mp5 "mcl"

bind "?" "+mp5"


MWheel Weapon Inventory
This one will go through all of your weapons, grenades & C4 in order...
Just use your mousewheel ( you do have one, right? ) to change

alias invup "invnext; +attack; wait; -attack"
alias invdown "invprev; +attack; wait; -attack"

bind "mwheelup" "invup"
bind "mwheeldown" "invdown"

and this one will cycle through your weapons ONLY. More handy when you always run
around with a bomb strapped to your back...

alias get1 "hud_fastswitch 1;slot1;hud_fastswitch 0;alias invup get3;alias invdown get2"
alias get2 "hud_fastswitch 1;slot2;hud_fastswitch 0;alias invup get1;alias invdown get3"
alias get3 "weapon_knife;alias invup get2;alias invdown get1"
alias invup "get3"
alias invdown "get2"

bind "mwheelup" "invup"
bind "mwheeldown" "invdown"


Knife quick-stab script
By pressing and holding a button, you get out your knife and start slashing.
Release the button to get back the weapon you had before

alias +quickstab "weapon_knife; wait; +attack2"
alias -quickstab "-attack2; lastinv"

bind "?" "+quickstab"


Grenade Spam script
Press/hold the button to buy, select, and throw a HE grenade. The longer you hold,
the more happens. Press again to repeat. SPAM.

alias buy_he "buyequip; menuselect 4; wait; wait"
alias get_he "weapon_hegrenade; wait; wait"
alias throw_he "+attack; wait; wait; wait; -attack"
alias spam_he "buy_he; get_he; throw_he"

bind "?" "spam_he"


Bomb Plant script
Select if you're planting or defusing, then press and hold to plant/defuse.

alias d0 "developer 0"
alias d1 "developer 1"
alias +plant "+duck; +attack"
alias -plant "-duck; -attack"
alias +defuse "+duck; +use"
alias -defuse "-duck; -use"
alias cover "say_team Planting/Defusing C4, Cover me!"
alias pdc4 "pdc41"
alias pdc41 "d1; echo Plant; d0; alias pdc4 pdc42; alias c4m +plant"
alias pdc42 "d1; echo Defuse; d0; alias pdc4 pdc41; alias c4m +defuse"

bind "?" "pdc4"
bind "?" "c4m"

"pdc4" is te toggle between planting and
defusing, "c4m" is the actual command.

NOTES TO CHEATERS
No bunnyjump scripts is ever written in this
post, and mostly it'll be a waste of time
asking for one in the forum.
IT - IS - A - CHEAT!
Same thing for 3rd person wiew.
No arguments taken.

Other stuff:

To make your weapons come instantly when the
number 1-5 is pressed, type this in your console:
hud_fastswitch 1

Posted by 0cT@goN:

HE Spam...

alias buy_he "buyequip; menuselect 4; wait; wait"
alias get_he "weapon_hegrenade; wait; wait"
alias throw_he "+attack; wait; wait; wait; -attack"
alias spam_he "buy_he; get_he; throw_he"

bind "?" "spam_he"


Grenade Script...

// -== 0cT@goN's Grenade Script ==-
alias +grenthrow "nomsg"
alias -grenthrow " "

alias throwflash "weapon_flashbang; flashmsg; w1; +attack"
alias throwhe "weapon_hegrenade; hemsg; w1; +attack"
alias throwsmoke "weapon_smokegrenade; smokemsg; w1; +attack"
alias finthrow "w1; -attack; w2; get_best"

// -== Messages ==-
alias flashmsg "say_team Look Out, Throwing a Flashbang"'
alias hemsg "say_team Throwing a HE Grenade!!"
alias smokemsg "say_team Throwing a Smoke Grenade!!"
 

RiX

BattleForums Senior Member
Joined
Sep 26, 2002
Messages
1,435
Reaction score
0
Location
Vancouver, B.C.
Website
thelazyshopper.wwdb.biz
Part 3 =)

// -== Grenade Cycler ==-
alias gren_cycle "he_throw"

alias smoke_throw "d1; echo Set to throw a *SMOKE GREN*; d0; alias grenthrow throwsmoke; alias -grenthrow finthrow; alias gren_cycle he_throw"
alias he_throw "d1; echo Set to throw a *HE GREN*; d0; alias +grenthrow throwhe; alias -grenthrow finthrow; alias gren_cycle flash_throw"
alias flash_throw "d1; echo Set to throw a *FLASHBANG*; d0; alias +grenthrow throwflash; alias -grenthrow finthrow; alias gren_cycle no_throw"
alias no_throw "d1; echo Set to throw *NOTHING*; d0; alias +grenthrow nomsg; alias -grenthrow none; alias gren_cycle smoke_throw"

// -== Common Cmds ==-
alias w1 "wait"
alias w2 "w1; w1"
alias d1 "developer 1"
alias d0 "developer 0"
alias none " "
alias nomsg "d1; echo Nothing Selected; d0"
alias get_best "hud_fastswitch 1; slot3; slot2; slot1; hud_fastswitch 0"

// -== Binds ==-
bind "?" "+grenthrow"
bind "?" "gren_cycle"


Jump Clear...

alias +slot10j "+jump; slot10"
alias -slot10j "-jump; slot10"

bind "?" "+slot10j"


Weapon Switches...

alias get_sec "hud_fastswitch 1; slot2; hud_fastswitch 0"
alias get_pri "hud_fastswitch 1; slot1; hud_fastswitch 0"
alias get_kni "hud_fastswitch 1; slot3; hud_fastswitch 0"
alias get_c4 "hud_fastswitch 1; slot5; hud_fastswitch 0"
alias get_best "hud_fastswitch 1; slot3; slot2; slot1; hud_fastswitch 0"

bind "?" "get_sec "
bind "?" "get_pri "
bind "?" "get_kni "
bind "?" "get_c4 "
bind "?" "get_best"


Switch Hands...

alias toggle_hand "left_hand"
alias left_hand "alias toggle_hand right_hand; cl_righthand 1; wait; wait; wait; weapon_knife; wait; wait; wait; lastinv"
alias right_hand "alias toggle_hand left_hand; cl_righthand 0; wait; wait; wait; weapon_knife; wait; wait; wait; lastinv"

bind "?" "toggle_hand"


Duck Toggle...

alias duck_on "+duck; developer 1; echo Ducking Toggle *ON*; developer 0; alias toggle_duck duck_off"
alias duck_off "-duck; developer 1; echo Ducking Toggle *OFF*; developer 0; alias toggle_duck duck_om"
alias toggle_duck "duck_on"

bind "?" "toggle_duck"

Thats all the brilliant stuff I could come up with.

Posted By ZigZagMan

Reload stop

alias reload_stop "weapon_knife; wait; wait; wait; lastinv"

bind "?" "reload_stop"


AFK Fun!! :>

alias afk "afk1"
alias afk1 "+forward; +left; weapon_knife; +attack; say_team be right back; alias afk afk0"
alias afk0 "-forward; -left; -attack; say_team I'm back; alias afk afk1"

bind "?" "afk"


Quick Stab

alias +quickstab "weapon_knife; wait; +attack2"
alias -quickstab "-attack2; lastinv"

bind "?" "+quickstab"


rcon admins and adminmod.
Note: For rcon commands, when prompted a command would look like this in the top left.
rcon: mp_friendlyfire" 0
Since rcon is the begining of the command, you must add the closing " then the last of the command.

contimes 10

alias ee1 "developer 1"
alias ee0 "developer 0"
alias 1w1 "wait;wait;wait'wait"
alias 0001 "messagemode name"
alias 0002 "messagemode rcon"
alias 0003 "messagemode admin_tsay"
alias 0004 "messagemode record"
alias 0011 "admin_fun 1"
alias 0012 "admin_fun 0"
alias 0013 "admin_pistols"
alias 000echo "ee1; echo 1. Change Name; echo 2. Enter rcon command; echo 3. Admin Say; echo 4. Record Demo; echo 6. FunMode On; echo 7. AdminFun Off; echo 8. Pistols Only;ee0"

alias 000bind "bind 1 0001; bind 2 0002; bind 3 0003; bind 4 0004; bind 5 0005; bind 6 0011; bind 7 0012; bind 8 0013; bind 9 0014;1w1;1w1;1w1;1w1"

alias 000tbind "bind 1 slot1; bind 2 slot2; bind 3 slot3; bind 4 slot4; bind 5 slot5; bind 6 slot6; bind 7 slot7; bind 8 slot8; bind 9 slot9";1w1;1w1;1w1;1w1"

alias +m01 "000echo; 1w1;1w1;000bind"
alias -m01 "1w1;1w1;000tbind"

bind ? "+m01"

Posted By The Super Fantabuloso Angelslayer:

AWM/P Auto Zoom

alias +autozoom "get1;w5;w5;w5;w5;w5;+attack2;w;-attack2"
alias -autozoom "+attack;wait;-attack;w;weapon_knife;w;lastinv;w5;w5;w5;+attack2;w;-attack2"
alias zoomtog "zoom+"
alias zoom+ "bind mouse1 +autozoom;alias zoomtog zoom-;d1;echo ***Auto Zoom On***;d0"
alias zoom- "bind mouse1 +attack;alias zoomtog zoom+;d1;echo ***Auto Zoom Off***;d0"

alias get1 "hud_fastswitch 1;slot1;hud_fastswitch 0"
alias w "wait"
alias w5 "w;w;w;w;w"
alias d1 "developer 1"
alias d0 "developer 0"

bind "?" zoomtog

press and hold to zoom once,
release to fire.

Move Clear/Buy Ammo All The Time

alias +cforward "+forward;slot10"
alias -cforward "-forward;slot10"
alias +cback "+back;slot10"
alias -cback "-back;slot10"
alias +cmoveleft "+moveleft;slot10"
alias -cmoveleft "-moveleft;slot10"
alias +cmoveright "+moveright;slot10"
alias -cmoveright "-moveright;slot10"
alias +cjump "+jump;slot10"
alias -cjump "-jump;slot10"

bind "?" "+cforward"
bind "?" "+cback"
bind "?" "+cmoveleft"
bind "?" "+cmoveright"
bind "?" "+cjump"

all you have to do is move and the menus will clear.

and if you wanna constantly buy ammo in buy zones, when you have the money....

alias +cforward "+forward;slot10;ba0"
alias -cforward "-forward;slot10;ba0"
alias +cback "+back;slot10;ba0"
alias -cback "-back;slot10;ba0"
alias +cmoveleft "+moveleft;slot10;ba0"
alias -cmoveleft "-moveleft;slot10;ba0"
alias +cmoveright "+moveright;slot10;ba0"
alias -cmoveright "-moveright;slot10;ba0"
alias +cjump "+jump;slot10;ba0"
alias -cjump "-jump;slot10;ba0"

alias ba1 "buyammo1;buyammo1;buyammo1;buyammo1;buyammo1;buyammo1;buyammo1"
alias ba1 "buyammo2;buyammo2;buyammo2;buyammo2;buyammo2;buyammo2;buyammo2"
alias ba0 "ba1;ba2"

bind "?" "+cforward"
bind "?" "+cback"
bind "?" "+cmoveleft"
bind "?" "+cmoveright"
bind "?" "+cjump"


Burst Fire Script
This burst fire script is based on holding down +attack.

alias d1 "developer 1"
alias d0 "developer 0"
alias w3 "wait;wait;wait"

alias burst "unbind mouse1;+attack;w3;w3;-attack;bind mouse1 burst"
alias burst_tog "burst+"
alias burst+ "bind mouse1 burst;d1;echo ** Burst Fire [ON ] **;d0;alias burst_tog burst-"
alias burst- "bind mouse1 +attack;d1;echo ** Burst Fire [OFF] **;d0;alias burst_tog burst+"

bind "???" burst_tog

and this one is based on the rapid activation of +attack/-attack

alias d1 "developer 1"
alias d0 "developer 0"

alias ss "+attack;wait;wait;-attack;wait;wait"
alias burst "unbind mouse1;ss;ss;ss;ss;ss;bind mouse1 burst"
alias burst_tog "burst+"
alias burst+ "bind mouse1 burst;d1;echo ** Burst Fire [ON ] **;d0;alias burst_tog burst-"
alias burst- "bind mouse1 +attack;d1;echo ** Burst Fire [OFF] **;d0;alias burst_tog burst+"

bind "???" burst_tog


MWheel Weapon Inventory
This one will go through all of your weapons, grenades & C4 in order...

alias invup "hud_fastswitch 1; invnext; +attack; wait; -attack; hud_fastswitch 0"
alias invdown "hud_fastswitch 1; invprev; +attack; wait; -attack; hud_fastswitch 0"

bind mwheelup invup
bind mwheeldown invdown

and this one will cycle through your weapons only.

alias get1 "hud_fastswitch 1;slot1;hud_fastswitch 0;alias invup get3;alias invdown get2"
alias get2 "hud_fastswitch 1;slot2;hud_fastswitch 0;alias invup get1;alias invdown get3"
alias get3 "weapon_knife;alias invup get2;alias invdown get1"
alias invup "get3"
alias invdown "get2"

bind mwheelup invup
bind mwheeldown invdown


Posted by Bigguns:
Had a go at the Grenade Auto Script (copying and pasting from others) and came up with this.

For HE grens:

alias waitlong "wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait"
alias get_he "weapon_hegrenade"
alias throw_he "+attack; waitlong; waitlong; waitlong; -attack"
alias get_best "hud_fastswitch 1; slot3; slot2; slot1; hud_fastswitch 0"
alias autogren "get_he; waitlong; throw_he; waitlong; waitlong; waitlong; get_best"

bind "?" "autogren"


For FlashBangs:

alias get_flash "weapon_flashbang"
alias throw_he "+attack; waitlong; waitlong; waitlong; -attack"
alias autoflash "get_flash; waitlong; throw_he; waitlong; waitlong; waitlong; get_best"

bind "?" "autoflash"


This will change to Grenade, (HE or Flash) throw, and then change to your best weapon.....

Works well with my gamevoice as well.....and you may have to change the wait alias to increase or decrease depending on the speed of your machine....

How to play a wave file over voice coms:

//External Wav script by X3M wav gotta be 8kHz 16bit Mono name it voice_input.wav and put it in HL folder
alias extoggle exon
alias exon "voice_inputfromfile 1; voice_loopback 1; +voicerecord; alias extoggle exoff"
alias exoff "-voicerecord; voice_inputfromfile 0; voice_loopback 0; alias extoggle exon"

For Rcon:-
//External Wav script by X3M wav gotta be 8kHz 16bit Mono name it voice_input.wav and put it in HL folder
alias extoggle exonalias exon "rcon sv_alltalk 1; voice_inputfromfile 1; +voicerecord; alias extoggle exoff"
alias exoff "-voicerecord; voice_inputfromfile 0; alias extoggle exon; rcon sv_alltalk 0"
 

RiX

BattleForums Senior Member
Joined
Sep 26, 2002
Messages
1,435
Reaction score
0
Location
Vancouver, B.C.
Website
thelazyshopper.wwdb.biz
Part 4 oOoO I Feel Like P.Diddy

For Adminmod:-
//External Wav script by X3M wav gotta be 8kHz 16bit Mono name it voice_input.wav and put it in HL folder
alias extoggle exonalias exon "admin_rcon sv_alltalk 1; voice_inputfromfile 1; +voicerecord; alias extoggle exoff"
alias exoff "-voicerecord; voice_inputfromfile 0; alias extoggle exon; admin_rcon sv_alltalk 0"


Originally posted by Mat@TheFlat,
rewritten by Nuclear Chicken:
Primary/Secodary weapon toggler

alias pswitch "weapon_knife; lastinv; weap_sec; lastinv; weap_prim; lastinv; weapon_knife; lastinv"
alias weap_prim "weap_shotgun; weap_smg; weap_ar; weap_sniper; weapon_m249"
alias weap_shotgun "weapon_m3; weapon_xm1014"
alias weap_smg "weapon_mp5navy; weapon_p90; weapon_tmp; weapon_mac10; weapon_ump45"
alias weap_ar "weapon_ak47; weapon_sg552; weapon_m4a1; weapon_aug"
alias weap_sniper "weapon_scout; weapon_awp; weapon_g3sg1; weapon_sg550"
alias weap_sec "weapon_glock18; weapon_usp; weapon_deagle; weapon_p228; weapon_elite; weapon_fiveseven"

bind "?" "pswitch"


Originally posted by The Super Fantabuloso Angelslayer:
AWP/Scout Quick Switch

alias d1 "developer 1"
alias d0 "developer 0"
alias s1 "slot1"
alias s2 "slot2"
alias pist_check ""
alias get2 "weapon_glock18;weapon_usp;weapon_deagle;weapon_p228;weapon_elite;weapon_fiveseven;set_off"
alias pist_tog "pist_on"
alias pist_on "bind mouse1 +fire;alias pist_tog pist_off;d1;echo Auto Switch [ON ];d0;set+; set_on"
alias pist_off "alias pist_tog pist_on;d1;echo Auto Switch [OFF];d0;set-; set_off"
alias +fire "+attack"
alias -fire "-attack;wait;wait;pist_check;slot10"
alias setter "alias pist_check get2"
alias set_on "setter"
alias set_off "alias pist_check"
alias set+ "alias set_on setter"
alias set- "alias set_on"

alias slot_1 "slot1;set_on"
alias slot_2 "slot2;set_off"
alias slot_3 "slot3;set_off"
alias slot_4 "slot4;set_off"
alias slot_5 "slot5;set_off"
alias dropper "drop;pist_off"
alias invup "invnext;set_off"
alias invdn "invprev;set_off"
alias invlast "lastinv;set_on"

bind "1" "slot_1"
bind "2" "slot_2"
bind "3" "slot_3"
bind "4" "slot_4"
bind "5" "slot_5"
bind "?" "invlast" //key for lastinv
bind "?" "dropper" //key to drop weapons
bind "?" "pist_tog" //key to toggle pistol switch mode
bind "?" "+fire" //normal fire button

Just change the ? to whatever key you want to use.

Status Update
show score, fps, netgraph 3, timeleft and closes menus.
release to clear

//Status Update
alias +statusupdate "+showscores; cl_showfps 1; net_graph 3; drawradar"
alias -statusupdate "-showscores; cl_showfps 0; net_graph 0; timeleft; slot10"

bind "???" "+statusupdate"

Originally posted by Desloc:
Desloc's Lag Reduction Script

// Autoexec.cfg entries:

// Lag Reduction Settings

alias setnetgraph netgraphon3
alias netgraphon3 "net_graph 3; cl_showfps 0; alias setnetgraph netgraphon2"
alias netgraphon2 "net_graph 2; alias setnetgraph netgraphon1"
alias netgraphon1 "net_graph 1; alias setnetgraph netgraphoff"
alias netgraphoff "net_graph 0; alias setnetgraph netgraphfps"
alias netgraphfps "cl_showfps 1; alias setnetgraph netgraphon3"

alias r10000 "rate 10000.007; devon; echo RATE 10000; devoff; alias r_up r10000; alias r_dn r8000"
alias r8000 "rate 8000.007; devon; echo RATE 8000; devoff; alias r_up r10000; alias r_dn r7000"
alias r7000 "rate 7000.007; devon; echo RATE 7000; devoff; alias r_up r8000; alias r_dn r6000"
alias r6000 "rate 6000.007; devon; echo RATE 6000; devoff; alias r_up r7000; alias r_dn r5500"
alias r5500 "rate 5500.007; devon; echo RATE 5500; devoff; alias r_up r6000; alias r_dn r5000"
alias r5000 "rate 5000.007; devon; echo RATE 5000; devoff; alias r_up r5500; alias r_dn r4500"
alias r4500 "rate 4500.007; devon; echo RATE 4500; devoff; alias r_up r5000; alias r_dn r4000"
alias r4000 "rate 4000.007; devon; echo RATE 4000; devoff; alias r_up r4500; alias r_dn r3500"
alias r3500 "rate 3500.007; devon; echo RATE 3500; devoff; alias r_up r4000; alias r_dn r3000"
alias r3000 "rate 3000.007; devon; echo RATE 3000; devoff; alias r_up r3500; alias r_dn r2500"
alias r2500 "rate 2500.007; devon; echo RATE 2500; devoff; alias r_up r3000; alias r_dn r2500"
r5000

alias updr55 "cl_updaterate 55; devon; echo 55 packets DOWN; devoff; alias updrup updr55; alias updrdn updr50"
alias updr50 "cl_updaterate 50; devon; echo 50 packets DOWN; devoff; alias updrup updr55; alias updrdn updr45"
alias updr45 "cl_updaterate 45; devon; echo 45 packets DOWN; devoff; alias updrup updr50; alias updrdn updr40"
alias updr40 "cl_updaterate 40; devon; echo 40 packets DOWN; devoff; alias updrup updr45; alias updrdn updr35"
alias updr35 "cl_updaterate 35; devon; echo 35 packets DOWN; devoff; alias updrup updr40; alias updrdn updr30"
alias updr30 "cl_updaterate 30; devon; echo 30 packets DOWN; devoff; alias updrup updr35; alias updrdn updr25"
alias updr25 "cl_updaterate 25; devon; echo 25 packets DOWN; devoff; alias updrup updr30; alias updrdn updr20"
alias updr20 "cl_updaterate 20; devon; echo 20 packets DOWN; devoff; alias updrup updr25; alias updrdn updr15"
alias updr15 "cl_updaterate 15; devon; echo 15 packets DOWN; devoff; alias updrup updr20; alias updrdn updr15"
updr30

alias cmdr55 "cl_cmdrate 55; devon; echo 55 packets UP; devoff; alias cmdrup cmdr55; alias cmdrdn cmdr50"
alias cmdr50 "cl_cmdrate 50; devon; echo 50 packets UP; devoff; alias cmdrup cmdr55; alias cmdrdn cmdr45"
alias cmdr45 "cl_cmdrate 45; devon; echo 45 packets UP; devoff; alias cmdrup cmdr50; alias cmdrdn cmdr40"
alias cmdr40 "cl_cmdrate 40; devon; echo 40 packets UP; devoff; alias cmdrup cmdr45; alias cmdrdn cmdr35"
alias cmdr35 "cl_cmdrate 35; devon; echo 35 packets UP; devoff; alias cmdrup cmdr40; alias cmdrdn cmdr30"
alias cmdr30 "cl_cmdrate 30; devon; echo 30 packets UP; devoff; alias cmdrup cmdr35; alias cmdrdn cmdr25"
alias cmdr25 "cl_cmdrate 25; devon; echo 25 packets UP; devoff; alias cmdrup cmdr30; alias cmdrdn cmdr20"
alias cmdr20 "cl_cmdrate 20; devon; echo 20 packets UP; devoff; alias cmdrup cmdr25; alias cmdrdn cmdr15"
alias cmdr15 "cl_cmdrate 15; devon; echo 15 packets UP; devoff; alias cmdrup cmdr20; alias cmdrdn cmdr15"
cmdr40

// Config.cfg entries:

bind "PAUSE" "setnetgraph"
bind "PGDN" "r_dn"
bind "PGUP" "r_up"
bind "HOME" "updrup"
bind "END" "updrdn"
bind "INS" "cmdrup"
bind "DEL" "cmdrdn"

rate "5000.007"
cl_updaterate "30"
cl_cmdrate "40"

As long as the config.cfg entries matches the autoexec.cfg entries(as above in bold) you'll be fine.

You might have set your config.cfg to 'read only' (right click on config.cfg, left click properties, put check mark in 'read only', click apply) in order to make sure the settings is permanently saved.

Enjoy


Special Thanks To Engrish Bob, AZRedWing, And WHOEVER REPLIED TO THEIR THREADS, Valve, and of COURSE me =) hahahaa

enjoy everyone its long i know but whatever you guys spend half your lives here anyways might as well take the time to read my post...
 

RiX

BattleForums Senior Member
Joined
Sep 26, 2002
Messages
1,435
Reaction score
0
Location
Vancouver, B.C.
Website
thelazyshopper.wwdb.biz
Originally posted by Gonorrhea Gibbon
Can we get this merged with my thread with all the scripting commands and keys, and then made as a sticky?
no
 

azk12000

Member!
Joined
Nov 6, 2002
Messages
931
Reaction score
0
Location
Perth Australia
k, well rix helped me out and i got it working, heres what i am using:

//buys ak/m4a1, ammo, and armor//
alias +ak_m4a1 "buy; menuselect 4; menuselect 1; buy; menuselect 4; menuselect 3; buy; menuselect 6; buy; menuselect 8; menuselect 2"
alias -ak_m4a1 "slot10; wait; wait; slot10"

//buys mp5, ammo, and armor//
alias +mp5 "buy; menuselect 3; menuselect 1; buy; menuselect 6; buy; menuselect 8; menuselect 2"
alias -mp5 "slot10; wait; wait; slot10"

//buys HE, flash, and smoke grenades (in that order)//
alias +grens "buy; menuselect 8; menuselect 4; buy; menuselect 8; menuselect 3; buy; menuselect 8; menuselect 5"
alias -grens "slot10; wait; wait; slot10"

//buys Armor, Primary ammo, and Secondary ammo//
alias +arm_ammo "buy; menuselect 8; menuselect 2; buy; menuselect 6; buy; menuselect 7
alias -arm_ammo "slot10; wait; wait; slot10"

the last 2 are very handy in maps like fy_pool_day, fy_iceworld, etc. all those little novelty maps with only one buyzone which u need to get to and buy ur stuff in about 3 seconds at the end of a round. or middle, if ur brave.

thx to rix for helping me out
 

azk12000

Member!
Joined
Nov 6, 2002
Messages
931
Reaction score
0
Location
Perth Australia
i like to learn, its interesting writing scripts and annoyingly chalenging as i have found out already. o yeah, rix i cant get that awp auto zomm thingy working.
 

azk12000

Member!
Joined
Nov 6, 2002
Messages
931
Reaction score
0
Location
Perth Australia
well i neen trying out sum of the scripts in rixs posts but i couldnt get half of em to work so ive started making my own, here r the first couple ive made, yes they are simple, and the pistol buy one is a bit pointless but meh, try em out.

//buy stuff//

//these are just sum alias's to make entering all the stuff easier, ms1 is easier then menuselect1 to type in"
alias ms1 "menuselect 1"
alias ms2 "menuselect 2"
alias ms3 "menuselect 3"
alias ms4 "menuselect 4"
alias ms5 "menuselect 5"
alias ms6 "menuselect 6"
alias ms7 "menuselect 7"
alias ms8 "menuselect 8"
alias ms9 "menuselect 9"
alias ammo1 "buy; ms6"
alias ammo2 "buy; ms7"
alias clmbuy "w; w; w; w; slot10; w; w; w; slot10"
alias w "wait"
alias w5 "w;w;w;w;w"
alias w10 "w;w;w;w;w;w;w;w;w;w"
alias w40 "w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;w;"
alias d1 "developer 1"
alias d0 "developer 0"

// BUY AK-47 or Colt M4A1 Carbine, Primary Ammo, and Armor + Helmet //
alias +ak_m4a1 "buy; ms4; ms1; buy; ms4; ms3; ammo1; buy; ms8; ms2"
alias -ak_m4a1 "clmbuy"

bind "?" "+ak_m4a1"

// BUY Steyr AUG or Sig SG-552 Commando, Primary Ammo, and Armor + Helmet //
alias +aug_sig "buy; ms4; ms2; buy; ms4; ms4; ammo1; buy; ms8; ms2"
alias -aug_sig "clmbuy"

bind "?" "+aug_sig"

// BUY H&K MP5-Navy, Primary Ammo, and Armor + Helmet //
alias +mp5 "buy; ms3; ms1; ammo1; buy; ms8; ms2"
alias -mp5 "clmbuy"

bind "?" "+mp5"

// BUY High Explosive Grenade, Flash Bang, and Smoke Grenade //
alias +grens "buy; ms8; ms4; buy; ms8; ms3; buy; ms8; ms5"
alias -grens "clmbuy"

bind "?" "+grens"

// BUY Armor + Helmet, Primary Ammo, Secondary Ammo, and Defuser Kit //
alias +arm_ammo "buy; ms8; ms2; buy; ms8; ms1; ammo1; ammo2; buy; ms8; ms6"
alias -arm_ammo "clmbuy"

bind "?" "arm_ammo"

//this script toggles the type of pistol that "." will buy for u and ammo for it//

alias pistolbuy "pistusp"
alias pistusp "bind . +usp; alias pistolbuy pistglock; d1; echo ***. BUYS USP+AMMO*** d0"
alias pistglock "bind . +glock; alias pistolbuy pistdeagle; d1; echo ***. BUYS GLOCK+AMMO*** d0"
alias pistdeagle "bind . +deagle; alias pistolbuy pistp228; d1; echo ***. BUYS DEAGLE+AMMO*** d0"
alias pistp228 "bind . +p228; alias pistolbuy pistteam; d1; echo ***. BUYS P228+AMMO*** d0"
alias pistteam "bind . +team; alias pistolbuy pistusp; d1; echo ***. BUYS ELITES or FIVE-SEVEN+AMMO*** d0"

alias +usp "buy; ms1; ms1; ammo2"
alias -usp "clmbuy"

alias +glock "buy; ms1; ms2; ammo2"
alias -glock "clmbuy"

alias +deagle "buy; ms1; ms3; ammo2"
alias -deagle "clmbuy"

alias +p228 "buy; ms1; ms4; ammo2"
alias -p228 "clmbuy"

alias +team "buy; ms1; ms6; ms5; ammo2"
alias -team "clmbuy"

bind "?" "pistolbuy"

//here are sum combat related scripts//
//Burst Fire (3 Shot, 5 Shot or Off), if you are fireing to many shots try shortening the waits//

alias burstmode "burst1"
alias burst1 "bind MOUSE1 +burstfire3; alias burstmode burst2; d1; echo *** 3 SHOT BURST ON ***; d0"
alias burst2 "bind MOUSE1 +burstfire5; alias burstmode burst3; d1; echo *** 5 SHOT BURST ON ***; d0"
alias burst3 "bind MOUSE1 +attack; alias burstmode burst1; d1; echo *** BURST MODE OFF ***; d0"

alias +burstfire3 "+attack; w10; w5; -attack"
alias -burstfire3 "w5"

alias +burstfire5 "+attack; w10; w10; w5; -attack"
alias -burstfire5 "w5"

bind "?" "burstmode"

//grenade throw + warning//
//i have each of these boud to "MOUSE4" and "MOUSE5", if pressed when no grenades are held and u have a sutomatic weapon it fire a 7 shot burst, probly needs a little work//

alias watch_hegren "say_team WATCHOUT - Throwing High Explosive Grenade"
alias watch_fb "say_team WATCHOUT - Throwing Flash Bang"

alias hegren "weapon_hegrenade; w; watch_hegren; w40; +attack; w40; -attack"

alias fb "weapon_flashbang; w; watch_fb; w40; +attack; w40; -attack"

bind "?" "hegren"
bind "?" "fb"

//Working autozoom script (zoom once on click, fire on release)//

alias snipermode "snipe1"
alias snipe1 "bind MOUSE1 +sniper; alias snipermode snipe2; d1; echo *** SNIPER MODE ON ***; d0"
alias snipe2 "bind MOUSE1 +attack; alias snipermode snipe1; d1; echo *** SNIPER MODE OFF ***; d0"

alias +sniper "+attack2; w5; -attack2"
alias -sniper "+attack; w; -attack; w; weapon_knife; w; get1"

bind "?" "snipermode"
//well thats all for now, if i have any interesting ideas ill have a go at em//
 

azk12000

Member!
Joined
Nov 6, 2002
Messages
931
Reaction score
0
Location
Perth Australia
you could, or u could write ur own which is much better, look on the cs nation site for their scripting tutorials.

scratch that, you could write your own which can suit your needs much better, this is actually execelent for alot of people, and a good learning experience for me.
 

Snappleguy2

Member!
Joined
Jun 2, 2003
Messages
280
Reaction score
0
Location
n00bsville
Website
Visit site
I like this thread....ive been trying to bind stuff to keys not really knowing too much about it. Excample: bind n "buy;menuselect 4;menuselect 1;buy;menuselect 6;buy;menuselect 1;menuselect 3;buy;menuselect 7" usualy it would buy me an ak throw it on the ground buy some other guns and throw it on the ground...lol so w/e thanks for the tutorial. and how long did it take you to type all this?
 

Snappleguy2

Member!
Joined
Jun 2, 2003
Messages
280
Reaction score
0
Location
n00bsville
Website
Visit site
oh oh oh now that i think about it how do i make the crosshairs change colors every time i shoot move jump etc...also how do i change the colors on the console??? isnt the crosshair thingy crosshair_adjust iunno what it is....
 

azk12000

Member!
Joined
Nov 6, 2002
Messages
931
Reaction score
0
Location
Perth Australia
does anyone know if it is possible using alias to bind keys to multiple commands using aliases?

i want sumthing like this:

alias ultimate1 "bind mouse1 ultimate; bind mouse1 +attack"

all that would do is bind mouse1 to ultimate, then to +attack, but i want it boud to both at once and be able to turn it on and off using a toogle.
 

azk12000

Member!
Joined
Nov 6, 2002
Messages
931
Reaction score
0
Location
Perth Australia
i was bored and made this, it toggles crosshair changing on/off. when on crosshair changes for all movements and attack, and secondary attack.

Code:
alias +moveleft1  "+moveleft;  adjust_crosshair"
alias -moveleft1  "-moveleft;  adjust_crosshair"
alias +moveright1 "+moveright; adjust_crosshair"
alias -moveright1 "-moveright; adjust_crosshair"
alias +forward1   "+forward;   adjust_crosshair"
alias -forward1   "-forward;   adjust_crosshair"
alias +back1      "+back;      adjust_crosshair"
alias -back1      "-back;      adjust_crosshair"

alias +attack1    "+attack;    adjust_crosshair"
alias -attack1    "-attack;    adjust_crosshair"
alias +attack21   "+attack2;   adjust_crosshair"
alias -attack21   "-attack2;   adjust_crosshair"

alias +duck1      "+duck;      adjust_crosshair"
alias -duck1      "-duck;      adjust_crosshair"
alias +speed1     "+speed;     adjust_crosshair"
alias -speed1     "-speed;     adjust_crosshair"
alias +jump1      "+jump;      adjust_crosshair"
alias -jump1      "-jump;      adjust_crosshair"

alias movebind1   "bind a +moveleft1; bind d +moveright1; bind w +forward1; bind s +back1"
alias attackbind1 "bind MOUSE1 +attack1; bind MOUSE2 +attack21"
alias move2bind1  "bind CTRL +duck1; bind SHIFT +speed1; bind SPACE +jump1"

alias defbind1    "bind a +moveleft; bind d +moveright; bind w +forward; bind s +back"
alias defbind2    "bind MOUSE1 +attack; bind MOUSE2 +attack2"
alias defbind3    "bind CTRL +duck; bind SHIFT +speed; bind SPACE +jump"

alias adjustall   "adjustall1"
alias adjustall1  "movebind1; attackbind1; move2bind1; alias adjustall adjustall0; d1; echo **Crosshair Chnager ]ON[**; d0" 
alias adjustall0  "defbind1; defbind2; defbind3;    alias adjustall adjustall1; d1; echo **Crosshair Chnager ]OFF[**; d0"

bind "?" "ajustall"
hope u like, o yeah, havent tested yet, counting on the fact that it works.

edit; tested it, found bugs and fixed em
 

NewPosts

New threads

Top