Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 04:13

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

Advertisement



Bot Problem

Discussion on Bot Problem within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
´Romka's Avatar
 
elite*gold: 10
Join Date: Dec 2008
Posts: 772
Received Thanks: 175
Bot Problem

Hallo
ich bin ein neuling in sachen AutoIt.
Ich wolte mal was ausprobieren aber ich habe ein Problem
Code:
#include <GUIConstants.au3>  
$Form1 = GUICreate("PicUp Bot by .FreakY", 250, 250, 200, 200)
$Button1 = GUICtrlCreateButton("AN ", 45, 23, 161, 33, 0)
$Button2 = GUICtrlCreateButton("AUS", 45, 59, 161, 33, 0)
$Button3 = GUICtrlCreateButton("An", 45, 135, 161, 33, 0)
$Button4 = GUICtrlCreateButton("Aus", 45, 175, 161, 33, 0)
$label1=GuiCtrlCreateLabel("PicUp",110,2,100,15)
$label2=GuiCtrlCreateLabel("AutoAtack",100,115,101,15)
GUISetState(@SW_SHOW) 
guictrlsetstate($button2,$gui_disable)
guictrlsetstate($button4,$gui_disable)
$state = false 
While 1
	$nMsg = GUIGetMsg() 
	Switch $nMsg 
		Case $GUI_EVENT_CLOSE 
			Exit 
		case $button3  
			guictrlsetstate($button3,$gui_enable) 
			guictrlsetstate($button4,$gui_disable)
			$state = true 
			ToolTip("") 
		case $button4
			guictrlsetstate($button4,$gui_enable) 
			guictrlsetstate($button3,$gui_disable)
			$state = false
		EndSwitch
		if $state =true then
			send ("{*}")
			sleep(10)
		endif
		WEnd
While 1
	$nMsg = GUIGetMsg() 
	Switch $nMsg 
		Case $GUI_EVENT_CLOSE 
		case $button1
			guictrlsetstate($button2,$gui_enable)
			guictrlsetstate($button1,$gui_disable) 
			ToolTip("") 
			$state = true 
		case $button2 
			guictrlsetstate($button1,$gui_enable) 
			guictrlsetstate($button2,$gui_disable)
			$state = false 
		EndSwitch 
		if $state = true Then 
			send("{^}")
			send("{y}")
			sleep(10) 
		endif 
		
WEnd
Ich will das es so machen, das wen ich PicUp anmache er halt ^y drückt.
Wenn ich auf Aus drücke er stoppen soll.
Genau so ie bei autoatack, nur da soll er die LERTASTE drücken
´Romka is offline  
Old 02/27/2010, 22:49   #2
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,147
Das muss schon in einer Schleife sein und die Leertaste ist in AutoIt {SPACE}

Ich habs mal ganz einfach gelöst:
PHP Code:
$Form1 GUICreate("PicUp Bot by .FreakY"250100)
$Button1 GUICtrlCreateButton("AN "4523161330)
$Button2 GUICtrlCreateButton("AUS"4559161330)
$Label1=GuiCtrlCreateLabel("Auto Attack / PicUp"105,2,100,15)
GUISetState(@SW_SHOW)

While 
True
    $msg 
GUIGetMsg()
    Switch 
$msg
        
Case -3
            
Exit
        Case 
$Button1
            
Do
                
Send("^y")
                
Sleep(10)
                
Send("{SPACE}")
                
Sleep(10)
            
Until GUIGetMsg() = $Button2
    
EndSwitch
WEnd 
KDeluxe is offline  
Old 02/28/2010, 11:07   #3
 
| Moep |'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,079
Received Thanks: 438
Hotkeys FTW?!

Code:
Global $pickUp,$autoAttack
HotKeySet("{F1}", "TogglePickUp")
HotKeySet("{F2}", "ToggleAutoAttack")

While 1
    Sleep(100)
WEnd

Func TogglePickUp()
    $pickUp = NOT $pickUp
    $autoAttack = false
    While $pickUp
        sleep(100)
	Send("{^}")
	Send("y")
        ToolTip("PickUp "&$pickUp&@CRLF&"AutoAttack "&$autoAttack,0,0)
    WEnd
    ToolTip("PickUp "&$pickUp&@CRLF&"AutoAttack "&$autoAttack,0,0)
EndFunc

Func ToggleAutoAttack()
    $autoAttack = NOT $autoAttack
    $pickUp = false
    While $autoAttack
        sleep(100)
	Send("{SPACE}")
        ToolTip("PickUp "&$pickUp&@CRLF&"AutoAttack "&$autoAttack,0,0)
    WEnd
    ToolTip("PickUp "&$pickUp&@CRLF&"AutoAttack "&$autoAttack,0,0)
EndFunc
Mit F1 und F2 startest du deine Loot und Attack Sequenzen...
| Moep | is offline  
Reply


Similar Threads Similar Threads
Metin 2 Pserver Problem/ Lösung für das Matrix Kartennummer Problem
01/04/2010 - Metin2 Private Server - 3 Replies
Hy Leute Wie in der Überschrift genannt, hab ich gerade ein Problem mit meinem Metin 2Server. Ich lasse ihn via Loopbackadapter laufen, funktioniert auch ganz gut. Ich hab aber jetzt das Poblem, das in meinem Account nur noch Krieger mit Level null stehen. Wie kann ich das Beheben??, das is auch manchmal da, wenn ich via Navicat n neuen Account mach. Hoffe einer hatt ne Lösung Hab n Screenshot im Anhang Aber ich hab ja auch ne Lösung für n anderes Problem. Gestern hatte ich beim...
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings



All times are GMT +2. The time now is 04:13.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.