Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Jaxbot

Store Bot

Recommended Posts

Hi, I'm making a storebot... but when I try to trade with it, it laggs out.

 

Here's the code:

 

 

case "donate":

$this->sendPrivateMessage($sender, "Great! Click trade on me!");

$this->send($SERVER_COMMANDS["TRADE_WITH"] ."%s", $sender);

break;

 

Thanks!

Share this post


Link to post
Share on other sites

Hi, I'm making a storebot... but when I try to trade with it, it laggs out.

 

Here's the code:

 

 

case "donate":

$this->sendPrivateMessage($sender, "Great! Click trade on me!");

$this->send($SERVER_COMMANDS["TRADE_WITH"] ."%s", $sender);

break;

 

Thanks!

You aren't using the protocol properly, so the server is disconnecting you. Look at the client code and you will see that most of the data going between you and the server is binary, and you never send a players name except for things like saying it or PM'ing!

 

If you can't follow the client code or some of the many links to bots already posted, maybe you need to stop trying or you will constantly run into problems like this!

Share this post


Link to post
Share on other sites

It's been a while since I messed with trading code, but don't you need the actor id, not the name? Feel free to delete this post if the information in it is incorrect :/

 

Edit: heh teh ph34r3d Learner beat me by a second :lipssealed:

 

2nd Edit: shouldn't your case check to see if the actor is in range before you try and initiate trade? The player needs to be in view so you will have the actor id..

Edited by LabRat

Share this post


Link to post
Share on other sites

Ok, thanks for the tip.

 

How do I get a actor ID?

Look at the client code and other peoples available code. We aren't here to write your bot for you and if you can't find that piece of information, you will keep needing too much help with your bot.

Share this post


Link to post
Share on other sites
I can't use the client code, because it's C++. However, I guess you have a point. I'll work on a simpler bot.
client code is in C, not C++. but you only need to be able to read it to make a bot, not write it (unless you're writing a bot in C/C++)

 

if you don't like reading C/C++ then use the work of other people... read code for bots in java or whatever you prefer if you can find it

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×