generated from Jaysyn/ModuleTemplate
59 lines
1.5 KiB
Plaintext
59 lines
1.5 KiB
Plaintext
effect eEffect;
|
|
/* Script generated by
|
|
Lilac Soul's NWN Script Generator, v. 1.6
|
|
|
|
For download info, please visit:
|
|
http://www.lilacsoul.revility.com */
|
|
|
|
//Put this OnUsed
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetLastUsedBy();
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
if (!(GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD))
|
|
return;
|
|
|
|
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP, 1.0f, 6.0f));
|
|
|
|
object oCaster;
|
|
oCaster = OBJECT_SELF;
|
|
|
|
object oTarget;
|
|
oTarget = oPC;
|
|
|
|
AssignCommand(oCaster, ActionCastSpellAtObject(SPELL_BLESS, oTarget, METAMAGIC_ANY, TRUE, 5, PROJECTILE_PATH_TYPE_DEFAULT, FALSE));
|
|
|
|
oTarget = oPC;
|
|
|
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
|
//apply to the WP's location instead
|
|
|
|
int nInt;
|
|
nInt = GetObjectType(oTarget);
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_NATURES_BALANCE), oTarget);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_NATURES_BALANCE), GetLocation(oTarget));
|
|
|
|
ActionSpeakString("Mielikki has seemingly found favor with you and has granted her blessing in return....");
|
|
|
|
if (GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL)
|
|
{
|
|
oTarget = oPC;
|
|
|
|
eEffect = EffectKnockdown();
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 10.0f);
|
|
|
|
}
|
|
oCaster = GetObjectByTag("NW_ALTAR");
|
|
|
|
oTarget = oPC;
|
|
|
|
AssignCommand(oCaster, ActionCastSpellAtObject(SPELL_BLESS, oTarget, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
|
|
|
|
}
|
|
|