WizzKidd Report post Posted July 4, 2005 Hello, I am working on writing a bot using VB.Net built on the 1.1 framework. Currently, my bot is able to log in and stay online (heartbeat) as well as communicate with players via general chat as well as private message. I would like to implement trading, but as I watch the ip packets between two clients attempting a trade it's dificult to decypher. Could you please post the message flow for responding to a trade request? I sure would appreciate it. Share this post Link to post Share on other sites
Zep Report post Posted July 4, 2005 (edited) You want to know of someone attempted to trade with you? Filter the chat log. to actually initiate a trade, You will need to know the actor_id for the player, And send a str[0] = TRADE_WITH; *((int *)(str+1)) = actors_list[j]->actor_id; my_tcp_send ( my_socket , str, 5 ); For example. str(0)=ADD_NEW_ACTOR is were you get your player ids from. The define #'s ive used here are in the client_serv.h in the el source Edited July 4, 2005 by Zep Share this post Link to post Share on other sites
ssjgohan Report post Posted July 4, 2005 boy oh boy you're still a top-notch programming guy zep ^^ Share this post Link to post Share on other sites
WizzKidd Report post Posted July 5, 2005 Ahhh, gota use the id, not the name No wonder it kept booting me out when I sent the command! Thanks! Share this post Link to post Share on other sites
Zep Report post Posted July 5, 2005 np yeah sending almost anything over length will have you disconnected, Nice server failsafe =) Share this post Link to post Share on other sites
WizzKidd Report post Posted July 6, 2005 OK, so next thing.. I figured out the first half of message 35 up though quantity, what's the rest? Also message 37 makes no sense to me. And the whole sequence of removing an item from the trade window. Best I can tell three messages are sent. an empty 37, then a 37 with a 1 in it, then a message starting with 0 which seems to contain the quantity. None of them contain the id to the item being removed! Am I going about this the wrong way? I wanted the bot to put the money in as the items are put in. Thanks Share this post Link to post Share on other sites
WizzKidd Report post Posted July 7, 2005 can anyone tell me in which el source file I can find the trading code? I would really appreciate it! Share this post Link to post Share on other sites
Zep Report post Posted July 8, 2005 can anyone tell me in which el source file I can find the trading code? I would really appreciate it! 177595[/snapback] umm, trade.c =) Share this post Link to post Share on other sites
Wicca Report post Posted September 15, 2005 umm, trade.c =) 178034[/snapback] Zep, if you want I can send you the source to Quartermaster and MadameYes - they both ran on my Tcl version of a trade bot and worked very well for many months. Since the update, the code is only a reference, and not too pretty either, but it does outline some of the OLD El packets. Also, the code is sloppy, but worked very well. From my point of view, the source for the EL client is NOT the way to write clients for EL or any socket code. Save yourself headaches and open 2 EL clients and run Etherreal to snif the facts out about those packets and how they interact. Another way to do it, if I may suggest, is to compile elbot and insert some printf's that list packet contents during a trade, and hack it out like that. Whitter posted a fantastic sequence of packet interaction last week in the forums here also, and thos are almost dead on describing the actual packets, BUT put and get object need slight fixes, but it's all there. Share this post Link to post Share on other sites
masoftheund Report post Posted November 20, 2006 How did the VB trade code come along. I'm trying to code the trade part of ny bot in VB.NET and implementing the trade protocols is getting confusing. Any help? Share this post Link to post Share on other sites