// vamp_act_edrain #include "vampire_header" void main() { object oPC=GetPCSpeaker(); if (!GetIsObjectValid(oPC)) oPC=OBJECT_SELF; int nBlood=GetLocalInt(oPC,"nBloodPool"); object oT=GetLocalObject(oPC,"oTarget"); nBlood=nBlood-40; SetLocalInt(oPC,"nBloodPool",nBlood); AssignCommand(oPC,ClearAllActions(TRUE)); AssignCommand(oPC,ActionCastSpellAtObject(SPELL_ENERGY_DRAIN,oT,METAMAGIC_ANY,TRUE)); fnGiveVampXP(oPC,75); SendMessageToPC(oPC,"You used 40 blood to cast energy drain on "+GetName(oT)+"."); }