Sending Packets

01/11/2011 08:23 Interest07#181
Quote:
Originally Posted by akupanda View Post
Can we send the package to change the gold that is on our bankers with auto id
no

Quote:

Will you give me the source code program that you created, such as bot program that you created
I've never made a bot, so there is no source code to give :)
01/21/2011 19:07 burple6#182
Here is the autoit code for hunting and gathering resources, as well as the interaction function in AutoIt form. Please note that the code is referencing variables and functions defined in Prophet Bot Recoded, but should be easily changed to suit your environment.

Global $aMATERIALS[1][6]

Func InteractWith($objectId, $interactionType)
ADDHISTORY("Interacting with " & $objectId)
Local $ACTIONSTRUCT = memread($CHAR_DATA_BASE + 0xFF4)
Local $ACTIONLIST = memread($ACTIONSTRUCT + 0x30)
Local $WALKTOACTION = memread($ACTIONLIST + 0x8)

; Action finished = 0
MemWrite($WALKTOACTION + 0x8, $PROCESS_INFORMATION, 0)
; Action start = 1
MemWrite($WALKTOACTION + 0x14, $PROCESS_INFORMATION, 1)
; Action Not Start = 0
MemWrite($WALKTOACTION + 0x24, $PROCESS_INFORMATION, 0)
; objectId
MemWrite($WALKTOACTION + 0x20, $PROCESS_INFORMATION, $objectId)
; interactionType 0 = regAtk, 1 = pick item, 2 = talk to NPC,3 = useSkill, 4 = gatherResources
MemWrite($WALKTOACTION + 0x38, $PROCESS_INFORMATION, $interactionType)
; Set error = 0
MemWrite($WALKTOACTION + 0x34, $PROCESS_INFORMATION, 0)
; Set skill pointer
MemWrite($WALKTOACTION + 0x50, $PROCESS_INFORMATION, 0)
; Set new actionType
MemWrite($ACTIONSTRUCT + 0xC, $PROCESS_INFORMATION, $WALKTOACTION)
; Set next action position to 1
MemWrite($ACTIONSTRUCT + 0x18, $PROCESS_INFORMATION, 1)
; Set new actionType
MemWrite($ACTIONSTRUCT + 0x14, $PROCESS_INFORMATION, $WALKTOACTION)
Do
Sleep(500)
Until $ACTIVE = 0
EndFunc

Func FindHerbs()
; Bug: Does not forget the locations of herbs
Local $i = 0
Local $hBase = 0x00A5B90C
Local $pointer,$counter
$pointer = memread(memread(memread(memread(memread($hBase) + 0x1C) + 0x8) + 0x28) + 0x18)
Global $aMATERIALS[1][6]

ADDHISTORY("Looking for resources " & $pointer)
for $i=0 to 768
Local $item_base = memread(memread($pointer + $i*4) + 0x4)

Local $ITEM_NAME = memread(memread($item_base + 0x164), 'wchar[30]') ;Item-Name
If (_ArraySearch($HERBS,$ITEM_NAME) <> -1 OR _ArraySearch($RESOURCES,$ITEM_NAME) <> -1) Then
Local $ITEM_SN = memread($item_base + 0x110) ;Item-SN
;$array[$counter][0] = memread($item_base + 0x110) ;Item-SN;
Local $ITEM_ID = memread($item_base + 0x10C) ;Item-ID

Local $ITEM_X = (memread($item_base + 0x3C, 'float')+4000)/10 ;Item x-position
Local $ITEM_Y = (memread($item_base + 0x44, 'float')+5500)/10 ;Item y-position
Local $ITEM_Z = memread($item_base + 0x40, 'float')/10 ;Item z-position
Local $ITEM_DISTANCE = Round(10*Sqrt(($HOME_X-$ITEM_X)^2+($HOME_Y-$ITEM_Y)^2+($HOME_Z-$ITEM_Z)^2),1)
;Local $ITEM_DISTANCE = ($DELTA_X + $DELTA_Y + $DELTA_Z)/3
If $ITEM_NAME <> "" Then
Redim $aMATERIALS[$counter+1][6]
$aMATERIALS[$counter][0] = $ITEM_DISTANCE
$aMATERIALS[$counter][1] = $ITEM_NAME
$aMATERIALS[$counter][2] = $ITEM_X
$aMATERIALS[$counter][3] = $ITEM_Y
$aMATERIALS[$counter][4] = $ITEM_Z
$aMATERIALS[$counter][5] = $ITEM_ID
$counter += 1
EndIf
;Else
;MsgBox(0,"RESERROR","Sorry, " & $ITEM_NAME & " is not a resource.")
Endif
Next

