Drunken BoT Projekt[helpfix] by N.ick

02/03/2009 07:02 idqdmaster#1
Hey :]
I have this i've been playing with learning my way around AutoItv3 for a yearish now
and.
there is a few problems i've encountered.
Ill start and run bot but it stops at the point to click the bottles.
i plan on working on this till you can use it for multiple types of alcohol.
but all im worried about now is Lvl3 [or Grog,Firewater,etc.]

Heres code.
if you and offer any help i'd appreciate it :]

Code:
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.0.0
 Author:         N.ick

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#include <GUIConstants.au3>
#include "tt6.au3"
#include "nomadmemory.au3" 

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Drunk_On_Grog_Bot", 256, 348, 259, 209)
GUISetBkColor(0xC0C0C0)
$Label1 = GUICtrlCreateLabel("Drunk On Grog Bot", 0, 0, 255, 23)
GUICtrlSetFont(-1, 12, 800, 0, "Arial")
GUICtrlSetBkColor(-1, 0x808080)
$StorageBox1 = GUICtrlCreateGroup("StorageBox1", 16, 64, 225, 41)
GUICtrlSetBkColor(-1, 0x008080)
$Lable2 = GUICtrlCreateLabel("HowMany?:", 112, 80, 55, 17)
$Input1 = GUICtrlCreateInput("0", 176, 80, 49, 21)
$Checkbox1 = GUICtrlCreateCheckbox("Has Some?", 24, 80, 73, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$StorageBox2 = GUICtrlCreateGroup("StorageBox2", 16, 120, 225, 41)
GUICtrlSetBkColor(-1, 0x008080)
$Label3 = GUICtrlCreateLabel("HowMany?:", 112, 136, 55, 17)
$Input2 = GUICtrlCreateInput("0", 176, 136, 49, 21)
$Checkbox2 = GUICtrlCreateCheckbox("Has Some?", 24, 136, 73, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$StorageBox3 = GUICtrlCreateGroup("StorageBox3", 16, 176, 225, 41)
GUICtrlSetBkColor(-1, 0x008080)
$Label4 = GUICtrlCreateLabel("HowMany?:", 112, 192, 55, 17)
$Input3 = GUICtrlCreateInput("0", 176, 192, 49, 21)
$Checkbox3 = GUICtrlCreateCheckbox("Has Some?", 24, 192, 73, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$StorageBox4 = GUICtrlCreateGroup("StorageBox4", 16, 232, 225, 41)
GUICtrlSetBkColor(-1, 0x008080)
$Label5 = GUICtrlCreateLabel("HowMany?:", 112, 248, 55, 17)
$Input4 = GUICtrlCreateInput("0", 176, 248, 49, 21)
$Checkbox4 = GUICtrlCreateCheckbox("Has Some?", 24, 248, 73, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$StorageBox5 = GUICtrlCreateGroup("StorageBox5", 16, 288, 225, 41)
GUICtrlSetBkColor(-1, 0x008080)
$Label6 = GUICtrlCreateLabel("HowMany?:", 112, 304, 55, 17)
$Input5 = GUICtrlCreateInput("0", 176, 304, 49, 21)
$Checkbox5 = GUICtrlCreateCheckbox("Has Some?", 24, 304, 81, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Start = GUICtrlCreateButton("Start", 8, 32, 65, 25)
GUICtrlSetBkColor(-1, 0x808080)
$Adapt_GW = GUICtrlCreateButton("Adapt_GW", 88, 32, 81, 25)
GUICtrlSetBkColor(-1, 0x8808080)
$End = GUICtrlCreateButton("End", 184, 32, 65, 25)
GUICtrlSetBkColor(-1, 0x808080)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
If $nmsg=$Start Then button1()
If $nmsg=$End Then button2()
If $nmsg=$Adapt_GW Then button4()

WEnd

HotKeySet("{END}","_exitit")
HotKeySet("{PAUSE}", "_TogglePause")
Global $Paused = False

func button1()
WinActivate("Guild Wars")
If Not WinActivate("Guild Wars") Then
			WinActivate("Guild Wars")
			Sleep(500)
			ControlMove("Guild Wars", "", "", 0, 0, 800, 600)
		EndIf
		Sleep(2000)
 Call("_Running")
EndFunc

func button2()
	Call("_exitit")
EndFunc

func button3()
	Call("_TogglePause")
EndFunc

func button4()
	call("_anpassen")
EndFunc

func _anpassen()
	sleep(250)
	ControlMove("Guild Wars", "", "", 0, 0, 800, 600)
EndFunc

Func _exitit()
	Exit
EndFunc

Func _TogglePause()
    $Paused = NOT $Paused
    While $Paused
        Sleep(100)
		ToolTip("Script is 'Paused'" & @CRLF & @CRLF)
    WEnd
    ToolTip("Script is running")
		If Not WinActivate("Guild Wars") Then
			WinActivate("Guild Wars")
		EndIf
		Sleep(2000)
	EndFunc
	
Func _Running()
While 1
	If $Input1 < 251 And GUICtrlRead($Input1)=$GUI_CHECKED Then
		_Clickhere()	
	ElseIf $Input1 = 0 And GUICtrlRead($Input1)=$GUI_CHECKED And $Input2 < 251 And GUICtrlRead($Input2)=$GUI_CHECKED Or $Input2 < 251 And GUICtrlRead($Input2)=$GUI_CHECKED Then
		_Clickhere2()	
	ElseIf $Input1 = 0 And GUICtrlRead($Input1)=$GUI_CHECKED And $Input2=0 And GUICtrlRead($Input2)=$GUI_CHECKED And $Input3 < 251 And GUICtrlRead($Input3)=$GUI_CHECKED Or $Input3 < 251 And GUICtrlRead($Input3)=$GUI_CHECKED Then
		_Clickhere3()
	ElseIf $Input1 = 0 And GUICtrlRead($Input1)=$GUI_CHECKED And $Input2=0 And GUICtrlRead($Input2)=$GUI_CHECKED And $Input3=0 And GUICtrlRead($Input3)=$GUI_CHECKED And $Input4 < 251 And GUICtrlRead($Input4)=$GUI_CHECKED Or $Input4 < 251 And GUICtrlRead($Input4)=$GUI_CHECKED Then
		_Clickhere4()
	ElseIf $Input1 = 0 And GUICtrlRead($Input1)=$GUI_CHECKED And $Input2=0 And GUICtrlRead($Input2)=$GUI_CHECKED And $Input3=0 And GUICtrlRead($Input3)=$GUI_CHECKED And $Input4=0 And $Input5 < 251 And GUICtrlRead($Input5)=$GUI_CHECKED Or $Input5 < 251 And GUICtrlRead($Input5)=$GUI_CHECKED Then
		_Clickhere5()
	ElseIf $Input1 = 0 And $Input2=0 And $Input3=0 And $Input4=0 And $Input5=0 Then
		Exit
EndIf
WEnd
EndFunc

Func _Clickhere()
	$rndx = Random(35,36)
	$rndy = Random(300,301)
	ControlClick("Guild Wars", "", "", "left", 2, $rndx, $rndy)
	$Input1=($Input1-1)
		Sleep(180000)
	Call("_Running")
	EndFunc
	
Func _Clickhere2()
	$rndx2 = Random(65,66)
	$rndy2 = Random(300,301)
	ControlClick("Guild Wars", "", "", "left", 2, $rndx2, $rndy2)
	$Input2=($Input2-1)
		Sleep(180000)
	Call("_Running")
	EndFunc
	
Func _Clickhere3()
	$rndx3 = Random(95,96)
	$rndy3 = Random(300,301)
	ControlClick("Guild Wars", "", "", "left", 2, $rndx3, $rndy3)
	$Input3=($Input3-1)
		Sleep(180000)
	Call("_Running")
	EndFunc
	
Func _Clickhere4()
	$rndx4 = Random(130,131)
	$rndy4 = Random(300,301)
	ControlClick("Guild Wars", "", "", "left", 2, $rndx4, $rndy4)
	$Input4=($Input4-1)
		Sleep(180000)
	Call("_Running")
	EndFunc
	
Func _Clickhere5()
	$rndx5 = Random(165,166)
	$rndy5 = Random(300,301)
	ControlClick("Guild Wars", "", "", "left", 2, $rndx5, $rndy5)
	$Input5=($Input5-1)
		Sleep(180000)
	Call("_Running")
	EndFunc
its very... rough. very noob as well. but ehh.
it keeps me thinking. i need help tho with this no clicking problem :\


Speacial thankx to:
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
02/03/2009 07:57 NBA#2
Why dont let gw be in the background while using controlclick
02/03/2009 23:14 idqdmaster#3
Quote:
Originally Posted by NBA View Post
Why dont let gw be in the background while using controlclick
i put it in there so i'd see if it clicks or not. so far it doesn't. but i just made it to run in background.
02/09/2009 09:45 Read Me#4
Warum redet ihr nicht einfach beide Deutsch und lasst das arme Englisch in Ruhe? :D
02/09/2009 14:46 candyman91#5
Weil idqdmaster nur englisch spricht?
02/09/2009 14:57 NBA#6
Yeah, I know, my britisch akzent school english is shit, but the 3 years in america helped learning english (american style :D ) Deswegen ? Weil ich auch mit Leuten rede die English sprechen, und immer versuche zu helfen?
02/09/2009 17:31 Illuminatus#7
Quote:
Originally Posted by NBA View Post
Yeah, I know, my britisch akzent school english is shit
xD that makes u no one so quickly after :)
02/09/2009 17:55 NBA#8
What does he want to tell me?

Nice Script. Very "Clean" coded.
02/09/2009 18:00 Illuminatus#9
Quote:
Originally Posted by NBA View Post
What does he want to tell me?
"britisch akzent" is not very english...

Quote:
Originally Posted by NBA View Post
Nice Script. Very "Clean" coded.
Hard to write 50 lines of code "dirty"?! isnt it?
02/09/2009 18:21 NBA#10
It is indeed. IF you use Tidy...
02/09/2009 21:16 Illuminatus#11
Quote:
Originally Posted by NBA View Post
Tidy...
Tidy? Never heard of it...
02/09/2009 23:37 idqdmaster#12
Quote:

Quote:
Originally Posted by Read Me View Post
Warum redet ihr nicht einfach beide Deutsch und lasst das arme Englisch in Ruhe? :D
Quote:
Originally Posted by candyman91 View Post
Weil idqdmaster nur englisch spricht?
Quote:
Originally Posted by NBA View Post
Yeah, I know, my britisch akzent school english is shit, but the 3 years in america helped learning english (american style :D ) Deswegen ? Weil ich auch mit Leuten rede die English sprechen, und immer versuche zu helfen?
First. Im american. Only half german, so i suck at speaking it. [sorry]
For the rude person. its almost 500 lines of code.
I'm in highschool so im still learning this.


What i want from you guys is... To tell me if there are any fixes that need to be made, or glitches in the code.


tidy-clean, neat


New Code:
Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=data\BottleofFirewater.ico
#AutoIt3Wrapper_Res_Description=Drunk On Grog Bot by:N.ick
#AutoIt3Wrapper_Res_Fileversion=0.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=by N.ick
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_Run_Obfuscator=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.12.1
 Author:         N.ick

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here


#include <GUIConstants.au3>
#include "tt6.au3"
#include "nomadmemory.au3" 
#include <GuiComboBoxEx.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include-once

HotKeySet("{END}","_exitit")
HotKeySet("{PAUSE}", "_TogglePause")
Global $Paused = False
Global $Input1
Global $Input2
Global $Input3
Global $Input4
Global $Input5
Global $time
Global $time2
Global $time3
Global $time4
Global $time5
Global $i
Global $i2
Global $i3
Global $i4
Global $i5
Global $timestats
Global $timer = TimerInit()
Global $label_stat
Global $clicks
Global $clicks2
Global $clicks3
Global $clicks4
Global $clicks5



#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Nicholas\Desktop\Grog Bot Projekt\Drunk Grog Bot.kxf
$Form1 = GUICreate("Drunk Grog Bot", 413, 313, 195, 110)
GUISetBkColor(0xFFFFFF)
$PageControl1 = GUICtrlCreateTab(0, 0, 412, 312)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Where at:")
$Checkbox1 = GUICtrlCreateCheckbox("Storage Box 1", 216, 40, 89, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Checkbox2 = GUICtrlCreateCheckbox("Storage Box 2", 216, 80, 89, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Checkbox3 = GUICtrlCreateCheckbox("Storage Box 3", 216, 120, 89, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Checkbox4 = GUICtrlCreateCheckbox("Storage Box 4", 216, 160, 89, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Checkbox5 = GUICtrlCreateCheckbox("Storage Box 5", 216, 200, 89, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Storage = GUICtrlCreatePic("C:\Documents and Settings\Nicholas\Desktop\Grog Bot Projekt\data\Storage.jpg", 0, 24, 193, 281, 0)
$TabSheet2 = GUICtrlCreateTabItem("The Drink?:")
$Group1 = GUICtrlCreateGroup("StorageBox1: How Many?", 16, 32, 153, 41)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Combo1 = GUICtrlCreateInput("0", 24, 48, 137, 25)
GUICtrlSetData(-1, "")
;$Combo1 = GUICtrlCreateCombo("0", 24, 48, 137, 25)
;GUICtrlSetData(-1,"1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("StorageBox2: How Many?", 16, 80, 153, 41)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Combo2 = GUICtrlCreateInput("0", 24, 96, 137, 25)
GUICtrlSetData(-1, "")
;$Combo2 = GUICtrlCreateCombo("0", 24, 96, 137, 25)
;GUICtrlSetData(-1,"1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("StorageBox3: How Many?", 16, 128, 153, 41)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Combo3 = GUICtrlCreateInput("0", 24, 144, 137, 25)
GUICtrlSetData(-1, "")
;$Combo3 = GUICtrlCreateCombo("0", 24, 144, 137, 25)
;GUICtrlSetData(-1,"1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("StorageBox4: How Many?", 16, 176, 153, 41)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Combo4 = GUICtrlCreateInput("0", 24, 192, 137, 25)
GUICtrlSetData(-1, "")
;$Combo4 = GUICtrlCreateCombo("0", 24, 192, 137, 25)
;GUICtrlSetData(-1,"1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group5 = GUICtrlCreateGroup("StorageBox5: How Many?", 16, 224, 153, 41)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Combo5 = GUICtrlCreateInput("0", 24, 240, 137, 25)
GUICtrlSetData(-1, "")
;$Combo5 = GUICtrlCreateCombo("0", 24, 240, 137, 25)
;GUICtrlSetData(-1,"1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group6 = GUICtrlCreateGroup("What Kind Of Ale?", 176, 32, 177, 49)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Radio1 = GUICtrlCreateRadio("1pt Ale", 192, 56, 57, 17)
$Radio2 = GUICtrlCreateRadio("3pt Ale", 288, 56, 57, 17)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group7 = GUICtrlCreateGroup("What Kind Of Ale?", 176, 80, 177, 49)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Radio3 = GUICtrlCreateRadio("1pt Ale", 192, 104, 57, 17)
$Radio4 = GUICtrlCreateRadio("3pt Ale", 288, 104, 57, 17)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group8 = GUICtrlCreateGroup("What Kind Of Ale?", 176, 128, 177, 49)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Radio5 = GUICtrlCreateRadio("1pt Ale", 192, 152, 57, 17)
$Radio6 = GUICtrlCreateRadio("3pt Ale", 288, 152, 57, 17)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group9 = GUICtrlCreateGroup("What Kind Of Ale?", 176, 176, 177, 49)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Radio7 = GUICtrlCreateRadio("1pt Ale", 192, 200, 57, 17)
$Radio8 = GUICtrlCreateRadio("3pt Ale", 288, 200, 57, 17)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group10 = GUICtrlCreateGroup("What Kind Of Ale?", 176, 224, 177, 49)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x008080)
$Radio9 = GUICtrlCreateRadio("1pt Ale", 192, 248, 57, 17)
$Radio10 = GUICtrlCreateRadio("3pt Ale", 288, 248, 57, 17)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlSetState(-3, $GUI_CHECKED)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet3 = GUICtrlCreateTabItem("Start:")
$Button1 = GUICtrlCreateButton("Start", 120, 152, 177, 105, 0)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Progress1 = GUICtrlCreateProgress(24, 88, 361, 25)
GUICtrlSetColor(-1, 0x008080)
Global $label_stat = GUICtrlCreateLabel("Min: 000  Sec: 00   Sence you Started .ExE", 24, 48, 361, 49)
GUICtrlSetColor(-1, 0x008080)
;GUICtrlCreateLabel("StorageBox1:" & $clicks & @CRLF & @CRLF & "StorageBox2:" & $clicks2 & @CRLF & @CRLF & "StorageBox3:" & $clicks3 & @CRLF & @CRLF & "StorageBox4:" & $clicks4 & @CRLF & @CRLF & "StorageBox5:" & $clicks5 , 24, 38, 361, 49)
;GUICtrlSetColor(-1, 0x008080)
GUICtrlCreateTabItem("")
$Button2 = GUICtrlCreateButton("End", 246, 280, 75, 25, 0)
$Button3 = GUICtrlCreateButton("Adapt GW", 328, 280, 75, 25, 0)
;GUICtrlCreateGroup("", -99, -99, 1, 1)
;$TabSheet3 = GUICtrlCreateTabItem("COORD's [X+Y]")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;


Func status()
    $timestats = TimerDiff($timer)
    $string = StringFormat("Min: %03u  Sec: %02u   Sence you Started .ExE", $timestats/1000/60, Mod($timestats/1000,60))
    GUICtrlSetData($label_stat, $string)
EndFunc 

While 1
	$nMsg = GUIGetMsg()
	If GUICtrlRead($Radio1)=$GUI_CHECKED Then _sleep1pt()
	If GUICtrlRead($Radio2)=$GUI_CHECKED Then _sleep3pt()
	If GUICtrlRead($Radio3)=$GUI_CHECKED Then _sleep1pt2()
	If GUICtrlRead($Radio4)=$GUI_CHECKED Then _sleep3pt2()
	If GUICtrlRead($Radio5)=$GUI_CHECKED Then _sleep1pt3()
	If GUICtrlRead($Radio6)=$GUI_CHECKED Then _sleep3pt3()
	If GUICtrlRead($Radio7)=$GUI_CHECKED Then _sleep1pt4()
	If GUICtrlRead($Radio8)=$GUI_CHECKED Then _sleep3pt4()
	If GUICtrlRead($Radio9)=$GUI_CHECKED Then _sleep1pt5()
	If GUICtrlRead($Radio10)=$GUI_CHECKED Then _sleep3pt5()
	If $nmsg=$Button1 Then button1()
	If $nmsg=$Button2 Then button2()
	If $nmsg=$Button3 Then button4()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
	EndSwitch
WEnd

func button1()
			If Not WinActivate($client) Then
			WinActivate($client)
		EndIf
		Sleep(2000)
	AdlibEnable("status",1000)
		Call("_Running")
EndFunc

func button2()
	Call("_exitit")
EndFunc

func button3()
	Call("_TogglePause")
EndFunc

func button4()
	call("_anpassen")
EndFunc

Func _sleep1pt()
	$time=60000
	$i=0
EndFunc

Func _sleep3pt()
	$time=180000
	$i=4
EndFunc

Func _sleep1pt2()
	$time2=60000
	$i2=0
	;If GUICtrlRead($Checkbox1)=$GUI_CHECKED Then
	;$i2=4
	;EndIf
EndFunc

Func _sleep3pt2()
	$time2=180000
	$i2=4
EndFunc

Func _sleep1pt3()
	$time3=60000
	$i3=0
	;If GUICtrlRead($Checkbox2)=$GUI_CHECKED Then
	;$i2=4
	;EndIf
EndFunc

Func _sleep3pt3()
	$time3=180000
	$i3=4
EndFunc

Func _sleep1pt4()
	$time4=60000
	$i4=0
	;If GUICtrlRead($Checkbox3)=$GUI_CHECKED Then
	;$i2=4
	;EndIf
EndFunc

Func _sleep3pt4()
	$time4=180000
	$i4=4
EndFunc

Func _sleep1pt5()
	$time5=60000
	$i5=0
	;If GUICtrlRead($Checkbox4)=$GUI_CHECKED Then
	;$i2=4
	;EndIf
EndFunc

Func _sleep3pt5()
	$time5=180000
	$i5=4
EndFunc

func _anpassen()
	If Not WinActivate($client) Then
			WinActivate($client)
		EndIf
	sleep(250)
	ControlMove($client, "", "", 0, 0, 800, 600)
EndFunc

Func _exitit()
	Exit
EndFunc

Func _TogglePause()
    $Paused = NOT $Paused
    While $Paused
        Sleep(100)
		ToolTip("Script is 'Paused'" & @CRLF & @CRLF)
    WEnd
    ToolTip("Script is running")
		If Not WinActivate($client) Then
			WinActivate($client)
		EndIf
		Sleep(2000)
	EndFunc


Func _Running()
		;If Not WinActivate($client) Then
		;	WinActivate($client)
		;EndIf
		;Sleep(2000)
	If GUICtrlRead($Checkbox1)=$GUI_CHECKED And $Combo1<>0 Then
		call("_Clickhere")
	ElseIf GUICtrlRead($Checkbox2)=$GUI_CHECKED And $Combo2<>0 Then
		call("_Clickhere2")
	ElseIf GUICtrlRead($Checkbox3)=$GUI_CHECKED And $Combo3<>0 Then
		call("_Clickhere3")
	ElseIf GUICtrlRead($Checkbox4)=$GUI_CHECKED And $Combo4<>0 Then
		call("_Clickhere4")
	ElseIf GUICtrlRead($Checkbox5)=$GUI_CHECKED And $Combo5<>0 Then
		call("_Clickhere5")
	ElseIf $Combo1=0 And $Combo2=0 And $Combo3=0 And $Combo4=0 And $Combo5=0 Then
		Exit
EndIf
EndFunc

Func _Clickhere()
	If $Combo1=0 Then
		call("_Clickhere2")
	Elseif $i<>4 Then
		Do
			ControlClick($client, "", "", "left", 2, 29, 300)
			;MouseClick("left", 29, 300, 2, 4)
			$i +=1
			$Combo1 -=1
			$clicks +=1
			Sleep(250)
			Call("_Clickhere")
		Until $i=4
	EndIf
			;If Not WinActivate($client) Then
			;WinActivate($client)
			;EndIf
	ControlClick($client, "", "", "left", 2, 29, 300)
	;MouseClick("left", 29, 300, 2, 4)
	$clicks +=1
	$Combo1 -=1
		Sleep($time)
	Call("_Running")

	EndFunc
	
Func _Clickhere2()
	If $Combo2=0 Then
		call("_Clickhere3")
	Elseif $i2<>4 Then
		Do
	;		;If Not WinActivate($client) Then
	;		;WinActivate($client)
	;		;EndIf
			ControlClick($client, "", "", "left", 2, 59, 300)
			;MouseClick("left", 59, 300, 2, 4)
			$i2 +=1
			$Combo2 -=1
			$clicks2 +=1
			Sleep(250)
			Call("_Clickhere2")
		Until $i2=4
	EndIf
			;If Not WinActivate($client) Then
			;WinActivate($client)
			;EndIf
	ControlClick($client, "", "", "left", 2, 59, 300)
	;MouseClick("left", 59, 300, 2, 4)
	$Combo2 -=1
	$clicks2 +=1
		Sleep($time2)
	Call("_Running")

	EndFunc
	
Func _Clickhere3()
	If $Combo3=0 Then
		call("_Clickhere4")
	Elseif $i3<>4 Then
		Do
	;		;If Not WinActivate($client) Then
	;		;WinActivate($client)
	;		;EndIf
			ControlClick($client, "", "", "left", 2, 89, 300)
			;MouseClick("left", 89, 300, 2, 4)
			$i3 +=1
			$Combo3 -=1
			$clicks3 +=1
			Sleep(250)
			Call("_Clickhere3")
		Until $i3=4
	EndIf
			;If Not WinActivate($client) Then
			;WinActivate($client)
			;EndIf
	ControlClick($client, "", "", "left", 2, 89, 300)
	;MouseClick("left", 89, 300, 2, 4)
	$Combo3 -=1
	$clicks3 +=1
		Sleep($time3)
	Call("_Running")
	
	EndFunc
	
Func _Clickhere4()
	If $Combo4=0 Then
		call("_Clickhere5")
	Elseif $i4<>4 Then
		Do
	;		;If Not WinActivate($client) Then
	;		;WinActivate($client)
	;		;EndIf
			ControlClick($client, "", "", "left", 2, 124, 300)
			;MouseClick("left", 124, 300, 2, 4)
			$i4 +=1
			$Combo4 -=1
			$clicks4 +=1
			Sleep(250)
			Call("_Clickhere4")
		Until $i4=4
	EndIf
			If Not WinActivate($client) Then
			WinActivate($client)
		EndIf
	ControlClick($client, "", "", "left", 2, 124, 300)
	;MouseClick("left", 124, 300, 2, 4)
	$Combo4 -=1
	$clicks4 +=1
		Sleep($time4)
	Call("_Running")
	
	EndFunc
	
Func _Clickhere5()
	If $Combo5=0 Then
		call("_Running")
	Elseif $i5<>4 Then
		Do
	;		;If Not WinActivate($client) Then
	;		;WinActivate($client)
	;		;EndIf
			ControlClick($client, "", "", "left", 2, 159, 300)
			;MouseClick("left", 159, 300, 2, 4)
			$i5 +=1
			$Combo5 -=1
			$clicks5 +=1
			Sleep(250)
			Call("_Clickhere5")
		Until $i5=4
	EndIf
			;If Not WinActivate($client) Then
			;WinActivate($client)
			;EndIf
	ControlClick($client, "", "", "left", 2, 159, 300)
	;MouseClick("left", 159, 300, 2, 4)
	$Combo5 -=1
	$clicks5 +=1
		Sleep($time5)
	Call("_Running")
	
	EndFunc
Storage Numbers
&
Screenshot Provided just for the hell of it:
02/10/2009 00:00 NBA#13
Nice. But please dont call functions that way. I don't like buffer overflows. Just call them with Functionname() . I haven't tested it, but I'll test it tomorrow. Is that what you wanted? :)
Like this:
Code:
func end()
exit 
endfunc

end()
Ps.: I don't know, but do you mean Illumanti with rude ;)
02/10/2009 00:12 Illuminatus#14
Quote:
Originally Posted by NBA View Post
Ps.: I don't know, but do you mean Illumanti with rude ;)
ya er meint mich
02/10/2009 02:57 idqdmaster#15
Quote:
Originally Posted by Illuminatus View Post
ya er meint mich
i didn't mean anything harsh about it.
i just dont like 4 days for thinking called 50 lines of code.. haha

Why shouldn't i call func how i do?
does it cause something?


i've tested it by setting the sleep times to 1000, then running but when it starts controlclick'ing on storage slots 3-5 it goes crazy :\

i really think most of my #include .au3's are necessary.


i also tryed making a .exe .. but my friend [using vista] couldn't run it