// 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)); }