PDA

View Full Version : Auto Buy And Binding Keys.


Redy
12-16-2004, 09:50 AM
Auto Buy And Binding Keys.

The two files we will be working with are the autobuy text file found in the: C:\Program Files\Valve\Steam\SteamApps\your email\counter-strike source\cstrike folder

and the Config file found in the: C:\Program Files\Valve\Steam\SteamApps\your email\counter-strike source\cstrike\cfg folder


The auto buy script looks something like this.

M4a1
ak47
P90
mp5

p228
deagle

primammo
secammo

flashbang
smokegrenade

defuse

vesthelm
vest

Now what that means is this. Whenever you hit your autobuy key (default F1), the script will buy instantly for you the weapons and equipment you have listed in your order depending on how much cash you have. So in the example above this auto buy will purchase either the M4a1 or the Ak47 depending on which team you are on. If you do not have sufficient funds
for a rifle, the auto buy will defer to your next choice of the cheaper P90, and then the even cheaper MP5.

After your primary weapon is purchased, the auto buy script will move on to your secondary weapon choice. Again depending on how much cash is left over it will buy either the P228 or the Deagle.

If sufficient funds are available the script will then buy your other choices of frags, defuser kit, and armor.

This is all good when you want to make quick purchases and then go running off to kill your enemy. What bad is the script will not separate your funds to purchase all of your items. So in the example above if you have just enough cash for the M4a1, you will get the M4a1 and nothing else.

You can choose any item to be your first purchase. lets say you always want to purchase armor and a defuser kit. Then you can change your script to look like this.

vesthelm
vest

defuse

M4a1
ak47
P90
mp5

p228
deagle

primammo
secammo

With this example you will auto buy your vest and defuser kit first and any funds left over will go towards the purchase of your weapons.

Remember to list weapons for either team as you cannot buy the AK-47 and elite pistols if you are a CT.



Binding Keys For the Purpose Of Auto Buying.

Now we will open the Config file with notepad. Here you will see the long list of binded keys. Some keys are not assigned. You can then assign those keys to buy your weapons in the same manner as the autobuy script. Here is my favorite.

bind "F8" "buy p90; buy primammo; buy defuser; buy vesthelm;"

(you need to insert this line and all other missing binds you want assigned)

Now at the beginning of the round, when I hit my F8 key, I will rapidly purchase a P90, some ammo for my P90, a defuser kit, and my armor. This comes in handy when you want to buy specific weapons for the map or task you are planning to undertake. Remember you need sufficient funds to purchase your items, so it is always good to know how much this stuff will cost you before hitting your binded key.

Need help? Catch me on TS or post here.

GroovyDude
12-16-2004, 09:56 AM
Nice job Redy. We'll just "sticky" this bad bear. :thumbsup:

wihadmin
12-16-2004, 12:18 PM
Unlocked for any comments or additions.

SalemSaberhagen
12-16-2004, 01:23 PM
Nice... I was wondering how to do this... I used to do it in the original CS but I didn't really try to learn too hard with CSS... but now that it is all laid out for me... I will start binding later (after I get off work).

wihadmin
12-16-2004, 05:03 PM
My edits in the config.cfg file does not stay. it saved when exiting from notepad, but the game overwrites it again when I start the game up. The only way I got the binds to work is to put it in my cfg/autoexec.cfg file.

SalemSaberhagen
12-16-2004, 05:15 PM
Hmmm... is it Read Only under Properties? If not... redo the binds... save and exit and try to put it on Read Only maybe. I don't know... I just got off work a little while ago so I am going to try to get it to work now.

SalemSaberhagen
12-16-2004, 05:57 PM
Well... I tried doing it in the config.cfg file... but that didn't work... but I copied it before exiting the file so I just hit CTRL + V to paste it and it worked.

Silk
12-16-2004, 08:46 PM
You da man Redy. :hump:

Scroto Baggins
12-31-2004, 12:00 AM
If your shitty with computers you can always download his scripts. they work with cs, cs:cz, and cs:s





http://nextwish.org/mods.php?page=script/cstrike#

Lothor
01-17-2005, 04:21 PM
thanks, been lookin for a good buy script for source.

Evol
01-28-2005, 12:08 AM
Ewww, I always thought buy-scripts were cheating? Oh well, whatever it takes to get you all to buy faster and get running out of my way! hehe

atomicbob
03-15-2005, 08:06 PM
I knoe and love the idea, but I can't make it work. I'm such an idiot.

The Leviathon
07-11-2005, 03:06 AM
oooor you could just use the hot keys, for example


b21o2o6o4o3o3o5b14,,,,....



gives you a shot gun, armor w/ helmet, a kit, a nade, two flashes, a smoke, a deagal 32 extra shotgun shells and 28 extra deagal rounds

in game this can be done in 2 seconds


cmon, dont let the computer do everything for you! then we will all get wiped out. didnt anyone see the matrix?

