jamincollins Report post Posted February 2, 2007 I've been working on some new bot code and run into something of a problem. For some reason, any trade consisting of more than 2 items on my character side of the trade to the bot fail with the following error: Trade session failed. Freya can't carry all the items. However, Freya has more than ample free slots: 20070202 17:22:34 [13105] - -- Detailed inventory dump -- 20070202 17:22:34 [13105] - Slot: 0 Qty: 1 Item: Steel Two Edged Sword 20070202 17:22:34 [13105] - Slot: 1 Qty: 27211 Item: Gold Coins 20070202 17:22:34 [13105] - Slot: 2 Qty: 1 Item: Iron Cuisses 20070202 17:22:34 [13105] - Slot: 3 Qty: 162 Item: Health Essence 20070202 17:22:34 [13105] - Slot: 4 Qty: 400 Item: Raw Meat 20070202 17:22:34 [13105] - Slot: 5 Qty: 800 Item: Water Essence 20070202 17:22:34 [13105] - Slot: 6 Qty: 329 Item: Fire Essence 20070202 17:22:34 [13105] - Slot: 7 Qty: 100 Item: Silver Bar 20070202 17:22:34 [13105] - Slot: 8 Qty: 1 Item: Steel Chain Mail 20070202 17:22:34 [13105] - Slot: 9 Qty: 1 Item: Iron Greave 20070202 17:22:34 [13105] - Slot: 10 Qty: 42 Item: Iron Bar 20070202 17:22:34 [13105] - Slot: 11 Qty: 1 Item: Titanium/Steel Alloy Long Sword 20070202 17:22:34 [13105] - Slot: 12 Qty: 5 Item: Enriched Fire Essence 20070202 17:22:34 [13105] - Slot: 13 Qty: 223 Item: Wine 20070202 17:22:34 [13105] - Slot: 14 Qty: 4 Item: Potion of Spirit Restoration 20070202 17:22:34 [13105] - Slot: 15 Qty: 2 Item: Hydrogenium Bar 20070202 17:22:34 [13105] - Slot: 16 Qty: 500 Item: Life Essence 20070202 17:22:34 [13105] - Slot: 17 Qty: 90 Item: Ring of Disengagement 20070202 17:22:34 [13105] - Slot: 18 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 19 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 20 Qty: 500 Item: Matter Essence 20070202 17:22:34 [13105] - Slot: 21 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 22 Qty: 30 Item: Ring of Damage 20070202 17:22:34 [13105] - Slot: 23 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 24 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 25 Qty: 500 Item: Magic Essence 20070202 17:22:34 [13105] - Slot: 26 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 27 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 28 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 29 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 30 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 31 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 32 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 33 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 34 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 35 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - -- Begin Worn Slots -- 20070202 17:22:34 [13105] - Slot: 36 Qty: 1 Item: Leather Helm 20070202 17:22:34 [13105] - Slot: 37 Qty: 1 Item: Padded Leather Armor 20070202 17:22:34 [13105] - Slot: 38 Qty: 1 Item: Leather Pants 20070202 17:22:34 [13105] - Slot: 39 Qty: 1 Item: Leather Boots 20070202 17:22:34 [13105] - Slot: 40 Qty: 1 Item: Leather Gloves 20070202 17:22:34 [13105] - Slot: 41 Qty: 1 Item: Fur Cloak 20070202 17:22:34 [13105] - Slot: 42 Qty: 0 Item: *unknown* 20070202 17:22:34 [13105] - Slot: 43 Qty: 0 Item: *unknown* As you can see from the above output there are a number of empty positions: 18-19, 21, 23-24, and 26-35. The same problem seems to effect some other bots (Charn and Shari come to mind). However in talking with LabRat, it doesn't seem to be true of all bots. Anyone have any idea what I may be missing? Share this post Link to post Share on other sites
The_Piper Report post Posted February 2, 2007 Its not only a matter of free slots, the bot just can be overloaded with the items you try to give to it. Piper Share this post Link to post Share on other sites
jamincollins Report post Posted February 3, 2007 Its not only a matter of free slots, the bot just can be overloaded with the items you try to give to it. While I did fail to mention it, I did check that too. At the time of the above report, the bot had over 5k available emu. The trade consisted of 2 cloaks (Monster Magnetism and Excavator) and 1 Matter Essence. There were more than enough slots and more than sufficient EMU available. Share this post Link to post Share on other sites
nicky Report post Posted April 2, 2007 jamincollins, did you happen to figure out what causes this? if you did, could you please share that info? Thanks Share this post Link to post Share on other sites
jamincollins Report post Posted April 6, 2007 jamincollins, did you happen to figure out what causes this? if you did, could you please share that info? Thanks Nope, still happening. I think I'm going to create a trimmed down set of code to illustrate the problem for others to pick over. Share this post Link to post Share on other sites
nicky Report post Posted April 6, 2007 Thanks for getting back to me. I now maintain charn, shari and perun and have been actively improving thier code (especially from some exploits that caused them to give away some free items). I'll be working on this issue as well, but i just can't see where on the client side this problem would be created. Items are added to the trade window properly, the slots and emu are available, both sides accept properly, and BAM! trade failed. If anyone on the EL Development side of the house has any idea's, I would greatly appreciate to hear them. I'll share any fix i can find on this thread. I already asked ttlanhil, and he wasn't sure what it could be. Share this post Link to post Share on other sites
Learner Report post Posted April 6, 2007 Thanks for getting back to me. I now maintain charn, shari and perun and have been actively improving thier code (especially from some exploits that caused them to give away some free items). I'll be working on this issue as well, but i just can't see where on the client side this problem would be created. Items are added to the trade window properly, the slots and emu are available, both sides accept properly, and BAM! trade failed. If anyone on the EL Development side of the house has any idea's, I would greatly appreciate to hear them. I'll share any fix i can find on this thread. I already asked ttlanhil, and he wasn't sure what it could be. Some players have claimed that accepting too quickly can cause a trade to fail. I've never been able to recreate this, so I don't know if this is true or not. Again, this might not have anything to do with your problem. Share this post Link to post Share on other sites
Lorck Report post Posted April 6, 2007 Some players have claimed that accepting too quickly can cause a trade to fail. I've never been able to recreate this, so I don't know if this is true or not. Again, this might not have anything to do with your problem. When you are in storage range and accept the trade to quickly, the items are placed on your inventory instead of your storage, so if you don't have enough space on inventory the trade is aborted. When your trading partner have accepted the first time, double click on your accept, it will trigger the bug for sure. Share this post Link to post Share on other sites
nicky Report post Posted April 7, 2007 Excellent, thank you both. This gives me a starting point to work from. Share this post Link to post Share on other sites
nicky Report post Posted April 8, 2007 #1 rule: go back to the documentation. Did so, and found something interesting. In the new trade protocol post, i found this tidbit: If you have already accepted the trade once, you have to send the targets for all of the items as well: CODE #define ITEM_INVENTORY 1 #define ITEM_BANK 2 str[0]=ACCEPT_TRADE; *((Uint16*)(str+1))=17; for(i=0;i<16;i++){ *((Uint8*)(str+3+i))=ITEM_INVENTORY || ITEM_BANK; } Well, i do not see my bot code doing this for the second accept, question that perhaps some of you may be able to answer, is does this apply when i'm nowhere near a storage? should I update my code to send this same command with all slots marker ITEM_INVENTORY? Share this post Link to post Share on other sites
nicky Report post Posted April 10, 2007 Fixed. On the test server it worked anyways, im at work, so i'll be updating my code when i get home. The code in my previous posting was the key to getting charn to accept more then 2 items form a user at a time. If you too are having problems with trades where users offer more then 2 items and the trade fails with an error stating you do not have enough room for the items, then try the above code. It's slightly different in VB.Net, but if you follow the idea to construct the packet properly, it will work. Thanks to everyone who posted thier ideas, and thank the game devs for this example code. Share this post Link to post Share on other sites