Initial Upload
Initial Upload
This commit is contained in:
41
_module/nss/sf_ghost.nss
Normal file
41
_module/nss/sf_ghost.nss
Normal file
@@ -0,0 +1,41 @@
|
||||
//:/ 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);
|
||||
}
|
||||
Reference in New Issue
Block a user