If I could get it to change it would help me so much.
Can anybody point out where I am wrong?
What I need help is with this Function: _MemoryWrite
I dont exactly know how to use this but I used it like this: _MemoryWrite(0x00570D38, $memory,0)
;Includes
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>
;GUI
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Dulce\Desktop\Koda\Forms\pw20.kxf
$Form1 = GUICreate("PWO Bot v2.0", 365, 293, 192, 124)
$Label1 = GUICtrlCreateLabel("Skill to use:", 8, 8, 58, 17)
$Label2 = GUICtrlCreateLabel("Movement:", 8, 48, 57, 17)
$Label3 = GUICtrlCreateLabel("Pokémon ID to catch:", 8, 88, 108, 17)
$Label4 = GUICtrlCreateLabel("Pokémon Currently Fighting/Fought:", 8, 168, 174, 17)
$Label5 = GUICtrlCreateLabel("$current", 184, 168, 43, 17)
$Input1 = GUICtrlCreateInput("", 120, 88, 49, 21)
$Combo1 = GUICtrlCreateCombo("", 72, 8, 97, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1st Skill|2nd Skill|3rd Skill|4th Skill")
$Combo2 = GUICtrlCreateCombo("", 72, 48, 97, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Up and Down|Left and Right|Random")
$Label6 = GUICtrlCreateLabel("Current PokéDollars:", 8, 128, 101, 17)
$Label7 = GUICtrlCreateLabel("$pd", 112, 128, 22, 17)
$Label8 = GUICtrlCreateLabel("Fighting/Fought Pokémon Level: ", 8, 208, 162, 17)
$Label9 = GUICtrlCreateLabel("$currentlvl", 168, 208, 53, 17)
$Button1 = GUICtrlCreateButton("Start", 8, 248, 75, 25)
$Button2 = GUICtrlCreateButton("Exit", 96, 248, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;Variables
$lbt = PixelSearch(405, 560, 406, 559, 9090916)
$process = WinGetHandle("Pokemon World Online")
$memory = _MemoryOpen($process)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MouseMove(663,349,2)
MouseDown("Left")
Sleep(100)
MouseUp("Left")
Sleep(100)
AutoBot()
Case $Button2
Exit 0
Case $Combo1
$c1 = GUICtrlRead($Combo1, 1)
Case $Combo2
$c2 = GUICtrlRead($Combo2, 1)
EndSwitch
WEnd
While 1
Sleep(1000)
WEnd
Func Login()
$lbt = PixelSearch(405, 560, 406, 559, 9090916) ;Login Button
$lbte = @error
If $lbte = 0 Then
MouseMove(405, 560, 2)
MouseDown("Left")
Sleep(100)
MouseUp("Left")
Sleep(5000)
EndIf
EndFunc ;==>Login
Func AutoBot()
Login()
$wsc = PixelSearch(860, 178, 861, 177, 2631720) ;Welcome Screen
$wsce = @error
If $wsce = 0 Then
MouseMove(892, 180, 2)
MouseDown("Left")
Sleep(100)
MouseUp("Left")
EndIf
Sleep(100)
$battle = _MemoryRead(0x00570D38, $memory)
If $battle = 0 Then
Move()
Else
MobCheck()
EndIf
EndFunc ;==>AutoBot
Func Move()
$movesafe = PixelSearch(718, 594, 720, 592, 2513506)
$movesafee = @error
If $movesafee = 1 Then
_MemoryWrite(0x00570D38, $memory,0)
EndIf
$c2 = GUICtrlRead($Combo2, 1)
If $c2 = "Up and Down" Then
Send("{UP down}")
Sleep(500)
Send("{UP up}")
Sleep(100)
Send("{DOWN down}")
Sleep(500)
Send("{DOWN up}")
Sleep(100)
EndIf
If $c2 = "Left and Right" Then
Send("{LEFT down}")
Sleep(500)
Send("{LEFT up}")
Sleep(100)
Send("{RIGHT down}")
Sleep(500)
Send("{RIGHT up}")
Sleep(100)
EndIf
If $c2 = "Random" Then
$LowerLimit = 1
$UpperLimit = 4
$walk = Random($LowerLimit, $UpperLimit, 1)
If $walk = 1 Then
Send("{LEFT}")
Sleep(100)
ElseIf $walk = 2 Then
Send("{RIGHT}")
Sleep(100)
ElseIf $walk = 3 Then
Send("{DOWN}")
Sleep(100)
ElseIf $walk = 4 Then
Send("{UP}")
Sleep(100)
EndIf
EndIf
EndFunc ;==>Move
Func MobCheck()
$battle = _MemoryRead(0x00570D38, $memory)
If $battle = 0 Then
Move()
ElseIf $battle <> 0 Then
ShinyCheck()
EndIf
EndFunc ;==>MobCheck
Func ShinyCheck()
Send("{SPACE}")
$shiny = PixelSearch(372, 178, 375, 175, 16773632)
$shinye = @error
If $shinye = 0 Then
_MemoryWrite(0x00570D38, $memory, 1)
Beep(500, 500)
Sleep(100)
MouseMove(279, 622, 10)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(5000)
MouseMove(194, 511, 10) ;Pokeball
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
_MemoryWrite(0x00570D38, $memory, 0)
ElseIf $shinye = 1 Then
InputCheck()
EndIf
EndFunc ;==>ShinyCheck
Func InputCheck()
$epoke = _MemoryRead(0x00570D3C, $memory)
If $Input1 = $epoke Then
_MemoryWrite(0x00570D38, $memory, 1)
Beep(500, 500)
Sleep(100)
MouseMove(279, 622, 10)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(5000)
MouseMove(194, 511, 10) ;Pokeball
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
_MemoryWrite(0x00570D38, $memory, 0)
ElseIf $Input1 <> $epoke Then
Fight()
EndIf
EndFunc ;==>InputCheck
Func Fight()
MouseMove(213, 559, 20)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
Skill()
EndFunc ;==>Fight
Func Skill()
$c1 = GUICtrlRead($Combo1, 1)
$check1 = PixelSearch(207, 479, 208, 478, 2644578)
$m = @error
If $m = 1 Then
Sleep(100)
Fight()
EndIf
If $c1 = "1st Skill" Then
MouseMove(205, 463, 20) ; 1nd Skill
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
EndIf
If $c1 = "2nd Skill" Then
MouseMove(198, 478, 20)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
EndIf
If $c1 = "3rd Skill" Then
MouseMove(209, 495, 20)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
EndIf
If $c1 = "4th Skill" Then
MouseMove(204, 509, 20)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
EndIf
EndFunc ;==>Skill
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>
;GUI
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Dulce\Desktop\Koda\Forms\pw20.kxf
$Form1 = GUICreate("PWO Bot v2.0", 365, 293, 192, 124)
$Label1 = GUICtrlCreateLabel("Skill to use:", 8, 8, 58, 17)
$Label2 = GUICtrlCreateLabel("Movement:", 8, 48, 57, 17)
$Label3 = GUICtrlCreateLabel("Pokémon ID to catch:", 8, 88, 108, 17)
$Label4 = GUICtrlCreateLabel("Pokémon Currently Fighting/Fought:", 8, 168, 174, 17)
$Label5 = GUICtrlCreateLabel("$current", 184, 168, 43, 17)
$Input1 = GUICtrlCreateInput("", 120, 88, 49, 21)
$Combo1 = GUICtrlCreateCombo("", 72, 8, 97, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1st Skill|2nd Skill|3rd Skill|4th Skill")
$Combo2 = GUICtrlCreateCombo("", 72, 48, 97, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Up and Down|Left and Right|Random")
$Label6 = GUICtrlCreateLabel("Current PokéDollars:", 8, 128, 101, 17)
$Label7 = GUICtrlCreateLabel("$pd", 112, 128, 22, 17)
$Label8 = GUICtrlCreateLabel("Fighting/Fought Pokémon Level: ", 8, 208, 162, 17)
$Label9 = GUICtrlCreateLabel("$currentlvl", 168, 208, 53, 17)
$Button1 = GUICtrlCreateButton("Start", 8, 248, 75, 25)
$Button2 = GUICtrlCreateButton("Exit", 96, 248, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;Variables
$lbt = PixelSearch(405, 560, 406, 559, 9090916)
$process = WinGetHandle("Pokemon World Online")
$memory = _MemoryOpen($process)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MouseMove(663,349,2)
MouseDown("Left")
Sleep(100)
MouseUp("Left")
Sleep(100)
AutoBot()
Case $Button2
Exit 0
Case $Combo1
$c1 = GUICtrlRead($Combo1, 1)
Case $Combo2
$c2 = GUICtrlRead($Combo2, 1)
EndSwitch
WEnd
While 1
Sleep(1000)
WEnd
Func Login()
$lbt = PixelSearch(405, 560, 406, 559, 9090916) ;Login Button
$lbte = @error
If $lbte = 0 Then
MouseMove(405, 560, 2)
MouseDown("Left")
Sleep(100)
MouseUp("Left")
Sleep(5000)
EndIf
EndFunc ;==>Login
Func AutoBot()
Login()
$wsc = PixelSearch(860, 178, 861, 177, 2631720) ;Welcome Screen
$wsce = @error
If $wsce = 0 Then
MouseMove(892, 180, 2)
MouseDown("Left")
Sleep(100)
MouseUp("Left")
EndIf
Sleep(100)
$battle = _MemoryRead(0x00570D38, $memory)
If $battle = 0 Then
Move()
Else
MobCheck()
EndIf
EndFunc ;==>AutoBot
Func Move()
$movesafe = PixelSearch(718, 594, 720, 592, 2513506)
$movesafee = @error
If $movesafee = 1 Then
_MemoryWrite(0x00570D38, $memory,0)
EndIf
$c2 = GUICtrlRead($Combo2, 1)
If $c2 = "Up and Down" Then
Send("{UP down}")
Sleep(500)
Send("{UP up}")
Sleep(100)
Send("{DOWN down}")
Sleep(500)
Send("{DOWN up}")
Sleep(100)
EndIf
If $c2 = "Left and Right" Then
Send("{LEFT down}")
Sleep(500)
Send("{LEFT up}")
Sleep(100)
Send("{RIGHT down}")
Sleep(500)
Send("{RIGHT up}")
Sleep(100)
EndIf
If $c2 = "Random" Then
$LowerLimit = 1
$UpperLimit = 4
$walk = Random($LowerLimit, $UpperLimit, 1)
If $walk = 1 Then
Send("{LEFT}")
Sleep(100)
ElseIf $walk = 2 Then
Send("{RIGHT}")
Sleep(100)
ElseIf $walk = 3 Then
Send("{DOWN}")
Sleep(100)
ElseIf $walk = 4 Then
Send("{UP}")
Sleep(100)
EndIf
EndIf
EndFunc ;==>Move
Func MobCheck()
$battle = _MemoryRead(0x00570D38, $memory)
If $battle = 0 Then
Move()
ElseIf $battle <> 0 Then
ShinyCheck()
EndIf
EndFunc ;==>MobCheck
Func ShinyCheck()
Send("{SPACE}")
$shiny = PixelSearch(372, 178, 375, 175, 16773632)
$shinye = @error
If $shinye = 0 Then
_MemoryWrite(0x00570D38, $memory, 1)
Beep(500, 500)
Sleep(100)
MouseMove(279, 622, 10)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(5000)
MouseMove(194, 511, 10) ;Pokeball
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
_MemoryWrite(0x00570D38, $memory, 0)
ElseIf $shinye = 1 Then
InputCheck()
EndIf
EndFunc ;==>ShinyCheck
Func InputCheck()
$epoke = _MemoryRead(0x00570D3C, $memory)
If $Input1 = $epoke Then
_MemoryWrite(0x00570D38, $memory, 1)
Beep(500, 500)
Sleep(100)
MouseMove(279, 622, 10)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(5000)
MouseMove(194, 511, 10) ;Pokeball
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
_MemoryWrite(0x00570D38, $memory, 0)
ElseIf $Input1 <> $epoke Then
Fight()
EndIf
EndFunc ;==>InputCheck
Func Fight()
MouseMove(213, 559, 20)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
Skill()
EndFunc ;==>Fight
Func Skill()
$c1 = GUICtrlRead($Combo1, 1)
$check1 = PixelSearch(207, 479, 208, 478, 2644578)
$m = @error
If $m = 1 Then
Sleep(100)
Fight()
EndIf
If $c1 = "1st Skill" Then
MouseMove(205, 463, 20) ; 1nd Skill
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
EndIf
If $c1 = "2nd Skill" Then
MouseMove(198, 478, 20)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
EndIf
If $c1 = "3rd Skill" Then
MouseMove(209, 495, 20)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
EndIf
If $c1 = "4th Skill" Then
MouseMove(204, 509, 20)
Sleep(500)
MouseDown("left")
Sleep(100)
MouseUp("left")
Sleep(500)
EndIf
EndFunc ;==>Skill






