AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Counter-Strike Autobuy Script (outputs .cfg file)

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Bkid



Joined: 26 Sep 2005
Posts: 44
Location: Hephzibah, GA

PostPosted: Tue Mar 07, 2006 12:03 am    Post subject: Counter-Strike Autobuy Script (outputs .cfg file) Reply with quote

My first completed script! Surprised 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! Smile

Code:
;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--
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group