RewardPartyGP

From NWN Lexicon



Contents

[edit] RewardPartyGP(int, object, int)

Give gold to PC or PC's entire party

void RewardPartyGP(
    int nGP,
    object oTarget,
    int bAllParty = TRUE
);

[edit] Parameters

nGP

Amount of gold to give

oTarget

Target (player) to receive the loot

bAllParty

If TRUE, all of oTarget's partymembers will receive nGP gold as well (Default: TRUE)


[edit] Description

* Gives the GP to (if bAllParty = TRUE) all party members.
* Each players gets the nGP value amount.



[edit] Remarks

Found in: nw_i0_tool.nss: 170

Useful for rewarding an entire party for their efforts, rather than just, say, the PC talking to the quest giver. It is simply a wrapper for GiveGoldToCreature. If bAllParty is TRUE, all member’s in oTarget’s party get nGP gold pieces. Otherwise, only oTarget receives the gold.


[edit] Requirements

#include " nw_i0_tool "

[edit] Version

1.28

[edit] Example

void main()
{
object oPC = GetPCSpeaker();
 
RewardPartyGP(1000, oPC);
//give 1000 gold to everybody in oPC’s party
 
//Or
 
RewardPartyGP(1000, oPC, FALSE);
//only give 1000 gold to oPC – exactly the same as GiveGoldToCreature(oPC, 1000);
}

[edit] See Also

functions: 

GiveGoldToCreature



 author: Lilac Soul, additional contributor(s): Lilac Soul
 

Personal tools
Categories