Server Totals
Wilderness - (4)
Elysia - (1)
Ferrell - (0)
Le'Or - (0)
M'Chek - (0)
Deglos - (0)
Visimontium - (0)
Underdark - (0)
Mikona - (0)
Total players: 5
Gallery
  • Pure, Spiritkin
    Album name: DM Events
    Uploaded by: Ronan
    Uploaded: Wed Aug 20, 2014 12:07 am

Links Menu

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

Moderators: Nighthawk4, Dungeon Masters

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

PostAuthor: 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

World of Avlis Page

Avlis Project FAQ
User avatar
Orleron
World Advisor, Co-founder
World Advisor, Co-founder
 
Posts: 14933
Joined: Fri Sep 14, 2001 9:48 pm
Timezone: GMT-5

Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]