Net_man Report post Posted June 2, 2006 (edited) 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 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 June 3, 2006 by Dude Share this post Link to post Share on other sites
Net_man Report post Posted June 2, 2006 (edited) Heres my BUY code sofar: f 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 June 2, 2006 by Dude Share this post Link to post Share on other sites
Jaxbot Report post Posted June 6, 2006 Nice code... but you'll need to edit the file... forgot which one... to make it work right. Share this post Link to post Share on other sites