Toxic Fog background leveler

06/09/2009 07:25 theunknown3#1
Set the keys first, then start it. It right clicks twice and has an option for people with Heaven's Blessing. I attached the exe at the bottom if you don't want to use the source code.

Created with AutoIt.

Source Code:
Code:
#NoTrayIcon
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Toxic Fog", 255, 140, 193, 125)
$Start = GUICtrlCreateButton("Start", 16, 16, 81, 25, 0)
$Stop = GUICtrlCreateButton("Stop", 16, 53, 81, 25, 0)
$Heaven = GUICtrlCreateCheckbox("Heaven's Blessing", 120, 19, 113, 17)
$Sit = GUICtrlCreateCombo("", 8, 112, 89, 25)
GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10")
$Label1 = GUICtrlCreateLabel("Sit Key:", 32, 96, 40, 17, BitOR($SS_CENTER, $SS_RIGHT, $SS_GRAYFRAME, $SS_WHITEFRAME, $SS_SIMPLE))
$ToxicFog = GUICtrlCreateCombo("", 141, 112, 89, 25)
GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10")
$Label2 = GUICtrlCreateLabel("Toxic Fog Key:", 148, 96, 75, 17, BitOR($SS_CENTER, $SS_RIGHT, $SS_GRAYFRAME, $SS_WHITEFRAME, $SS_SIMPLE))
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlSetOnEvent($Start, "Start")
GUICtrlSetOnEvent($Stop, "Stop")
GUISetState(@SW_SHOW)
$Conquer = ControlGetHandle("[CLASS:Afx:400000:0:10003:0:0]", "", "#327701")
$Active = False
$Run = 0

While 1
	If $Active = False Then Sleep(100)
	If $Active = True Then
		$SitKey = GUICtrlRead($Sit)
		$TFK = GUICtrlRead($ToxicFog)
		If $Run = 0 Then ; Select Toxic Fog
			If $TFK = "F1" Then ControlClick($Conquer, "", "Button136", "Right", 1, 18, 20)
			If $TFK = "F2" Then ControlClick($Conquer, "", "Button136", "Right", 1, 61, 20)
			If $TFK = "F3" Then ControlClick($Conquer, "", "Button136", "Right", 1, 102, 20)
			If $TFK = "F4" Then ControlClick($Conquer, "", "Button136", "Right", 1, 144, 20)
			If $TFK = "F5" Then ControlClick($Conquer, "", "Button136", "Right", 1, 183, 20)
			If $TFK = "F6" Then ControlClick($Conquer, "", "Button136", "Right", 1, 220, 20)
			If $TFK = "F7" Then ControlClick($Conquer, "", "Button136", "Right", 1, 260, 20)
			If $TFK = "F8" Then ControlClick($Conquer, "", "Button136", "Right", 1, 306, 20)
			If $TFK = "F9" Then ControlClick($Conquer, "", "Button136", "Right", 1, 348, 20)
			If $TFK = "F10" Then ControlClick($Conquer, "", "Button136", "Right", 1, 387, 20)
			$Run = 1
			Sleep(500)
		EndIf
		If GUICtrlRead($Heaven) == 4 Then ; Unchecked
			ControlClick($Conquer, "", $Conquer, "Right", 1, 503, 406)
			Sleep(1000)
			ControlClick($Conquer, "", $Conquer, "Right", 1, 503, 406)
			Sleep(500)
			If $SitKey = "F1" Then ControlClick($Conquer, "", "Button136", "Right", 1, 18, 20)
			If $SitKey = "F2" Then ControlClick($Conquer, "", "Button136", "Right", 1, 61, 20)
			If $SitKey = "F3" Then ControlClick($Conquer, "", "Button136", "Right", 1, 102, 20)
			If $SitKey = "F4" Then ControlClick($Conquer, "", "Button136", "Right", 1, 144, 20)
			If $SitKey = "F5" Then ControlClick($Conquer, "", "Button136", "Right", 1, 183, 20)
			If $SitKey = "F6" Then ControlClick($Conquer, "", "Button136", "Right", 1, 220, 20)
			If $SitKey = "F7" Then ControlClick($Conquer, "", "Button136", "Right", 1, 260, 20)
			If $SitKey = "F8" Then ControlClick($Conquer, "", "Button136", "Right", 1, 306, 20)
			If $SitKey = "F9" Then ControlClick($Conquer, "", "Button136", "Right", 1, 348, 20)
			If $SitKey = "F10" Then ControlClick($Conquer, "", "Button136", "Right", 1, 387, 20)
			Sleep(10000)
		EndIf
		If GUICtrlRead($Heaven) == 1 Then ; Checked
			ControlClick($Conquer, "", $Conquer, "Right", 1, 503, 406)
			Sleep(1000)
			ControlClick($Conquer, "", $Conquer, "Right", 1, 503, 406)
			Sleep(1000)
			ControlClick($Conquer, "", $Conquer, "Right", 1, 503, 406)
			Sleep(500)
			If $SitKey = "F1" Then ControlClick($Conquer, "", "Button136", "Right", 1, 18, 20)
			If $SitKey = "F2" Then ControlClick($Conquer, "", "Button136", "Right", 1, 61, 20)
			If $SitKey = "F3" Then ControlClick($Conquer, "", "Button136", "Right", 1, 102, 20)
			If $SitKey = "F4" Then ControlClick($Conquer, "", "Button136", "Right", 1, 144, 20)
			If $SitKey = "F5" Then ControlClick($Conquer, "", "Button136", "Right", 1, 183, 20)
			If $SitKey = "F6" Then ControlClick($Conquer, "", "Button136", "Right", 1, 220, 20)
			If $SitKey = "F7" Then ControlClick($Conquer, "", "Button136", "Right", 1, 260, 20)
			If $SitKey = "F8" Then ControlClick($Conquer, "", "Button136", "Right", 1, 306, 20)
			If $SitKey = "F9" Then ControlClick($Conquer, "", "Button136", "Right", 1, 348, 20)
			If $SitKey = "F10" Then ControlClick($Conquer, "", "Button136", "Right", 1, 387, 20)
			Sleep(15000)
		EndIf
	EndIf
