Exemplo n.º 1
0
        public override void OnCast()
        {
            if (Caster.CanBeginAction(typeof(RogueSlyFoxSpell)) && CheckSequence())
            {
                Caster.BeginAction(typeof(RogueIntimidationScroll));
                new InternalTimer(Caster, TimeSpan.FromMinutes(1)).Start();

                object[] mods = new object[]
                {
                    new StatMod(StatType.Dex, "RogueIntimidationSpellDexMod", -20, TimeSpan.Zero),
                    new StatMod(StatType.Str, "RogueIntimidationSpellStrMod", 20, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Hiding, true, -20),
                    new DefaultSkillMod(SkillName.Stealth, true, -20),
                    new DefaultSkillMod(SkillName.Swords, true, 20),
                    new DefaultSkillMod(SkillName.Macing, true, 20),
                    new DefaultSkillMod(SkillName.Fencing, true, -20)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddSkillMod((SkillMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);
                Caster.AddSkillMod((SkillMod)mods[4]);
                Caster.AddSkillMod((SkillMod)mods[5]);
                Caster.AddSkillMod((SkillMod)mods[6]);
            }
            else
            {
                Caster.SendMessage("You cannot intimidate someone in that state!");
            }
        }
Exemplo n.º 2
0
        public override void OnCast()
        {
            Caster.Hidden = true;
            if (Caster.CanBeginAction(typeof(RogueShadowSpell)))
            {
                Caster.BeginAction(typeof(RogueShadowSpell));
                DefaultSkillMod mod = new DefaultSkillMod(SkillName.Stealth, true, 50.0);
                m_Table.Add(Caster, mod);
                Caster.AddSkillMod(mod);

                new InternalTimer(Caster, DateTime.UtcNow.AddSeconds(15 * (Caster.Skills[DamageSkill].Base / 10))).Start();
            }
            else
            {
                Caster.SendMessage("You are already in the shadows!");
            }
        }
        public override void OnCast()
        {
            TransformationSpellHelper.OnCast(Caster, this);

            if (CheckSequence())
            {
                RemoveEffect(Caster);

                object[] mods = new object[]
                {
                    new StatMod(StatType.Str, "[Cleric] Str Offset", 20, TimeSpan.Zero),
                    new StatMod(StatType.Dex, "[Cleric] Dex Offset", 20, TimeSpan.Zero),
                    new StatMod(StatType.Int, "[Cleric] Int Offset", 20, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Macing, true, 20),
                    new DefaultSkillMod(SkillName.Healing, true, 20),
                    new DefaultSkillMod(SkillName.Anatomy, true, 20)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddStatMod((StatMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);
                Caster.AddSkillMod((SkillMod)mods[4]);
                Caster.AddSkillMod((SkillMod)mods[5]);

                double span = 10.0 * ClericDivineFocusSpell.GetScalar(Caster);
                new InternalTimer(Caster, TimeSpan.FromMinutes((int)span)).Start();

                IMount mount = Caster.Mount;

                if (mount != null)
                {
                    mount.Rider = null;
                }

                Caster.BodyMod = 123;
                Caster.BeginAction(typeof(ClericAngelicFaithSpell));
                Caster.PlaySound(0x165);
                Caster.FixedParticles(0x3728, 1, 13, 0x480, 92, 3, EffectLayer.Head);
            }

            FinishSequence();
        }
Exemplo n.º 4
0
        public override void OnCast()
        {
            TransformationSpellHelper.OnCast(Caster, this);

            if (CheckSequence())
            {
                RemoveEffect(Caster);

                int modify = (int)((Caster.Skills[SkillName.Healing].Value / 25) + (Caster.Skills[SkillName.SpiritSpeak].Value / 25));

                modify = Server.Misc.MyServerSettings.PlayerLevelMod(modify, Caster);

                object[] mods = new object[]
                {
                    new StatMod(StatType.Str, "[] Str Offset", modify, TimeSpan.Zero),
                    new StatMod(StatType.Dex, "[] Dex Offset", modify, TimeSpan.Zero),
                    new StatMod(StatType.Int, "[] Int Offset", modify, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Parry, true, modify),
                    new DefaultSkillMod(SkillName.Tactics, true, modify),
                    new DefaultSkillMod(SkillName.Anatomy, true, modify)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddStatMod((StatMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);
                Caster.AddSkillMod((SkillMod)mods[4]);
                Caster.AddSkillMod((SkillMod)mods[5]);

                double span = (Caster.Skills[SkillName.Healing].Value + (Caster.Skills[SkillName.SpiritSpeak].Value / 2));
                new InternalTimer(Caster, TimeSpan.FromSeconds((int)span)).Start();

                Caster.BeginAction(typeof(SanctifySpell));
                Caster.PlaySound(0x5C9);
                Point3D wings = new Point3D(Caster.X + 1, Caster.Y + 1, Caster.Z + 18);
                Effects.SendLocationEffect(wings, Caster.Map, 0x3FE5, 30, 10, 0, 0);
            }

            FinishSequence();
        }
Exemplo n.º 5
0
        public override void OnCast()
        {
            TransformationSpellHelper.OnCast(Caster, this);

            if (CheckSequence())
            {
                RemoveEffect(Caster);

                int modify = (int)((Caster.Skills[SkillName.Healing].Value / 5) + (Caster.Skills[SkillName.SpiritSpeak].Value / 10));

                object[] mods = new object[]
                {
                    new StatMod(StatType.Str, "[] Str Offset", modify, TimeSpan.Zero),
                    new StatMod(StatType.Dex, "[] Dex Offset", modify, TimeSpan.Zero),
                    new StatMod(StatType.Int, "[] Int Offset", modify, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Parry, true, modify),
                    new DefaultSkillMod(SkillName.Tactics, true, modify),
                    new DefaultSkillMod(SkillName.Anatomy, true, modify)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddStatMod((StatMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);
                Caster.AddSkillMod((SkillMod)mods[4]);
                Caster.AddSkillMod((SkillMod)mods[5]);

                double span = (Caster.Skills[SkillName.Healing].Value + (Caster.Skills[SkillName.SpiritSpeak].Value / 2));
                new InternalTimer(Caster, TimeSpan.FromSeconds((int)span)).Start();

                Caster.BeginAction(typeof(SanctifySpell));
                Caster.PlaySound(0x5C9);
                Caster.FixedParticles(0x3FE5, 1, 13, 0, 92, 3, EffectLayer.Head);
            }

            FinishSequence();
        }
Exemplo n.º 6
0
        public override void OnCast()
        {
            if (!Caster.CanBeginAction(typeof(RangerHuntersAimSpell)))
            {
                Caster.SendLocalizedMessage(1005559);
            }

            else if (CheckSequence())
            {
                object[] mods = new object[]
                {
                    new StatMod(StatType.Dex, "[Ranger] Dex Offset", 5, TimeSpan.Zero),
                    new StatMod(StatType.Str, "[Ranger] Str Offset", 5, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Archery, true, 20),
                    new DefaultSkillMod(SkillName.Tactics, true, 20),
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddSkillMod((SkillMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);

                double span = 1.0 * RangerHuntersAimSpell.GetScalar(Caster);
                new InternalTimer(Caster, TimeSpan.FromMinutes((int)span)).Start();

                IMount mount = Caster.Mount;

                if (mount != null)
                {
                    mount.Rider = null;
                }


                Caster.BeginAction(typeof(RangerHuntersAimSpell));
            }
        }
Exemplo n.º 7
0
        public override void OnCast()
        {
            if (Caster.CanBeginAction(typeof(RogueSlyFoxSpell)) && CheckSequence())
            {
                Caster.BeginAction(typeof(RogueSlyFoxSpell));
                new InternalTimer(Caster, TimeSpan.FromMinutes(1)).Start();

                object[] mods = new object[]
                {
                    new StatMod(StatType.Dex, "SlyFoxSpellStatMod", 20, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Hiding, true, 20),
                    new DefaultSkillMod(SkillName.Stealth, true, 20)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddSkillMod((SkillMod)mods[1]);
                Caster.AddSkillMod((SkillMod)mods[2]);


                IMount mount = Caster.Mount;

                if (mount != null)
                {
                    mount.Rider = null;
                }

                Caster.BodyMod = 225;
                Caster.PlaySound(0xE5);
                Caster.FixedParticles(0x3728, 1, 13, 0x480, 92, 3, EffectLayer.Head);
            }
            else
            {
                Caster.SendMessage("You cannot become a sly fox in that state!");
            }
        }
Exemplo n.º 8
0
        public override void OnCast()
        {
            if (!CheckSequence())
            {
                return;
            }
            else if (Caster.Mounted)
            {
                Caster.SendLocalizedMessage(1042561); //Please dismount first.
            }
            else if (!Caster.CanBeginAction(typeof(AncientPeerSpell)))
            {
                Caster.SendLocalizedMessage(1005559); // This spell is already in effect.
            }
            else if (Server.Spells.TransformationSpellHelper.UnderTransformation(Caster))
            {
                Caster.SendMessage("Your eyes stay firmly inside your body.");
            }
            else if (DisguiseTimers.IsDisguised(Caster)) //
            {
                Caster.SendMessage("Your eyes stay firmly inside your body.");
            }
            else if (Caster.BodyMod == 183 || Caster.BodyMod == 184)
            {
                Caster.SendMessage("Your eyes stay firmly inside your body.");
            }
            else if (!Caster.CanBeginAction(typeof(IncognitoSpell)) || Caster.IsBodyMod)
            {
                DoFizzle();
            }
            else if (CheckSequence())
            {
                if (Caster.BeginAction(typeof(AncientPeerSpell)))
                {
                    if (this.Scroll != null)
                    {
                        Scroll.Consume();
                    }
                    Caster.PlaySound(0x2DF);

                    Caster.SendMessage("Your sight leaves your body.");

                    Souless dg = new Souless(this);

                    dg.Body = Caster.Body;

                    dg.Hue         = Caster.Hue;
                    dg.Name        = Caster.Name;
                    dg.SpeechHue   = Caster.SpeechHue;
                    dg.Fame        = Caster.Fame;
                    dg.Karma       = Caster.Karma;
                    dg.EmoteHue    = Caster.EmoteHue;
                    dg.Title       = Caster.Title;
                    dg.Criminal    = (Caster.Criminal);
                    dg.AccessLevel = Caster.AccessLevel;
                    dg.Str         = Caster.Str;
                    dg.Int         = Caster.Int;
                    dg.Hits        = Caster.Hits;
                    dg.Dex         = Caster.Dex;
                    dg.Mana        = Caster.Mana;
                    dg.Stam        = Caster.Stam;

                    dg.VirtualArmor = (Caster.VirtualArmor);
                    dg.SetSkill(SkillName.Wrestling, Caster.Skills[SkillName.Wrestling].Value);
                    dg.SetSkill(SkillName.Tactics, Caster.Skills[SkillName.Tactics].Value);
                    dg.SetSkill(SkillName.Anatomy, Caster.Skills[SkillName.Anatomy].Value);

                    dg.SetSkill(SkillName.Magery, Caster.Skills[SkillName.Magery].Value);
                    dg.SetSkill(SkillName.MagicResist, Caster.Skills[SkillName.MagicResist].Value);
                    dg.SetSkill(SkillName.Meditation, Caster.Skills[SkillName.Meditation].Value);
                    dg.SetSkill(SkillName.EvalInt, Caster.Skills[SkillName.EvalInt].Value);

                    dg.SetSkill(SkillName.Archery, Caster.Skills[SkillName.Archery].Value);
                    dg.SetSkill(SkillName.Macing, Caster.Skills[SkillName.Macing].Value);
                    dg.SetSkill(SkillName.Swords, Caster.Skills[SkillName.Swords].Value);
                    dg.SetSkill(SkillName.Fencing, Caster.Skills[SkillName.Fencing].Value);
                    dg.SetSkill(SkillName.Lumberjacking, Caster.Skills[SkillName.Lumberjacking].Value);
                    dg.SetSkill(SkillName.Alchemy, Caster.Skills[SkillName.Alchemy].Value);
                    dg.SetSkill(SkillName.Parry, Caster.Skills[SkillName.Parry].Value);
                    dg.SetSkill(SkillName.Focus, Caster.Skills[SkillName.Focus].Value);
                    dg.SetSkill(SkillName.Necromancy, Caster.Skills[SkillName.Necromancy].Value);
                    dg.SetSkill(SkillName.Chivalry, Caster.Skills[SkillName.Chivalry].Value);
                    dg.SetSkill(SkillName.ArmsLore, Caster.Skills[SkillName.ArmsLore].Value);
                    dg.SetSkill(SkillName.Poisoning, Caster.Skills[SkillName.Poisoning].Value);
                    dg.SetSkill(SkillName.SpiritSpeak, Caster.Skills[SkillName.SpiritSpeak].Value);
                    dg.SetSkill(SkillName.Stealing, Caster.Skills[SkillName.Stealing].Value);
                    dg.SetSkill(SkillName.Inscribe, Caster.Skills[SkillName.Inscribe].Value);
                    dg.Kills = (Caster.Kills);

                    m_PeerMod = new ArrayList();
                    double   loss = (0 - Caster.Skills[SkillName.AnimalTaming].Base);
                    SkillMod sk   = new DefaultSkillMod(SkillName.AnimalTaming, true, loss);
                    Caster.AddSkillMod(sk);
                    m_PeerMod.Add(sk);
                    double   loss1 = (0 - Caster.Skills[SkillName.AnimalLore].Base);
                    SkillMod sk1   = new DefaultSkillMod(SkillName.AnimalLore, true, loss1);// Druidry
                    Caster.AddSkillMod(sk1);
                    m_PeerMod.Add(sk1);

                    double   loss3 = (0 - Caster.Skills[SkillName.Necromancy].Base);
                    SkillMod sk3   = new DefaultSkillMod(SkillName.Necromancy, true, loss3);
                    Caster.AddSkillMod(sk3);
                    m_PeerMod.Add(sk3);
                    double   loss4 = (0 - Caster.Skills[SkillName.TasteID].Base);
                    SkillMod sk4   = new DefaultSkillMod(SkillName.TasteID, true, loss4);
                    Caster.AddSkillMod(sk4);
                    m_PeerMod.Add(sk4);
                    // Clear Items
                    RemoveFromAllLayers(dg);

                    // Then copy
                    CopyFromLayer(Caster, dg, Layer.FirstValid);
                    CopyFromLayer(Caster, dg, Layer.OneHanded);
                    CopyFromLayer(Caster, dg, Layer.TwoHanded);
                    CopyFromLayer(Caster, dg, Layer.Shoes);
                    CopyFromLayer(Caster, dg, Layer.Pants);
                    CopyFromLayer(Caster, dg, Layer.Shirt);
                    CopyFromLayer(Caster, dg, Layer.Helm);
                    CopyFromLayer(Caster, dg, Layer.Gloves);
                    CopyFromLayer(Caster, dg, Layer.Ring);
                    CopyFromLayer(Caster, dg, Layer.Talisman);
                    CopyFromLayer(Caster, dg, Layer.Neck);
                    CopyFromLayer(Caster, dg, Layer.Hair);
                    CopyFromLayer(Caster, dg, Layer.Waist);
                    CopyFromLayer(Caster, dg, Layer.InnerTorso);
                    CopyFromLayer(Caster, dg, Layer.Bracelet);
                    //CopyFromLayer(Caster, dg, Layer.Unused_xF);
                    CopyFromLayer(Caster, dg, Layer.FacialHair);
                    CopyFromLayer(Caster, dg, Layer.MiddleTorso);
                    CopyFromLayer(Caster, dg, Layer.Earrings);
                    CopyFromLayer(Caster, dg, Layer.Arms);
                    CopyFromLayer(Caster, dg, Layer.Cloak);
                    CopyFromLayer(Caster, dg, Layer.Backpack);
                    CopyFromLayer(Caster, dg, Layer.OuterTorso);
                    CopyFromLayer(Caster, dg, Layer.OuterLegs);
                    CopyFromLayer(Caster, dg, Layer.InnerLegs);
                    CopyFromLayer(Caster, dg, Layer.LastUserValid);
                    CopyFromLayer(Caster, dg, Layer.Mount);

                    dg.Owner    = Caster;
                    dg.OldBody  = m_OldBody;
                    m_Fake      = dg;
                    dg.Map      = Caster.Map;
                    dg.Location = Caster.Location;
                    BaseArmor.ValidateMobile(Caster);
                    m_OldBody        = Caster.Body;
                    Caster.BodyValue = 903;
                    Caster.Blessed   = true;
                    StopTimer(Caster);

                    Timer t = new InternalTimer(Caster, m_OldBody, m_Fake, this);

                    m_Timers[Caster] = t;

                    t.Start();
                }
                else
                {
                    Caster.SendLocalizedMessage(1005559); // This spell is already in effect.
                }
            }

            FinishSequence();
        }