Anphillia Continuum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

All good things come in threes. plus one.

4 posters

Go down

All good things come in threes. plus one. Empty All good things come in threes. plus one.

Post  Vladimir Wed Jun 01, 2011 7:23 pm

some things bothered me. so i got the public version and corrected them. paste it if you agree.

this is nw_c2_default2. this will stop shadowdancers from peeing blood. npcs will note that pcs are hidden or invis.
Code:
#include "NW_I0_GENERIC"
void main()
{
    if (GetAILevel() == AI_LEVEL_VERY_LOW) return;

    object oPercep = GetLastPerceived();
    int bSeen = GetLastPerceptionSeen();
    int bHeard = GetLastPerceptionHeard();
    if (bHeard == FALSE)
    {
        bHeard = GetLastPerceptionVanished();
    }
    if(GetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION)
      && GetIsPC(oPercep)
      && bSeen)
    {
        SpeakOneLinerConversation();
    }
    if ((GetLastPerceptionVanished()) && GetIsEnemy(GetLastPerceived()))
    {
        object oGone = GetLastPerceived();
        if((GetAttemptedAttackTarget() == GetLastPerceived() ||
          GetAttemptedSpellTarget() == GetLastPerceived() ||
          GetAttackTarget() == GetLastPerceived()) && GetArea(GetLastPerceived()) != GetArea(OBJECT_SELF))
        {
          ClearAllActions();
          DetermineCombatRound();
        }
    }
    if (GetIsInCombat(OBJECT_SELF)){}
    else if (GetIsEnemy(oPercep) && bSeen)
    {
        if(!GetHasEffect(EFFECT_TYPE_SLEEP)) {
            if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL))
            {
                DetermineSpecialBehavior();
            } else
            {
                SetFacingPoint(GetPosition(oPercep));
                SpeakString("NW_I_WAS_ATTACKED", TALKVOLUME_SILENT_TALK);
                DetermineCombatRound();
            }
        }
    }
    else
    {
        if (bSeen)
        {
            if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL)) {
                DetermineSpecialBehavior();
            } else if (GetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION)
                      && GetIsPC(oPercep))
            {
                ActionStartConversation(OBJECT_SELF);
            }
        }
        else if (bHeard && GetIsEnemy(oPercep))
        {
            if (GetDistanceToObject(oPercep) <= 7.0)
            {
                if (GetHasSpell(SPELL_TRUE_SEEING))
                {
                    ActionCastSpellAtObject(SPELL_TRUE_SEEING, OBJECT_SELF);
                }
                else if (GetHasSpell(SPELL_SEE_INVISIBILITY))
                {
                    ActionCastSpellAtObject(SPELL_SEE_INVISIBILITY, OBJECT_SELF);
                }
                else if (GetHasSpell(SPELL_INVISIBILITY_PURGE))
                {
                    ActionCastSpellAtObject(SPELL_INVISIBILITY_PURGE, OBJECT_SELF);
                }
                else
                {
                    ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT, 0.5);
                    ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_RIGHT, 0.5);
                    ActionPlayAnimation(ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD, 0.5);
                }
            }
        }
      if (!IsInConversation(OBJECT_SELF)) {
          if (GetIsPostOrWalking()) {WalkWayPoints();
          } else if (GetIsPC(oPercep) &&
              (GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS)
                || GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS_AVIAN)
                || GetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS)
                || GetIsEncounterCreature()))
          {
                SetAnimationCondition(NW_ANIM_FLAG_IS_ACTIVE);
          }
        }
    }
    if(GetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT) && GetLastPerceptionSeen())
    {
        SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_PERCEIVE));
    }
}

this is hb for fearing aura. nw_s1_aurafeara is the nss name. tis annoying when vlad wakes up cuz his dragon is standing on corpses.
Code:
#include "NW_I0_SPELLS"
void main()
{
    object oTarget = GetEnteringObject();
    effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S);
    effect eDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
    effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
    effect eFear = EffectFrightened();
    effect eLink = EffectLinkEffects(eFear, eDur);
    eLink = EffectLinkEffects(eLink, eDur2);
    int nHD = GetHitDice(GetAreaOfEffectCreator());
    int nDC = 10 + GetHitDice(GetAreaOfEffectCreator())/3;
    int nDuration = GetScaledDuration(nHD, oTarget);
    if(!MothGetIsFortAlly(oTarget, GetAreaOfEffectCreator()))
    {
        if(GetIsDead(oTarget)){return;}
        SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_FEAR));
        if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR))
        {
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
            ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
        }
    }
}


