42 lines
955 B
Plaintext
42 lines
955 B
Plaintext
|
//:/ SoulFlame's testing phase for Ghost respawn system
|
||
|
//:/
|
||
|
|
||
|
#include "nw_i0_plot"
|
||
|
#include "lod_include"
|
||
|
|
||
|
void MakeGhost(object oPC)
|
||
|
{
|
||
|
int iAppear = GetAppearanceType(oPC);
|
||
|
SetLocalInt(oPC, "MyAppearance", iAppear);
|
||
|
|
||
|
effect eSanc = EffectSanctuary(100);
|
||
|
|
||
|
SetPlotFlag(oPC, TRUE);
|
||
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSanc, oPC);
|
||
|
SetCreatureAppearanceType(oPC, APPEARANCE_TYPE_ALLIP);
|
||
|
}
|
||
|
|
||
|
|
||
|
void TakeGhost(object oPC)
|
||
|
{
|
||
|
int iAppear = GetLocalInt(oPC, "MyAppearance");
|
||
|
effect eSanc = EffectSanctuary(100);
|
||
|
|
||
|
SetPlotFlag(oPC, FALSE);
|
||
|
RemoveEffect(oPC, eSanc);
|
||
|
SetCreatureAppearanceType(oPC, iAppear);
|
||
|
}
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object oPC = OBJECT_SELF;
|
||
|
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPC);
|
||
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(GetMaxHitPoints(oPC)), oPC);
|
||
|
RemoveEffects(oPC);
|
||
|
|
||
|
MakeGhost(oPC);
|
||
|
|
||
|
ActionStartConversation(oPC, "sf_ghost_convo", TRUE, FALSE);
|
||
|
}
|