Sign in to follow this  
Followers 0
layer

repetitive spacebar please

32 posts in this topic

a friend of mine asked me to make this script because he did a big favor for me, and i had to pay him back, he wanted these weird things, he gave the descriptions of what they do so now im stuck after making my first GUI! heres the code

#include <GUICONSTANTS.au3>

GUICreate("Scripts NOTE: KEEP THIS OPEN DURING GAMEPLAY!", 450, 150, -1, -1, -1, "-1")

GUISetState (@SW_SHOW)

$bhop= GUICtrlCreateCheckBox ("Bunny Hop: Hold SPACEBAR in game for use.", 10, 20)

GuiCtrlSetState ($bhop, $GUI_UNCHECKED)

$norecoil= GUICtrlCreateCheckBox ("No Recoil: Just fire as usual.", 10, 60)

GuiCtrlSetState ($norecoil, $gui_unchecked)

$burst= GuiCtrlCreateCheckBox ("1 Burst Fire: Shoots one bullet at a time.", 10, 100)

GuiCtrlSetState ($burst, $gui_unchecked)

if $bhop= $gui_checked then Toggle

Func Toggle ()

HotkeySet ("^!p", "Bhop")

EndFunc

Func Bhop ()

Send ("^!p")

While 1

Send ("{SPACE}")

if $bhop= $gui_checked then continueloop

if $bhop= $gui_unchecked then exitloop

wend]

EndFunc

$help = GUICtrlCreateMenu("&Help")

$help1 = GUICtrlCreateMenuItem ("&Help", $help)

while 1

$getmsg= GUIGetMsg()

if $getmsg = $GUI_EVENT_CLOSE then ExitLoop

wend

its not completely finished, i still have to add a few functions in there, but this is my first gui that ive ever made so, just give me a brake :) so im only asking for the help on bhop part where it starts is

if $bhop= $gui_checked then Toggle

any help on why its not pressing spacebar would be appreciated, or could i modify it so that when the box is checked, the toggle button is enabled and say i press it, then it would hold down spacebar? and then when i press the toggle buttons again, it stops the spacebar hold down and then i uncheck the bhop checkbox and the togglebutton doesnt work until it is checked again...

if you need me to explain it a little better, i will, but tomorrow, it's late now and im tired, thanks :)


FootbaG

Share this post


Link to post
Share on other sites



I cleaned it up a little.

#include <GUICONSTANTS.au3>

GUICreate("Scripts NOTE: KEEP THIS OPEN DURING GAMEPLAY!", 450, 150)

$bhop= GUICtrlCreateCheckBox ("Bunny Hop: Hold SPACEBAR in game for use.", 10, 20)
    GuiCtrlSetState ($bhop, $GUI_UNCHECKED)
    
$norecoil= GUICtrlCreateCheckBox ("No Recoil: Just fire as usual.", 10, 60)
    GuiCtrlSetState ($norecoil, $gui_unchecked)
    
$burst= GuiCtrlCreateCheckBox ("1 Burst Fire: Shoots one bullet at a time.", 10, 100)
    GuiCtrlSetState ($burst, $gui_unchecked)
    
$help = GUICtrlCreateMenu("&Help")
$help1 = GUICtrlCreateMenuItem ("&Help", $help)

GUISetState (@SW_SHOW)

while 1
    $getmsg = GUIGetMsg()
    if $getmsg = $GUI_EVENT_CLOSE then
        ExitLoop
    ElseIf $getmsg = $bhop Then
        Toggle()
    EndIf
wend

Func Toggle ()
    If GUICtrlGetState($bhop) = $gui_checked then
        HotkeySet ("^!p", "Bhop")
    ElseIf GUICtrlGetState($bhop) = $gui_UNchecked then
        HotkeySet ("^!p")
    EndIf
EndFunc
    
Func Bhop ()
    HotkeySet ("^!p")
    Send ("^!p")
    While 1
        Send ("{SPACE}")
        if GUICtrlGetState($bhop) = $gui_UNchecked then
            exitloop
        EndIf
        Sleep(25)  ;remove this if you don't want any delay
    Wend
    Return
EndFunc

Share this post


Link to post
Share on other sites

There is a bot exactly like that, except written in another language on www.japsclan.com

Share this post


Link to post
Share on other sites

sorry, first off, i dont like japs clan because i dont hack, and second, this is for my friend, so i might as well make a virus free script instead...third, i basically just finished it except i dont know how to get the toggle shi to work, like it still doesnt press spacebar or shoot one bullet at a time, or make the mouse look down when shooting.. heres the code, anyone anna help? this is my first actuall big project, it may not be so big to you, but to me it is! :)

#include <GUICONSTANTS.au3>

GUICreate("Scripts NOTE: KEEP THIS OPEN DURING GAMEPLAY!", 450, 150)

$bhop= GUICtrlCreateCheckBox ("Bunny Hop: Hold SPACEBAR in game for use.", 10, 20)

GuiCtrlSetState ($bhop, $GUI_UNCHECKED)

$norecoil= GUICtrlCreateCheckBox ("No Recoil: Just fire as usual.", 10, 60)

GuiCtrlSetState ($norecoil, $gui_unchecked)

$burst= GuiCtrlCreateCheckBox ("1 Burst Fire: Shoots one bullet at a time.", 10, 100)

GuiCtrlSetState ($burst, $gui_unchecked)

$help = GUICtrlCreateMenu("&Help")

