41 lines
1.0 KiB
Plaintext
41 lines
1.0 KiB
Plaintext
|
//Created by Genisys 5/28/08
|
||
|
//This script boots any non-partymember out of the party room
|
||
|
|
||
|
//Put this script OnEnter
|
||
|
void main()
|
||
|
{
|
||
|
|
||
|
object oPC = GetEnteringObject();
|
||
|
object oTarget;
|
||
|
location lTarget;
|
||
|
|
||
|
if (!GetIsPC(oPC)) return;
|
||
|
|
||
|
|
||
|
string sSound1 = GetLocalString(OBJECT_SELF, "CEP_L_SOUND1");
|
||
|
string sSound2 = GetLocalString(OBJECT_SELF, "CEP_L_SOUND2");
|
||
|
if (GetLocalInt(OBJECT_SELF,"CEP_L_AMION") == 0)
|
||
|
{
|
||
|
object oSelf = OBJECT_SELF;
|
||
|
PlaySound(sSound1);
|
||
|
DelayCommand(0.1, PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||
|
SetLocalInt(OBJECT_SELF,"CEP_L_AMION",1);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
object oSelf = OBJECT_SELF;
|
||
|
PlaySound(sSound2);
|
||
|
DelayCommand(0.1, PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||
|
SetLocalInt(OBJECT_SELF,"CEP_L_AMION",0);
|
||
|
}
|
||
|
|
||
|
if (GetLocalInt(oPC, "IMemberA")<= 0)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("home");
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
||
|
}
|
||
|
}
|