Transactions

From HLKitWiki
Revision as of 16:46, 1 March 2011 by Colen (Talk | contribs) (Created page with 'A "transaction" takes place when the user adds certain game-system-dependent items of gear to the hero. It involves a TransactSetup Script, and either a [[TransactBuy Script]...')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A "transaction" takes place when the user adds certain game-system-dependent items of gear to the hero. It involves a TransactSetup Script, and either a TransactBuy Script or a TransactSell Script.

Setup

A TransactSetup Script is invoked at two points:

  1. When the user selects an item of gear on a choose form.
  1. When the user clicks the "delete" button for an item of gear.

Using this script, you can set up fields on the transaction pick. The transaction pick's fields hold information about the current transaction, before the transaction is executed.

For example, a common set of data for the transaction pick to hold is the buy or sell price of the current item. Before the user buys or sells the item, he can often change those values, which are then used in the TransactBuy Script or TransactSell Script.

Buying an Item

When