Linger8484 and edmuntyy, you both play on PW MY, but edmuntyy managed to get the numbers from what I posted ( I assume edmuntyy meant $base and $call ? , cmiiw ) , weird , same pw version , same script, but different result.
@linger8484 : You should dig in Interes07's thread, the sendpacket stuff, if I recall correctly there is a guide to find sendpacketcall manually using IDA Pro. I tried it but it gave me a headache and then lolkop posted that script for findsendpacketcall.
@edmuntyy : If the findsendpacketcall script I posted could give you the same numbers as mine, I wonder why you still had the same error msg as linger8484 was having. :confused: , the sendpacket call address then should be right.
From what binz and Shareen had observed, Jawq recognized your name and level, so charstruct should be right. Your character could move toward NPC, so the action offset should be right as well, but it crashed WHEN exchanging information with the npc, where sendpacketcall was used for handing in quest, from what I gathered from there, it could be the sendpacketcall was wrong or maybe the npc struct ?
You should try simple stuff using sendpacket from Interest07's thread like targetting your own character's ID using SelectMob or others.
Or you could check the player/npc struct using this AutoIT script, it will list all NPCs/Players around you (HP/MP/LV won't be shown in your computer memory until you click that character) , so you'll know which from the offset list you use is wrong, npc/player, or sendpacketcall.
Here is the script, be sure to change this line Global $pid=wingetprocess("Perfect World") to the wintitle of your running game client :
Code:
#include <array.au3>
#include <ListViewConstants.au3>
#include <GuiListView.au3>
Global $kernel32 = DllOpen('kernel32.dll')
Global Const $base = 0x00C9DFAC, $select_call = 0x00681F50, $pick_call = 0x00681EE0
Global $class_info[10] = ['Blademaster', 'Wizzard', 'Psychic', 'Venomancer', 'Barbarian', 'Assassin', 'Archer', 'Cleric', 'Seeker', 'Mystic']
Global $special_info[10] = ['None', 'Increased Movement', 'Unknown Special', 'Increased Defence', 'Increased Mag Resistance', 'Increased Attack', 'Increased Magical Attack', 'Sacrificial Assault', 'Increased Life', 'Weak']
Global $pid=wingetprocess("Perfect World")
Global $mid = memopen($pid)
$npcs = GetNpcList()
_ArrayDisplay($npcs)
$players = GetplayerList()
_ArrayDisplay($players)
memclose($mid)
DllClose($kernel32)
Func GetNpcList()
Local $array[1][7], $pointer, $npc_base, $counter
$pointer = memread(memread(memread(memread(memread($base) + 0x1C) + 0x1c) + 0x20) + 0x58)
$npccount = memread(memread(memread(memread(memread($base) + 0x1C) + 0x1c) + 0x20) +0x14)
For $x=0 To ($npcCount - 1)
$npc_base = memread($pointer + $x*0x4)
If $npc_base<>0 Then
ReDim $array[$counter+1][7]
$array[$counter][0] = hex(memread($npc_base + 0x120)) ;NPC Unique ID
$array[$counter][1] = memread(memread($npc_base + 0x278), 'wchar[30]') ;NPC Name
$array[$counter][2] = memread($npc_base + 0x128) ;NPC Level
$array[$counter][3] = (memread($npc_base + 0x3C, 'float')+4000)/10 ;NPC x-position
$array[$counter][4] = (memread($npc_base + 0x44, 'float')+5500)/10 ;NPC y-position
$array[$counter][5] = memread($npc_base + 0x40, 'float')/10 ;NPC z-position
$array[$counter][6] = (memread($npc_base + 0x124)) ;NPC ID/Serial Number
$counter += 1
EndIf
Next
Return $array
EndFunc
Func GetPlayerList()
Local $array[1][8], $pointer, $player_base, $counter
$pointer = memread(memread(memread(memread(memread($base) + 0x1C) + 0x1c) + 0x1c) + 0x94)
$playerCount = memread(memread(memread(memread(memread($base) + 0x1C) + 0x1c) + 0x1c) + 0x14)
For $x=0 To ($playerCount - 1)
$player_base = memread($pointer + $x*0x4)
If $player_base<>0 Then
ReDim $array[$counter+1][8]
$array[$counter][0] = memread(memread($player_base + 0x6b0), 'wchar[30]') ;Name
$array[$counter][1] = (memread($player_base + 0x3C, 'float')+4000)/10 ;x
$array[$counter][2] = (memread($player_base + 0x44, 'float')+5500)/10 ;y
$array[$counter][3] = memread($player_base + 0x40, 'float')/10 ;z
$array[$counter][4] = hex(memread($player_base + 1172)) ;id
$array[$counter][5] = (memread($player_base +1192)) ;hp
$array[$counter][6] = (memread($player_base + 1196)) ;mp
$array[$counter][7] = (memread($player_base + 0x4A0)) ;lvl
$counter += 1
EndIf
Next
Return $array
EndFunc
Func memopen($pid)
Local $mid = DllCall($kernel32, 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
Return $mid[0]
EndFunc
Func memread($adress, $type = 'dword')
Local $struct = DllStructCreate($type)
DllCall($kernel32, 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
Return DllStructGetData($struct, 1)
EndFunc
Func memclose($mid)
DllCall($kernel32, 'int', 'CloseHandle', 'int', $mid)
EndFunc
It should look like this below, the highlighted one is Li MengPai NPC (or called Antonio here) , notice the NPC ID / Serial Number is correct as in pwdatabase.com
[Only registered and activated users can see links. Click Here To Register...] which is 14090, so offset for NPC ID is right.
[Only registered and activated users can see links. Click Here To Register...]