$help1 = GUICtrlCreateMenuItem ("&Help", $help)

GUISetState (@SW_SHOW)

while 1

$getmsg = GUIGetMsg()

if $getmsg = $GUI_EVENT_CLOSE then

ExitLoop

ElseIf $getmsg = $bhop Then

Toggle()

EndIf

wend

Func Toggle ()

If GUICtrlGetState($bhop) = $gui_checked then

HotkeySet ("^!p", "Bhop")

ElseIf GUICtrlGetState($bhop) = $gui_UNchecked then

HotkeySet ("^!p")

EndIf

EndFunc

Func Bhop ()

HotkeySet ("^!p")

Send ("^!p")

While 1

Send ("{SPACE}")

if GUICtrlGetState($bhop) = $gui_UNchecked then

exitloop

EndIf

Wend

Return

EndFunc

while 1

$getmsg = GUIGetMsg()

if $getmsg = $GUI_EVENT_CLOSE then

ExitLoop

ElseIf $getmsg = $norecoil Then

Toggle1()

EndIf

wend

Func Toggle1 ()

If GUICtrlGetState($norecoil) = $gui_checked then

HotkeySet ("^!l", "norecoil")

ElseIf GUICtrlGetState($norecoil) = $gui_UNchecked then

HotkeySet ("^!l")

EndIf

EndFunc

Func norecoil ()

HotKeySet ("^!l")

send ("^!l")

While 1

If mouseclick then Opt ("MouseClickDragDelay")

Wend

EndFunc

while 1

$getmsg = GUIGetMsg()

if $getmsg = $GUI_EVENT_CLOSE then

ExitLoop

ElseIf $getmsg = $burst Then

Toggle()

EndIf

wend

Func Toggle2 ()

If GUICtrlGetState($burst) = $gui_checked then

HotkeySet ("^!o", "norecoil") and SoundPlay ("burst act.wav")

ElseIf GUICtrlGetState($burst) = $gui_UNchecked then

HotkeySet ("^!o")

EndIf

EndFunc

Func burst ()

HotKeySet ("^!o")

send ("^!o")

While 1

If mouseclick then Opt ("MouseClickDelay")

WEnd

EndFunc

I still have tons of work to do, i mean like nothing is complete, its not working, and the help drop down doesnt have anything for when you click it, and none of the functions work because i got toatally confused, and when you press the [X] button to close it, it takes like 10 secods or more, its a mess...


FootbaG

Share this post


Link to post
Share on other sites

basically, none of the Functions work nor the toggles work, so im sort of stuck, so if any one would help me out, that would be nice but in the meantime, ill try to clean it up and make it work!

thanks

PS: Python, im not like dissing ur site, just that, there was a guy in our server and we kicked and banned him cause hacking, and ive heard some bad stuff bout japsclan so ill just stay away =D


FootbaG

Share this post


Link to post
Share on other sites

JapsClan is the elite hacking clan on CS. If you are looking for serious hacks, that website has all of them. If not, then go ahead and create a GUI CS hack heh. Personally... I would say "Don't reinvent the wheel." But, maybe you want to make a square wheel.

Share this post


Link to post
Share on other sites

well, i dont know, i dont hack, this is only for my friend, he likes taking the easy way out, but i dont want to start a flame post, so can someone please help me? even you can python =)


FootbaG

Share this post


Link to post
Share on other sites

also, how would i go about making a pause function, ive tried but it doesnt work, heres mine which doesnt work..

hotkeyset ("^!p", "TogglePause")

While 1

send ("{SPACE}")

WEnd

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

WEnd

EndFunc

if togglepause then sleep (100)

if not togglepause then

while 1

send ("{SPACE}")

wend

EndIf

im gonna try to make each function seperatly now... so i can be more organized and think better so someone doesnt have to write my script for me =P


FootbaG

Share this post


Link to post
Share on other sites

The pause function is probably not working because CS won't accept hotkeys... After trying hotkey scripts on about 5 different games, I have learned that very seldomly does a hotkey work. Your best bet is to make an infinite loop and the way to stop it will be to ALT+TAB out of the game and exit the script the hard way.

Share this post


Link to post
Share on other sites

but it doesnt even pause in notepad? =/ it presses space like a million times but im trying to just make it pasuse, but maybe there is no way =/ oh well, ill hvae to figure sometihing out


FootbaG

Share this post


Link to post
Share on other sites

Make sure you initialize $Paused to 0 at the beginning of the script.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

like $togglepause= 0?


FootbaG

Share this post


Link to post
Share on other sites

i mean $paused= 0


FootbaG

Share this post


Link to post
Share on other sites

Is this your whole script?

hotkeyset ("^!p", "TogglePause")
While 1
send ("{SPACE}")
WEnd
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
WEnd
EndFunc
if togglepause then sleep (100)
if not togglepause then
while 1 
send ("{SPACE}") 
wend
EndIf

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

nah, that still dont work =(


FootbaG

Share this post


Link to post
Share on other sites

yes, thats the pause script


FootbaG

Share this post


Link to post
Share on other sites

i mean $paused= 0

<{POST_SNAPBACK}>

Yes but do you declare any variables at all?

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

to tell you the truth, im sort of new, so i dont know, but that is the script, thats all


FootbaG

Share this post


Link to post
Share on other sites

Alright well just throw $paused=0 at the beginning of the script.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

Isn't 0 the default value of a variable? If it is not assigned. I have been under the impression that the ladder is true.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0