Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
27
_module/nss/en4_rnd_h_exit.nss
Normal file
27
_module/nss/en4_rnd_h_exit.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
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));
|
||||
|
||||
}
|
Reference in New Issue
Block a user