34 lines
681 B
Plaintext
34 lines
681 B
Plaintext
//Put this script OnUsed
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetLastUsedBy();
|
|
object oSelf = OBJECT_SELF;
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
object oTarget;
|
|
location lTarget;
|
|
|
|
oTarget = GetWaypointByTag("home");
|
|
lTarget = GetLocation(oTarget);
|
|
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
|
|
//Teleport all the members of the user to the way point tagnamed "home"
|
|
oTarget=GetFirstFactionMember(oPC, FALSE);
|
|
|
|
while (GetIsObjectValid(oTarget))
|
|
{
|
|
AssignCommand(oTarget, ClearAllActions());
|
|
AssignCommand(oTarget, ActionJumpToLocation(lTarget));
|
|
|
|
oTarget=GetNextFactionMember(oPC, FALSE);
|
|
}
|
|
{
|
|
SetPlotFlag(oSelf, FALSE);
|
|
DelayCommand(1.0, DestroyObject(oSelf, 0.0f));
|
|
}
|
|
|
|
}
|