; Sort by distance
_ArraySort($aMATERIALS,0,0)
;_ArrayDisplay($aMATERIALS)
If $aMATERIALS[0][1] <> "" Then
ADDHISTORY("Closest gatherable is " & $aMATERIALS[0][1] & ', ' & $aMATERIALS[0][0] & ' away')
Endif
EndFunc

Func GatherHerbs()
FindHerbs()
For $x = 0 to Ubound($aMATERIALS) -1
If $aMATERIALS[$x][1] <> "" Then
;For $x = 0 to 0
If $aMATERIALS[$x][0] < 85 Then
ADDHISTORY("Moving to item " & $aMATERIALS[$x][1] & " distance " & $aMATERIALS[$x][0])
MoveToXYZ($aMATERIALS[$x][2]*10-4000,$aMATERIALS[$x][3]*10-5500,$aMATERIALS[$x][4]*10)
Do
Sleep(500)
Until $ACTIVE = 0
Sleep(1000)
;; Gather the resource
InteractWith($aMATERIALS[$x][5],4)
ADDHISTORY("Now at item " & $aMATERIALS[$x][1])
Do
Sleep(500)
Until $ACTIVE = 0
;FindHerbs()
;Sleep( 10000 )
_ArraySort($aMATERIALS,0,0)
EndIf
ADDHISTORY("Done Gathering.")
Endif
Next
EndFunc

Func ShowResources()
_ArrayDisplay($aMATERIALS)
EndFunc
01/21/2011 20:52 PW-Prophets#183
Quote:
Originally Posted by burple6 View Post
Here is the autoit code for hunting and gathering resources, as well as the interaction function in AutoIt form. Please note that the code is referencing variables and functions defined in Prophet Bot Recoded, but should be easily changed to suit your environment.

Global $aMATERIALS[1][6]

Func InteractWith($objectId, $interactionType)
ADDHISTORY("Interacting with " & $objectId)
Local $ACTIONSTRUCT = memread($CHAR_DATA_BASE + 0xFF4)
Local $ACTIONLIST = memread($ACTIONSTRUCT + 0x30)
Local $WALKTOACTION = memread($ACTIONLIST + 0x8)

; Action finished = 0
MemWrite($WALKTOACTION + 0x8, $PROCESS_INFORMATION, 0)
; Action start = 1
MemWrite($WALKTOACTION + 0x14, $PROCESS_INFORMATION, 1)
; Action Not Start = 0
MemWrite($WALKTOACTION + 0x24, $PROCESS_INFORMATION, 0)
; objectId
MemWrite($WALKTOACTION + 0x20, $PROCESS_INFORMATION, $objectId)
; interactionType 0 = regAtk, 1 = pick item, 2 = talk to NPC,3 = useSkill, 4 = gatherResources
MemWrite($WALKTOACTION + 0x38, $PROCESS_INFORMATION, $interactionType)
; Set error = 0
MemWrite($WALKTOACTION + 0x34, $PROCESS_INFORMATION, 0)
; Set skill pointer
MemWrite($WALKTOACTION + 0x50, $PROCESS_INFORMATION, 0)
; Set new actionType
MemWrite($ACTIONSTRUCT + 0xC, $PROCESS_INFORMATION, $WALKTOACTION)
; Set next action position to 1
MemWrite($ACTIONSTRUCT + 0x18, $PROCESS_INFORMATION, 1)
; Set new actionType
MemWrite($ACTIONSTRUCT + 0x14, $PROCESS_INFORMATION, $WALKTOACTION)
Do
Sleep(500)
Until $ACTIVE = 0
EndFunc

Func FindHerbs()
; Bug: Does not forget the locations of herbs
Local $i = 0
Local $hBase = 0x00A5B90C
Local $pointer,$counter
$pointer = memread(memread(memread(memread(memread($hBase) + 0x1C) + 0x8) + 0x28) + 0x18)
Global $aMATERIALS[1][6]

