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.
Here is the video showing how it works. Notice that the mouse pointer sometimes moves and sometimes does not.
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
|
|