|
You last visited: Today at 00:06
Advertisement
Sending Packets
Discussion on Sending Packets within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.
07/14/2015, 21:51
|
#421
|
elite*gold: 0
Join Date: Oct 2010
Posts: 3
Received Thanks: 0
|
Hi, I've noticed neither c# nor autoit will send packets over 127 bytes in size and crash the client. Is this related to the methods of allocating memory in these examples or is there a restriction put up by elementclient (doubtful about this because I've sniffed packets bigger than the "limit")? If it's the latter, are there any workarounds?
|
|
|
07/15/2015, 09:30
|
#422
|
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
|
No, it's due to the fact that byte length isn't a byte, it'S a CUInt (packed int). After 127, it is two bytes long with a special encoding.
|
|
|
07/16/2015, 11:35
|
#423
|
elite*gold: 0
Join Date: Oct 2010
Posts: 3
Received Thanks: 0
|
Quote:
Originally Posted by Sᴡoosh
No, it's due to the fact that byte length isn't a byte, it'S a CUInt (packed int). After 127, it is two bytes long with a special encoding.
|
Hey, thanks for your answer. However, I'm still lost as to how to pass two bytes as packet length. Here, in the opcode:
PHP Code:
0x60, //PUSHAD
0xB8, 0x00, 0x00, 0x00, 0x00, //MOV EAX, SendPacketAddress
0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, //MOV ECX, DWORD PTR [realBaseAddress]
0x8B, 0x49, 0x20, //MOV ECX, DWORD PTR [ECX+20]
0xBF, 0x00, 0x00, 0x00, 0x00, //MOV EDI, packetAddress
0x6A, 0x00, <-- //PUSH packetSize
0x57, //PUSH EDI
0xFF, 0xD0, //CALL EAX
0x61, //POPAD
0xC3 //RET
There's only place for one byte to write. I tried adding an additional byte and encoding the length in 128 base, but that produces the same result - crashes the client. Sorry if this is really easy and I'm missing something obvious, but I've tried to do this for a good few hours and I can't seem to figure it out myself.
|
|
|
07/16/2015, 12:47
|
#424
|
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
|
Yeah, Push only supports one byte as opcode. There's a different function that handles this correctly. This function was never meant to be called directly by the programmers.
What the hell are you sending in a C22 packet that's over 127 bytes btw?
|
|
|
07/16/2015, 13:33
|
#425
|
elite*gold: 0
Join Date: Oct 2010
Posts: 3
Received Thanks: 0
|
Quote:
Originally Posted by Sᴡoosh
Yeah, Push only supports one byte as opcode. There's a different function that handles this correctly. This function was never meant to be called directly by the programmers.
What the hell are you sending in a C22 packet that's over 127 bytes btw?
|
The packet I'm trying to send is the one that recrafts weapons. Normal crafting packet is 18 or so bytes long, but this packet has additional 128 bytes as it needs to pass to the client itemTypeID and index in inventory of each ingredient. What boggles me, though, is that there's 32 empty bytes after itemTypeID bytes and another 32 after index bytes.
Anywho, there was a russian autocraft for 1.4.6- versions, but I guess it doesn't work anymore and I can't seem to find anything related to how it sends packets.
So, is this possible to be done by sending packets? My knowledge about asm and memory manipulating is still low so I wouldn't know how to find the function you mentioned.
Edit: Never mind, I just had to load packetsize into a register and push that register.
|
|
|
01/16/2017, 23:07
|
#426
|
elite*gold: 0
Join Date: Sep 2016
Posts: 2
Received Thanks: 0
|
how to find SendPacketAddress please.
|
|
|
01/21/2017, 10:59
|
#427
|
elite*gold: 0
Join Date: Jun 2008
Posts: 37
Received Thanks: 21
|
I found out today how to double the accountstash to 32 slots, when you take everything out, it's gone again.
Just push an item from the stash to position 17, via packet, to expand
|
|
|
01/25/2017, 23:28
|
#428
|
elite*gold: 0
Join Date: Apr 2007
Posts: 50
Received Thanks: 0
|
Quote:
Originally Posted by Kruger2001
I found out today how to double the accountstash to 32 slots, when you take everything out, it's gone again.
Just push an item from the stash to position 17, via packet, to expand 
|
This I'd love to learn how to do. My stash shows 32 but i'm only able to use 16 slots.
|
|
|
01/26/2017, 09:59
|
#429
|
elite*gold: 0
Join Date: Jun 2008
Posts: 37
Received Thanks: 21
|
Quote:
Originally Posted by Sh@dowX
This I'd love to learn how to do. My stash shows 32 but i'm only able to use 16 slots.
|
Yes, I also noticed, I have a stack shared and one on each slot, thats worked for all 32 slots and so I thought it worked with everyone.
|
|
|
01/26/2017, 19:31
|
#430
|
elite*gold: 0
Join Date: Jul 2011
Posts: 145
Received Thanks: 97
|
To put in more than 16 items put something stackable in your stash, split the stack into another slot of the stash by holding down alt key and dragging. Then swap something into your inventory into the newly occupied spot. I found this packet when they merged the servers.
|
|
|
02/25/2017, 18:03
|
#431
|
elite*gold: 0
Join Date: Feb 2017
Posts: 1
Received Thanks: 0
|
Is it possible to start a catshop with packets (ingame)? I tried sending packet 0x54 (which opens the catshop creation window, as expected) and then 0x4c (copied exactly from a packet sniffer). It works only if I opened the catshop manually before, but not when I remove all items manually and send the same packets.
So, what else is needed for opening a catshop?
|
|
|
06/26/2017, 19:48
|
#432
|
elite*gold: 0
Join Date: Sep 2011
Posts: 25
Received Thanks: 0
|
wow, this thread has been going on for a while now lol
|
|
|
03/26/2019, 04:32
|
#433
|
elite*gold: 0
Join Date: Dec 2016
Posts: 20
Received Thanks: 2
|
Quote:
Originally Posted by burple6
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
|
can you put these offset from the prophet in this code?
[Perfect_World_Base_Address_In_Decimal]
Application_Title=Perfect World Renascer - Clįssico
Base_Address=13069772
Real_Base_Address=13067820
Base_AddressFZ=13070976
Base_AddressEXP=13072960
SendPacket_Adress=7493376
ChatBase_Address=13090272
LastChat_Address=13090284
Base_Zoom=4227602
Base_Emot=5432478
[Custom_32_Offsets_In_Decimal]
CHARSTRUCT1_OffSet=44
Casting_Offset=1956
Name_offset=1712
CHARID_Offset=1172
LVL_Offset=1184
Class_offset=1720
HP_OffSet=1192
MaxHP_OffSet=1268
EXP_OffSet=1200
MP_OffSet=1196
MaxMP_OffSet=1272
STR_offset=1260
DEX_offset=1264
VIT_offset=1252
MAG_offset=1256
Spirit_offset=1204
Gold_offset=1400
FlySpeed_Offset=1292
FlyCounter_Offset=2564
FlyID_Offset=1456
MoveMode_OffSet=1732
CHI_Offset=1212
MAXCHI_Offset=1396
Jump_Offset=3640
CastID_Offset=1952
CharState_Offset=1856
Reputation_Offset=1528
Culti_Offset=1188
X_Offset=60
Y_Offset=68
Z_Offset=64
HPCD_OffSet=2916
MPCD_OffSet=2924
Target_OffSet=3388
PetBase_Offset=5000
PetHP_OffSet=56
PetHunger_OffSet=8
ACTIONSTRCT1_Offset=44
ACTIONSTRCT2_Offset=4976
ACTIONSTRCT3_Offset=48
ACTIONSTRCT4A_Offset=4
ACTIONSTRCT4B_Offset=8
ActionFlag_Offset=24
ActionRead_Offset=4
ActionRead2_Offset=8
ActionRead3_Offset=28
ActionWrite_Offset=12
ActionWrite2_Offset=20
ActionSkill_Offset=80
ActionMoveX_Offset=32
ActionMoveY_Offset=40
ActionMoveZ_Offset=36
ActionHeight_OffSet=104
ActionHeightFlag_OffSet=100
ActionHeightFlag2_OffSet=108
ActionDoneFlag_Offset=8
ActionValue_Offset=44
ActionValue2_Offset=64
ActionSetError_Offset=76
ActionFinished_Offset=8
ActionStart_Offset=20
ActionNotStart_Offset=36
ActionObject_Offset=32
ObjectAction_Offset=56
PLAYERSTRUCT1_OffSet=28
PLAYERSTRUCT2_OffSet=28
PlayerBase_Offset=148
PlayerCount_Offset=20
PlayerID_Offset=1172
PlayerLVL_Offset=1184
PlayerName_Offset=1712
PlayerHP_Offset=1192
PlayerMAXHP_Offset=1268
PlayerClass_Offset=1720
PlayerGenie_Offset=996
GenieStamina_Offset=184
NPCSTRUCT1_OffSet=24
NPCSTRUCT2_OffSet=32
NPCBase_Offset=88
NPCPAI_Offset=752
NPCCount_Offset=20
NPCID_Offset=288
NPCName_Offset=632
NPCLVL_Offset=296
NPCHP_Offset=304
NPCMAXHP_Offset=380
NPCSpecial_Offset=620
TARSTARGET_OffSet=772
ITEMSTRUCT1_OffSet=24
ITEMSTRUCT2_OffSet=36
ItemBase_Offset=28
ItemID_Offset=272
ItemSN_Offset=276
ItemName_Offset=360
ItemType_Offset=336
INVENTORYSTRUCT1_OffSet=3856
InventoryBase_Offset=12
InventoryCount_Offset=20
InventoryID_Offset=12
InventoryStackAmount_Offset=24
InventoryMAXStackAmount_Offset=24
InventorySellPrice_Offset=28
InventoryBuyPrice_Offset=32
InventoryDescription_Offset=76
EQUIPPEDINVENTORSTRUCT1_OffSet=3864
[Skillz]
SkillBase=5020
|
|
|
 |
