[Guide] Relieving the crafting pain

11/03/2012 15:42 168Atomica#1
Crafting is ok. As long as you craft a few items. But what if you would craft 100x of the same item? Is it still OK?

In this tutorial, I will share you the script I am using when crafting items.
You need to understand AutoIt tho. This is quickly written so please improve the script to suit your needs. (This is for quick crafting only. If you are crafting items that would take long to process, then this is not the script for you).

This is useful for those who are starting to craft and want to pump their amity points.

First there are 3 points you need to work with. As in the following figure. SO PLEASE PLEASE MODIFY THE COORDINATES THAT MATCHES YOUR CLIENT.
Use Winfo that comes with AutoIt.
[Only registered and activated users can see links. Click Here To Register...]

What the code does is Loop on the following commands (after pressing Pause)
0. Check if Cabal is active. If not active, it will not perform the work.
1. If active, check the border of the second box. If the check is successful this means that there is nothing being crafted.
2. Call RequestCraft (lol but request craft simply presses the Request button)
3. Next a call on IsCrafting is made.
- what IsCrafting does is check if Complete button is available (by checking its color). It returns true if the button is not yet available or false if it is.
4. Retrieve the craft if IsCrafting is false (the function just clicks the complete button)

Note: It does not stop until you press Pause. I just make sure I have enough materials to work with before running it.
Code:
Global $Toggle
Global $hwnd
Global $CraftCount
HotKeySet("{PAUSE}", "Craft")
HotKeySet("{ESC}", "Terminate")
AutoItSetOption("SendKeyDownDelay", 10)
AutoItSetOption("PixelCoordMode",0)
AutoItSetOption("MouseCoordMode",0)
While 1
    Sleep(100)
WEnd

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

Func Craft()
	$Toggle = Not $Toggle
	$hwnd = WinGetHandle("CABAL","")
	while $Toggle
		ToolTip("Crafting...",0,0)
		if WinActive("CABAL", "") then
			sleep(1000)
			ToolTip("Requesting Craft",0,0)
			;check second slot if crafting
			$coord = PixelSearch(434, 227, 434, 227, 0X2D3134, 0, 1, $hwnd)
			if not @error then
				Call("RequestCraft")
			EndIf
			IF IsCrafting() Then
				ToolTip("Still Crafting",0,0)
			Else
				ToolTip("Retrieving Craft",0,0)
				call("RetrieveCraft")
			EndIf
;			$CraftCount = $CraftCount +1
		EndIf
	WEnd
EndFunc

Func RequestCraft()
	MouseClick("left",347,558)
EndFunc

Func IsCrafting()
	$hwnd = WinGetHandle("CABAL","")
	$coord = PixelSearch(687, 104, 687, 104, 0X34383B, 0, 1, $hwnd)
	if @error then
		Return TRUE
	Else
		Return FALSE
	endif
EndFunc

func RetrieveCraft()
	MouseClick("left",663,104)
EndFunc
Here is the video showing how it works. Notice that the mouse pointer sometimes moves and sometimes does not.
11/03/2012 17:15 Moookie#2
will i work in xp or just win7?
11/03/2012 17:26 168Atomica#3
Quote:
Originally Posted by Moookie View Post
will i work in xp or just win7?
I am using W7 64bit but you could simply test if autoit works by running a sample script while in game.

Code:
WinActivate("CABAL")
Send("{Enter}Hello World{Enter}")
It sends Hello World to the chat window.
If it runs then my script will run on your machine.:mofo:
11/12/2012 09:35 milds7ven#4
WOW man ur d man... already hit thx
11/12/2012 11:43 geosnuk#5
sir 168atomica ive sent you a mail hope you read it to continue our pm's tnx godbless
11/12/2012 13:38 dark23650431#6
After putting the code what is next? XD

video tutorial please :D (noob here)
11/16/2012 03:25 wannabe21#7
Quote:
Originally Posted by 168Atomica View Post
Crafting is ok. As long as you craft a few items. But what if you would craft 100x of the same item? Is it still OK?

In this tutorial, I will share you the script I am using when crafting items.
You need to understand AutoIt tho. This is quickly written so please improve the script to suit your needs. (This is for quick crafting only. If you are crafting items that would take long to process, then this is not the script for you).

This is useful for those who are starting to craft and want to pump their amity points.

