Inventory list packet

03/02/2011 21:15 shitboi#16
Quote:
Originally Posted by pro4never View Post
^ this.

Ground uids are based on a counter that tq uses (or so I've been told). Essentially it assigns a uid to items dropped on ground skiping npc uids.

Not that it really helps for any sort of auto looter but that's how it was explained to me. Each time you drop something on the ground it's assigned a uid.... if you were the only one on the map killing anything and dropped items they should increase by uid of 1 each time (skipping any used uids for other objects)

I ASSUME this is for an autohunt/loot type purpose so I'll explain how I always have done looting (I'm sure there are better ways and someone should definitely enlighten us if they can :P)


On picking up and item I determine if it should be dropped... I add it to a list of inventory items to be dropped..

As part of my botting code I check if I have items waiting to drop.. run a calculation to decide if I want to (how long since last dropped items... how many items waiting to be dropped, etc).

If those pass I drop the item and set my character to have last dropped an item now and last droped static id to be the item id I dropped..

In my packet handling code whenever I receive a item usage to remove item from my inventory I check if it's an item I am attempting to drop and if so remove it from the todrop list and from my inventory (cause sometimes you will send drop packet but server will not let you cause you just moved or w/e... it's just safer that way I found)

In my packet handling code whenever I receive a new item being added to the ground I check if the last time I dropped an item was say... less than 500 ms ago.. if so I check if the static id of the item dropped is the same as the last item I attempted to drop. If so I add it to a temporary ignore list (based on ground uid) basically saying for the next 60 seconds do not attempt to pick up a ground item with a uid of XXX


It worked fine in all my tests but I'm sure some others have different ways of doing things.
ouch... there i should i could avoid that... and now you jump out saying that is how you did it. Hmmmm... this is the also only way i thought of atm.
03/02/2011 21:16 shitboi#17
Quote:
Originally Posted by IAmHawtness View Post
Drop item while adding your current coordinates to a temporary ignore list -> wait for server response to tell you that the item was dropped -> add the temporary ignored coordinates to permanent list (dictionary of item id, timestamp) -> repeat. That's how I do it. That's kinda ping dependant of course, but who cares, my ping is great:p
wooot, that is a neat idea, lol. flagging an item on the coord it was dropped. remembered that :)
03/02/2011 21:20 IAmHawtness#18
Quote:
Originally Posted by shitboi View Post
wooot, that is a neat idea, lol. flagging an item on the coord it was dropped. remembered that :)
Yeah, and if the server hasn't responded with an "item dropped" packet after say 3 seconds or so, you can just try dropping the item again. Works wonders :p. This could of course be done with multiple items at the same time to save time
03/02/2011 22:37 pro4never#19
Quote:
Originally Posted by IAmHawtness View Post
Yeah, and if the server hasn't responded with an "item dropped" packet after say 3 seconds or so, you can just try dropping the item again. Works wonders :p. This could of course be done with multiple items at the same time to save time
That's a fantastic idea.

I was so obsessed with uids, this would have saved me loads of time on my old proxy.