RewardPartyGP

From NWN Lexicon
Jump to: navigation, search



RewardPartyGP(int, object, int)

Give gold to PC or PC's entire party

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

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)


Description

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



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.


Requirements

#include " nw_i0_tool "

Version

1.28

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);
}

See Also

functions: 

GiveGoldToCreature



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