As per discussion in channel :
- The bot is started with the command /bot setshop ; and stopped with the command /bot closehop.
- When put into shop mode, the bot will read comma separated values from the file bot-shop.txt. The format is as follows :
as for instance
Which would signify that the bot is willing to sell WWB from its inventory at 160% of their quality-adjusted base value ; or else buy WWB of quality no higher than 300, and no lower than 5, up to a total count of 27`500 units.
- When put into shop mode, the bot will build the list of all the stacks that it holds in inventory that are mentioned in bot-shop.txt.
- When put into shop mode, the bot will build the list of all the banned players, on the basis of the first field in the file scammers.txt found in /.Eulora/logs/. The format of this file should be
- While in shop mode, every hour the bot will produce a line in public chat reading "I am buying :" followed by a list of names it is buying ; followed by "and I am selling :" followed by a list of names it is selling.
- While in shop mode, the bot will automatically respond to all whispers (with a whisper), and to all invocations of its name that it hears in public chat (the client highlights these) that come from players not matching 4 and contain one or more strings matching the list created in 3 with a list of the entries in the file it loaded at 2, formatted as follows :
I sell WWB at 160%, and have 2000q196 currentlyi ; I buy WWB q5to q300 at 150%, up to 27`500 units.
Followed by "I am at X Y." giving its coordinates (the first and third figure returned by /pos).
- The bot should automatically accept all trade requests from players not found in scammers.txt ; and automatically reject all others. The bot should automatically cancel all pending trades that have been pending for longer than three minutes.
- If at the time it hears a string matching a given name it has the trade window open, and the name of the player that mentioned the matching string matches the name of the player it has the window open with, and there is money in the trade window placed by that player ; then the bot should split a quantity of the matching product equal to the integer division of the sum of money by the unit price and place it in trade. The bot should also give change for the remainder, if it has it available.
- If at any point during an open trade the bot sees the other party accepting the trade, it should check the value of the goods on its side versus the value of the goods on the other party's side. If equal or to its advantage, it should accept ; otherwise it should cancel the trade and enter a summary line into scammers.txt with the name of the other player and the situation of the trade.
- Immediately after accepting a trade in which it bought something, the bot should open the storage and dump the products he has bought before accepting new trades. If the storage is not accessible, the bot should wait for five minutes and try to store again ; and repeat this cycle until successfully stored.
- After completing a trade, the bot should enter a line into tradelog.txt in /.Eulora/logs/, in the format
such as for instance
Fri Sep 16 15:37:53 ART 2016,Mircea Mircescu,WWB,100,195,43992
- If the name of the other party matches "Shinoa Fores", the bot should offer a 1% discount towards sells and a 1% premium over buys, so that in the example case it would pay 151% to buy and charge 159% to sell the WWB.
- Presuming he has 2k units at q 196. Bot should only describe the first stack in its inventory. [↩]