ADDHISTORY("Looking for resources " & $pointer)
for $i=0 to 768
Local $item_base = memread(memread($pointer + $i*4) + 0x4)

Local $ITEM_NAME = memread(memread($item_base + 0x164), 'wchar[30]') ;Item-Name
If (_ArraySearch($HERBS,$ITEM_NAME) <> -1 OR _ArraySearch($RESOURCES,$ITEM_NAME) <> -1) Then
Local $ITEM_SN = memread($item_base + 0x110) ;Item-SN
;$array[$counter][0] = memread($item_base + 0x110) ;Item-SN;
Local $ITEM_ID = memread($item_base + 0x10C) ;Item-ID

Local $ITEM_X = (memread($item_base + 0x3C, 'float')+4000)/10 ;Item x-position
Local $ITEM_Y = (memread($item_base + 0x44, 'float')+5500)/10 ;Item y-position
Local $ITEM_Z = memread($item_base + 0x40, 'float')/10 ;Item z-position
Local $ITEM_DISTANCE = Round(10*Sqrt(($HOME_X-$ITEM_X)^2+($HOME_Y-$ITEM_Y)^2+($HOME_Z-$ITEM_Z)^2),1)
;Local $ITEM_DISTANCE = ($DELTA_X + $DELTA_Y + $DELTA_Z)/3
If $ITEM_NAME <> "" Then
Redim $aMATERIALS[$counter+1][6]
$aMATERIALS[$counter][0] = $ITEM_DISTANCE
$aMATERIALS[$counter][1] = $ITEM_NAME
$aMATERIALS[$counter][2] = $ITEM_X
$aMATERIALS[$counter][3] = $ITEM_Y
$aMATERIALS[$counter][4] = $ITEM_Z
$aMATERIALS[$counter][5] = $ITEM_ID
$counter += 1
EndIf
;Else
;MsgBox(0,"RESERROR","Sorry, " & $ITEM_NAME & " is not a resource.")
Endif
Next

; Sort by distance
_ArraySort($aMATERIALS,0,0)
;_ArrayDisplay($aMATERIALS)
If $aMATERIALS[0][1] <> "" Then
ADDHISTORY("Closest gatherable is " & $aMATERIALS[0][1] & ', ' & $aMATERIALS[0][0] & ' away')
Endif
EndFunc

Func GatherHerbs()
FindHerbs()
For $x = 0 to Ubound($aMATERIALS) -1
If $aMATERIALS[$x][1] <> "" Then
;For $x = 0 to 0
If $aMATERIALS[$x][0] < 85 Then
ADDHISTORY("Moving to item " & $aMATERIALS[$x][1] & " distance " & $aMATERIALS[$x][0])
MoveToXYZ($aMATERIALS[$x][2]*10-4000,$aMATERIALS[$x][3]*10-5500,$aMATERIALS[$x][4]*10)
Do
Sleep(500)
Until $ACTIVE = 0
Sleep(1000)
;; Gather the resource
InteractWith($aMATERIALS[$x][5],4)
ADDHISTORY("Now at item " & $aMATERIALS[$x][1])
Do
Sleep(500)
Until $ACTIVE = 0
;FindHerbs()
;Sleep( 10000 )
_ArraySort($aMATERIALS,0,0)
EndIf
ADDHISTORY("Done Gathering.")
Endif
Next
EndFunc

Func ShowResources()
_ArrayDisplay($aMATERIALS)
EndFunc
Very nice I am impressed. This is almost exactly the same as our gathering function's other then separating Herb/Resource's so that you can choose which you would like to hunt. I really think you will like the source of Unleashed when its released. You will most likely code allot differently after you
have studied its code. One thing I can note for Unleashed source is that we have converted all memory functions to use nomadmemory.au3 and allot of arrays. I would advise anyone planning on making use of the unleashed source to practice nomadmemory.au3 functions and building array's.
This will get you ready for the release.
01/22/2011 21:18 manatchai#184
Quote:
Originally Posted by burple6 View Post

Local $ACTIONSTRUCT = memread($CHAR_DATA_BASE + 0xFF4)
Please some body tell me how to find action struct offset of Jade Dynasty, step by step ?

:handsdown:
01/22/2011 21:40 PW-Prophets#185
Quote:
Originally Posted by manatchai View Post
Please some body tell me how to find action struct offset of Jade Dynasty, step by step ?

