efilnikufecin
Member
TradeArray.ash is a set of functions which you use to build a list of items you wish to trade to another player, then propose the trade offer. The script is designed to be imported into another script.
ItemAdd(item toput, int QuantToSave)
call this function for each item you want to add to the list of items to be traded. QuantToSave is the amount of the item to keep.
The reason for using QuantToSave instead of QuantToTrade is that most of the time people (at least myself) know how many of an item they want to keep, and calculate how many to trade. The script does it for you. 0 to keep none.
ExecuteTrade(int Playernum, string message)
Call this function after building the list. Playernum is the players number you want to propose the trade to. message is the text in the trade message
About message text: this can be an empty string ""if you have any spaces in the message replace them with a + sign as demonstrated in Sewertrade.ash. any punctuation should be omitted (unless you know how to properly convert). Later I may add further instructions for use of punctuation. Now supports plain text messages per veracity's suggestion.
about playernum: it is the player number visible on a players profile by their name.
SewerTrade.ash
this script will build a list of tradeable sewer items which you have (except spices), and propose them in a trade offer to me (I collect them). For those who don't know I will reply with 75 meat per item.
SewerTrade.ash requires TradeArray.ash, however you may use tradearray.ash for other items/players as you see the need. I suggest looking at SewerTrade.ash if you plan to use TradeArray.ash because it is an example of how to use TradeArray.
Any Trades offered using this script must be accepted manually. There is no method of replying to a trade offer automattically that I see, or accepting them.
This script was written and posted at the request of another player who sells sewer items to me.
edit: forgot the files. How dumb of me
Now updated to use url_encode. Now supports plain text messages. I forgot the feature was added.
ItemAdd(item toput, int QuantToSave)
call this function for each item you want to add to the list of items to be traded. QuantToSave is the amount of the item to keep.
The reason for using QuantToSave instead of QuantToTrade is that most of the time people (at least myself) know how many of an item they want to keep, and calculate how many to trade. The script does it for you. 0 to keep none.
ExecuteTrade(int Playernum, string message)
Call this function after building the list. Playernum is the players number you want to propose the trade to. message is the text in the trade message
About message text: this can be an empty string ""
about playernum: it is the player number visible on a players profile by their name.
SewerTrade.ash
this script will build a list of tradeable sewer items which you have (except spices), and propose them in a trade offer to me (I collect them). For those who don't know I will reply with 75 meat per item.
SewerTrade.ash requires TradeArray.ash, however you may use tradearray.ash for other items/players as you see the need. I suggest looking at SewerTrade.ash if you plan to use TradeArray.ash because it is an example of how to use TradeArray.
Any Trades offered using this script must be accepted manually. There is no method of replying to a trade offer automattically that I see, or accepting them.
This script was written and posted at the request of another player who sells sewer items to me.
edit: forgot the files. How dumb of me

Now updated to use url_encode. Now supports plain text messages. I forgot the feature was added.