Ancordia_PRC8/_module/nss/random_gofurther.nss

26 lines
851 B
Plaintext
Raw Permalink Normal View History

2023-09-21 19:51:32 -04:00
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));
}