26 lines
851 B
Plaintext
26 lines
851 B
Plaintext
|
void main()
|
||
|
{
|
||
|
object oPC = GetClickingObject();
|
||
|
object oArea = GetArea(OBJECT_SELF);
|
||
|
|
||
|
//Should only run for PCs
|
||
|
if (!GetIsPC(oPC)) return;
|
||
|
|
||
|
//Disallow the player to proceed if they're seen or heard by any enemy
|
||
|
object oObject = GetFirstObjectInArea(oArea);
|
||
|
while (GetIsObjectValid(oObject))
|
||
|
{
|
||
|
if (!GetIsPC(oObject) && GetIsEnemy(oPC, oObject) && !GetIsDead(oObject) && (GetObjectSeen(oPC, oObject) || GetObjectHeard(oPC, oObject)))
|
||
|
{
|
||
|
FloatingTextStringOnCreature("You can't proceed until no enemy is aware of your presence!", oPC, FALSE);
|
||
|
return;
|
||
|
}
|
||
|
oObject = GetNextObjectInArea(oArea);
|
||
|
}
|
||
|
|
||
|
//Start convo
|
||
|
ClearAllActions();
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
AssignCommand(oPC, ActionStartConversation(oPC, "conv_further", TRUE, FALSE));
|
||
|
}
|