PoA_PRC8/_module/nss/partyroomport2.nss

42 lines
1.0 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(), "PartyB")!= 1)
{
CreateItemOnObject("partyroom", oPC, 1);
SetLocalInt(GetModule(), "PartyB", 1);
oTarget = GetWaypointByTag("partyway2");
lTarget = GetLocation(oTarget);
if (GetArea(GetAreaFromLocation(lTarget))==OBJECT_INVALID) return;
oTarget=GetFirstFactionMember(oPC, TRUE);
while (GetIsObjectValid(oTarget))
{
SetLocalLocation(oTarget, "ls_stored_loc", GetLocation(oTarget));
SetLocalInt(oTarget, "IMemberB", 1);
AssignCommand(oTarget, ClearAllActions());
AssignCommand(oTarget, ActionJumpToLocation(lTarget));
oTarget=GetNextFactionMember(oPC, TRUE);
}
}
}