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

Any help with a store bot?

Recommended Posts

Hi! after my success with netWizzie(hes on alot on the testserver, PM him ;)) i wanted to make a storebot.



Edit: does anyone know of an editable store-bot that WORKS? oh, and fixed some spelling errors.


but ive found a few problems :(


first of all, how do you tell what quantity of item opponent put on the trade?


other then that, hes pretty good :pirate:


Thanks for your help,


Netdude2(on testserver, NeTdudE on mainserver)


What ive got so far:


*trade with user(almost..)

*come up with the right price needed for item

*list items

Edited by Dude

Share this post

Link to post
Share on other sites

Heres my BUY code sofar:




function buy($sender, $object) {

$items = Array("Raw Meat", "Brown rabbit fur");
$prices = Array(5,8);

$this->sendPrivateMessage($sender, "Great!");

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

$this->sendPrivateMessage($sender, "Trade me and ill sell it to you!");

// canculate $ammount
if($object == $items[0]) {
 $ammount = $prices[0];
if($object == $items[1]) {
 $ammount = $prices[1];

if($ammount == 0) { //if ammount has not been set(e.g. item not exist).
 $this->sendPrivateMessage($sender, "Sorry, i dont sell that!");
 $this->send($SERVER_COMMANDS["EXIT_TRADE"], "");

$this->sendPrivateMessage($sender, "That will cost you " . $ammount . " gc!");

$this->send($SERVER_COMMANDS["PUT_ITEM_ON_TRADE"], $object);

//Once other person puts item on trade; accept, wait 30, accept again


Edited by Dude

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.