#region pwibot
func pwibot()
if $Bstate = "OFF" then
fillin()
else
FMM()
EndIf
EndFunc
func FMM()
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form1", 225, 139, 250, 374)
GUISetBkColor(0xB9D1EA)
$MyButton1 = GUICtrlCreateButton("Exit", 120, 104, 100, 30,0)
$MyButton2 = GUICtrlCreateButton("start bot", 64, 32, 100, 30, 0)
$MyButton3 = GUICtrlCreateButton("Main Menu", 8, 104, 100, 30, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("!1", "_getHp")
hotkeyset("!2", "_getMp")
hotkeyset("!3", "_getP")
hotkeyset("!4","_getPS")
hotkeyset("!5","_getO")
hotkeyset("!0","_botpause")
$pwidata1 = iniread("C:\masterpiece\mp.ini","PWI","AS1","")
$pwidata2 = iniread("C:\masterpiece\mp.ini","PWI","AS2","")
$pwidata3 = iniread("C:\masterpiece\mp.ini","PWI","HP","")
$pwidata4 = iniread("C:\masterpiece\mp.ini","PWI","MP","")
$pwidata5 = iniread("C:\masterpiece\mp.ini","PWI","PetHP","")
$pwidata6 = iniread("C:\masterpiece\mp.ini","PWI","PetFOOD","" )
$pwidata7 = iniread("C:\masterpiece\mp.ini","PWI","PICK","")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
case $Mybutton2
$pwiloop = 0
$pwiloop2 = 1
$rungpwi = 1
do
if $rungpwi = 1 then
guictrlsetdata($Mybutton2,"botting...")
if $pwiloop2 = 1 then
do
If _getCurrentColorH( $xH, $yH) <> $colorH Then
WinWaitActive("Element Client")
Send($pwidata3)
EndIf
if _getcurrentcolorM($xM, $yM) <> $colorM Then
WinWaitActive("Element Client")
Send($pwidata4)
endif
if _getcurrentcolorP( $xP, $yP) <> $colorP Then
WinWaitActive("Element Client")
Send($pwidata5)
endif
if _getcurrentcolorPS($XPS, $YPS) <> $colorPS Then
winwaitactive("Element Client")
Send($pwidata6)
EndIf
if $Rungpwi = 0 Then
guictrlsetdata($Mybutton2,"Start bot")
winsetstate($form2,"",@sw_hide)
do
sleep(1)
until $rungpwi = 1
FMM()
EndIf
WinWaitActive("Element Client")
send($pwidata7)
WinWaitActive("Element Client")
send($pwidata1)
WinWaitActive("Element Client")
send($pwidata7)
winWaitActive("Element Client")
send($pwidata2)
global $escape = _getcurrentcolorO( $xO, $yO)
until $escape <> $colorO
WinWaitActive("Element Client")
send ($pwidata7)
sleep (800)
WinWaitActive("Element Client")
send ($pwidata7)
sleep(300)
WinWaitActive("Element Client")
send ("{tab}")
guictrlsetdata($Mybutton2,"start bot")
EndIf
EndIf
until $pwiloop = 1
case $mybutton1
exifc()
case $mybutton3
winsetstate($form2,"",@sw_hide)
dmm()
EndSwitch
WEnd
EndFunc
func fillin()
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("start pwi bot", 316, 219, 193, 125)
GUISetBkColor(0xB9D1EA)
$Input1 = GUICtrlCreateInput("Attack skill 1", 8, 16, 121, 21)
$Input2 = GUICtrlCreateInput("Attack skill 2", 8, 40, 121, 21)
$Input3 = GUICtrlCreateInput("Heal HP", 8, 64, 121, 21)
$Input4 = GUICtrlCreateInput("Heal MP", 8, 88, 121, 21)
$Input5 = GUICtrlCreateInput("Heal PET", 8, 112, 121, 21)
$Input6 = GUICtrlCreateInput("Feed pet, with water, etc", 8, 136, 121, 21)
$Input7 = GUICtrlCreateInput("pickup", 8, 160, 121, 21)
$MyButton1 = GUICtrlCreateButton("Confirm", 184, 16, 100, 30, 0)
$MyButton2 = GUICtrlCreateButton("exit", 184, 72, 100, 30, 0)
$MyButton3 = GUICtrlCreateButton("Main Menu", 184, 128, 100, 30, 0)
$Label1 = GUICtrlCreateLabel("To enter another character that is not a letter or a number youll have to do it like this: {enter} or {F2}", 136, 168, 172, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
case $Mybutton2
Exifc()
case $mybutton3
winsetstate($form1,"",@sw_hide)
DMM()
case $mybutton1
global $inp1 = guictrlread($input1)
global $inp2 = guictrlread($input2)
global $inp3 = guictrlread($input3)
global $inp4 = guictrlread($input4)
global $inp5 = guictrlread($input5)
global $inp6 = guictrlread($input6)
global $inp7 = guictrlread($input7)
iniwrite("C:\masterpiece\MP.ini","PWI","AS1",$inp1 )
iniwrite("C:\masterpiece\MP.ini","PWI","AS2",$inp2 )
iniwrite("C:\masterpiece\MP.ini","PWI","HP",$inp3)
iniwrite("C:\masterpiece\MP.ini","PWI","MP",$inp4)
iniwrite("C:\masterpiece\MP.ini","PWI","PetHP",$in p5)
iniwrite("C:\masterpiece\MP.ini","PWI","PetFOOD",$ inp6)
iniwrite("C:\masterpiece\MP.ini","PWI","PICK",$inp 7)
iniwrite("C:\masterpiece\MP.ini","PWI","state","ON ")
FMM()
EndSwitch
WEnd
endfunc
func _getps()
global $coordPS = mousegetpos()
global $XPS = $coordPS[0]
global $YPS = $coordPS[1]
global $colorPS = hex(pixelgetcolor( $XPS, $YPS), 6)
EndFunc
func _getcurrentcolorPS($xPSDEF, $YPSDEF)
global $newcolorPS = hex(pixelgetcolor($XPSDEF, $YPSDEF),6)
return( $newcolorPS)
EndFunc
Func _getHp()
global $coordH = MouseGetPos()
global $xH = $coordH[0]
global $yH = $coordH[1]
global $colorH = Hex(PixelGetColor( $coordH[0], $coordH[1]), 6)
EndFunc
Func _getCurrentColorH( $xHDef, $yHDef)
global $newColorH = Hex(PixelGetColor( $xHDef,$yHDef), 6)
Return ($newColorH)
EndFunc
Func _getMp()
global $coordM = MouseGetPos()
global $xM = $coordM[0]
global $yM = $coordM[1]
global $colorM = Hex(PixelGetColor($coordM[0], $coordM[1]), 6)
EndFunc
Func _getCurrentColorM( $xMDef, $yMDef)
global $newColorM = Hex(PixelGetColor($xMDef, $yMDef), 6)
Return ($newColorM)
EndFunc
Func _getp()
global $coordP = MouseGetPos()
global $xP = $coordP[0]
global $yP =$coordP[1]
global $colorP = Hex(PixelGetColor($coordP[0],$coordP[1]), 6)
EndFunc
Func _getCurrentColorP($xPDef, $yPDef)
global $newColorP = Hex(PixelGetColor( $xPDef, $yPDef), 6)
Return ($newColorP)
EndFunc
Func _getO()
global $coordO = MouseGetPos()
global $xO = $coordO[0]
global $yO = $coordO[1]
global $colorO = Hex(PixelGetColor($coordO[0],$coordO[1]), 6)
global $statusO = "off"
EndFunc
Func _getCurrentColorO($xODef, $yODef)
global $newColorO = Hex(PixelGetColor($xODef, $yODef), 6)
Return ($newColorO)
EndFunc
func _botpause()
if $rungpwi = 1 Then
global $rungpwi = 0
elseif $rungpwi = 0 Then
global $rungpwi = 1
EndIf
winsetstate("start pwi bot","",@sw_hide)
sleep(100)
endfunc
#endregion pwibot
|