OpenStore

From NWN Lexicon



Contents

[edit] OpenStore(object, object, int, int)

Opens a store for PCs to barter.

void OpenStore(
    object oStore,
    object oPC,
    int nBonusMarkUp = 0,
    int nBonusMarkDown = 0
);

[edit] 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)


[edit] 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.



[edit] Version

1.22

[edit] 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());
}

[edit] See Also

functions: 

gplotAppraiseOpenStore



 author: Tom Cassiotis, editor: Kristian Markon, Mistress
 

Personal tools
Categories