Blis
09-18-2005, 08:46 PM
The vast majority of the time i dont want autoweaponswitch to be on but every now and again it would be usefull so i wrote this script that turns it on and off.While you hold capslock it is on and when you realease caps it goes back off.So if you run over a gun holding caps it will auto switch to it.You can change capslock for any other key.

alias +autowepswitch "cl_autowepswitch "1""
alias -autowepswitch "cl_autowepswitch "0""
bind "capslock" "+autowepswitch"


Another type of bind i havent seen posted here is the switch to weapon bind.This one will switch straight to your pistol when you press Q.Again you can just change the "bind q" bit to any key you want if you still use Q for previous weapon.

alias qpist "use weapon_deagle; use weapon_usp; use weapon_glock; use weapon_p228; use weapon_elite; use weapon_fiveseven"
bind q "qpist"

You have to include every gun of the type you want to switch to.So if you wanted a switch to rifle button you would have to put every rifle you might be using in there.If you want to make one that switches to a nade though only put in the type of nade you want it to go to.

SoReal
09-21-2005, 08:21 AM
Anyway to make a script that changes your crosshair on fire? I can never see my crosshair on the dust maps, and thought this might help to continually change the crosshair color.

I don't think this would be possible simply because +attack = mousebutton 1 and I don't think you can assign one button two different assignments.

Blis
09-21-2005, 09:26 AM
You can only assign one main alias per button but you can have that alias do as many things as you want.This should do the trick if i correctly understand what you want.Every time you press fire it will change the colour of your crosshairs.

alias +firecolour "+attack; incrementvar cl_crosshaircolor 0 4 1"
alias -firecolour "-attack"

bind "MOUSE1" "+firecolour"

SoReal
09-21-2005, 09:50 AM
That's exactly what I wanted. Thanks a lot.

Blis
09-21-2005, 10:07 AM
np.I figure on some maps you'd want to be able to keep it on the same colour without it changing.So i'm trying to figure out a way to bind a key to toggle the alias on and off.I'll post here if i figure it out.

SoReal
11-05-2005, 10:52 AM
Another script request.

Anyway to buy ammo with only one clip? I.e. m4a1 has a 30 round ammo clip. Anyway to bind that to a key to get just one round of ammo instead of having to buy 3x30? Might help during scrims to save some cash. Buy a m4a1 then a single clip and keep the extra 200 for a defuse.

Prowler130
11-05-2005, 10:57 AM
this is autobound as default config. I believe a primary clip is "," and a secondary clip is "." least thats how it is for me in game....very useful

SoReal
11-05-2005, 11:43 AM
Thanks i'll check it out.

Edit: That works nicely. Thanks again.

Blis
11-05-2005, 12:26 PM
If your wanting to edit your buy scrpit so it buys just 1 clip along with your weapon,the command is buyammo1 for primary and buyammo2 for secondary.

Did you ever find a decent script for changing crosshair colour?I was trying to make one that would make it constantly change without having to press anything,basicaly a flashing crosshair,but i couldnt get it to work.

SoReal
11-05-2005, 12:41 PM
Nope, I never found one. I was watching a CS:S movie, and a dude had it. So it has to be possible.

Noetic
06-21-2006, 04:32 PM
If your shitty with computers you can always download his scripts. they work with cs, cs:cz, and cs:s





http://nextwish.org/mods.php?page=script/cstrike#

Can i get these scripts anywhere else on an updated page. I get the ole page 404 error from this link, suppose because it's an oldie. Or if possible can someone kindly email me with them. Email is in profile.

Thanks In Advance

Blis
06-21-2006, 04:59 PM
What do you want the scripts to do? I can write them for you if you want. It doesnt take any time.

If you want to learn how to do it yourself this website has pretty much all you need to know http://www.counter-script.net

They've got loads of scripts there but they're user submited so some of them arent that great.

PS. Do you know about setting your rates?

Noetic
06-21-2006, 06:58 PM
I know nothing about rates.. As far as the scripts go, I appreciate your willingness to write them for me, really cool:thumbsup: . But i'll dig into the handy link you provided me with and learn a lil' bit. Thanks for the info,Bliss.

housefull
02-22-2010, 05:12 PM
My edits in the config.cfg file does not stay. it saved when exiting from notepad, but the game overwrites it again when I start the game up. The only way I got the binds to work is to put it in my cfg/autoexec.cfg file.
Well... I tried doing it in the config.cfg file... but that didn't work... but I copied it before exiting the file so I just hit CTRL + V to paste it and it worked.:minigun:

SnaKe
02-23-2010, 08:45 PM
Well... I tried doing it in the config.cfg file... but that didn't work... but I copied it before exiting the file so I just hit CTRL + V to paste it and it worked.:minigun:housefull,
Welcome to the site. Please post some information about yourself in the Meet and Greet forum.

Also, please remove the link from your signature as it is a violation of our forum rules.

Thanks.