generated from Jaysyn/ModuleTemplate
Initial upload
Initial upload
This commit is contained in:
30
_mod/_module/nss/vamp_coffin_use.nss
Normal file
30
_mod/_module/nss/vamp_coffin_use.nss
Normal file
@@ -0,0 +1,30 @@
|
||||
// vamp_coffin_use
|
||||
void main()
|
||||
{
|
||||
object oMe=OBJECT_SELF;
|
||||
object oVampire=GetLocalObject(oMe,"oVampire");
|
||||
object oPC=GetLastUsedBy();
|
||||
int nCHP;
|
||||
int nMHP;
|
||||
int nDif;
|
||||
effect eEffect;
|
||||
if (oVampire==oPC)
|
||||
{
|
||||
SendMessageToPC(oPC,"The healing powers of your coffin flow through you.");
|
||||
nCHP=GetCurrentHitPoints(oPC);
|
||||
nMHP=GetMaxHitPoints(oPC);
|
||||
nDif=nMHP-nCHP;
|
||||
if (nDif>0)
|
||||
{ // heal
|
||||
eEffect=EffectHeal(nDif);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eEffect,oPC,1.0);
|
||||
} // heal
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC,"This coffin is cold to the touch and feels evil. It would be best if it were destroyed.");
|
||||
}
|
||||
AssignCommand(oPC,ClearAllActions());
|
||||
SetLocalObject(oPC,"oTarget",oMe);
|
||||
AssignCommand(oPC,ActionStartConversation(oPC,"coffin_move",TRUE,FALSE));
|
||||
}
|
||||
Reference in New Issue
Block a user