PoA_PRC8/_module/nss/partyroomport1.nss

42 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2022-10-07 14:20:31 -04:00
//Created by Genisys 5/25/08
//This script teleports all members of the party to the party room.
location lTarget;
object oTarget;
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this script OnUsed
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
if (GetLocalInt(GetModule(), "PartyA")!= 1)
{
CreateItemOnObject("partyroom", oPC, 1);
SetLocalInt(GetModule(), "PartyA", 1);
oTarget = GetWaypointByTag("partyway1");
lTarget = GetLocation(oTarget);
//if (GetFirstFactionMember(oPC, TRUE)==OBJECT_INVALID) return;
oTarget=GetFirstFactionMember(oPC, TRUE);
while (GetIsObjectValid(oTarget))
{
SetLocalLocation(oTarget, "ls_stored_loc", GetLocation(oTarget));
SetLocalInt(oTarget, "IMemberA", 1);
DelayCommand(1500.0, SetLocalInt(oTarget, "IMemberA", 0));
AssignCommand(oTarget, ClearAllActions());
AssignCommand(oTarget, ActionJumpToLocation(lTarget));
oTarget=GetNextFactionMember(oPC, TRUE);
}
}
}