Quote:
Originally Posted by Question
how would i do that?
|
Put something like this anywhere in your code
Code:
Public Type Inventory
ItemID As String
UniqueID As String
End Type
Public Items(1 to 40) As Inventory
And put this where you're examining incoming packets
Code:
Case "Whatever ID for picking up items is"
While Items(i).ItemID <> ""
i = i + 1
Wend
Items(i).ItemID = mid(IncomingPacket, Where ever the ID is, 4)
Items(i).UniqueID = mid(IncomingPacket, Where ever the ID is, 4)
Of course you would also want to examine the first inventory packet sent to you in the same way as the item pickup so that your current inventory is also stored. As well as that you will want to record item drop packets and clear certain items from the array.