WEnd

Func _Exit()
	Exit 0
EndFunc   ;==>_Exit

Func Start()
	$Active = True
EndFunc   ;==>Start

Func Stop()
	$Run = 0
	$Active = False
EndFunc   ;==>Stop
Note: This was created with AutoIt, that means some virus scanners will detect false positives. If you are too afraid to use it then don't use it.
06/11/2009 02:16 1qq23q#2
are you crazy doing this long script?
mine has 4 lines... and works PERFECT!
06/11/2009 04:39 theunknown3#3
Quote:
Originally Posted by 1qq23q View Post
are you crazy doing this long script?
mine has 4 lines... and works PERFECT!
I don't like AHK, this isn't even close to a lot of lines, this is actually a short code compared to many programs. And your script is more than 4 lines. ;D

Code:
; <COMPILER: v1.0.48.3>
msgbox, Sit F1 (toxic fog/Guard as skill)      (C)www.************* by 1qq23q
WinGet,id, ID,[C
loop
{
ControlClick, x110 y760,ahk_id %id%,,right
sleep 1000
ControlClick, x646 y272,ahk_id %id%,,right
}
06/11/2009 06:30 BubblesMuhaha#4
Nice Job. Works just as it should. Don't forget: Vista users, right click, Run as Admin. Took me 10 minutes to remember -_-'
06/11/2009 17:27 cyZ#5
Hai men, nice work =D
how does it know which co window it has to take? (if ur usin multiple accs)
06/11/2009 20:37 theunknown3#6
Quote:
Originally Posted by cyZ View Post
Hai men, nice work =D
how does it know which co window it has to take? (if ur usin multiple accs)
Start the one you want to bot first. After that you can log in as many accounts as you want.
06/11/2009 20:50 cyZ#7
k, is it possible to access two windows in one app? :D
and how can i do it, if its possible =D
06/11/2009 21:45 theunknown3#8
Quote:
Originally Posted by cyZ View Post
k, is it possible to access two windows in one app? :D
and how can i do it, if its possible =D
Are you saying you want to have two ninjas open both doing Toxic Fog?
06/11/2009 21:55 cyZ#9
nope :D one acc who summons goldguard every 30 mins, another who attacks it... to lvl phoenix. doin it with mouse clicks atm :| wud like to have it done in the background =D so i need to know how to acces multiple windows. guess i need
Quote:
ControlGetHandle("[CLASS:Afx:400000:0:10003:0:0]", "", "#327701")
that for another window :o
06/12/2009 00:36 theunknown3#10
Quote:
Originally Posted by cyZ View Post
nope :D one acc who summons goldguard every 30 mins, another who attacks it... to lvl phoenix. doin it with mouse clicks atm :| wud like to have it done in the background =D so i need to know how to acces multiple windows. guess i need

that for another window :o
What you could do is write two scripts. One that summons the guard and one that attacks the guard. You open one Conquer window and start the guard script first. Then open another Conquer window and start the one that attacks the guard. That's how you would have both scripts running at the same time.

Your guard script would look something like this:
Code:
; Guard Script
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Summon Guard", 202, 65, 193, 125)
$Button1 = GUICtrlCreateButton("Start", 16, 8, 169, 25, 0)
$Button2 = GUICtrlCreateButton("Stop", 16, 36, 169, 25, 0)
$Active = False
$Conquer = ControlGetHandle("[CLASS:Afx:400000:0:10003:0:0]", "", "#327701")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlSetOnEvent($Button1, "Start")
GUICtrlSetOnEvent($Button2, "Stop")
GUISetState(@SW_SHOW)

While 1
	If $Active = False Then Sleep(1000)
	If $Active = True Then
		ControlClick($Conquer, "", $Conquer, "Right", 1, 503, 406)
		Sleep(500)
		ControlClick($Conquer, "", "Button136", "Right", 1, 18, 20) ; Right clicks on F1, put Sit their.
		Sleep(1800000) ; Sleeps for 30 minutes.
	EndIf
WEnd

Func Start()
	$Active = True
EndFunc

Func Stop()
	$Active = False
EndFunc

Func _Exit()
	Exit
EndFunc
And the one that attacks the guard:
Code:
; Attack the guard
#NoTrayIcon
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Attack Guard", 202, 65, 193, 125)
$Button1 = GUICtrlCreateButton("Start", 16, 8, 169, 25, 0)
$Button2 = GUICtrlCreateButton("Stop", 16, 36, 169, 25, 0)
$Active = False
$Conquer = ControlGetHandle("[CLASS:Afx:400000:0:10003:0:0]", "", "#327701")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlSetOnEvent($Button1, "Start")
GUICtrlSetOnEvent($Button2, "Stop")
GUISetState(@SW_SHOW)
While 1
	If $Active = False Then Sleep(1000)
	If $Active = True Then
		$Pixel = PixelSearch(0, 0, 1024, 768, 12059395, 0, 1, $Conquer)
		If IsArray($Pixel) = 1 Then
			If WinActive("[TITLE:[Conquer2.0]", "") Then
				Send("{CTRLDOWN}")
				Sleep(500)
				MouseClick("Left", $Pixel[0] + 20, $Pixel[1] + 20, 1, 0)
				Sleep(500)
				Send("{CTRLUP}")
			EndIf
		EndIf
		Sleep(1000)
	EndIf
WEnd
Func Start()
	$Active = True
EndFunc   ;==>Start

Func Stop()
	$Active = False
EndFunc   ;==>Stop

Func _Exit()
	Exit
EndFunc   ;==>_Exit
Click Start then click on the conquer window that you want to attack the guard with.

It finds the health bar and clicks on the guard. This cannot run in the background. Sorry. But the one that summons the guard can.

Oh yeah make sure you are NOT around any monsters or other guards with Health Bars underneath their names.
06/12/2009 11:02 cyZ#11
hmm focused window is gay =/ can't i access two windows in one script? cud use mousclick coords for the attacking, if urs dsnt work. all i need is accessing two windows ;_;
... thx for the work tho xD
06/12/2009 18:34 theunknown3#12
Quote:
Originally Posted by cyZ View Post
hmm focused window is gay =/ can't i access two windows in one script? cud use mousclick coords for the attacking, if urs dsnt work. all i need is accessing two windows ;_;
... thx for the work tho xD
No you can't because you have to hold down CTRL when you attack a guard and you can't send that in the background. And yes you can access two windows with one script but one will still have to be focused while the other is in the background.
06/13/2009 00:35 thekiller99#13
do u guy use cheat engine?
06/13/2009 13:44 cyZ#14
i see, thought so too, some time after i posted mah reply xD how cud i switch windows? lets say im using 3 accs, 2 for the phoenix thing, one to play... how cud i switch from the one on which im playin to the one that has to attack the guard? :D
07/20/2009 07:33 SexLady1#15
GOOD FRIND