error on the Wiki

I also now notice that the description of the put_shop functionality is not completely accurate.

boolean put_shop (int price, int limit, item it)
Places all of the associated item into your mall store at the desired price and with the associated limit on purchases per day, if possible. If the price is set to 0, then the price set will be 999,999,999 meat.

Actual functionality:
Places all of the associated item into your mall store at the desired price and with the associated limit on purchases per day, if possible. If the price is set to 0, then the current price will remain unchanged if you already have that item in your store. If you do not already have that item in your store and If the price is set to 0, then the price set will be 999,999,999 meat.

another thing to add:
boolean buy (int count, item it)
Tries to buy items. First preference is given to NPC stores that you have access to and then, if possible, will buy the cheapest available items from the mall.

When passing 0 or a negative number to the buy command kolmafia ignores the command. This functionality is usefull as follows:

Code:
buy(100-shop_amount($item[olive]), $item[olive]);
put_shop(100, 0, $item[olive]);

if I have 109 olives in my store, then I am telling kolmafia to buy -9 olives. It seemingly makes no sense to tell kolmafia to do that, however since kolmafia ignores the command I do not have to write an if statement, and make a simple script way too complex.


Finally I gotta say Great work on the Wiki! I will be using it a lot since I can finally find what I am looking for rather quick. I found myself prone to error because of not looking at the manual while writing scripts before. Now that I can weed out the command that totally don't relate to what I am typing at the moment I will have far fewer errors.
 
[quote author=Alexander Daychilde link=topic=323.msg1754#msg1754 date=1154386959]
BTW, I wouldn't mind giving you an account over there, you know. It's encouraged. ;-)

(but don't feel obligated... just emphasizing I don't mind granting access...)
[/quote]

OK sounds good.

By the way,
boolean use (int number, item it)
boolean eat (int number, item it)
boolean drink (int number, item it)
boolean create (int number, item it)

instead of "int number" in the parameters list, I think it should read "int quantity" which would be obvious what the parameter is for to someone who has no scripting or programming experience whatsoever.

before the thought comes up that I would be indicating that someone might be too dumb to realize, I will say that from time to time logical thought goes out the window for a programmer writing a program. Those times when the programmer just needs to walk away from it for a smoke or something, and come back with a clear head.
 

macman104

Member
[quote author=efilnikufecin link=topic=323.msg1761#msg1761 date=1154410695]
OK sounds good.

By the way,
boolean use (int number, item it)
boolean eat (int number, item it)
boolean drink (int number, item it)
boolean create (int number, item it)

instead of "int number" in the parameters list, I think it should read "int quantity" which would be obvious what the parameter is for to someone who has no scripting or programming experience whatsoever.

before the thought comes up that I would be indicating that someone might be too dumb to realize, I will say that from time to time logical thought goes out the window for a programmer writing a program. Those times when the programmer just needs to walk away from it for a smoke or something, and come back with a clear head.
[/quote]Agreed and updated!

EDIT: Or not, since someone already beat me to the punch :)
 
Top