Exemple #1
0
    public override void OnSpellEffect(SpellPacketBody spell)
    {
        Logger.Info("ahobm OnSpellEffect");
        var remove_list = new List <GameObject>();

        spell.duration = 1;
        AttachParticles("sp-Bane", spell.caster);
        foreach (var target_item in spell.Targets)
        {
            var tar = target_item.Object;
            if ((tar.GetNameId() == 8064) || (tar.GetNameId() == 8042) || (tar.GetNameId() == 8043) || (tar.GetNameId() == 14455))
            {
                remove_list.Add(tar);
                tar.FloatMesFileLine("mes/spell.mes", 20048);
            }
            else if (tar.IsMonsterCategory(MonsterCategory.plant))
            {
                remove_list.Add(tar);
                tar.FloatMesFileLine("mes/spell.mes", 20049);
            }
            else if (tar.IsMonsterCategory(MonsterCategory.ooze))
            {
                remove_list.Add(tar);
                tar.FloatMesFileLine("mes/spell.mes", 20049);
            }
            else if (tar.IsMonsterCategory(MonsterCategory.aberration))
            {
                remove_list.Add(tar);
                tar.FloatMesFileLine("mes/spell.mes", 20049);
            }
            else if (tar.IsMonsterCategory(MonsterCategory.undead))
            {
                remove_list.Add(tar);
                tar.FloatMesFileLine("mes/spell.mes", 20050);
            }
            else if (tar.GetNameId() == 14455)
            {
                remove_list.Add(tar);
            }
            else
            {
                tar.FloatMesFileLine("mes/spell.mes", 30002);
                tar.FloatMesFileLine("mes/spell.mes", 20047);
                tar.KillWithDeathEffect();
            }
        }

        spell.RemoveTargets(remove_list);
        Co8.End_Spell(spell);
        spell.EndSpell();
    }
    public override void OnSpellEffect(SpellPacketBody spell)
    {
        Logger.Info("Enslavement OnSpellEffect");
        var npc         = spell.caster;
        var target_item = spell.Targets[0];

        if (!target_item.Object.IsFriendly(spell.caster) && target_item.Object.GetNameId() != 14455)
        {
            if ((target_item.Object.type == ObjectType.pc) || (target_item.Object.type == ObjectType.npc))
            {
                if (!(spell.caster.HasMaxFollowers()))
                {
                    spell.caster.AddFollower(target_item.Object);
                }
                else
                {
                    spell.caster.AddAIFollower(target_item.Object);
                }

                // add target to initiative, just in case
                target_item.Object.AddToInitiative();
                UiSystems.Combat.Initiative.UpdateIfNeeded();
            }
            else
            {
                // not a person
                target_item.Object.FloatMesFileLine("mes/spell.mes", 30000);
                target_item.Object.FloatMesFileLine("mes/spell.mes", 31001);
                AttachParticles("Fizzle", target_item.Object);
                spell.RemoveTarget(target_item.Object);
            }
        }
        else
        {
            // can't target friendlies
            AttachParticles("Fizzle", target_item.Object);
            spell.RemoveTarget(target_item.Object);
        }

        Co8.End_Spell(spell);
        spell.EndSpell();
    }
Exemple #3
0
    public override void OnSpellEffect(SpellPacketBody spell)
    {
        Logger.Info("All Die OnSpellEffect");
        var remove_list = new List <GameObject>();

        spell.duration = 1;
        AttachParticles("sp-Bane", spell.caster);
        foreach (var target_item in spell.Targets)
        {
            if (!(GameSystems.Party.PartyMembers).Contains(target_item.Object) && target_item.Object.GetNameId() != 14455)
            {
                target_item.Object.Kill();
            }
            else
            {
                remove_list.Add(target_item.Object);
            }
        }

        spell.RemoveTargets(remove_list);
        Co8.End_Spell(spell);
        spell.EndSpell();
    }
    public override void OnSpellEffect(SpellPacketBody spell)
    {
        Logger.Info("Reincarnation OnSpellEffect");
        spell.duration = 1;
        var target_item = spell.Targets[0];

        target_item.Object.AddCondition("sp-Raise Dead", spell.spellId, spell.duration, 0);
        // target_item.partsys_id = game.particles( 'sp-Raise Dead', target_item.obj )
        // target_item.obj.stat_base_set(stat_race, (race_gnome))
        if (target_item.Object.GetStat(Stat.level) == 1)
        {
            SetGlobalVar(752, 0);
        }
        else if (target_item.Object.GetStat(Stat.level) == 2)
        {
            SetGlobalVar(752, 500);
        }
        else if (target_item.Object.GetStat(Stat.level) == 3)
        {
            SetGlobalVar(752, 2000);
        }
        else if (target_item.Object.GetStat(Stat.level) == 4)
        {
            SetGlobalVar(752, 4500);
        }
        else if (target_item.Object.GetStat(Stat.level) == 5)
        {
            SetGlobalVar(752, 8000);
        }
        else if (target_item.Object.GetStat(Stat.level) == 6)
        {
            SetGlobalVar(752, 12500);
        }
        else if (target_item.Object.GetStat(Stat.level) == 7)
        {
            SetGlobalVar(752, 18000);
        }
        else if (target_item.Object.GetStat(Stat.level) == 8)
        {
            SetGlobalVar(752, 24500);
        }
        else if (target_item.Object.GetStat(Stat.level) == 9)
        {
            SetGlobalVar(752, 32000);
        }
        else if (target_item.Object.GetStat(Stat.level) == 10)
        {
            SetGlobalVar(752, 40500);
        }
        else if (target_item.Object.GetStat(Stat.level) == 11)
        {
            SetGlobalVar(752, 50000);
        }
        else if (target_item.Object.GetStat(Stat.level) == 12)
        {
            SetGlobalVar(752, 60500);
        }
        else if (target_item.Object.GetStat(Stat.level) == 13)
        {
            SetGlobalVar(752, 72000);
        }
        else if (target_item.Object.GetStat(Stat.level) == 14)
        {
            SetGlobalVar(752, 84500);
        }
        else if (target_item.Object.GetStat(Stat.level) == 15)
        {
            SetGlobalVar(752, 98000);
        }
        else if (target_item.Object.GetStat(Stat.level) == 16)
        {
            SetGlobalVar(752, 112500);
        }
        else if (target_item.Object.GetStat(Stat.level) == 17)
        {
            SetGlobalVar(752, 128000);
        }
        else if (target_item.Object.GetStat(Stat.level) == 18)
        {
            SetGlobalVar(752, 144500);
        }
        else if (target_item.Object.GetStat(Stat.level) == 19)
        {
            SetGlobalVar(752, 162000);
        }
        else
        {
            SetGlobalVar(752, 180500);
        }

        target_item.Object.SetBaseStat(Stat.experience, GetGlobalVar(752));
        target_item.Object.ExecuteObjectScript(target_item.Object, ObjScriptEvent.Resurrect);
        Co8.End_Spell(spell);
        spell.EndSpell();
    }