|
|
|
|
|
|
|
|
|
#include <AutoItConstants.au3>
|
|
|
|
|
#include <File.au3>
|
|
|
|
|
#include <ScreenCapture.au3>
|
|
|
|
|
#include <ButtonConstants.au3>
|
|
|
|
|
#include <GUIConstantsEx.au3>
|
|
|
|
|
#include <GUIConstants.au3>
|
|
|
|
|
#include <WindowsConstants.au3>
|
|
|
|
|
#include <MsgBoxConstants.au3>
|
|
|
|
|
#include <StaticConstants.au3>
|
|
|
|
|
#NoTrayIcon
|
|
|
|
|
|
|
|
|
|
;==================== D<EFBFBD>but du script ====================
|
|
|
|
|
|
|
|
|
|
; On initialise les variables en Global pour quelles puissent garder leur valeur dans toutes les fonctions :
|
|
|
|
|
|
|
|
|
|
Global $PosG[2] ; On cr<EFBFBD><EFBFBD> un tableau <EFBFBD> 2 dimensions pour stocker les coordonn<EFBFBD>es du temtem d<EFBFBD>tect<EFBFBD>e plus bas.
|
|
|
|
|
|
|
|
|
|
Global $PosC[2]
|
|
|
|
|
|
|
|
|
|
Global $PosD[2]
|
|
|
|
|
|
|
|
|
|
Global $CoordComb[2]
|
|
|
|
|
|
|
|
|
|
Global $VerifHG[2]
|
|
|
|
|
Global $VerifHC[2]
|
|
|
|
|
Global $VerifHD[2]
|
|
|
|
|
|
|
|
|
|
Global $PosDVerif
|
|
|
|
|
|
|
|
|
|
Global $Minimap
|
|
|
|
|
|
|
|
|
|
Global $Detect
|
|
|
|
|
|
|
|
|
|
Global $CombatOn
|
|
|
|
|
|
|
|
|
|
Global $Healthbar
|
|
|
|
|
|
|
|
|
|
Global $VerifCatch
|
|
|
|
|
|
|
|
|
|
Global $RandomRun
|
|
|
|
|
|
|
|
|
|
Global $RandomShort
|
|
|
|
|
|
|
|
|
|
Global $tourner = 0
|
|
|
|
|
|
|
|
|
|
Global $G
|
|
|
|
|
Global $D
|
|
|
|
|
Global $C
|
|
|
|
|
|
|
|
|
|
Global $Log
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Email
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
; ===============================================================================================================================
|
|
|
|
|
; Variables for the _INetSmtpMailCom
|
|
|
|
|
; ===============================================================================================================================
|
|
|
|
|
Global Enum _
|
|
|
|
|
$g__INetSmtpMailCom_ERROR_FileNotFound = 1, _
|
|
|
|
|
$g__INetSmtpMailCom_ERROR_Send, _
|
|
|
|
|
$g__INetSmtpMailCom_ERROR_ObjectCreation, _
|
|
|
|
|
$g__INetSmtpMailCom_ERROR_COUNTER
|
|
|
|
|
|
|
|
|
|
Global Const $g__cdoSendUsingPickup = 1 ; Send message using the local SMTP service pickup directory.
|
|
|
|
|
Global Const $g__cdoSendUsingPort = 2 ; Send the message using the network (SMTP over the network). Must use this to use Delivery Notification
|
|
|
|
|
Global Const $g__cdoAnonymous = 0 ; Do not authenticate
|
|
|
|
|
Global Const $g__cdoBasic = 1 ; basic (clear-text) authentication
|
|
|
|
|
Global Const $g__cdoNTLM = 2 ; NTLM
|
|
|
|
|
Global $gs_thoussep = "."
|
|
|
|
|
Global $gs_decsep = ","
|
|
|
|
|
Global $sFileOpenDialog = ""
|
|
|
|
|
|
|
|
|
|
; Delivery Status Notifications
|
|
|
|
|
Global Const $g__cdoDSNDefault = 0 ; None
|
|
|
|
|
Global Const $g__cdoDSNNever = 1 ; None
|
|
|
|
|
Global Const $g__cdoDSNFailure = 2 ; Failure
|
|
|
|
|
Global Const $g__cdoDSNSuccess = 4 ; Success
|
|
|
|
|
Global Const $g__cdoDSNDelay = 8 ; Delay
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Func _SendmailG()
|
|
|
|
|
Local $sSmtpServer = "smtp.gmail.com" ; address for the smtp-server to use - REQUIRED
|
|
|
|
|
Local $sFromName = "user" ; name from who the email was sent
|
|
|
|
|
Local $sFromAddress = "janvoiebertrand@gmail.com" ; address from where the mail should come
|
|
|
|
|
Local $sToAddress = "janvoiebertrand@gmail.com" ; destination address of the email - REQUIRED
|
|
|
|
|
Local $sSubject = "LUMA!" ; subject from the email - can be anything you want it to be
|
|
|
|
|
Local $sBody = "TU AS ATTRAPER UN LUMA, ALLER HOP, VAS TCHECKER LES SCREENSHOTS!!!" ; the messagebody from the mail - can be left blank but then you get a blank mail
|
|
|
|
|
Local $sAttachFiles = @ScriptDir & "\lumaG.jpg" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed
|
|
|
|
|
Local $sCcAddress = "" ; address for cc - leave blank if not needed
|
|
|
|
|
Local $sBccAddress = "" ; address for bcc - leave blank if not needed
|
|
|
|
|
Local $sImportance = "High" ; Send message priority: "High", "Normal", "Low"
|
|
|
|
|
Local $sUsername = "janvoiebertrand@gmail.com" ; username for the account used from where the mail gets sent - REQUIRED
|
|
|
|
|
Local $sPassword = "ag2r2017" ; password for the account used from where the mail gets sent - REQUIRED
|
|
|
|
|
Local $iIPPort = 465 ; GMAIL port used for sending the mail
|
|
|
|
|
Local $bSSL = True ; GMAIL enables/disables secure socket layer sending - set to True if using httpS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Local $bIsHTMLBody = False
|
|
|
|
|
Local $iDSNOptions = $g__cdoDSNDefault
|
|
|
|
|
|
|
|
|
|
Local $rc = _INetSmtpMailCom($sSmtpServer, $sFromName, $sFromAddress, $sToAddress, $sSubject, $sBody, $sAttachFiles, $sCcAddress, $sBccAddress, $sImportance, $sUsername, $sPassword, $iIPPort, $bSSL, $bIsHTMLBody, $iDSNOptions)
|
|
|
|
|
If @error Then
|
|
|
|
|
MsgBox(0, "_INetSmtpMailCom(): Error sending message", _
|
|
|
|
|
"Error code: " & @error & @CRLF & @CRLF & _
|
|
|
|
|
"Error Hex Number: " & _INetSmtpMailCom_ErrHexNumber() & @CRLF & @CRLF & _
|
|
|
|
|
"Description: " & _INetSmtpMailCom_ErrDescription() & @CRLF & @CRLF & _
|
|
|
|
|
"Description (rc): " & $rc & @CRLF & @CRLF & _
|
|
|
|
|
"ScriptLine: " & _INetSmtpMailCom_ErrScriptLine() _
|
|
|
|
|
)
|
|
|
|
|
ConsoleWrite("### COM Error ! Number: " & _INetSmtpMailCom_ErrHexNumber() & " ScriptLine: " & _INetSmtpMailCom_ErrScriptLine() & " Description:" & _INetSmtpMailCom_ErrDescription() & @LF)
|
|
|
|
|
;Else
|
|
|
|
|
;Dim $iMsgBoxAnswer
|
|
|
|
|
;$iMsgBoxAnswer = MsgBox(262208, "SUCCESS", ":-)", 5)
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
EndFunc ;==>_Enviarmail
|
|
|
|
|
|
|
|
|
|
Func _SendmailC()
|
|
|
|
|
Local $sSmtpServer = "smtp.gmail.com" ; address for the smtp-server to use - REQUIRED
|
|
|
|
|
Local $sFromName = "user" ; name from who the email was sent
|
|
|
|
|
Local $sFromAddress = "janvoiebertrand@gmail.com" ; address from where the mail should come
|
|
|
|
|
Local $sToAddress = "janvoiebertrand@gmail.com" ; destination address of the email - REQUIRED
|
|
|
|
|
Local $sSubject = "LUMA!" ; subject from the email - can be anything you want it to be
|
|
|
|
|
Local $sBody = "TU AS ATTRAPER UN LUMA, ALLER HOP, VAS TCHECKER LES SCREENSHOTS!!!" ; the messagebody from the mail - can be left blank but then you get a blank mail
|
|
|
|
|
Local $sAttachFiles = @ScriptDir & "\lumaC.jpg" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed
|
|
|
|
|
Local $sCcAddress = "" ; address for cc - leave blank if not needed
|
|
|
|
|
Local $sBccAddress = "" ; address for bcc - leave blank if not needed
|
|
|
|
|
Local $sImportance = "High" ; Send message priority: "High", "Normal", "Low"
|
|
|
|
|
Local $sUsername = "janvoiebertrand@gmail.com" ; username for the account used from where the mail gets sent - REQUIRED
|
|
|
|
|
Local $sPassword = "ag2r2017" ; password for the account used from where the mail gets sent - REQUIRED
|
|
|
|
|
Local $iIPPort = 465 ; GMAIL port used for sending the mail
|
|
|
|
|
Local $bSSL = True ; GMAIL enables/disables secure socket layer sending - set to True if using httpS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Local $bIsHTMLBody = False
|
|
|
|
|
Local $iDSNOptions = $g__cdoDSNDefault
|
|
|
|
|
|
|
|
|
|
Local $rc = _INetSmtpMailCom($sSmtpServer, $sFromName, $sFromAddress, $sToAddress, $sSubject, $sBody, $sAttachFiles, $sCcAddress, $sBccAddress, $sImportance, $sUsername, $sPassword, $iIPPort, $bSSL, $bIsHTMLBody, $iDSNOptions)
|
|
|
|
|
If @error Then
|
|
|
|
|
MsgBox(0, "_INetSmtpMailCom(): Error sending message", _
|
|
|
|
|
"Error code: " & @error & @CRLF & @CRLF & _
|
|
|
|
|
"Error Hex Number: " & _INetSmtpMailCom_ErrHexNumber() & @CRLF & @CRLF & _
|
|
|
|
|
"Description: " & _INetSmtpMailCom_ErrDescription() & @CRLF & @CRLF & _
|
|
|
|
|
"Description (rc): " & $rc & @CRLF & @CRLF & _
|
|
|
|
|
"ScriptLine: " & _INetSmtpMailCom_ErrScriptLine() _
|
|
|
|
|
)
|
|
|
|
|
ConsoleWrite("### COM Error ! Number: " & _INetSmtpMailCom_ErrHexNumber() & " ScriptLine: " & _INetSmtpMailCom_ErrScriptLine() & " Description:" & _INetSmtpMailCom_ErrDescription() & @LF)
|
|
|
|
|
;Else
|
|
|
|
|
;Dim $iMsgBoxAnswer
|
|
|
|
|
;$iMsgBoxAnswer = MsgBox(262208, "SUCCESS", ":-)", 5)
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
EndFunc ;==>_Enviarmail
|
|
|
|
|
|
|
|
|
|
Func _SendmailD()
|
|
|
|
|
Local $sSmtpServer = "smtp.gmail.com" ; address for the smtp-server to use - REQUIRED
|
|
|
|
|
Local $sFromName = "user" ; name from who the email was sent
|
|
|
|
|
Local $sFromAddress = "janvoiebertrand@gmail.com" ; address from where the mail should come
|
|
|
|
|
Local $sToAddress = "janvoiebertrand@gmail.com" ; destination address of the email - REQUIRED
|
|
|
|
|
Local $sSubject = "LUMA!" ; subject from the email - can be anything you want it to be
|
|
|
|
|
Local $sBody = "TU AS ATTRAPER UN LUMA, ALLER HOP, VAS TCHECKER LES SCREENSHOTS!!!" ; the messagebody from the mail - can be left blank but then you get a blank mail
|
|
|
|
|
Local $sAttachFiles = @ScriptDir & "\lumaD.jpg" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed
|
|
|
|
|
Local $sCcAddress = "" ; address for cc - leave blank if not needed
|
|
|
|
|
Local $sBccAddress = "" ; address for bcc - leave blank if not needed
|
|
|
|
|
Local $sImportance = "High" ; Send message priority: "High", "Normal", "Low"
|
|
|
|
|
Local $sUsername = "janvoiebertrand@gmail.com" ; username for the account used from where the mail gets sent - REQUIRED
|
|
|
|
|
Local $sPassword = "ag2r2017" ; password for the account used from where the mail gets sent - REQUIRED
|
|
|
|
|
Local $iIPPort = 465 ; GMAIL port used for sending the mail
|
|
|
|
|
Local $bSSL = True ; GMAIL enables/disables secure socket layer sending - set to True if using httpS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Local $bIsHTMLBody = False
|
|
|
|
|
Local $iDSNOptions = $g__cdoDSNDefault
|
|
|
|
|
|
|
|
|
|
Local $rc = _INetSmtpMailCom($sSmtpServer, $sFromName, $sFromAddress, $sToAddress, $sSubject, $sBody, $sAttachFiles, $sCcAddress, $sBccAddress, $sImportance, $sUsername, $sPassword, $iIPPort, $bSSL, $bIsHTMLBody, $iDSNOptions)
|
|
|
|
|
If @error Then
|
|
|
|
|
MsgBox(0, "_INetSmtpMailCom(): Error sending message", _
|
|
|
|
|
"Error code: " & @error & @CRLF & @CRLF & _
|
|
|
|
|
"Error Hex Number: " & _INetSmtpMailCom_ErrHexNumber() & @CRLF & @CRLF & _
|
|
|
|
|
"Description: " & _INetSmtpMailCom_ErrDescription() & @CRLF & @CRLF & _
|
|
|
|
|
"Description (rc): " & $rc & @CRLF & @CRLF & _
|
|
|
|
|
"ScriptLine: " & _INetSmtpMailCom_ErrScriptLine() _
|
|
|
|
|
)
|
|
|
|
|
ConsoleWrite("### COM Error ! Number: " & _INetSmtpMailCom_ErrHexNumber() & " ScriptLine: " & _INetSmtpMailCom_ErrScriptLine() & " Description:" & _INetSmtpMailCom_ErrDescription() & @LF)
|
|
|
|
|
;Else
|
|
|
|
|
;Dim $iMsgBoxAnswer
|
|
|
|
|
;$iMsgBoxAnswer = MsgBox(262208, "SUCCESS", ":-)", 5)
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
EndFunc ;==>_Enviarmail
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region UDF Functions
|
|
|
|
|
; The UDF
|
|
|
|
|
; #FUNCTION# ====================================================================================================================
|
|
|
|
|
; Name ..........: _INetSmtpMailCom
|
|
|
|
|
; Description ...:
|
|
|
|
|
; Syntax ........: _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress[, $s_Subject = ""[, $as_Body = ""[,
|
|
|
|
|
; $s_AttachFiles = ""[, $s_CcAddress = ""[, $s_BccAddress = ""[, $s_Importance = "Normal"[, $s_Username = ""[,
|
|
|
|
|
; $s_Password = ""[, $IPPort = 25[, $bSSL = False[, $bIsHTMLBody = False[, $iDSNOptions = $g__cdoDSNDefault]]]]]]]]]]]])
|
|
|
|
|
; Parameters ....: $s_SmtpServer - A string value.
|
|
|
|
|
; $s_FromName - A string value.
|
|
|
|
|
; $s_FromAddress - A string value.
|
|
|
|
|
; $s_ToAddress - A string value.
|
|
|
|
|
; $s_Subject - [optional] A string value. Default is "".
|
|
|
|
|
; $s_Body - [optional] A string value. Default is "".
|
|
|
|
|
; $s_AttachFiles - [optional] A string value. Default is "".
|
|
|
|
|
; $s_CcAddress - [optional] A string value. Default is "".
|
|
|
|
|
; $s_BccAddress - [optional] A string value. Default is "".
|
|
|
|
|
; $s_Importance - [optional] A string value. Default is "Normal".
|
|
|
|
|
; $s_Username - [optional] A string value. Default is "".
|
|
|
|
|
; $s_Password - [optional] A string value. Default is "".
|
|
|
|
|
; $IPPort - [optional] An integer value. Default is 25.
|
|
|
|
|
; $bSSL - [optional] A binary value. Default is False.
|
|
|
|
|
; $bIsHTMLBody - [optional] A binary value. Default is False.
|
|
|
|
|
; $iDSNOptions - [optional] An integer value. Default is $g__cdoDSNDefault.
|
|
|
|
|
; Return values .: None
|
|
|
|
|
; Author ........: Jos
|
|
|
|
|
; Modified ......: mLipok
|
|
|
|
|
; Remarks .......:
|
|
|
|
|
; Related .......: http://www.autoitscript.com/forum/topic/23860-smtp-mailer-that-supports-html-and-attachments/
|
|
|
|
|
; Link ..........: http://www.autoitscript.com/forum/topic/167292-smtp-mailer-udf/
|
|
|
|
|
; Example .......: Yes
|
|
|
|
|
; ===============================================================================================================================
|
|
|
|
|
Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $s_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance = "Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $bSSL = False, $bIsHTMLBody = False, $iDSNOptions = $g__cdoDSNDefault)
|
|
|
|
|
; init Error Handler
|
|
|
|
|
_INetSmtpMailCom_ErrObjInit()
|
|
|
|
|
|
|
|
|
|
Local $objEmail = ObjCreate("CDO.Message")
|
|
|
|
|
If Not IsObj($objEmail) Then Return SetError($g__INetSmtpMailCom_ERROR_ObjectCreation, Dec(_INetSmtpMailCom_ErrHexNumber()), _INetSmtpMailCom_ErrDescription())
|
|
|
|
|
|
|
|
|
|
; Clear previous Err information
|
|
|
|
|
_INetSmtpMailCom_ErrHexNumber(0)
|
|
|
|
|
_INetSmtpMailCom_ErrDescription('')
|
|
|
|
|
_INetSmtpMailCom_ErrScriptLine('')
|
|
|
|
|
|
|
|
|
|
$objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>'
|
|
|
|
|
$objEmail.To = $s_ToAddress
|
|
|
|
|
|
|
|
|
|
If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress
|
|
|
|
|
If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress
|
|
|
|
|
$objEmail.Subject = $s_Subject
|
|
|
|
|
|
|
|
|
|
; Select whether or not the content is sent as plain text or HTM
|
|
|
|
|
If $bIsHTMLBody Then
|
|
|
|
|
$objEmail.Textbody = $s_Body & @CRLF
|
|
|
|
|
Else
|
|
|
|
|
$objEmail.HTMLBody = $s_Body
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
; Add Attachments
|
|
|
|
|
If $s_AttachFiles <> "" Then
|
|
|
|
|
Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
|
|
|
|
|
For $x = 1 To $S_Files2Attach[0]
|
|
|
|
|
$S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x])
|
|
|
|
|
If FileExists($S_Files2Attach[$x]) Then
|
|
|
|
|
ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF)
|
|
|
|
|
$objEmail.AddAttachment($S_Files2Attach[$x])
|
|
|
|
|
Else
|
|
|
|
|
ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF)
|
|
|
|
|
Return SetError($g__INetSmtpMailCom_ERROR_FileNotFound, 0, 0)
|
|
|
|
|
EndIf
|
|
|
|
|
Next
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
; Set Email Configuration
|
|
|
|
|
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = $g__cdoSendUsingPort
|
|
|
|
|
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
|
|
|
|
|
If Number($IPPort) = 0 Then $IPPort = 25
|
|
|
|
|
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
|
|
|
|
|
;Authenticated SMTP
|
|
|
|
|
If $s_Username <> "" Then
|
|
|
|
|
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = $g__cdoBasic
|
|
|
|
|
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
|
|
|
|
|
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
|
|
|
|
|
EndIf
|
|
|
|
|
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = $bSSL
|
|
|
|
|
|
|
|
|
|
;Update Configuration Settings
|
|
|
|
|
$objEmail.Configuration.Fields.Update
|
|
|
|
|
|
|
|
|
|
; Set Email Importance
|
|
|
|
|
Switch $s_Importance
|
|
|
|
|
Case "High"
|
|
|
|
|
$objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "High"
|
|
|
|
|
Case "Normal"
|
|
|
|
|
$objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Normal"
|
|
|
|
|
Case "Low"
|
|
|
|
|
$objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Low"
|
|
|
|
|
EndSwitch
|
|
|
|
|
|
|
|
|
|
; Set DSN options
|
|
|
|
|
If $iDSNOptions <> $g__cdoDSNDefault And $iDSNOptions <> $g__cdoDSNNever Then
|
|
|
|
|
$objEmail.DSNOptions = $iDSNOptions
|
|
|
|
|
$objEmail.Fields.Item("urn:schemas:mailheader:disposition-notification-to") = $s_FromAddress
|
|
|
|
|
;~ $objEmail.Fields.Item("urn:schemas:mailheader:return-receipt-to") = $s_FromAddress
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
; Update Importance and Options fields
|
|
|
|
|
$objEmail.Fields.Update
|
|
|
|
|
|
|
|
|
|
; Sent the Message
|
|
|
|
|
$objEmail.Send
|
|
|
|
|
|
|
|
|
|
If @error Then
|
|
|
|
|
_INetSmtpMailCom_ErrObjCleanUp()
|
|
|
|
|
Return SetError($g__INetSmtpMailCom_ERROR_Send, Dec(_INetSmtpMailCom_ErrHexNumber()), _INetSmtpMailCom_ErrDescription())
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
; CleanUp
|
|
|
|
|
$objEmail = ""
|
|
|
|
|
_INetSmtpMailCom_ErrObjCleanUp()
|
|
|
|
|
|
|
|
|
|
EndFunc ;==>_INetSmtpMailCom
|
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
; Com Error Handler
|
|
|
|
|
Func _INetSmtpMailCom_ErrObjInit($bParam = Default)
|
|
|
|
|
Local Static $oINetSmtpMailCom_Error = Default
|
|
|
|
|
If $bParam == 'CleanUp' And $oINetSmtpMailCom_Error <> Default Then
|
|
|
|
|
$oINetSmtpMailCom_Error = ''
|
|
|
|
|
Return $oINetSmtpMailCom_Error
|
|
|
|
|
EndIf
|
|
|
|
|
If $oINetSmtpMailCom_Error = Default Then
|
|
|
|
|
$oINetSmtpMailCom_Error = ObjEvent("AutoIt.Error", "_INetSmtpMailCom_ErrFunc")
|
|
|
|
|
EndIf
|
|
|
|
|
Return $oINetSmtpMailCom_Error
|
|
|
|
|
EndFunc ;==>_INetSmtpMailCom_ErrObjInit
|
|
|
|
|
|
|
|
|
|
Func _INetSmtpMailCom_ErrObjCleanUp()
|
|
|
|
|
_INetSmtpMailCom_ErrObjInit('CleanUp')
|
|
|
|
|
EndFunc ;==>_INetSmtpMailCom_ErrObjCleanUp
|
|
|
|
|
|
|
|
|
|
Func _INetSmtpMailCom_ErrHexNumber($vData = Default)
|
|
|
|
|
Local Static $vReturn = 0
|
|
|
|
|
If $vData <> Default Then $vReturn = $vData
|
|
|
|
|
Return $vReturn
|
|
|
|
|
EndFunc ;==>_INetSmtpMailCom_ErrHexNumber
|
|
|
|
|
|
|
|
|
|
Func _INetSmtpMailCom_ErrDescription($sData = Default)
|
|
|
|
|
Local Static $sReturn = ''
|
|
|
|
|
If $sData <> Default Then $sReturn = $sData
|
|
|
|
|
Return $sReturn
|
|
|
|
|
EndFunc ;==>_INetSmtpMailCom_ErrDescription
|
|
|
|
|
|
|
|
|
|
Func _INetSmtpMailCom_ErrScriptLine($iData = Default)
|
|
|
|
|
Local Static $iReturn = ''
|
|
|
|
|
If $iData <> Default Then $iReturn = $iData
|
|
|
|
|
Return $iReturn
|
|
|
|
|
EndFunc ;==>_INetSmtpMailCom_ErrScriptLine
|
|
|
|
|
|
|
|
|
|
Func _INetSmtpMailCom_ErrFunc()
|
|
|
|
|
_INetSmtpMailCom_ErrObjInit()
|
|
|
|
|
_INetSmtpMailCom_ErrHexNumber(Hex(_INetSmtpMailCom_ErrObjInit().number, 8))
|
|
|
|
|
_INetSmtpMailCom_ErrDescription(StringStripWS(_INetSmtpMailCom_ErrObjInit().description, 3))
|
|
|
|
|
_INetSmtpMailCom_ErrScriptLine(_INetSmtpMailCom_ErrObjInit().ScriptLine)
|
|
|
|
|
SetError(1) ; something to check for when this function returns
|
|
|
|
|
Return
|
|
|
|
|
EndFunc ;==>_INetSmtpMailCom_ErrFunc
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Raccourcis claviers
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
HotKeySet("{END}", "Bye") ; On assigne la fonction Bye (Pour quitter) <EFBFBD> la touche 'Echap'
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; INI Couleur
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
Global $TempC1 = FileOpen(@ScriptDir & "\data\color\couleur1.ini", 0)
|
|
|
|
|
Global $TempC2 = FileOpen(@ScriptDir & "\data\color\couleur2.ini", 0)
|
|
|
|
|
Global $TempC3 = FileOpen(@ScriptDir & "\data\color\couleur3.ini", 0)
|
|
|
|
|
Global $Couleur1 = FileRead ($TempC1)
|
|
|
|
|
Global $Couleur2 = FileRead ($TempC2)
|
|
|
|
|
Global $Couleur3 = FileRead ($TempC3)
|
|
|
|
|
FileClose($TempC1)
|
|
|
|
|
FileClose($TempC2)
|
|
|
|
|
FileClose($TempC3)
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; GUI
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Opt("GUIOnEventMode", 1) ; Change to OnEvent mode
|
|
|
|
|
|
|
|
|
|
$started = 0
|
|
|
|
|
$mainwindow = GuiCreate("Temtem", 160, 510, 1, 1, BitOr($WS_BORDER, $WS_POPUP), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$CompteurText = GUICtrlCreateLabel("Compteur:", 45, 20, 100, 30)
|
|
|
|
|
GUICtrlSetFont(-1, 10, 800, 0, "Century Gothic")
|
|
|
|
|
$CompteurLabel = GUICtrlCreateLabel("", 50, 40, 100, 30)
|
|
|
|
|
GUICtrlSetFont(-1, 18, 800, 0, "Century Gothic")
|
|
|
|
|
GUICtrlSetColor(-1, 0xFF0000)
|
|
|
|
|
|
|
|
|
|
GUICtrlCreateGroup(" Menu ", 10, 70, 140, 145)
|
|
|
|
|
|
|
|
|
|
$startbutton = GUICtrlCreateButton("Start", 30, 90, 100, 30)
|
|
|
|
|
$stopbutton = GuiCtrlCreateButton("Stop", 30, 130, 100, 30)
|
|
|
|
|
$btnExit = GUICtrlCreateButton("Exit", 30, 170, 100, 30)
|
|
|
|
|
|
|
|
|
|
GUICtrlCreateGroup(" Color codes ", 10, 220, 140, 280)
|
|
|
|
|
|
|
|
|
|
Global $idCheckbox1 = GUICtrlCreateCheckbox("Color 1", 30, 235, 50, 20)
|
|
|
|
|
GUICtrlSetState(-1, $GUI_CHECKED)
|
|
|
|
|
$Input1 = GUICtrlCreateInput($Couleur1, 30, 255, 100, 30)
|
|
|
|
|
GUICtrlSetBkColor(-1, $Couleur1)
|
|
|
|
|
$Changer1 = GUICtrlCreateButton("Change", 30, 285, 100, 30)
|
|
|
|
|
|
|
|
|
|
Global $idCheckbox2 = GUICtrlCreateCheckbox("Color 2", 30, 320, 50, 20)
|
|
|
|
|
GUICtrlSetState(-1, $GUI_CHECKED)
|
|
|
|
|
$Input2 = GUICtrlCreateInput($Couleur2, 30, 340, 100, 30)
|
|
|
|
|
GUICtrlSetBkColor(-1, $Couleur2)
|
|
|
|
|
$Changer2 = GUICtrlCreateButton("Change", 30, 370, 100, 30)
|
|
|
|
|
|
|
|
|
|
Global $idCheckbox3 = GUICtrlCreateCheckbox("Color 3", 30, 405, 50, 20)
|
|
|
|
|
GUICtrlSetState(-1, $GUI_CHECKED)
|
|
|
|
|
$Input3 = GUICtrlCreateInput($Couleur3, 30, 425, 100, 30)
|
|
|
|
|
GUICtrlSetBkColor(-1, $Couleur3)
|
|
|
|
|
$Changer3 = GUICtrlCreateButton("Change", 30, 455, 100, 30)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GUISetOnEvent($GUI_EVENT_CLOSE, "_Terminate")
|
|
|
|
|
GUICtrlSetOnEvent($Changer1, "InputBox1")
|
|
|
|
|
GUICtrlSetOnEvent($Changer2, "InputBox2")
|
|
|
|
|
GUICtrlSetOnEvent($Changer3, "InputBox3")
|
|
|
|
|
GUICtrlSetOnEvent($startbutton, "StartButton")
|
|
|
|
|
GUICtrlSetOnEvent($stopbutton, "StopButton")
|
|
|
|
|
GUICtrlSetOnEvent($btnExit, "_Terminate")
|
|
|
|
|
|
|
|
|
|
TraySetIcon(@ScriptDir & "\temtem.ico")
|
|
|
|
|
GUISetIcon (@ScriptDir & "\temtem.ico")
|
|
|
|
|
Global $sAnswer
|
|
|
|
|
|
|
|
|
|
GUISetState(@SW_SHOW)
|
|
|
|
|
|
|
|
|
|
Func _IsChecked($idControlID)
|
|
|
|
|
Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED
|
|
|
|
|
EndFunc ;==>_IsChecked
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Function change Couleur
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Func pixelcolor()
|
|
|
|
|
;Ex<EFBFBD>cute le Bloc-notes avec la fen<EFBFBD>tre agrandie.
|
|
|
|
|
Local $iPID = Run("pixelcolor.exe", "")
|
|
|
|
|
EndFunc ;==>Example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Func InputBox1 ()
|
|
|
|
|
GUISetIcon (@ScriptDir & "\temtem.ico")
|
|
|
|
|
pixelcolor()
|
|
|
|
|
$hGUI = GUICreate("", 0, 0, 0, 0, Default, $WS_EX_TOPMOST)
|
|
|
|
|
GUISetState(@SW_HIDE, $hGUI)
|
|
|
|
|
Local $CouleurTemp1 = InputBox("Couleur", "Quelle couleur veux-tu detecter?", $Couleur1, "",170, 140, 1, 444, "", $hGUI)
|
|
|
|
|
$Couleur1 = $CouleurTemp1
|
|
|
|
|
$SaveCompteur1 = FileOpen(@ScriptDir & "\data\color\couleur1.ini", 2)
|
|
|
|
|
FileWrite ( $SaveCompteur1 , $Couleur1 )
|
|
|
|
|
FileClose($SaveCompteur1)
|
|
|
|
|
GuiCtrlSetData($Input1, $Couleur1)
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func InputBox2 ()
|
|
|
|
|
GUISetIcon (@ScriptDir & "\temtem.ico")
|
|
|
|
|
pixelcolor()
|
|
|
|
|
$hGUI = GUICreate("", 0, 0, 0, 0, Default, $WS_EX_TOPMOST)
|
|
|
|
|
local $CouleurTemp2 = InputBox("Couleur", "Quelle couleur veux-tu detecter?", $Couleur2, "",160, 140, 4, 444, "", $hGUI)
|
|
|
|
|
$Couleur2 = $CouleurTemp2
|
|
|
|
|
$SaveCompteur2 = FileOpen(@ScriptDir & "\data\color\couleur2.ini", 2)
|
|
|
|
|
FileWrite ( $SaveCompteur2 , $Couleur2 )
|
|
|
|
|
FileClose($SaveCompteur2)
|
|
|
|
|
GuiCtrlSetData($Input2, $Couleur2)
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func InputBox3 ()
|
|
|
|
|
GUISetIcon (@ScriptDir & "\temtem.ico")
|
|
|
|
|
pixelcolor()
|
|
|
|
|
$hGUI = GUICreate("", 0, 0, 0, 0, Default, $WS_EX_TOPMOST)
|
|
|
|
|
local $CouleurTemp3 = InputBox("Couleur", "Quelle couleur veux-tu detecter?", $Couleur3, "",160, 140, 4, 444, "", $hGUI)
|
|
|
|
|
$Couleur3 = $CouleurTemp3
|
|
|
|
|
$SaveCompteur3 = FileOpen(@ScriptDir & "data\color\couleur3.ini", 2)
|
|
|
|
|
FileWrite ( $SaveCompteur3 , $Couleur3 )
|
|
|
|
|
FileClose($SaveCompteur3)
|
|
|
|
|
GuiCtrlSetData($Input3, $Couleur3)
|
|
|
|
|
EndFunc
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Compteur
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Global $Compteur
|
|
|
|
|
|
|
|
|
|
$SaveCompteur = FileOpen(@ScriptDir & "\data\count\compteurtemtem.ini", 0)
|
|
|
|
|
$Compteur = FileRead ($SaveCompteur)
|
|
|
|
|
FileClose($SaveCompteur)
|
|
|
|
|
GuiCtrlSetData($CompteurLabel, $Compteur)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Main
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
While 1
|
|
|
|
|
Sleep(10)
|
|
|
|
|
If $started Then
|
|
|
|
|
|
|
|
|
|
GuiCtrlSetData($CompteurLabel, $Compteur)
|
|
|
|
|
Local $Log = FileOpen(@ScriptDir & "\Temtemlog.log", 1)
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Tourner()
|
|
|
|
|
Combat()
|
|
|
|
|
VerifCatch()
|
|
|
|
|
VerifXp ()
|
|
|
|
|
|
|
|
|
|
;ConsoleWrite (' RENCONTRE = ' & $Compteur &' ')
|
|
|
|
|
FileClose($Log)
|
|
|
|
|
EndIf
|
|
|
|
|
Wend
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Menu
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func _Terminate()
|
|
|
|
|
$SaveCompteur = FileOpen(@ScriptDir & "\data\count\compteurtemtem.ini", 2)
|
|
|
|
|
FileWrite ( $SaveCompteur , $compteur )
|
|
|
|
|
FileClose($SaveCompteur)
|
|
|
|
|
_FileWriteLog($Log,' RENCONTRE = ' & $Compteur &' ')
|
|
|
|
|
FileClose($Log)
|
|
|
|
|
Exit
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func StartButton()
|
|
|
|
|
;MsgBox(0, "Temtem Luma Hunting", "Le script est lanc<EFBFBD>")
|
|
|
|
|
$started = 1
|
|
|
|
|
$tourner = 1
|
|
|
|
|
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func StopButton()
|
|
|
|
|
;MsgBox(0, "Temtem Luma Hunting", "Le script est arret<EFBFBD>")
|
|
|
|
|
$started = 0
|
|
|
|
|
$tourner = 0
|
|
|
|
|
$SaveCompteur = FileOpen(@ScriptDir & "\data\count\compteurtemtem.ini", 2)
|
|
|
|
|
FileWrite ( $SaveCompteur , $compteur )
|
|
|
|
|
FileClose($SaveCompteur)
|
|
|
|
|
_FileWriteLog($Log,' RENCONTRE = ' & $Compteur &' ')
|
|
|
|
|
FileClose($Log)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Run
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Verif
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func Verif ()
|
|
|
|
|
Combat ()
|
|
|
|
|
EndFunc ;==> Verif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Tourner en rond
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func Tourner() ;==> Tourner
|
|
|
|
|
|
|
|
|
|
$Minimap = PixelGetColor(1670, 92) ; R<EFBFBD>cup<EFBFBD>re la couleur qui se trouve en 593 (Axe de la hauteur), 610 (Axe de la largeur), si un combat est lanc<EFBFBD>, la couleur est Orange.
|
|
|
|
|
$Minimap = Hex($Minimap, 6)
|
|
|
|
|
|
|
|
|
|
If $Minimap = '3CE8EA' AND $tourner = 1 Then
|
|
|
|
|
;$Minimap = PixelSearch(0, 0, 1341, 60, 0xFF8C42, 1) ; Minimap?
|
|
|
|
|
;If Not @error Then ; Si pas d'erreur alors:
|
|
|
|
|
Send("{UP down}") ; Enfonce la touche haut
|
|
|
|
|
$RandomRun = Random(500, 2000, 1)
|
|
|
|
|
sleep($RandomRun);On attend 0.5secs.
|
|
|
|
|
Send("{UP up}") ; Relache la touche haut
|
|
|
|
|
;Send("{RIGHT down}") ; Enfonce la touche droite
|
|
|
|
|
;sleep(500);On attend 0.5secs.
|
|
|
|
|
;Send("{RIGHT up}") ; Relache la touche droite
|
|
|
|
|
Send("{DOWN down}") ; Enfonce la touche bas
|
|
|
|
|
$RandomRun = Random(500, 2000, 1)
|
|
|
|
|
sleep($RandomRun) ;On attend 0.5secs.
|
|
|
|
|
Send("{DOWN up}") ; Relache la touche bas
|
|
|
|
|
;Send("{LEFT down}") ; Enfonce la touche gauche
|
|
|
|
|
;sleep(500) ; On attend 0.5secs.
|
|
|
|
|
;Send("{LEFT up}") ; Relache la touche gauche
|
|
|
|
|
$Minimap = PixelGetColor(1670, 92) ; R<EFBFBD>cup<EFBFBD>re la couleur qui se trouve en 593 (Axe de la hauteur), 610 (Axe de la largeur), si un combat est lanc<EFBFBD>, la couleur est Orange.
|
|
|
|
|
$Minimap = Hex($Minimap, 6)
|
|
|
|
|
EndIf ;==> Minimap
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> Tourner
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Combat
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func Combat ()
|
|
|
|
|
|
|
|
|
|
$CombatOrange = PixelGetColor(864, 889) ; R<EFBFBD>cup<EFBFBD>re la couleur qui se trouve en 593 (Axe de la hauteur), 610 (Axe de la largeur), si un combat est lanc<EFBFBD>, la couleur est Orange.
|
|
|
|
|
$CombatOrange = Hex($CombatOrange, 6)
|
|
|
|
|
$CombatBleu = PixelGetColor(971, 896) ; R<EFBFBD>cup<EFBFBD>re la couleur qui se trouve en 593 (Axe de la hauteur), 610 (Axe de la largeur), si un combat est lanc<EFBFBD>, la couleur est Orange.
|
|
|
|
|
$CombatBleu = Hex($CombatBleu, 6)
|
|
|
|
|
|
|
|
|
|
If $CombatOrange = 'FFA732' AND $CombatBleu = '22FDFF' Then
|
|
|
|
|
NbTemtem()
|
|
|
|
|
Endif ;==> CombatOn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> Combat
|
|
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; Nombre de temtem
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
Func NbTemtem ()
|
|
|
|
|
|
|
|
|
|
$NbTemtem = PixelGetColor(1170, 94) ; NB
|
|
|
|
|
$NbTemtem = Hex($NbTemtem, 6)
|
|
|
|
|
|
|
|
|
|
If $NbTemtem= '1E1F1E' Then
|
|
|
|
|
CouleurG ()
|
|
|
|
|
CouleurD ()
|
|
|
|
|
Verif2 ()
|
|
|
|
|
Else
|
|
|
|
|
CouleurC ()
|
|
|
|
|
Verif1 ()
|
|
|
|
|
EndIf ;==> NbTemtem
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; Detection couleur
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; 0x58FE8D (VERT) 0xFF5D3E (ROUGE)
|
|
|
|
|
|
|
|
|
|
Func CouleurG ()
|
|
|
|
|
$PosG = PixelSearch(1014, 185, 1082, 366, $Couleur1, 5)
|
|
|
|
|
If Not @error AND _IsChecked($idCheckbox1) Then
|
|
|
|
|
$G = 1
|
|
|
|
|
Else
|
|
|
|
|
$PosG = PixelSearch(1014, 185, 1082, 366, $Couleur2, 5)
|
|
|
|
|
If Not @error AND _IsChecked($idCheckbox2) Then
|
|
|
|
|
$G = 1
|
|
|
|
|
Else
|
|
|
|
|
$PosG = PixelSearch(1014, 185, 1082, 366, 0xFF4A63, 5)
|
|
|
|
|
If Not @error AND _IsChecked($idCheckbox3) Then
|
|
|
|
|
$G = 1
|
|
|
|
|
Else
|
|
|
|
|
$G = 0
|
|
|
|
|
EndIf
|
|
|
|
|
EndIf
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func CouleurD ()
|
|
|
|
|
$PosD = PixelSearch(1385, 223, 1470, 450, $Couleur1, 5)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
$D = 1
|
|
|
|
|
Else
|
|
|
|
|
$PosD = PixelSearch(1385, 223, 1470, 450, $Couleur2, 5)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
$D = 1
|
|
|
|
|
Else
|
|
|
|
|
$PosD = PixelSearch(1385, 223, 1470, 450, 0xFF4A63, 5)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
$D = 1
|
|
|
|
|
Else
|
|
|
|
|
$D = 0
|
|
|
|
|
EndIf
|
|
|
|
|
EndIf
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func CouleurC ()
|
|
|
|
|
$PosC = PixelSearch(1196, 222, 1289, 350, $Couleur1, 5)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
$C = 1
|
|
|
|
|
Else
|
|
|
|
|
$PosC = PixelSearch(1196, 222, 1289, 350, $Couleur2, 5)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
$C = 1
|
|
|
|
|
Else
|
|
|
|
|
$PosC = PixelSearch(1196, 222, 1289, 350, 0xFF4A63, 5)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
$C = 1
|
|
|
|
|
Else
|
|
|
|
|
$C = 0
|
|
|
|
|
EndIf
|
|
|
|
|
EndIf
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; Verification
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func Verif2 ()
|
|
|
|
|
If $G = 1 AND $D = 1 Then
|
|
|
|
|
Fuir ()
|
|
|
|
|
$Compteur += 2
|
|
|
|
|
ElseIf $G = 0 AND $D = 1 Then
|
|
|
|
|
_ScreenCapture_Capture(@ScriptDir & "\lumaG.jpg")
|
|
|
|
|
_SendmailG()
|
|
|
|
|
_FileWriteLog($Log, "LUMA G")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
VieG ()
|
|
|
|
|
ElseIf $G = 1 AND $D = 0 Then
|
|
|
|
|
_ScreenCapture_Capture(@ScriptDir & "\lumaD.jpg")
|
|
|
|
|
_SendmailD()
|
|
|
|
|
_FileWriteLog($Log, "LUMA D")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
VieD ()
|
|
|
|
|
ElseIf $G = 0 AND $D = 0 Then
|
|
|
|
|
VieG ()
|
|
|
|
|
VieD ()
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func Verif1 ()
|
|
|
|
|
If $C = 1 Then
|
|
|
|
|
Fuir ()
|
|
|
|
|
$Compteur += 1
|
|
|
|
|
ElseIf $C = 0 Then
|
|
|
|
|
_ScreenCapture_Capture(@ScriptDir & "\lumaC.jpg")
|
|
|
|
|
_SendmailC()
|
|
|
|
|
_FileWriteLog($Log, "LUMA C")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
VieC ()
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Vie
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
Func VieG () ; On verifie la vie du temtem de gauche.
|
|
|
|
|
|
|
|
|
|
Sleep(5000)
|
|
|
|
|
|
|
|
|
|
$Healthbar = PixelGetColor(1435, 70)
|
|
|
|
|
$Healthbar = Hex($Healthbar, 6)
|
|
|
|
|
|
|
|
|
|
If $Healthbar = '86C249' Then
|
|
|
|
|
ConsoleWrite ("VIE? ")
|
|
|
|
|
_FileWriteLog($Log, "VIE PLEINE G")
|
|
|
|
|
AttaqueG()
|
|
|
|
|
Else
|
|
|
|
|
_FileWriteLog($Log, "VIE ENTAME G")
|
|
|
|
|
VerifHypG ()
|
|
|
|
|
|
|
|
|
|
Global $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
CatchG ()
|
|
|
|
|
EndIf ;==> Healthbar
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> VieG
|
|
|
|
|
|
|
|
|
|
Func VieC () ; On verifie la vie du temtem centrale.
|
|
|
|
|
|
|
|
|
|
Sleep(5000)
|
|
|
|
|
|
|
|
|
|
$Healthbar = PixelGetColor(1835, 124)
|
|
|
|
|
$Healthbar = Hex($Healthbar, 6)
|
|
|
|
|
|
|
|
|
|
If $Healthbar = '86C249' Then
|
|
|
|
|
ConsoleWrite ("VIE? ")
|
|
|
|
|
_FileWriteLog($Log, "VIE PLEINE C")
|
|
|
|
|
AttaqueC()
|
|
|
|
|
Else
|
|
|
|
|
_FileWriteLog($Log, "VIE ENTAME C")
|
|
|
|
|
VerifHypC ()
|
|
|
|
|
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
CatchC()
|
|
|
|
|
EndIf ;==> Healthbar
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> VieC
|
|
|
|
|
|
|
|
|
|
Func VieD () ; On verifie la vie du temtem de droite.
|
|
|
|
|
|
|
|
|
|
Sleep(5000)
|
|
|
|
|
|
|
|
|
|
$Healthbar = PixelGetColor(1835, 124)
|
|
|
|
|
$Healthbar = Hex($Healthbar, 6)
|
|
|
|
|
|
|
|
|
|
If $Healthbar = '86C249' Then
|
|
|
|
|
ConsoleWrite ("VIE? ")
|
|
|
|
|
_FileWriteLog($Log, "VIE PLEINE D")
|
|
|
|
|
AttaqueD ()
|
|
|
|
|
Else
|
|
|
|
|
_FileWriteLog($Log, "VIE ENTAME D")
|
|
|
|
|
VerifHypD ()
|
|
|
|
|
|
|
|
|
|
Global $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
CatchD ()
|
|
|
|
|
EndIf ;==> Healthbar
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> VieD
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Verification Hypnose
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func VerifHypG ()
|
|
|
|
|
|
|
|
|
|
;$VerifHyp = PixelGetColor(142, 868)
|
|
|
|
|
;$VerifHyp = Hex($VerifHyp, 6)
|
|
|
|
|
|
|
|
|
|
;If $VerifHyp = 'C369AJ' Then
|
|
|
|
|
;ConsoleWrite ("Verif Hyp ")
|
|
|
|
|
;_FileWriteLog($Log, "VERIFICATION SI HYPNOSE G ")
|
|
|
|
|
;HypnoseG ()
|
|
|
|
|
;Else
|
|
|
|
|
;_FileWriteLog($Log, " HYPNOSE G INDISPO ")
|
|
|
|
|
;CatchG ()
|
|
|
|
|
;EndIf
|
|
|
|
|
|
|
|
|
|
$VerifHG = PixelSearch(124, 878, 136, 884, 0x6A405B, 1)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
CatchG ()
|
|
|
|
|
Else
|
|
|
|
|
HypnoseG ()
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func VerifHypC ()
|
|
|
|
|
|
|
|
|
|
;$VerifHyp = PixelGetColor(142, 868)
|
|
|
|
|
;$VerifHyp = Hex($VerifHyp, 6)
|
|
|
|
|
|
|
|
|
|
;If $VerifHyp = 'C369AJ' Then
|
|
|
|
|
; _FileWriteLog($Log, "VERIFICATION SI HYPNOSE C ")
|
|
|
|
|
; HypnoseC ()
|
|
|
|
|
;Else
|
|
|
|
|
; _FileWriteLog($Log, " HYPNOSE C INDISPO ")
|
|
|
|
|
; CatchC ()
|
|
|
|
|
;EndIf
|
|
|
|
|
|
|
|
|
|
$VerifHC = PixelSearch(124, 878, 136, 884, 0x6A405B, 1)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
CatchC ()
|
|
|
|
|
Else
|
|
|
|
|
HypnoseC ()
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func VerifHypD ()
|
|
|
|
|
|
|
|
|
|
;$VerifHyp = PixelGetColor(142, 868)
|
|
|
|
|
;$VerifHyp = Hex($VerifHyp, 6)
|
|
|
|
|
|
|
|
|
|
;If $VerifHyp = 'C369AJ' Then
|
|
|
|
|
;_FileWriteLog($Log, "VERIFICATION SI HYPNOSE D ")
|
|
|
|
|
;HypnoseD ()
|
|
|
|
|
;Else
|
|
|
|
|
;_FileWriteLog($Log, " HYPNOSE D INDISPO ")
|
|
|
|
|
;CatchD ()
|
|
|
|
|
;EndIf
|
|
|
|
|
|
|
|
|
|
$VerifHD = PixelSearch(124, 878, 136, 884, 0x6A405B, 1)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
CatchD ()
|
|
|
|
|
Else
|
|
|
|
|
HypnoseD ()
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Hypnose
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
Func HypnoseG ()
|
|
|
|
|
|
|
|
|
|
ConsoleWrite ("HYPNOSE G ")
|
|
|
|
|
_FileWriteLog($Log, "HYPNOSE G ")
|
|
|
|
|
Attaque ()
|
|
|
|
|
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
MouseMove ( 1248, 317 , 1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
MouseClick($MOUSE_CLICK_PRIMARY)
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> HypnoseG
|
|
|
|
|
|
|
|
|
|
Func HypnoseC ()
|
|
|
|
|
|
|
|
|
|
ConsoleWrite ("HYPNOSE C ")
|
|
|
|
|
_FileWriteLog($Log, "HYPNOSE C ")
|
|
|
|
|
Attaque ()
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> HypnoseC
|
|
|
|
|
|
|
|
|
|
Func HypnoseD ()
|
|
|
|
|
|
|
|
|
|
ConsoleWrite ("HYPNOSE D ")
|
|
|
|
|
_FileWriteLog($Log, "HYPNOSE D ")
|
|
|
|
|
Attaque ()
|
|
|
|
|
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
MouseMove ( 1448, 632 , 1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
MouseClick($MOUSE_CLICK_PRIMARY)
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> HypnoseD
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Attaque
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func AttaqueG ()
|
|
|
|
|
|
|
|
|
|
Passe ()
|
|
|
|
|
ConsoleWrite ("ATTAQUE G ")
|
|
|
|
|
_FileWriteLog($Log, "ATTAQUE G ")
|
|
|
|
|
Attaque ()
|
|
|
|
|
MouseMove ( 1248, 317 , 1)
|
|
|
|
|
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
MouseClick($MOUSE_CLICK_PRIMARY)
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> AttaqueG
|
|
|
|
|
|
|
|
|
|
Func AttaqueC ()
|
|
|
|
|
|
|
|
|
|
Passe ()
|
|
|
|
|
ConsoleWrite ("ATTAQUE C ")
|
|
|
|
|
_FileWriteLog($Log, "ATTAQUE C ")
|
|
|
|
|
Attaque ()
|
|
|
|
|
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
Send("{f}") ; VALIDER
|
|
|
|
|
Sleep (250)
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> AttaqueC
|
|
|
|
|
|
|
|
|
|
Func AttaqueD ()
|
|
|
|
|
|
|
|
|
|
Passe ()
|
|
|
|
|
ConsoleWrite ("ATTAQUE D ")
|
|
|
|
|
_FileWriteLog($Log, "ATTAQUE D ")
|
|
|
|
|
Attaque ()
|
|
|
|
|
MouseMove ( 1448, 632 , 1)
|
|
|
|
|
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
MouseClick($MOUSE_CLICK_PRIMARY)
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> AttaqueD
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Catch
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func CatchG ()
|
|
|
|
|
|
|
|
|
|
Send("{7}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{UP}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{F}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
MouseMove ( 1248, 317 , 1) ;MouseMove ( 1448, 632 , 1)
|
|
|
|
|
MouseClick($MOUSE_CLICK_PRIMARY)
|
|
|
|
|
ConsoleWrite ("CATCH G ")
|
|
|
|
|
_FileWriteLog($Log, "CATCH G ")
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> CatchG
|
|
|
|
|
|
|
|
|
|
Func CatchC ()
|
|
|
|
|
|
|
|
|
|
Send("{7}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{UP}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{F}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
ConsoleWrite ("CATCH C ")
|
|
|
|
|
_FileWriteLog($Log, "CATCH C ")
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> CatchC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Func CatchD ()
|
|
|
|
|
|
|
|
|
|
Send("{7}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{UP}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{F}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
MouseMove ( 1448, 632 , 1)
|
|
|
|
|
MouseClick($MOUSE_CLICK_PRIMARY)
|
|
|
|
|
ConsoleWrite ("CATCH D ")
|
|
|
|
|
_FileWriteLog($Log, "CATCH D ")
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> CatchD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Verification XP
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func VerifXp ()
|
|
|
|
|
|
|
|
|
|
$VerifXp = PixelGetColor(881, 564)
|
|
|
|
|
$VerifXp = Hex($VerifXp, 6)
|
|
|
|
|
|
|
|
|
|
If $VerifXp = '1BD2D3' Then
|
|
|
|
|
_FileWriteLog($Log, "VERIFICATION SI FENETRE XP ")
|
|
|
|
|
MouseClick($MOUSE_CLICK_PRIMARY)
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Verification Catch
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func VerifCatch ()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$VerifCatch = PixelGetColor(1451, 331)
|
|
|
|
|
$VerifCatch = Hex($VerifCatch, 6)
|
|
|
|
|
|
|
|
|
|
If $VerifCatch = 'FF9339' Then
|
|
|
|
|
_FileWriteLog($Log, "VERIFICATION SI ATTRAPEE ")
|
|
|
|
|
MouseMove ( 816, 763 , 1)
|
|
|
|
|
MouseClick($MOUSE_CLICK_PRIMARY)
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Attaque
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
Func Attaque ()
|
|
|
|
|
|
|
|
|
|
Local $RandomShort = Random(400, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{1}") ; ATTAQUE 1
|
|
|
|
|
Local $RandomShort = Random(400, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Fuir
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func Fuir ()
|
|
|
|
|
|
|
|
|
|
Send("{8 down}") ; Relache la touche 8
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{8 up}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{8 down}") ; Relache la touche 8
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
Send("{8 up}")
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
ConsoleWrite("FUITE ")
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> Fuir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Passe
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func Passe ()
|
|
|
|
|
|
|
|
|
|
ConsoleWrite ("PASSE ")
|
|
|
|
|
_FileWriteLog($Log, "PASSE ")
|
|
|
|
|
Send("{6}") ; PASSER
|
|
|
|
|
Local $RandomShort = Random(200, 500,1)
|
|
|
|
|
Sleep($RandomShort)
|
|
|
|
|
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; Quitter
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func Bye()
|
|
|
|
|
FileClose($Log)
|
|
|
|
|
Exit 0
|
|
|
|
|
|
|
|
|
|
EndFunc ;==>Bye
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; ANCIENNE FUNCTION
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Func DetectG1 ()
|
|
|
|
|
$PosG = PixelSearch(1008, 274, 1078, 336, 0x57FB89, 8)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
DetectD1 ()
|
|
|
|
|
Else
|
|
|
|
|
DetectG2 ()
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaG.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("LUMA G ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA G BLEU")
|
|
|
|
|
VieG()
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func DetectD1 ()
|
|
|
|
|
$PosD = PixelSearch(1385, 314, 1470, 417, 0x71E6CB, 8)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
DetectG2 ()
|
|
|
|
|
Else
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaD.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("VERT D ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA D")
|
|
|
|
|
VieD()
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func DetectC1 ()
|
|
|
|
|
$PosC = PixelSearch(1173, 312, 1250, 373, 0x71E6CB, 8)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
DetectC2 ()
|
|
|
|
|
Else
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaC.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("VERT C ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA C BLEU")
|
|
|
|
|
VieC()
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; Detection couleur 2
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Func DetectG2 ()
|
|
|
|
|
$PosG = PixelSearch(1008, 274, 1078, 336, 0x71E6CB, 8)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
DetectD2 ()
|
|
|
|
|
Else
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaG.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("LUMA G ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA G BLEU")
|
|
|
|
|
VieG()
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func DetectD2 ()
|
|
|
|
|
$PosD = PixelSearch(1385, 314, 1470, 417, 0x71E6CB, 8)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
Fuir ()
|
|
|
|
|
$Compteur += 1 ; On assigne la valeur du compteur <EFBFBD> 0.
|
|
|
|
|
Else
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaD.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("VERT D ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA D")
|
|
|
|
|
VieD()
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func DetectC2 ()
|
|
|
|
|
$PosC = PixelSearch(1173, 312, 1250, 373, 0x71E6CB, 8)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
Fuir ()
|
|
|
|
|
$Compteur += 1
|
|
|
|
|
Else
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaC.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("VERT C ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA C BLEU")
|
|
|
|
|
VieC()
|
|
|
|
|
EndIf
|
|
|
|
|
EndFunc
|
|
|
|
|
|
|
|
|
|
Func Detect()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$PosG = PixelSearch(1008, 274, 1078, 336, 0x71E6CB, 8)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaG.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("LUMA G ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA G BLEU")
|
|
|
|
|
VieG()
|
|
|
|
|
Else
|
|
|
|
|
$PosC = PixelSearch(1173, 312, 1250, 373, 0x71E6CB, 8)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaC.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("VERT C ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA C BLEU")
|
|
|
|
|
VieC()
|
|
|
|
|
Else
|
|
|
|
|
$PosD = PixelSearch(1385, 314, 1470, 417, 0x71E6CB, 8)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaD.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("VERT D ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA D BLEU")
|
|
|
|
|
VieD()
|
|
|
|
|
Else
|
|
|
|
|
Detect1 ()
|
|
|
|
|
$Compteur += 1 ; On assigne la valeur du compteur <EFBFBD> 0.
|
|
|
|
|
EndIf ;==> Droite?
|
|
|
|
|
EndIf ;==> Centre?
|
|
|
|
|
EndIf ;==>Gauche?
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> Detection
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
; Detection Couleur 2
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
; 295A67 (bleu) 56FC8E (vert) 7B4D3A
|
|
|
|
|
Func Detect1()
|
|
|
|
|
|
|
|
|
|
$PosG = PixelSearch(1008, 274, 1078, 336, 0x703623, 7)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaG.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("LUMA G ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA G")
|
|
|
|
|
VieG()
|
|
|
|
|
Else
|
|
|
|
|
$PosC = PixelSearch(1173, 312, 1250, 373, 0x703623, 7)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaC.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("VERT C ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA C")
|
|
|
|
|
VieC()
|
|
|
|
|
Else
|
|
|
|
|
$PosD = PixelSearch(1385, 314, 1470, 417, 0x703623, 7)
|
|
|
|
|
If Not @error Then
|
|
|
|
|
_ScreenCapture_Capture(@MyDocumentsDir & "\lumaD.jpg")
|
|
|
|
|
Beep(1000, 5000)
|
|
|
|
|
ConsoleWrite ("VERT D ")
|
|
|
|
|
_FileWriteLog($Log, "DETECTION LUMA D")
|
|
|
|
|
VieD()
|
|
|
|
|
Else
|
|
|
|
|
Fuir ()
|
|
|
|
|
$Compteur += 1 ; On assigne la valeur du compteur <EFBFBD> 0.
|
|
|
|
|
EndIf ;==> Droite?
|
|
|
|
|
EndIf ;==> Centre?
|
|
|
|
|
EndIf ;==>Gauche?
|
|
|
|
|
|
|
|
|
|
EndFunc ;==> Detection
|