Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Counter-Strike Autobuy Script (outputs .cfg file)


  • Please log in to reply
No replies to this topic
Bkid
  • Members
  • 91 posts
  • Last active: Apr 02 2015 05:58 PM
  • Joined: 26 Sep 2005
My first completed script! :O Yay me! So yeah, it's a script for Counter-Strike that lets you set your weapons (One for Terrorists, the other for Counter Terrorists) that auto buy your weapons in the game. Currently, the buy buttons are set to PgUp for Terrorists and PgDn for Counter Terrorists. Enjoy! :)

;Bkid's easy autobuy script
;An easy way to buy weapons in Counter-Strike, with the push of a button!
;©2006 Ben Pryor
Gui, Add, Text,,Bkid's Easy Autobuy Script:
Gui, Add, Tab, w300 h300, Terrorist|Counter Terrorist
Gui, Tab, 1
Gui, Add, Text,, Primary weapon:
Gui, Add, DropDownList, x+10 vpweapont, none|--Shotguns--|12guage|autoshotgun|--SMG--|mac10|mp5|ump45|c90|--Rifles--|defender|cv47|scout|krieg552|awp|d3au1|--Machine Guns--|m249
Gui, Add, Text, xm+12 y+20, Secondary weapon:
Gui, Add, DropDownList, x+10 vsweapont, none|glock|usp|228compact|deagle|elites
Gui, Add, Text, xm+85 y+20, Choose your Equipment:
Gui, Add, Text, xm+12 y+20, Kevlar and/or helment:
Gui, Add, DropDownList, x+10 vkevlarandorhelmt, none|vest|vesthelm
Gui, Add, Text, xm+12 y+20, Other:
Gui, Add, Checkbox, x+10 vheornot, He
Gui, Add, Checkbox, x+10 vsmokeornot, Smoke
Gui, Add, Checkbox, x+10 vnightvisionornot, Nightvision
Gui, Add, Text, xm+12 y+20, Flash:
Gui, Add, DropDownList, w50 x+10 vflashornot, none|1|2
Gui, Add, Button, Default, SetT
Gui, Tab, 2
Gui, Add, Text,, Primary weapon:
Gui, Add, DropDownList, x+10 vpweaponct, none|--Shotguns--|12guage|autoshotgun|--SMG--|mp|mp5|ump45|c90|--Rifles--|famas|m4a1|scout|bullpup|awp|krieg550|--Machine Guns--|m249
Gui, Add, Text, xm+12 y+20, Secondary weapon:
Gui, Add, DropDownList, x+10 vsweapontct, none|glock|usp|228compact|deagle|fiveseven
Gui, Add, Text, xm+85 y+20, Choose your Equipment:
Gui, Add, Text, xm+12 y+20, Kevlar and/or helment:
Gui, Add, DropDownList, x+10 vkevlarandorhelmct, none|vest|vesthelm
Gui, Add, Text, xm+12 y+20, Other:
Gui, Add, Checkbox, x+10 vheornoct, He
Gui, Add, Checkbox, x+10 vsmokeornoct, Smoke
Gui, Add, Checkbox, x+10 vnightvisionornoct, Nightvision
Gui, Add, Text, xm+12 y+20, Flash:
Gui, Add, DropDownList, w50 x+10 vflashornoct, none|1|2
Gui, Add, Checkbox, x+10 vdefusalkit, Defusal Kit
Gui, Add, Checkbox, x+10 vtacticalshield, Tactical Shield
Gui, Add, Button, x+-231 y+14, SetCT
Gui, Show
Return
ButtonSetT:
Gui, Submit
if (flashornot = none)
{
	flashornot = 
}
else if (flashornot = 1)
{
	flashornot = flash
}
else if (flashornot = 2)
{
	flashornot = flash;flash
}
if (heornot = 0)
{
	heornot = 
}
else if (heornot = 1)
{
	heornot = hegren
}
if (smokeornot = 0)
{
	smokeornot = 
}
else if (smokeornot = 1)
{
	smokeornot = sgren
}
if (nightvisionornot = 0)
{
	nightvisionornot = 
}
else if (nightvisionornot = 1)
{
	nightvisionornot = nvgs
}
FileAppend, alias autobuyt "%pweapont%;%sweapont%;%kevlarandorhelmt%;%heornot%;%smokeornot%;%flashornot%;%nightvisionornot%"`nbind "pgup" "autobuyt, autobuyt.cfg
MsgBox, 64,, Be sure to execute the script in CS, or else it won't work! Execute the script by typing "exec autobuyt.cfg" (without quotes) in the console. Press PgUp to auto buy for Terrorists.
Gui, Show
return
ButtonSetCT:
Gui, Submit
if (flashornoct = none)
{
	flashornoct = 
}
else if (flashornoct = 1)
{
	flashornoct = flash
}
else if (flashornoct = 2)
{
	flashornoct = flash;flash
}
if (heornoct = 0)
{
	heornoct = 
}
else if (heornoct = 1)
{
	heornoct = hegren
}
if (smokeornoct = 0)
{
	smokeornoct = 
}
else if (smokeornoct = 1)
{
	smokeornoct = sgren
}
if (nightvisionornoct = 0)
{
	nightvisionornoct = 
}
else if (nightvisionornoct = 1)
{
	nightvisionornoct = nvgs
}
if (defusalkit = 0)
{
	defusalkit = 
}
else if (defusalkit = 1)
{
	defusalkit = defuser
}
if (tacticalshield = 0)
{
	tacticalshield = 
}
else if (tacticalshield = 1)
{
	tacticalshield = shield
}
FileAppend, alias autobuyct "%pweaponct%;%sweapontct%;%kevlarandorhelmct%;%heornoct%;%smokeornoct%;%flashornoct%;%nightvisionornoct%;%defusalkit%;%tacticalshield%"`nbind "pgdn" "autobuyct",autobuyct.cfg
MsgBox, 64,, Be sure to execute the script in CS, or else it won't work! Execute the script by typing "exec autobuyct.cfg" (without quotes) in the console. Press PgDn to auto buy for Counter Terrorists.
Gui, Show
return
GuiClose:
ExitApp

--Bkid--