|
Similar Threads
|
Help with sending packets in autoit
08/16/2010 - AutoIt - 1 Replies
ive been lookin around different sites for ways to send packets to the game server. the only examples i see is to create a server and a client which i dont need, i think. well to the point now, can someone lead me in a direction or tell me how to send packets to a game? also if i send packets then that means i dont need the game to be active, correct? Because in autoit when u use keys u need to have the game active, and control send does not work. ty
|
Sending Packets !!!
09/07/2008 - Kal Online - 14 Replies
now i know how to sniff / analyse packets ... but what then ? :)
how can i send packets ?? to pimp or mix weapon for example
i just need the way to send , and then i can depend on myself :D
|
Sending Packets (need advice)
03/20/2008 - Conquer Online 2 - 7 Replies
OK well im finaly trying to stop leaching off of everybodys work its been great n all download n play :D But im tired of being a begger n the past couple months ive been learning as much as i can about macros memery add blah blah you know ...
After playing around with ce and ahk the past couple months i stumbled across wpe pro, theres not alot of tuturals and its hard to find good help.
Well heres what ive been doing so far, open my CO then i attach it to my sniffer.
I change my...
|
Scamming by sending packets???
04/15/2006 - Conquer Online 2 - 1 Replies
Well my friend and i came up with the idea to send packets to the server to show a certain item in the trade window. We want to use this as a type of scam. I didnt see this in any other threads and was wondering if anyone knew if this is possible and if they could point use in the right direction. My friend was pretty good with packets in CO 1.0 but we arent really sure to go about doing it. If anyone one could please lend a helping hand?
P.S.- Before I get flamed for this because i know i...
|
Sending packets
10/12/2005 - Conquer Online 2 - 10 Replies
I've a question. Is it possible to send 1 packet multiple times at the exact same time?
|
All times are GMT +1. The time now is 00:07.
|
|