Neverwinter Nights > Script Request

Uhm a few questions....

<< < (3/3)

fireknight40:
Sigh I am regretted to say that I need more help...
A healing placeable like the healing lights I can't seem to be able to do anything like that.

Tea-cup:

--- Quote ---Sigh I am regretted to say that I need more help...
A healing placeable like the healing lights I can't seem to be able to do anything like that.
[snapback]13667[/snapback]
--- End quote ---

--- Code: ---void Raise(object oPlayer)
    {
        effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION);

        effect eBad = GetFirstEffect(oPlayer);
        ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer);
        ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer);

        //Search for negative effects
        while(GetIsEffectValid(eBad))
        {
            if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
                GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
                GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
                GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
                {
                    //Remove effect if it is negative.
                    RemoveEffect(oPlayer, eBad);
                }
            eBad = GetNextEffect(oPlayer);
        }
        //Fire cast spell at event for the specified target
        SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE));
        ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer);
    }
void main()
{
    object oPC = GetLastUsedBy();
    if(GetIsInCombat(oPC) == FALSE)
    {
        Raise(oPC);
        ForceRest(oPC);
    }
    else
    {
        DelayCommand(0.1, SendMessageToPC(oPC, "You are in combat."));
    }
}
--- End code ---
Does use the same Raise() function as the standard ondeath script. Also, someone that is in combat, someone can't rest, can't use the light either.

Just place it in the onuse of the object and make it useable/plot.

-Mel

fireknight40:
Thank you!!! :)

fireknight40:
Well I need some more help... I don't know much about scripting and I was wondering if someone would check my script and I also don't know how to make it so that it's the one item? Here's the script as I have right now.

--- Code: ---void main()
{
object oPC;

if (!GetIsDM(GetItemActivatorTarget())
|| !GetIsPC(GetItemActivatedTarget())
){

SendMessageToPC(GetItemActivator(), "");
return;}

SetCutsceneMode(oPC, TRUE);

FadeFromBlack(oPC, FADE_SPEED_SLOW);

object oTarget;
oTarget = oPC;


int nInt;
nInt = GetObjectType(oTarget);

if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget));

oTarget = oPC;


nInt = GetObjectType(oTarget);

if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_STRIKE_HOLY), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_STRIKE_HOLY), GetLocation(oTarget));

oTarget = oPC;

nInt = GetObjectType(oTarget);

if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oTarget));

}

--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version