Errol
Thu, 11th Jul '02, 4:02pm
(With Permission)
This is a Topic where you can post all your NWN scripts, that work. They should be entered as such:
Type of Script: say what kind of script it is. eg. Combat Script, Action script, etc.
What it Does: What does it do? Does it make NPC's walk around? Does it make the AI better? Does it do anything to help quests? etc.
The Script: post the main script here, it could be written in Code. (the little '#' button.
My Script:
Healing
Makes an object which heals you to full Hp
The Script (copy the whole thing)
/Start Script
/Put this script in the OnUsed script section
/Fountains and other objects are perfect for this
void main()
{
object oUser;
effect eHeal;
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_S);
int nCurrentHitPoints, nMaxHitPoints, nVisualEffectId;
oUser = GetLastUsedBy();
nMaxHitPoints = GetMaxHitPoints(oUser);
nCurrentHitPoints = GetCurrentHitPoints(oUser);
if ( nCurrentHitPoints < nMaxHitPoints )
{
eHeal = EffectHeal(nMaxHitPoints - nCurrentHitPoints);
ApplyEffectToObject( DURATION_TYPE_INSTANT, eHeal, oUser );
ApplyEffectToObject( DURATION_TYPE_INSTANT, eHealVis, oUser );
}
}
/End of Script
Please only post working scripts, and
if you find it doesn't work, please
come back and change it.
Thanks.
:)
[This message has been edited by Gopher (edited July 11, 2002).]
This is a Topic where you can post all your NWN scripts, that work. They should be entered as such:
Type of Script: say what kind of script it is. eg. Combat Script, Action script, etc.
What it Does: What does it do? Does it make NPC's walk around? Does it make the AI better? Does it do anything to help quests? etc.
The Script: post the main script here, it could be written in Code. (the little '#' button.
My Script:
Healing
Makes an object which heals you to full Hp
The Script (copy the whole thing)
/Start Script
/Put this script in the OnUsed script section
/Fountains and other objects are perfect for this
void main()
{
object oUser;
effect eHeal;
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_S);
int nCurrentHitPoints, nMaxHitPoints, nVisualEffectId;
oUser = GetLastUsedBy();
nMaxHitPoints = GetMaxHitPoints(oUser);
nCurrentHitPoints = GetCurrentHitPoints(oUser);
if ( nCurrentHitPoints < nMaxHitPoints )
{
eHeal = EffectHeal(nMaxHitPoints - nCurrentHitPoints);
ApplyEffectToObject( DURATION_TYPE_INSTANT, eHeal, oUser );
ApplyEffectToObject( DURATION_TYPE_INSTANT, eHealVis, oUser );
}
}
/End of Script
Please only post working scripts, and
if you find it doesn't work, please
come back and change it.
Thanks.
:)
[This message has been edited by Gopher (edited July 11, 2002).]