Initial commit
Initial commit [v9.7]
This commit is contained in:
36
_module/nss/enter_tfgtngd.nss
Normal file
36
_module/nss/enter_tfgtngd.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
|
||||
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetObjectByTag("skwelldoor");
|
||||
|
||||
|
||||
object oActor;
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Only fire once per PC.
|
||||
if ( GetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF)) )
|
||||
return;
|
||||
SetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
// Have "void main()" strike up a conversation with the PC.
|
||||
oActor = GetNearestObjectByTag("ctplr", oPC);
|
||||
AssignCommand(oActor, ActionStartConversation(oPC));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user