I've fallen and I can't get up! Heal me!

Moderator: Event DM

Post Reply
Orleron
World Advisor, Co-founder
World Advisor, Co-founder
Posts: 15149
Joined: Fri Sep 14, 2001 9:48 pm
Timezone: GMT-5
Contact:

I've fallen and I can't get up! Heal me!

Post by Orleron » Thu Jun 27, 2002 1:50 am

// Casts a heal spell at the PC which is appropriate to their wounds.

void main()
{
object oPC = GetPCSpeaker();
int iHitPointDifference = GetMaxHitPoints(oPC)- GetCurrentHitPoints(oPC);

if ( iHitPointDifference <= 10)
{
ActionCastSpellAtObject(SPELL_CURE_LIGHT_WOUNDS, oPC);
}
if ( iHitPointDifference <= 20)
{
ActionCastSpellAtObject(SPELL_CURE_SERIOUS_WOUNDS, oPC);
}
if ( iHitPointDifference <= 30)
{
ActionCastSpellAtObject(SPELL_CURE_MODERATE_WOUNDS, oPC);
}
if ( iHitPointDifference <= 40)
{
ActionCastSpellAtObject(SPELL_CURE_CRITICAL_WOUNDS, oPC);
}
}
"Truth has no form."
--Idries Shah
Post Reply