:handsdown:
Maybe....we will look into this unless someone else already has.
01/23/2011 00:40 msxgames#186
Check this post and search for Actionstruct: [Only registered and activated users can see links. Click Here To Register...]

There shouldn't be a big difference between Perfect World and Jade Dynasty
01/23/2011 01:34 PW-Prophets#187
Quote:
Originally Posted by msxgames View Post
Check this post and search for Actionstruct: [Only registered and activated users can see links. Click Here To Register...]

There shouldn't be a big difference between Perfect World and Jade Dynasty
Have you seen my cheat engine tutorials? They can be found [Only registered and activated users can see links. Click Here To Register...].
01/29/2011 08:11 penipu81#188
Quote:
Originally Posted by burple6 View Post
Here is the autoit code for hunting and gathering resources, as well as the interaction function in AutoIt form. Please note that the code is referencing variables and functions defined in Prophet Bot Recoded, but should be easily changed to suit your environment.

Global $aMATERIALS[1][6]

Func InteractWith($objectId, $interactionType)
ADDHISTORY("Interacting with " & $objectId)
Local $ACTIONSTRUCT = memread($CHAR_DATA_BASE + 0xFF4)
Local $ACTIONLIST = memread($ACTIONSTRUCT + 0x30)
Local $WALKTOACTION = memread($ACTIONLIST + 0x8)

; Action finished = 0
MemWrite($WALKTOACTION + 0x8, $PROCESS_INFORMATION, 0)
; Action start = 1
MemWrite($WALKTOACTION + 0x14, $PROCESS_INFORMATION, 1)
; Action Not Start = 0
MemWrite($WALKTOACTION + 0x24, $PROCESS_INFORMATION, 0)
; objectId
MemWrite($WALKTOACTION + 0x20, $PROCESS_INFORMATION, $objectId)
; interactionType 0 = regAtk, 1 = pick item, 2 = talk to NPC,3 = useSkill, 4 = gatherResources
MemWrite($WALKTOACTION + 0x38, $PROCESS_INFORMATION, $interactionType)
; Set error = 0
MemWrite($WALKTOACTION + 0x34, $PROCESS_INFORMATION, 0)
; Set skill pointer
MemWrite($WALKTOACTION + 0x50, $PROCESS_INFORMATION, 0)
; Set new actionType
MemWrite($ACTIONSTRUCT + 0xC, $PROCESS_INFORMATION, $WALKTOACTION)
; Set next action position to 1
MemWrite($ACTIONSTRUCT + 0x18, $PROCESS_INFORMATION, 1)
; Set new actionType
MemWrite($ACTIONSTRUCT + 0x14, $PROCESS_INFORMATION, $WALKTOACTION)
Do
Sleep(500)
Until $ACTIVE = 0
EndFunc

Func FindHerbs()
; Bug: Does not forget the locations of herbs
Local $i = 0
Local $hBase = 0x00A5B90C
Local $pointer,$counter
$pointer = memread(memread(memread(memread(memread($hBase) + 0x1C) + 0x8) + 0x28) + 0x18)
Global $aMATERIALS[1][6]

ADDHISTORY("Looking for resources " & $pointer)
for $i=0 to 768
Local $item_base = memread(memread($pointer + $i*4) + 0x4)

Local $ITEM_NAME = memread(memread($item_base + 0x164), 'wchar[30]') ;Item-Name
If (_ArraySearch($HERBS,$ITEM_NAME) <> -1 OR _ArraySearch($RESOURCES,$ITEM_NAME) <> -1) Then
Local $ITEM_SN = memread($item_base + 0x110) ;Item-SN
;$array[$counter][0] = memread($item_base + 0x110) ;Item-SN;
Local $ITEM_ID = memread($item_base + 0x10C) ;Item-ID

