38 lines
683 B
Plaintext
38 lines
683 B
Plaintext
|
location lTarget;
|
||
|
object oTarget;
|
||
|
|
||
|
//Put this script OnClose
|
||
|
void main()
|
||
|
{
|
||
|
|
||
|
object oPC = GetLastClosedBy();
|
||
|
|
||
|
if (!GetIsPC(oPC)) return;
|
||
|
|
||
|
oTarget = GetWaypointByTag("secureway1");
|
||
|
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
|
||
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||
|
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
|
||
|
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
||
|
|
||
|
SetLocked(OBJECT_SELF, TRUE);
|
||
|
|
||
|
DelayCommand(300.0, SetLocked(OBJECT_SELF, FALSE));
|
||
|
|
||
|
DelayCommand(301.0, ActionOpenDoor(OBJECT_SELF));
|
||
|
|
||
|
object oParty = GetFirstFactionMember(oPC);
|
||
|
while(oParty != OBJECT_INVALID)
|
||
|
{
|
||
|
|
||
|
CreateItemOnObject("barrel", oParty);
|
||
|
oParty = GetNextFactionMember(oPC);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|