generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
57
_removed/corpse_crypt_e.nss
Normal file
57
_removed/corpse_crypt_e.nss
Normal file
@@ -0,0 +1,57 @@
|
||||
#include "corpse_lib"
|
||||
object GetFinalMaster(object target)
|
||||
{
|
||||
object master = GetMaster(target);
|
||||
object lastMaster = OBJECT_INVALID;
|
||||
|
||||
|
||||
while(GetIsObjectValid(master))
|
||||
{
|
||||
lastMaster = master;
|
||||
|
||||
master = GetMaster(lastMaster);
|
||||
}
|
||||
|
||||
return lastMaster;
|
||||
}
|
||||
void markEquipement(object target,int cursed)
|
||||
{
|
||||
int slot = 0;
|
||||
while(slot<= NUM_INVENTORY_SLOTS)
|
||||
{
|
||||
object item = GetItemInSlot(slot++,target);
|
||||
|
||||
if(GetIsObjectValid(item))
|
||||
{
|
||||
SetLocalInt(item,CorpseWasDroppable,GetItemCursedFlag(item));
|
||||
SetLocalInt(item,CorspeWasDroppableSet,TRUE);
|
||||
SetItemCursedFlag(item,cursed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object enteringObject = GetEnteringObject();
|
||||
|
||||
if(!GetIsDM(enteringObject) && !GetIsDMPossessed(enteringObject) && !GetIsDM(GetFinalMaster(enteringObject)) && !GetIsCorpseCopying(enteringObject))
|
||||
{
|
||||
|
||||
//DelayCommand(5.0,deathSpeach(enteringObject));
|
||||
effect test = ExtraordinaryEffect(EffectLinkEffects(EffectCutsceneGhost(),EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE)));
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,test,enteringObject);
|
||||
markEquipement(enteringObject,TRUE);
|
||||
|
||||
SetImmortal(enteringObject,TRUE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user