Recent changes Random page
GAMING
Gaming
 
WoWWiki
Halopedia
FFXIclopedia
Age of Conan
Warhammer Online
Grand Theft Wiki
See more...

NPC Healer

From NWNWiki

Jump to: navigation, search

Contents

[edit] NPC Healer

[edit] What it does

Used to make an NPC become a healer, much like Aribeth in the NWN single player game. Can be altered to make the NPC charge money for his services, but this version of the script there is no charge.

[edit] Notes

An NPC conversation should be created with a suggestion that the PC may need healing, whether it be the NPC suggests his healing services, or the PC asks for healing. This script should be loaded under the Actions Taken tab.

[edit] The Script

/*********************************
Script: NPC Healer
Created By: FreKy J
Created On: 8/28/02
*********************************/
void main()
{
 //Set the variables
 object xPlayer = GetPCSpeaker();
 int xPlayerHP;
 effect xPlayerHeal;
 effect xHealVis = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
 //Set how much to heal
 xPlayerHP = GetMaxHitPoints(xPlayer);
 //Create the heal effect
 xPlayerHeal = EffectHeal(xPlayerHP);
 //Perform the heal and the effect
 ApplyEffectToObject(DURATION_TYPE_INSTANT,xHealVis,xPlayer);
 ApplyEffectToObject(DURATION_TYPE_INSTANT,xPlayerHeal,xPlayer);
} 
Rate this article:
Share this article: