28 lines
676 B
Plaintext
28 lines
676 B
Plaintext
|
|
void main()
|
|
{
|
|
object oClicker = GetClickingObject();
|
|
object oTarget = GetTransitionTarget(OBJECT_SELF);
|
|
|
|
object oArea = GetArea(oClicker);
|
|
|
|
SetAreaTransitionBMP(AREA_TRANSITION_RANDOM);
|
|
|
|
object oMob = GetFirstObjectInArea(oArea);
|
|
while (GetIsObjectValid(oMob))
|
|
{
|
|
if (GetObjectType(oMob) == OBJECT_TYPE_CREATURE && !GetIsPC(oMob) && !GetIsPC(GetMaster(oMob)))
|
|
{
|
|
AssignCommand(oMob,ClearAllActions(TRUE));
|
|
ForceRest(oMob);
|
|
}
|
|
oMob = GetNextObjectInArea(oArea);
|
|
}
|
|
|
|
if (!GetIsObjectValid(oTarget))
|
|
SendMessageToPC(oClicker,"ERROR: Invalid Destination for " + GetTag(oTarget));
|
|
|
|
AssignCommand(oClicker,JumpToObject(oTarget));
|
|
|
|
}
|