combust can be cast on ally and pet. not very good. nss name is x2_s0_combust.
Code:
#include "x2_I0_SPELLS"
#include "x2_inc_toollib"
#include "x2_inc_spellhook"
void RunCombustImpact(object oTarget, object oCaster, int nLevel, int nMetaMagic);
void main()
{
    object oTarget = GetSpellTargetObject();
    object oCaster = OBJECT_SELF;
    if (!X2PreSpellCastCode())
    {
        return;
    }
    int nLevel = MothGetCasterLevel(OBJECT_SELF);
    int nDamage = MothGetCasterLevel(OBJECT_SELF);
    if (nDamage > 15)
    {
        nDamage = 15;
    }
    int nMetaMagic = GetMetaMagicFeat();
    if (nMetaMagic == METAMAGIC_MAXIMIZE)
    {
        nDamage += 18;
    }
    else
    {
        nDamage  += d6(3);
        if (nMetaMagic == METAMAGIC_EMPOWER)
        {
            nDamage = nDamage + (nDamage/2);
        }
    }
    int nDuration = 10 + MothGetCasterLevel(OBJECT_SELF);
    if (nDuration < 1)
    {
        nDuration = 10;
    }
    effect eDam      = EffectDamage(nDamage+12, DAMAGE_TYPE_FIRE);
    effect eDur      = EffectVisualEffect(498);
    if(!MothGetIsFortAlly(oTarget, OBJECT_SELF))
    {
        SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
        if(!MyResistSpell(OBJECT_SELF, oTarget))
        {
            MothFireLink(OBJECT_SELF,oTarget,nDamage);
            ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
            TLVFXPillar(VFX_IMP_FLAME_M, GetLocation(oTarget), 5, 0.1f,0.0f, 2.0f);
            if (GetHasSpellEffect(GetSpellId(),oTarget))
            {
                FloatingTextStrRefOnCreature(100775,OBJECT_SELF,FALSE);
                return;
            }
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oTarget, RoundsToSeconds(nDuration/2));
            DelayCommand(8.0, RunCombustImpact(oTarget,oCaster,nLevel, nMetaMagic));
        }
    }
}
void RunCombustImpact(object oTarget, object oCaster, int nLevel, int nMetaMagic)
{
    if (GZGetDelayedSpellEffectsExpired(SPELL_COMBUST,oTarget,oCaster))
    {
        return;
    }
    if (GetIsDead(oTarget) == FALSE)
    {
            int nDamage = nLevel;
            if (nDamage > 15)
            {
                nDamage = 15;
            }
            int nMetaMagic = GetMetaMagicFeat();
            if (nMetaMagic == METAMAGIC_MAXIMIZE)
            {
                nDamage += 18;
            }
            else
            {
                nDamage  += d6(3);
                if (nMetaMagic == METAMAGIC_EMPOWER)
                {
                    nDamage = nDamage + (nDamage/2);
                }
            }
            MothFireLink(oCaster,oTarget,nDamage+12);
            effect eDmg = EffectDamage(nDamage+12,DAMAGE_TYPE_FIRE);
            effect eVFX = EffectVisualEffect(VFX_IMP_FLAME_S);
            ApplyEffectToObject(DURATION_TYPE_INSTANT,eDmg,oTarget);
            ApplyEffectToObject(DURATION_TYPE_INSTANT,eVFX,oTarget);
            DelayCommand(8.0f,RunCombustImpact(oTarget,oCaster, nLevel,nMetaMagic));
  }
}

finally i like to ask that you increase cr on the conclave npcs. waaaay too hard for the xp gain. while youre at it add another one of them chest in krust cave. top cave has better loot!

shoutout to all those that helped vlad get raised today.
peace!

Vladimir

Posts : 110
Join date : 2011-05-17

Back to top Go down

All good things come in threes. plus one. Empty Re: All good things come in threes. plus one.

Post  J. Persinne Wed Jun 01, 2011 9:36 pm

Yeaaah, there are a lot of awful scripts in the public release. I'll take a look at these.

J. Persinne

Posts : 591
Join date : 2011-03-10

Back to top Go down

All good things come in threes. plus one. Empty Re: All good things come in threes. plus one.

Post  Felix Wed Jun 01, 2011 10:46 pm

Nice. Thanks Vlad!
Felix
Felix
Admin

Posts : 1253
Join date : 2011-02-28

Back to top Go down

All good things come in threes. plus one. Empty Re: All good things come in threes. plus one.

Post  Vladimir Thu Jun 02, 2011 6:33 am

no sir.code is good in what i have looked at.many sexy wrappers.
lotta work here in so many parts of the mod.
the defualt script is new with 1.69.otherwise its biowares own nss.
combust i just put in an ally check.dragon aura i just put in getisdead check.
all scripts i have seen are well done.

ur welcome felix Smile

Vladimir

Posts : 110
Join date : 2011-05-17

Back to top Go down

All good things come in threes. plus one. Empty Re: All good things come in threes. plus one.

Post  Professor Plum Thu Jun 02, 2011 8:14 am

What's wrong with combusting an ally? ;(
Professor Plum
Professor Plum

Posts : 783
Join date : 2011-04-09

Back to top Go down

All good things come in threes. plus one. Empty Re: All good things come in threes. plus one.

Post  Vladimir Tue Jun 14, 2011 2:16 pm

anything gonna happen with these things? i need to know to decide where im gonna go.

Vladimir

Posts : 110
Join date : 2011-05-17

Back to top Go down

All good things come in threes. plus one. Empty Re: All good things come in threes. plus one.

Post  J. Persinne Thu Jun 16, 2011 4:44 am

Yes.

J. Persinne

Posts : 591
Join date : 2011-03-10

Back to top Go down

All good things come in threes. plus one. Empty Re: All good things come in threes. plus one.

Post  Vladimir Wed Jun 29, 2011 3:10 pm

thx for fixin this.

Vladimir

Posts : 110
Join date : 2011-05-17

Back to top Go down

All good things come in threes. plus one. Empty Re: All good things come in threes. plus one.

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum