46 lines
832 B
Plaintext
46 lines
832 B
Plaintext
#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)));
|
|
}
|
|
}
|
|
}
|