trade accepting via a script

working off of the code base from my trade response script comes the trade accepting script. It checks to make sure the amount of meat you expected is in the response from the other party, then accepts the trade if so. If not, then it leaves the trade open for manual handling. If the script does not know what you expect for an item in the trade, the trade is left open for you to either manually handle or update and re-run the script.

Like the trade response script, this one will require you to do some simple editting so that it will know how to handle the item you are dealing with.

This editing takes place in the function void main, and the format is

Code:
price[$item[meat paste]] = 10;
where meat paste is the item you are setting the price for, and 10 is the price expected. There is room for improvements as nightmist alternate trade response script shows, but the basics are here.

Oh yeah the length function should be built into kolmafia now, but I haven't been able to get the newest version to download yet.
 

Attachments

  • TradeAccept.ash
    4.1 KB · Views: 121

Capital Bot

New member
hey, how do i open an ash file? and i am making a bot that i want to respond to the meat AND text of the proposed trade. what should that ash file look like, and how to load to kolmafia? please kmail me any of this info on kol (i am capital bot)
 

slyz

Developer
You can edit any ASH file with any non-formatting text editor (notepad, or notepad++ for example).
 
Top