Local $ITEM_X = (memread($item_base + 0x3C, 'float')+4000)/10 ;Item x-position
Local $ITEM_Y = (memread($item_base + 0x44, 'float')+5500)/10 ;Item y-position
Local $ITEM_Z = memread($item_base + 0x40, 'float')/10 ;Item z-position
Local $ITEM_DISTANCE = Round(10*Sqrt(($HOME_X-$ITEM_X)^2+($HOME_Y-$ITEM_Y)^2+($HOME_Z-$ITEM_Z)^2),1)
;Local $ITEM_DISTANCE = ($DELTA_X + $DELTA_Y + $DELTA_Z)/3
If $ITEM_NAME <> "" Then
Redim $aMATERIALS[$counter+1][6]
$aMATERIALS[$counter][0] = $ITEM_DISTANCE
$aMATERIALS[$counter][1] = $ITEM_NAME
$aMATERIALS[$counter][2] = $ITEM_X
$aMATERIALS[$counter][3] = $ITEM_Y
$aMATERIALS[$counter][4] = $ITEM_Z
$aMATERIALS[$counter][5] = $ITEM_ID
$counter += 1
EndIf
;Else
;MsgBox(0,"RESERROR","Sorry, " & $ITEM_NAME & " is not a resource.")
Endif
Next

; Sort by distance
_ArraySort($aMATERIALS,0,0)
;_ArrayDisplay($aMATERIALS)
If $aMATERIALS[0][1] <> "" Then
ADDHISTORY("Closest gatherable is " & $aMATERIALS[0][1] & ', ' & $aMATERIALS[0][0] & ' away')
Endif
EndFunc

Func GatherHerbs()
FindHerbs()
For $x = 0 to Ubound($aMATERIALS) -1
If $aMATERIALS[$x][1] <> "" Then
;For $x = 0 to 0
If $aMATERIALS[$x][0] < 85 Then
ADDHISTORY("Moving to item " & $aMATERIALS[$x][1] & " distance " & $aMATERIALS[$x][0])
MoveToXYZ($aMATERIALS[$x][2]*10-4000,$aMATERIALS[$x][3]*10-5500,$aMATERIALS[$x][4]*10)
Do
Sleep(500)
Until $ACTIVE = 0
Sleep(1000)
;; Gather the resource
InteractWith($aMATERIALS[$x][5],4)
ADDHISTORY("Now at item " & $aMATERIALS[$x][1])
Do
Sleep(500)
Until $ACTIVE = 0
;FindHerbs()
;Sleep( 10000 )
_ArraySort($aMATERIALS,0,0)
EndIf
ADDHISTORY("Done Gathering.")
Endif
Next
EndFunc

Func ShowResources()
_ArrayDisplay($aMATERIALS)
EndFunc
Code:
how to use this code ?
01/29/2011 23:57 msxgames#189
Try [Only registered and activated users can see links. Click Here To Register...]
02/08/2011 04:13 ayongz#190
Quote:
Originally Posted by DIAsko View Post
By sending packets all clear, but somebody has found how to read the received packets?
Good Point
02/09/2011 22:34 Smurfin#191
hi Interest07, this is totally off topic, but I'll post it here anyway since you're the topic starter at this thread :p

do you have resources for the chat system ? like for getting the nick of who's whispering, and what the message is. Thought of making an auto buffer priest by whispering something to it. Put the cleric somewhere and I can ask for buff by just whispering the command.
02/17/2011 22:32 ayongz#192
sorry..
02/21/2011 13:55 Smurfin#193
lol I was asking about resources for ingame chat system like its pointers/offsets/structures not material resources, but thanks anyway.

guess he's busy or not monitoring this thread anymore.
02/22/2011 08:31 Interest07#194
Quote:
Originally Posted by Smurfin View Post
lol I was asking about resources for ingame chat system like its pointers/offsets/structures not material resources, but thanks anyway.

guess he's busy or not monitoring this thread anymore.
Oh, yeah, I do have them for PWI somewhere, I'll dig em up later. About 1% of the time a chat sentence seems to be blank in memory instead of what it should be though, but I have the same problem with players around me not turning up in the list I use, so maybe it's just me doing something wrong :D
04/15/2011 06:38 r4v37t#195
Quote:
Originally Posted by Interest07 View Post
The packets are encrypted before sent to the server as far as I know, so WPE pro won't help. I view the packets by settings a breakpoint at the sendPacket function (so before encryption) using MHS and displaying whats in the stack. YOu can automatically edit the packets here if you wish, but the above methods shouldn't be possible though, as you send a packet to the server saying "Please refine this n that item" instead of "I refined this item, update it please"
Interest07 can you teach me how you can get function flow/work besides sendPacket, memopen, memclose, and _hex?
:handsdown: