Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 08:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



HELP WITH BOT

Discussion on HELP WITH BOT within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
User198's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 203
Received Thanks: 511
HELP WITH BOT

Hi everybody I'm trying to make a bot for S4 League, but I have some problems, here it is my code:
Code:
HotKeySet("{X}", "Terminate")
Func Terminate()
Exit 0
EndFunc

HotKeySet("{Z}", "Say")
Func Say()
	While 1
	Send ("{ENTER}")
	Send ("Asd")
	Send ("{ENTER}")
	Sleep(10000)
	WEnd
EndFunc

HotKeySet("{C}", "Click")
Func Click()  
	MouseClick("left", 511, 697)
	Sleep(5000)
EndFunc

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Bot v1.0", 210, 74, 302, 218)
GUISetBkColor(0x000000)
$Button1 = GUICtrlCreateButton("Info", 56, 8, 97, 25, $WS_GROUP)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x3399FF)
$Button2 = GUICtrlCreateButton("Esci", 56, 40, 97, 25, $WS_GROUP)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x3399FF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

WHILE 3
$NMSG=GUIGETMSG()
SWITCH $NMSG
CASE $Button1
MsgBox(0,"Info","Bot By User198")
CASE $Button2
Exit
EndSwitch
WEnd
I need that if I Press:
-Z it activare Function Say
-X it close application
-C it clicks the target

But it doesn't work... What's the problem?
User198 is offline  
Old 05/16/2010, 19:35   #2
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

HotKeySet("{X}""Terminate")
HotKeySet("{Z}""Say")
HotKeySet("{C}""Click")

#Region ### START Koda GUI section ### Form=
$Form2 GUICreate("Bot v1.0"21074302218)
GUISetBkColor(0x000000)
$Button1 GUICtrlCreateButton("Info"5689725$WS_GROUP)
GUICtrlSetColor(-10xFFFFFF)
GUICtrlSetBkColor(-10x3399FF)
$Button2 GUICtrlCreateButton("Esci"56409725$WS_GROUP)
GUICtrlSetColor(-10xFFFFFF)
GUICtrlSetBkColor(-10x3399FF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg
=GUIGetMsg()
    Switch = 
$nMsg
        
Case $Button1
            MsgBox
(0,"Info","Bot By User198")
        Case 
$Button2
            
Exit
    EndSwitch
WEnd

Func Terminate
()
    Exit
EndFunc

Func Say
()
    
Send ("{ENTER}")
    
sleep(10)
    
Send ("Asd")
    
sleep(10)
    
Send ("{ENTER}")
    
Sleep(10000)
EndFunc

Func Click
()  
    
MouseClick("left"511697)
    
Sleep(5000)
EndFunc 
€dit: Gewöhn dir mal nen sauberen Programmierstil an
Σternαl. is offline  
Old 05/16/2010, 20:22   #3
 
User198's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 203
Received Thanks: 511
It doesn't work xD
User198 is offline  
Old 05/16/2010, 20:40   #4
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
What doesn't work?
The whole programm or just one function or several?
Σternαl. is offline  
Reply




All times are GMT +1. The time now is 08:58.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.