Results 1 to 9 of 9
  1. #1
    DonJuan13's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    76

    How to find ObjectID of SlotObject for current vault chest

    I am trying to automate the process of placing a bunch of items in a single vault by using the Invswap packet. Also is there a way to get the ObjectTypes for all the items in a vault you are standing over.

    This is an example of a succesful Invswap packet that I hooked onto and printed in the console:
    Code:
    INVSWAP(78) Packet Instance
    	Time => 50684
    	Position => { X=37.31911, Y=70.5954 }
    	SlotObject1 => { ObjectId=353, SlotId=4, ObjectType=2593 }
    	SlotObject2 => { ObjectId=359, SlotId=0, ObjectType=-1 }
    	Send => True
    	Id => 78
    359 is the ObjectId of the vault I placed the item in. That is the only value I am having trouble finding.

  2. #2
    bluuman's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    localhost
    Posts
    629
    Reputation
    10
    Thanks
    889
    Im also curious about this. All I can think of is look in the newObjs of the update packet, then compare an objects position to player position to find the closest one.

  3. #3
    059's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    California
    Posts
    3,312
    Reputation
    700
    Thanks
    92,771
    You need to parse the statdata in update/newtick. Make a GameObject dictionary, just like the flash client does, and every update/newtick parse statdata for the id. Then just loop objects, look for vault object type, find closest one, then check the items.
    My Vouches
    Having an issue with RotMG? Check for the solution here.


    Need Realm items? Come to RealmStock!

    Accepting PayPal - Bitcoin - Giftcards
    Selling ST Sets, Class Top Sets, Life Pots, and much more!


    Find it here: MPGH Sales Thread

  4. The Following User Says Thank You to 059 For This Useful Post:

    DonJuan13 (01-28-2017)

  5. #4
    CrazyJani's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    2,475
    Reputation
    170
    Thanks
    15,666
    Keep in mind that you have to wait 550 milliseconds after switching each item or the server will not let you.

  6. The Following 2 Users Say Thank You to CrazyJani For This Useful Post:

    Alde. (01-30-2017),DonJuan13 (01-28-2017)

  7. #5
    toddddd's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    720
    Reputation
    46
    Thanks
    6,363
    Take a look at the LootHelper plugin for k-relay (you can find the source on ****** easily). You can see how it finds the items in bags, which is the same way you would for vault chests, and you can see how it creates the packet for grabbing that item (which you could reverse for putting something in a vault).

  8. The Following User Says Thank You to toddddd For This Useful Post:

    DonJuan13 (01-30-2017)

  9. #6
    DonJuan13's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    76
    @059 So I've gotten it mostly working. The only problem is that if I move all the items to the vault slots, then try to move them back the client disconnects. I think it has something to do with the ObjectId's not being updated.

    A successful Invswap packet looks something like this:
    Code:
    Made: INVSWAP(78) Packet Instance
    	Time => 1360522
    	Position => { X=37.48363, Y=70.27171 }
    	SlotObject1 => { ObjectId=353, SlotId=4, ObjectType=2592 }
    	SlotObject2 => { ObjectId=359, SlotId=0, ObjectType=-1 }
    	Send => True
    	Id => 78
    Then if I try to swap it back with another Invswap packet the ObjectType seems to not be updating for the vault data

    Code:
    Made: INVSWAP(78) Packet Instance
    	Time => 1367834
    	Position => { X=37.48363, Y=70.27171 }
    	SlotObject1 => { ObjectId=353, SlotId=4, ObjectType=-1 }
    	SlotObject2 => { ObjectId=359, SlotId=0, ObjectType=-1 }
    	Send => True
    	Id => 78
    Any clues as to why the ObjectType isn't being updated? Do I have to wait for an Update/Newtick Packet? Thanks for any advice

  10. #7
    059's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    California
    Posts
    3,312
    Reputation
    700
    Thanks
    92,771
    Quote Originally Posted by DonJuan13 View Post
    @059 So I've gotten it mostly working. The only problem is that if I move all the items to the vault slots, then try to move them back the client disconnects. I think it has something to do with the ObjectId's not being updated.

    A successful Invswap packet looks something like this:
    Code:
    Made: INVSWAP(78) Packet Instance
    	Time => 1360522
    	Position => { X=37.48363, Y=70.27171 }
    	SlotObject1 => { ObjectId=353, SlotId=4, ObjectType=2592 }
    	SlotObject2 => { ObjectId=359, SlotId=0, ObjectType=-1 }
    	Send => True
    	Id => 78
    Then if I try to swap it back with another Invswap packet the ObjectType seems to not be updating for the vault data

    Code:
    Made: INVSWAP(78) Packet Instance
    	Time => 1367834
    	Position => { X=37.48363, Y=70.27171 }
    	SlotObject1 => { ObjectId=353, SlotId=4, ObjectType=-1 }
    	SlotObject2 => { ObjectId=359, SlotId=0, ObjectType=-1 }
    	Send => True
    	Id => 78
    Any clues as to why the ObjectType isn't being updated? Do I have to wait for an Update/Newtick Packet? Thanks for any advice
    Yes, wait for newtick. In my bot I have it set up like this:
    on update:
    - add/remove new objects, then parse their statdata
    on newtick:
    - parse all object statdata
    - run the logic for looting (note there's a 500ms speed limit on looting items)

    This way, the objects' inventories will be updated before you do anything.
    My Vouches
    Having an issue with RotMG? Check for the solution here.


    Need Realm items? Come to RealmStock!

    Accepting PayPal - Bitcoin - Giftcards
    Selling ST Sets, Class Top Sets, Life Pots, and much more!


    Find it here: MPGH Sales Thread

  11. The Following User Says Thank You to 059 For This Useful Post:

    DonJuan13 (01-30-2017)

  12. #8
    DonJuan13's Avatar
    Join Date
    May 2014
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    76
    @059 Thanks for your help so far. Sorry for bombarding you with such simple questions.

    It mostly works now, but disconnects after about 16-24 Inventory swaps. My guess is that the way I am implementing it, I don't wait for a newtick/update packet before trying to send another packet. However, I do have it wait at least 500ms. You can view my source code here if that helps any?

    On another note, what are the "Drops" from the UpdatePacket? Is it just an array of ObjectId's of items that have left the current FoV? Is that what I would use to remove old objects from my dictionary of objects?

    Sorry again for all the questions. Cheers.

    [Edit] On further thought I now think this is because I am using the same client.Time which is not getting the most recent time and is just using the time from the original packet sent.
    Last edited by DonJuan13; 01-30-2017 at 11:28 AM.

  13. #9
    bluuman's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    localhost
    Posts
    629
    Reputation
    10
    Thanks
    889
    Quote Originally Posted by DonJuan13 View Post
    @059 Thanks for your help so far. Sorry for bombarding you with such simple questions.

    It mostly works now, but disconnects after about 16-24 Inventory swaps. My guess is that the way I am implementing it, I don't wait for a newtick/update packet before trying to send another packet. However, I do have it wait at least 500ms. You can view my source code here if that helps any?

    On another note, what are the "Drops" from the UpdatePacket? Is it just an array of ObjectId's of items that have left the current FoV? Is that what I would use to remove old objects from my dictionary of objects?

    Sorry again for all the questions. Cheers.

    [Edit] On further thought I now think this is because I am using the same client.Time which is not getting the most recent time and is just using the time from the original packet sent.
    I think you're right about drops. Its what should and can be removed. You can get the clients time with client.Time.

Similar Threads

  1. [Solved] How to find Anti AFK Addy for 1 thanks.
    By fvckinghell in forum WarRock Help
    Replies: 2
    Last Post: 01-16-2015, 03:46 AM
  2. How to find Address Fly hack for MAT (Cheat Engine)
    By kunonzaz1 in forum Mission Against Terror Help
    Replies: 3
    Last Post: 04-21-2013, 04:09 AM
  3. [Tutorial] How To Find Some WarRock PH Addys! (Currently)
    By F l a p J a c K ™ in forum WarRock Philippines Hacks
    Replies: 32
    Last Post: 01-15-2013, 02:05 AM
  4. [CODERS] How to find your character number for SF
    By brayton123 in forum Soldier Front Help
    Replies: 0
    Last Post: 09-21-2012, 02:50 PM
  5. How to find the logon box for customized logon screens[PICS]
    By chanman1101 in forum CrossFire Mods & Rez Modding
    Replies: 14
    Last Post: 08-09-2010, 10:33 AM