I am trying to create a "camp when out of resources" script to add to Pickled's crafting script but I am still so new at this I am not sure where I have screwed up. Here is what I have:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; Check Resource 1-3 ;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$colorBehindEvents = --------
Func ResourceCheckingProcedure()
$Resource1x = ---
$Resource1y = ---
$Resource2x = ---
$Resource2y = ---
$Resource3x = ---
$Resource3y = ---
$ResourceCheck1 = PixelGetColor($Resource1x, $Resource1y)
$ResourceCheck2 = PixelGetColor($Resource2x, $Resource2y)
$ResourceCheck3 = PixelGetColor($Resource3x, $Resource3y)
MsgBox(64,"Resource Listings", "Pixel color at location for resource 1" & @CRLF & "Pixel Colour for resource 1: " & $ResourceCheck1 & " x:" & $Resource1x & " y:" & $Resource1y _
& @CRLF & "Pixel color at location for resource 2" & @CRLF & "Pixel Colour for resource 2: " & $ResourceCheck2 & " x:" & $Resource2x & " y:" & $Resource2y _
& @CRLF & "Pixel color at location for resource 3" & @CRLF & "Pixel Colour for resource 3: " & $ResourceCheck3 & " x:" & $Resource3x & " y:" & $Resource3y)
EndFunc
Func CheckIfEventColorsIsDefault()
If ($ResourceCheck1= $colorBehindEvents) OR ($ResourceCheck2= $colorBehindEvents) OR ($ResourceCheck3= $colorBehindEvents) Then
MsgBox(3, "Out of Resources", "You have 60 sec. to press ABORT or you will camp to the Character Selection Screen" [, 60000])
If 3 Then Exit(0) Else
Send("{enter}") ;Press enter on keyboard
Send("/camp") ;Camps to Character Select Screen
Send("{enter}") ;Press enter on keyboard
The "$colorBehindEvents = --------" is actually a global varible in Pickled's script and just shown for refrence.
Here is what I am trying to do.
Read in the color of each resource square prior to starting. When the resource square equals the color of "$colorBehindEvents" then it will bring up a window that will basicly say "Press the button to continue your crafting" and then will basicly shut down the script and allow you to go buy more or whatever OR if nothing is is done in 60 seconds then it will type "/camp" and you are camped out to the character select screen.
Why do I want this option? Because I don't want to look guilty sitting in front of a crafter station for hours not doing anything till I get down to reset the script.
If there is anyone out there that can help me get this to work I would greatly appreciate it.
Loraik