First there are 3 points you need to work with. As in the following figure. SO PLEASE PLEASE MODIFY THE COORDINATES THAT MATCHES YOUR CLIENT.
Use Winfo that comes with AutoIt.
[Only registered and activated users can see links. Click Here To Register...]

What the code does is Loop on the following commands (after pressing Pause)
0. Check if Cabal is active. If not active, it will not perform the work.
1. If active, check the border of the second box. If the check is successful this means that there is nothing being crafted.
2. Call RequestCraft (lol but request craft simply presses the Request button)
3. Next a call on IsCrafting is made.
- what IsCrafting does is check if Complete button is available (by checking its color). It returns true if the button is not yet available or false if it is.
4. Retrieve the craft if IsCrafting is false (the function just clicks the complete button)

Note: It does not stop until you press Pause. I just make sure I have enough materials to work with before running it.
Code:
Global $Toggle
Global $hwnd
Global $CraftCount
HotKeySet("{PAUSE}", "Craft")
HotKeySet("{ESC}", "Terminate")
AutoItSetOption("SendKeyDownDelay", 10)
AutoItSetOption("PixelCoordMode",0)
AutoItSetOption("MouseCoordMode",0)
While 1
    Sleep(100)
WEnd

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

Func Craft()
	$Toggle = Not $Toggle
	$hwnd = WinGetHandle("CABAL","")
	while $Toggle
		ToolTip("Crafting...",0,0)
		if WinActive("CABAL", "") then
			sleep(1000)
			ToolTip("Requesting Craft",0,0)
			;check second slot if crafting
			$coord = PixelSearch(434, 227, 434, 227, 0X2D3134, 0, 1, $hwnd)
			if not @error then
				Call("RequestCraft")
			EndIf
			IF IsCrafting() Then
				ToolTip("Still Crafting",0,0)
			Else
				ToolTip("Retrieving Craft",0,0)
				call("RetrieveCraft")
			EndIf
;			$CraftCount = $CraftCount +1
		EndIf
	WEnd
EndFunc

Func RequestCraft()
	MouseClick("left",347,558)
EndFunc

Func IsCrafting()
	$hwnd = WinGetHandle("CABAL","")
	$coord = PixelSearch(687, 104, 687, 104, 0X34383B, 0, 1, $hwnd)
	if @error then
		Return TRUE
	Else
		Return FALSE
	endif
EndFunc

func RetrieveCraft()
	MouseClick("left",663,104)
EndFunc
is this working on official servers? does it work with GG aswell??

not working...
keyboard and mouse actions are blocked by gameguard...
11/16/2012 07:05 WenYen#8
working but you need to modify values to work with you
11/16/2012 21:42 wannabe21#9
Quote:
Originally Posted by WenYen View Post
working but you need to modify values to work with you
I guess it will work if u use a dll call...
11/17/2012 09:40 ericbatara#10
Quote:
Originally Posted by 168Atomica View Post
I am using W7 64bit but you could simply test if autoit works by running a sample script while in game.

Code:
WinActivate("CABAL")
Send("{Enter}Hello World{Enter}")
It sends Hello World to the chat window.
If it runs then my script will run on your machine.:mofo:
why this code is not working on my cabal? does it need bypass to run the autoit??

os win7 64bit
cabalph here
11/17/2012 11:06 geosnuk#11
thats working in ph im from ph to you dont need a bypass for it as long as youre w7 64 bit
11/17/2012 20:13 ericbatara#12
Quote:
Originally Posted by geosnuk View Post
thats working in ph im from ph to you dont need a bypass for it as long as youre w7 64 bit
can you tell me how you manage to work in your pc...

i try this simple code and its not working... can you tell me what is the problem

WinActivate("CABAL")
Send("{Enter}Hello World{Enter}")

thanks...
11/18/2012 02:19 geosnuk#13
press F5 Y_Y
11/18/2012 07:00 ericbatara#14
Quote:
Originally Posted by geosnuk View Post
press F5 Y_Y
i tried it already... i compile it... and used right click to run... but it opens another application... it means it cannot find my cabal.. thanks for the reply...
11/23/2012 10:12 wannabe21#15
Quote:
Originally Posted by WenYen View Post
working but you need to modify values to work with you
oh yeah i forgot about the values... are you playing on official server???

EDIT:
this code is block by gameguard...
Code:
WinActivate("CABAL")
Send("{Enter}Hello World{Enter}")