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