Shop routine
Opens the shopping system.
Syntax
function shop(style: word; messageStyle: byte; store: word): boolean;
Description
The shop routine begins the shopping system. The style parameter determines which type of shop will be opened: 0 is a buy/sell shop, 1 is a buy-only shop, and 2 is a sell-only shop. The messageStyle parameter refers to the set of shop messages to be displayed. The store parameter refers to a store inventory previously set up by the prepareStore routine.
If an invalid number is passed to any of these parameters, it will be corrected to a default value: the lowest valid number for each case. A default shop # 0 that sells nothing is created automatically during setup.
The routine returns true if anything has been successfully bought or sold, or false otherwise.
Related topics
This help file was created with the free trial version of HelpScribble.