EN4_PRC8/_module/nss/qst_host1rwd9.nss

33 lines
726 B
Plaintext
Raw Normal View History

#include "rd_treasure"
void GivePartyReward(object oPC);
void main()
{
location lMove;
GivePartyReward(GetPCSpeaker());
ExecuteScript("qst_done",OBJECT_SELF);
lMove = GetLocation(GetObjectByTag("en3_move"));
DelayCommand(3.0f,AssignCommand(OBJECT_SELF,JumpToLocation(lMove)));
}
void GivePartyReward(object oPC)
{
string sTag;
location lLoc;
object oCreature;
object oPartyMember = GetFirstFactionMember(oPC, TRUE);
while (GetIsObjectValid(oPartyMember) == TRUE)
{
sTag = "en4_hostsum" + IntToString(Random(2)+1);
lLoc=GetLocation(oPartyMember);
oCreature=CreateObject(OBJECT_TYPE_CREATURE,sTag,lLoc);
AddHenchman(oPartyMember,oCreature);
oPartyMember = GetNextFactionMember(oPC, TRUE);
}
}