Sign in to follow this  
Followers 0
KillingEye

CSS Buyscript

6 posts in this topic

#1 ·  Posted (edited)

Hi,

i want to make a script in which you can choose your weapons for a CSS buyscript.

The script show me a text like this "bind "F3" "buy scout; buy deagle; buy vest; buy primammo; buy vesthelm; buy hegrenade; buy flashbang; buy defuser; buy flashbang" in a textbox.

Problem: - How can the bot write this things in a textbox?

- need the bot a database for the variables?

#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

_Main()

Func _Main()
    Local $m4, $scout, $clarion, $bull, $kriegauto, $awp, $para, $tec, $mp5, $ump, $p90, $leone, $leoneauto
    Local $clock, $tactical, $compact, $deagle, $dual
    Local $he, $flash1, $flash2, $smoke
    
    
    
    GUICreate("IRC-Bot - Lynch, Killing-Eye & bloC", 450, 500)
    
    
    GuiCtrlCreateGroup("Primär Waffen", 9, 28, 130, 370)
    $m4 = GuiCtrlCreateRadio("M4A1 / AK", 12, 40, 80)
    $clarion = GuiCtrlCreateRadio("Clarion", 12, 60, 80)
    $scout = GuiCtrlCreateRadio("Scout", 12, 80, 80)
    $bull = GuiCtrlCreateRadio("Bullpup / Krieg", 12, 100, 80)
    $kriegauto = GuiCtrlCreateRadio("Krieg Auto", 12, 120, 80)
    $awp = GuiCtrlCreateRadio("Magnum", 12, 140, 80)
    $para = GuiCtrlCreateRadio("M249 Para", 12, 160, 80)
    $tec = GuiCtrlCreateRadio("Schmidt /Tec", 12, 180, 80)
    $mp5 = GuiCtrlCreateRadio("MP5", 12, 200, 80)
    $ump = GuiCtrlCreateRadio("UMP45", 12, 220, 80)
    $p90 = GuiCtrlCreateRadio("P90", 12, 240, 80)
    $leone = GuiCtrlCreateRadio("Leone 12", 12, 260, 80)
    $leoneauto = GuiCtrlCreateRadio("Leone Auto", 12, 280, 80)
    GUICtrlCreateGroup ("Primärwaffen",-99,-99,1,1);close group
    
    
    GuiCtrlCreateGroup("Sekundär Waffen", 145, 28, 130, 370)
    $clock = GuiCtrlCreateRadio("Clock", 148, 40, 80)
    $tactical = GuiCtrlCreateRadio("Tactical", 148, 60, 80)
    $compact = GuiCtrlCreateRadio("Compact", 148, 80, 80)
    $deagle = GuiCtrlCreateRadio("Deagle", 148, 100, 80)
    $dual = GuiCtrlCreateRadio("Fifeseven / Dual", 148, 120, 80)
    GUICtrlCreateGroup ("Sekundär Waffen",-99,-99,1,1);close group
    
    GuiCtrlCreateGroup("Equippment", 281, 28, 130, 370)
    $he = GuiCtrlCreateCheckbox("HE", 284, 40, 80)
    $flash1 = GuiCtrlCreateCheckbox("Flash1", 284, 60, 80)
    $flash2 = GuiCtrlCreateCheckbox("Flash2", 284, 80, 80)
    $flash2 = GuiCtrlCreateCheckbox("Flash2", 284, 80, 80)
    $smoke = GuiCtrlCreateCheckbox("Smoke", 284, 100, 80)
    
    GUICtrlCreateGroup ("Equippment",-99,-99,1,1);close group
    
    GUISetState()
; Run the GUI until the dialog is closed
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
                
            Case Else
        EndSwitch
    WEnd

    GUIDelete()
EndFunc ;==>_Main

(Sry for my bad english)

KillingEye

Buyscript.au3

Edited by KillingEye

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Does anyone understand my problem?

Edited by KillingEye

Share this post


Link to post
Share on other sites

yes but I can't see how it has anything with Graphical User Interface (GUI) to do.

And I don't know why you have the gui INSIDE a func :S

Look for "Send" (and maybe "MouseMove" too) in the helpfile, if I were you I would save the settings in a .ini file.

To get the state of the checkbox use:

If GUICtrlRead($m4) = 1 Then

BuyM4()

Func BuyM4()

;mousemove and send here

Endfunc

make a OK button or something to start it.

Share this post


Link to post
Share on other sites

yes but I can't see how it has anything with Graphical User Interface (GUI) to do.

And I don't know why you have the gui INSIDE a func :S

I think he is aiming it at a C/++ styled program, everything in main()


Share this post


Link to post
Share on other sites

Ok this is not the complete GUI.

This is only the part of the Buy-Script-Maker.

It is a small part of the complete GUI.

I copied only the Buy script out of the GUI.

Share this post


Link to post
Share on other sites

First of all you have to create a single variable:

Global $buyscript

Create a button to build the $buyscript

Then you have to change the value of the buyscript based on that gui element witch is selected

If GUICtrlGetState($he) = $GUI_CHECKED Then $buyscript &= "buy hegrenade; "

If GUICtrlGetState($flash1) = $GUI_CHECKED Then $buyscript &= "buy flashbang; "

And so on...

Note: This is one of the simplest, less knownage required method to do the task.

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