Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
36 lines
1.4 KiB
Plaintext
36 lines
1.4 KiB
Plaintext
// Bottle blood from target
|
|
void vamp_bottleblood(object oSelf, object oTarget, object oPC)
|
|
{
|
|
PrintString("vamp_bottleblood: "+GetName(oPC)+" attempts to bottle the blood of "+GetName(oTarget)+".");
|
|
PrintString("vamp_bottleblood: GetObjectType["+IntToString(GetObjectType(oTarget))
|
|
+" GetRacialType["+IntToString(GetRacialType(oTarget))
|
|
+"].");
|
|
|
|
// If target is not undead, construct or elemental.
|
|
if ((GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
|
|
&&( GetRacialType(oPC)!=RACIAL_TYPE_UNDEAD )
|
|
&& ( GetRacialType(oPC) != RACIAL_TYPE_CONSTRUCT )
|
|
&& (GetRacialType(oPC) != RACIAL_TYPE_ELEMENTAL ))
|
|
{
|
|
// And distance is < 2m
|
|
if (GetDistanceBetween(oPC,oTarget)<2.0f)
|
|
{
|
|
// And target is dead.
|
|
if (GetIsDead(oTarget)==TRUE)
|
|
{
|
|
// Bottle blood
|
|
SendMessageToPC(oPC,"You bottle some blood.");
|
|
CreateItemOnObject("bloodbottle", oPC, 1);
|
|
DestroyObject(oSelf);
|
|
}
|
|
// Victim is not dead
|
|
else SendMessageToPC(oPC,"Victim is still alive. You cannot bottle blood.");
|
|
}
|
|
// Target is too far
|
|
else SendMessageToPC(oPC,"You are too far to bottle blood.");
|
|
}
|
|
// Target is not living being
|
|
else SendMessageToPC(oPC,"Target is not living creature. You cannot bottle blood.");
|
|
|
|
}
|