Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
45
_module/nss/en3_fspiritdeath.nss
Normal file
45
_module/nss/en3_fspiritdeath.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
#include "nw_i0_plot"
|
||||
#include "rd_misc"
|
||||
|
||||
void Respawn(object oSelf);
|
||||
|
||||
void main()
|
||||
{
|
||||
DelayCommand(30.0f,Respawn(OBJECT_SELF));
|
||||
}
|
||||
|
||||
void Respawn(object oSelf)
|
||||
{
|
||||
string sMaster;
|
||||
object oPC;
|
||||
object oLastPC;
|
||||
int iFlag;
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oSelf);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oSelf)), oSelf);
|
||||
RemoveEffects(oSelf);
|
||||
|
||||
sMaster = GetLocalString(OBJECT_SELF,"Master");
|
||||
|
||||
oPC=GetFirstPC();
|
||||
|
||||
iFlag = 0;
|
||||
|
||||
|
||||
while (iFlag == 0)
|
||||
{
|
||||
oLastPC = oPC;
|
||||
oPC = GetNextPC();
|
||||
|
||||
if (GetName(oLastPC) == GetName(oPC))
|
||||
{
|
||||
iFlag = 1;
|
||||
}
|
||||
|
||||
if (GetName(oPC) == sMaster)
|
||||
{
|
||||
DelayCommand(0.1f,AddHenchman(oPC,OBJECT_SELF));
|
||||
DelayCommand(0.2f,AssignCommand(OBJECT_SELF,ActionForceFollowObject(oPC,3.0)));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user