Age4/object types/buyitem: Difference between revisions
< Age4 | object types
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Allows the purchase of an item from a shop. Multiple items can be specified to buy at once. All normal restrictions such as full inventory, maximum items in a stack, etc are followed. | Allows the purchase of an item from a shop. Multiple items can be specified to buy at once. All normal restrictions such as full inventory, maximum items in a stack, etc are followed. You will always purchase as many as able if configured for more than 1. | ||
'''Example Usage''' | '''Example Usage''' | ||
| Line 12: | Line 12: | ||
'''Required Variables''' | '''Required Variables''' | ||
name | |||
name - The name of the item. | |||
'''Optional Variables''' | '''Optional Variables''' | ||
val | |||
val - how many to buy. Default is always 1, and can never be less than 1. | |||
'''Alignment Restrictable''': Yes | '''Alignment Restrictable''': Yes | ||
Latest revision as of 20:44, 6 June 2025
Allows the purchase of an item from a shop. Multiple items can be specified to buy at once. All normal restrictions such as full inventory, maximum items in a stack, etc are followed. You will always purchase as many as able if configured for more than 1.
Example Usage
Buy a single item or equipment
#type buyitem name=Sword
Buy 5 of the same item
#type buyitem name=Potion val=5
Required Variables
name - The name of the item.
Optional Variables
val - how many to buy. Default is always 1, and can never be less than 1.
Alignment Restrictable: Yes