[Question] Perfect World Bots

12/28/2009 12:42 |Jonny|#1
Hello,

I have been trying to make a simple level bot for this game but I can't seem to send keys or mouse clicks to this game. Here is the code I have been trying to get to work:

Code:
Func Start()
	While 1
	send("{TAB}")
	Sleep(500)
	Send("{F1}")
	Sleep(3000)
	WEnd
EndFunc
Both Send & ControlSend do not work. Does anyone know how to send keys and mouse clicks to this game?

I'm an autoit user obviously :)
12/29/2009 13:45 stormy_PWI#2
umm try this >.<

Code:
#include <NomadMemory.au3>
HotKeySet("{END}", "_Exit")

Global $BASE_ADDR = 0x009B4594

Global $APP_TITLE = "Element Client"
Global $PID = WinGetProcess($APP_TITLE)
Global $x = _MemoryOpen($PID)

Global $TARGET_OFFSET[3]
$TARGET_OFFSET[1] = 32
$TARGET_OFFSET[2] = 2800


; Main loop
While 1
        $TARGET_STATE = _MemoryPointerRead($BASE_ADDR, $x, $TARGET_OFFSET)

        If $TARGET_STATE[1] <> 0 Then
                ControlSend($APP_TITLE, "", "", "{F1}") ; F1 is the skill he will cast
        Else
                ControlSend($APP_TITLE, "", "", "{TAB}")
        EndIf
        Sleep(125)
WEnd


Func _Exit()
        _MemoryClose($PID)
        Exit
EndFunc   ;==>_Exit
its not my work though..
12/30/2009 13:34 |Jonny|#3
Thanks but it didn't work, I have studied others peoples work too but nothing works for me lol.