[Help] AutoIt adding Mana Feature for HP bot

05/10/2015 15:10 f3edada#1
Hi there! I recently made a pixel-based-auto-pot-bot an hour ago. The HP bot seems to be functional however when I added the the mana feature the programs goes wrong like when I tried to cast a skill it will press F2 for mana pots since my condition when the mana color of the mana is very low and even when I change the status to 0 it will still send F2. Anyways ill post the code here then maybe attach some files. Please I really need some help and explanation here. BTW, my experience on AutoIt was 2 days ago and 1 day for making this bot so I really need some experts to teach me too and sorry for too long intro and oh special mention to { Angelius } thanks for the cracked CO.exe and the inspiration.



HotKeySet("{END}","strt")
HotKeySet("{F11}","stop")
HotkeySet("{UP}","pause")
WinWaitActive("[Conquer] King-Dragon-Warrior")



ToolTip("END = Start Home = Pause F11= Exit",0,0)
Global $stats=0
while 1

Sleep(100)
WEnd


Func strt()
WinWaitActive("[Conquer] King-Dragon-Warrior")
$stats= 1
if $stats=1 Then


While 1


$Coord=MouseGetPos()
$x=$Coord[0]
$y=$Coord[1]


$ms=StringFormat("Coordinates x: %i y: %i Status: %s",$x,$y,$stats)

ToolTip($ms,0,0)

if PixelGetColor(278,667) <> 9374483 Then
WinWaitActive("[Conquer] King-Dragon-Warrior")
Send("{F1}")
Sleep(500)
EndIf

WEnd
EndIf




EndFunc

Func pause()
$stats= 0
EndFunc


func stop()
ToolTip("Program Terminated",0,0)
Sleep(1000)
Exit
EndFunc
09/24/2016 06:13 Grippybr#2
f1

f1
09/24/2016 15:30 Ultimation#3
wow people still use AutoIT... lol