Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pls Help me fixed CreateSpell.au3!
#1
Rainbow 
I want bot Create Spell, but it no work in new vesion... im have try fix it but can't.
now can click barrcks, but it no click spell..Sad

anyonw help me fix it,pls!!!


CreateSpell.au3

Func CreateSpell()
If _GUICtrlComboBox_GetCurSel($cmbSpell) <> 0 Then
Local $chkSpell = 0
SetLog("Creating Spells...")
While 1
For $i = 0 To 3
;If _Sleep(500) Then ExitLoop (2)

;Click(1, 1) ;Click Away

;If _Sleep(500) Then ExitLoop (2)
If $barrackPos[0] = "" Then
LocateBarrack()
SaveConfig()
If _Sleep(2000) Then Return
EndIf

SetLog("Training Troops+++...", $COLOR_BLUE)

If _Sleep(100) Then Return

ClickP($TopLeftClient) ;Click Away

If _Sleep(100) Then Return

;Click($barrackPos[$i][0], $barrackPos[$i][1]) ;Click Barrack
Click($barrackPos[0], $barrackPos[1]) ;Click Barrack

If _Sleep(600) Then ExitLoop (2)
_CaptureRegion()

Local $TrainPos = _PixelSearch(155, 603, 694, 605, Hex(0x603818, 6), 5) ;Finds Train Troops button
If IsArray($TrainPos) = False Then
SetLog("Barrack " & $i + 1 & " is not available")
If _Sleep(500) Then ExitLoop (2)
Else
Click($TrainPos[0], $TrainPos[1]) ;Click Train Troops button
If _Sleep(600) Then ExitLoop (2)
While _ColorCheck(_GetPixelColor(219, 512), Hex(0xFFFFFF, 6), 20) = False
Click(95, 333) ;Click Barrack Tab
If _Sleep(1000) Then ExitLoop (2)
_CaptureRegion()
$chkSpell += 1
If $chkSpell = 7 And _ColorCheck(_GetPixelColor(219, 512), Hex(0xFFFFFF, 6), 20) = False Then
SetLog("Spell Factory is not available")
ExitLoop (3)
EndIf
WEnd
_CaptureRegion()
Switch $Spell
Case 1
While _ColorCheck(_GetPixelColor(251, 357), Hex(0x888888, 6), 20) = False
Click(218, 319) ;Click Lightning Spell
If _Sleep(1000) Then ExitLoop (2)
_CaptureRegion()
WEnd
Case 2
While _ColorCheck(_GetPixelColor(251, 357), Hex(0x888888, 6), 20) = False
Click(322, 319) ;Click Healing Spell
If _Sleep(1000) Then ExitLoop (2)
_CaptureRegion()
WEnd
Case 3
While _ColorCheck(_GetPixelColor(251, 357), Hex(0x888888, 6), 20) = False
Click(433, 319) ;Click Rage Spell
If _Sleep(1000) Then ExitLoop (2)
_CaptureRegion()
WEnd
Case 4
While _ColorCheck(_GetPixelColor(251, 357), Hex(0x888888, 6), 20) = False
Click(540, 319) ;Click Jump Spell
If _Sleep(1000) Then ExitLoop (2)
_CaptureRegion()
WEnd
Case 5
While _ColorCheck(_GetPixelColor(251, 357), Hex(0x888888, 6), 20) = False
Click(643, 319) ;Click Freeze Spell
If _Sleep(1000) Then ExitLoop (2)
_CaptureRegion()
WEnd
EndSwitch
ExitLoop
EndIf
Next
If _Sleep(500) Then ExitLoop (2)
Click(1, 1, 2, 250); Click away twice with 250ms delay
SetLog("Creating Spells Complete")
ExitLoop
WEnd
EndIf
EndFunc ;CreateSpell
Reply
 


Messages In This Thread
pls Help me fixed CreateSpell.au3! - by mtrong - 02-26-2015, 12:44 PM

Forum Jump:


Users browsing this thread: 6 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website