[SPELL] Harm version 3.5

Répondre
Partager Rechercher
Code PHP:

//::///////////////////////////////////////////////
//:: [Harm]
//:: [NW_S0_Harm.nss]
//:: Copyright (c) 2000 Bioware Corp.
//:://////////////////////////////////////////////
//:: Reduces target to 1d4 HP on successful touch
//:: attack.  If the target is undead it is healed.
//:://////////////////////////////////////////////
//:: Created By: Keith Soleski
//:: Created On: Jan 18, 2001
//:://////////////////////////////////////////////
//:: VFX Pass By: Preston W, On: June 20, 2001
//:: Update Pass By: Preston W, On: Aug 1, 2001

#include "NW_I0_SPELLS"
void main()
{
    
//Declare major variables
    
object oTarget GetSpellTargetObject();
    
int nLvl GetCasterLevel(OBJECT_SELF);
    if (
nLvL 15){nLvL 15;}
    
int nDamagenHeal;
    
effect eVis EffectVisualEffect(246);
    
effect eVis2 EffectVisualEffect(VFX_IMP_HEALING_G);
    
effect eHealeDam;
    
//Check that the target is undead
    
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
    {
        
//Figure out the amount of damage to heal
        
nHeal nLvL*10;
        
//Set the heal effect
        
eHeal EffectHeal(nHeal);
        
//Apply heal effect and VFX impact
        
ApplyEffectToObject(DURATION_TYPE_INSTANTeHealoTarget);
        
ApplyEffectToObject(DURATION_TYPE_INSTANTeVis2oTarget);
        
//Fire cast spell at event for the specified target
        
SignalEvent(oTargetEventSpellCastAt(OBJECT_SELFSPELL_HARMFALSE));
    }
    else if(!
GetIsReactionTypeFriendly(oTarget))
    {
        
//Fire cast spell at event for the specified target
        
SignalEvent(oTargetEventSpellCastAt(OBJECT_SELFSPELL_HARM));
        if (!
MyResistSpell(OBJECT_SELFoTarget))
        {
        if (!
MySavingThrow(SAVING_THROW_WILL,  oTargetGetSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)))
        {
            
nDamage nLvL*10;
            
//Check for metamagic
            
eDam EffectDamage(nDamage,DAMAGE_TYPE_NEGATIVE);
            
//Apply the VFX impact and effects
            
DelayCommand(1.0ApplyEffectToObject(DURATION_TYPE_INSTANTeDamoTarget));
            
ApplyEffectToObject(DURATION_TYPE_INSTANTeVisoTarget);
            }
        else
        {
            
nDamage nLvL*5;
            if (
nDamage GetCurrentHitPoints(oTarget)){ nDamage GetCurrentHitPoints(oTarget)-1;}
            
//Check for metamagic
            
eDam EffectDamage(nDamage,DAMAGE_TYPE_NEGATIVE);
            
//Apply the VFX impact and effects
            
DelayCommand(1.0ApplyEffectToObject(DURATION_TYPE_INSTANTeDamoTarget));
            
ApplyEffectToObject(DURATION_TYPE_INSTANTeVisoTarget);
            }
        }
    }

j'ai mis un save de type Negative, ca peut être changé.
(le script est non testé, m'enfin a priori, ca doit ressembler a ca ^^
Merci beaucoup EMRaisltin
On va tester cela et je t'informerais si il y a un souci (mais à priori tu as vraiment pensé à tout, même le jet de sauvegarde spécifiquement contre l'énergie négative, chose à laquelle je n'aurais même jamais pensé ).

Tiens au fait, es-tu partant pour participer au projet discuté dans le sujet suivant :
https://forums.jeuxonline.info/showthread.php?t=220571
[HS]

Helas non : pas l'envie qui m'en manque, mais le temps : Une journée classique : Leve 6h, boulot jusqu'a 20 (trajet compris), Soirée avec ma femme jusqu'a 0h00 (en gros), puis developpement de mon mod jusqu'a 3h, paske faut bien dormir un peu... (et qu'une reconversion totale, bah... ca prend un max de temps : je commence a peine les PNJ du mod apres 1 an de Online...)

[HS]
Répondre

Connectés sur ce fil

 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés