// vamp_act_charm #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-20; SetLocalInt(oPC,"nBloodPool",nBlood); AssignCommand(oPC,ClearAllActions(TRUE)); AssignCommand(oPC,ActionCastSpellAtObject(SPELL_CHARM_PERSON,oT,METAMAGIC_ANY,TRUE)); fnGiveVampXP(oPC,10); SendMessageToPC(oPC,"You used 20 blood to cast charm person on "+GetName(oT)+"."); }