Skip to content

Party Item Reward

I can't seem to get my hands on a script that will reward the whole party with a specific item (xp and gold arent the issue they got their own functions).
For the item reward, i can't find a set function nor a function that will get me the pc in a party or something, like GetNextPlayer within a party.
However I know it's possible, because i've seen it implemented on a server before, I just can't seem to think of the solution.
Any help is greatly appreciated.

Comments

  • DazDaz Member Posts: 125
    You can do something like this:
    void GiveItemToParty(object oPC, string sResRef)
    {
        object oPartyMember = GetFirstFactionMember(oPC, TRUE);
    
        while (GetIsObjectValid(oPartyMember))
        {
            CreateItemOnObject(sResRef, oPartyMember);
    
            oPartyMember = GetNextFactionMember(oPC, TRUE);
        }
    }
    
  • MelhoodMelhood Member Posts: 5
    Perfect, thanks.
Sign In or Register to comment.