// 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);
}
}
I've fallen and I can't get up! Heal me!
Moderator: Event DM
-
- 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!
"Truth has no form."
--Idries Shah
--Idries Shah