Initial commit
Initial commit [v9.7]
This commit is contained in:
40
_module/nss/approach_mlfrgs.nss
Normal file
40
_module/nss/approach_mlfrgs.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
#include "x0_i0_partywide"
|
||||
|
||||
void main()
|
||||
|
||||
{
|
||||
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Only fire once.
|
||||
if ( GetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF)) )
|
||||
return;
|
||||
SetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
// Give 5 experience (to party) to the PC.
|
||||
GiveXPToAll(oPC, 5);
|
||||
|
||||
object omlfrgs = GetObjectByTag("mlfrgs");
|
||||
int nHP = GetCurrentHitPoints(omlfrgs);
|
||||
if (!GetIsPC(oPC)) return;
|
||||
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
|
||||
if (DoOnce==TRUE) return;
|
||||
if (nHP >= 1)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
|
||||
AssignCommand(oPC, ClearAllActions(TRUE));
|
||||
SetCutsceneMode(oPC, TRUE);
|
||||
AssignCommand(oPC, ActionMoveToObject(omlfrgs));
|
||||
|
||||
DelayCommand(3.0, SetCutsceneMode(oPC, FALSE));
|
||||
|
||||
DelayCommand(3.5, AssignCommand(omlfrgs, ActionStartConversation(oPC, "")));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user