OpenStore(object, object, int, int)
Opens a store for PCs to barter.
void OpenStore( object oStore, object oPC, int nBonusMarkUp = 0, int nBonusMarkDown = 0 );
Parameters
oStore
The store object to open.
oPC
The player to present the store.
nBonusMarkUp
A number in percent to mark up prices. (Default: 0)
nBonusMarkDown
A number in percent to mark down prices. (Default: 0)
Description
Open oStore for oPC. You can mark up or down the prices with the optional parameters. If nBonusMarkUp is given a value of 10, prices will be 110% of the normal prices.
Version
1.22
Example
// From Bioware's David Gaider Scripting FAQ: // The storekeeper doubles all prices for elves // (I guess he doesn't like them): void main() { object oStore = GetObjectByTag("STORE_TAG_HERE"); if (GetRacialType(GetPCSpeaker()) == RACIAL_TYPE_ELF) { OpenStore(oStore, GetPCSpeaker(), 100); } else OpenStore(oStore, GetPCSpeaker()); }
See Also
functions: | gplotAppraiseOpenStore |
categories: | Store Functions | Money Functions |
author: Tom Cassiotis, editor: Kristian Markon, Mistress