IsDisguised() public static method

public static IsDisguised ( Server.Mobile m ) : bool
m Server.Mobile
return bool
コード例 #1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
            }
            else if (from.Mounted)
            {
                from.SendLocalizedMessage(1042561);                   // Please dismount first.
            }
            else if (Factions.Sigil.ExistsOn(from))
            {
                from.SendLocalizedMessage(1010521);                 // You cannot polymorph while you have a Town Sigil
            }
            else if (TransformationSpellHelper.UnderTransformation(from))
            {
                from.SendLocalizedMessage(1061633);                 // You cannot polymorph while in that form.
            }
            else if (DisguiseTimers.IsDisguised(from))
            {
                from.SendLocalizedMessage(502167);                 // You cannot polymorph while disguised.
            }
            else if (from.BodyMod == 183 || from.BodyMod == 184)
            {
                from.SendLocalizedMessage(1042512);                 // You cannot polymorph while wearing body paint
            }
            else
            {
                if (from.BodyMod != 0)
                {
                    from.BodyMod = 0;
                }
                else
                {
                    from.BodyMod = m_BodyMod;
                }

                from.PlaySound(m_TransformSound);
                from.FixedParticles(0x376A, 9, 32, 5005, EffectLayer.Waist);
            }
        }
コード例 #2
0
        public override void Drink(Mobile from)
        {
            PlayerMobile player = from as PlayerMobile;

            if (player == null)
            {
                return;
            }

            if (this != null && ParentEntity != from.Backpack)
            {
                from.SendMessage("The potion must be in your pack to drink it.");
            }

            else
            {
                if (!from.CanBeginAction(typeof(PolymorphSpell)))
                {
                    from.SendMessage("You are already under the influence of an polymorph effect.");
                    return;
                }

                if (player.RecentlyInPlayerCombat)
                {
                    from.SendMessage("You have been in combat with another player too recently to drink this.");
                    return;
                }

                if (DisguiseTimers.IsDisguised(from))
                {
                    from.SendMessage("You cannot can drink that while being disguised.");
                }

                if (KinPaint.IsWearingKinPaint(from))
                {
                    from.SendMessage("You cannot can drink that while wearing kin paint.");
                    return;
                }

                if (!from.CanBeginAction(typeof(IncognitoSpell)) || from.IsBodyMod)
                {
                    from.SendMessage("You cannot can drink that while under the effect of a modification spell, ability, or item.");
                    return;
                }

                from.FixedParticles(0x373A, 10, 15, 5036, EffectLayer.Head);
                from.PlaySound(0x3BD);
                from.Animate(34, 5, 1, true, false, 0);

                BasePotion.PlayDrinkEffect(from);

                List <int> m_PossibleBodyValues = new List <int>();

                m_PossibleBodyValues.Add(1);   //Ogre
                m_PossibleBodyValues.Add(2);   //Ettin
                m_PossibleBodyValues.Add(3);   //Zombie
                m_PossibleBodyValues.Add(4);   //Gargoyle
                m_PossibleBodyValues.Add(5);   //Orc Captain
                m_PossibleBodyValues.Add(6);   //Corpser
                m_PossibleBodyValues.Add(9);   //Daemon
                m_PossibleBodyValues.Add(17);  //Orc
                m_PossibleBodyValues.Add(22);  //Gazer
                m_PossibleBodyValues.Add(26);  //Ghost
                m_PossibleBodyValues.Add(30);  //Harpy
                m_PossibleBodyValues.Add(31);  //Headless
                m_PossibleBodyValues.Add(35);  //Lizardman
                m_PossibleBodyValues.Add(39);  //Mongbat
                m_PossibleBodyValues.Add(45);  //Ratman
                m_PossibleBodyValues.Add(57);  //Skeleton
                m_PossibleBodyValues.Add(53);  //Troll
                m_PossibleBodyValues.Add(70);  //Terathan Warrior
                m_PossibleBodyValues.Add(71);  //Terathan Drone
                m_PossibleBodyValues.Add(72);  //Terathan Queen
                m_PossibleBodyValues.Add(75);  //Cyclops
                m_PossibleBodyValues.Add(82);  //Lich
                m_PossibleBodyValues.Add(85);  //Ophidian Mage
                m_PossibleBodyValues.Add(86);  //Ophidian Warrior
                m_PossibleBodyValues.Add(87);  //Ophidian Queen
                m_PossibleBodyValues.Add(154); //Mummy
                m_PossibleBodyValues.Add(285); //Treestalk
                m_PossibleBodyValues.Add(301); //Ent
                m_PossibleBodyValues.Add(303); //Devourer
                m_PossibleBodyValues.Add(304); //Flesh Golem
                m_PossibleBodyValues.Add(305); //Ore Golem
                m_PossibleBodyValues.Add(306); //Hook Horror
                m_PossibleBodyValues.Add(309); //Patchwork Skeleton
                m_PossibleBodyValues.Add(312); //Myconid

                from.BodyMod = m_PossibleBodyValues[Utility.RandomMinMax(0, m_PossibleBodyValues.Count - 1)];
                from.HueMod  = 0;

                BaseArmor.ValidateMobile(from);

                int duration = 300;

                from.BeginAction(typeof(PolymorphPotion));
                Timer.DelayCall(TimeSpan.FromSeconds(duration), delegate
                {
                    from.EndAction(typeof(PolymorphPotion));
                });

                from.BeginAction(typeof(PolymorphSpell));
                Timer.DelayCall(TimeSpan.FromSeconds(duration), delegate { ChangeBack(from); });

                Consume();
            }
        }
コード例 #3
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (m_Book.Deleted)
            {
                return;
            }

            if (m_Book.IsChildOf(m_From.Backpack))
            {
                if (info.ButtonID == 1)
                {
                    //m_From.SendMessage( "You are turning to the previous page!" );
                    m_Book.Page--;

                    m_From.SendGump(new DaemonSpellGump((PlayerMobile)m_From, m_Book));
                }
                else if (info.ButtonID == 2)
                {
                    //m_From.SendMessage( "You are turning to the next page!" );
                    m_Book.Page++;

                    m_From.SendGump(new DaemonSpellGump((PlayerMobile)m_From, m_Book));
                }
                else if (info.ButtonID == 3)
                {
                    m_From.SendMessage("You are casting Unholy Gate!");

                    //new UnholyGateSpell(m_From);
                }
                else if (info.ButtonID == 4)                 //DEAMON FORM
                {
                    if ((m_From.BodyMod == 183 || m_From.BodyMod == 184) ||
                        (!m_From.CanBeginAction(typeof(IncognitoSpell)) || m_From.IsBodyMod) ||
                        (DisguiseTimers.IsDisguised(m_From)) ||
                        (!m_From.CanBeginAction(typeof(PolymorphSpell))) ||
                        (Factions.Sigil.ExistsOn(m_From))
                        )
                    {
                        m_From.SendMessage("You cannot obtain demonic power in that form.");
                    }
                    else
                    {
                        m_From.SendMessage("You are casting Daemon Form!");
                        new DaemonFormSpell(m_From);
                    }
                }
                else if (info.ButtonID == 5)
                {
                    m_From.SendMessage("You are casting Psi Explode!");
                }
                else if (info.ButtonID == 6)
                {
                    m_From.SendMessage("You are casting Soul Bleed!");
                }
                else if (info.ButtonID == 7)
                {
                    m_From.SendMessage("You are casting Possession!");
                }
                else if (info.ButtonID == 8)
                {
                    m_From.SendMessage("You are casting Mana Sheild!");
                }
                else if (info.ButtonID == 9)                 //SHADOW WALK
                {
                    if ((m_From.BodyMod == 183 || m_From.BodyMod == 184) ||
                        (!m_From.CanBeginAction(typeof(IncognitoSpell)) || m_From.IsBodyMod) ||
                        (DisguiseTimers.IsDisguised(m_From)) ||
                        (!m_From.CanBeginAction(typeof(PolymorphSpell))) ||
                        (Factions.Sigil.ExistsOn(m_From))
                        )
                    {
                        m_From.SendMessage("You cannot cast this spell in your current form!");
                    }
                    else
                    {
                        m_From.SendMessage("You are casting Shadow Walk!");

                        new ShadowWalkSpell(m_From);
                    }
                }
                else if (info.ButtonID == 10)                 //LAY AMBUSH
                {
                    m_From.SendMessage("You are casting Lay Ambush!");

                    m_From.Target = new LayAmbushTarget(m_From, m_Book);
                }
                else if (info.ButtonID == 11)                 //BONE WALL
                {
                    m_From.SendMessage("You are casting Bone Wall!");

                    m_From.Target = new BoneWallTarget(m_From, m_Book);
                }
                else if (info.ButtonID == 12)                 //IMPERSONATE
                {
                    if ((m_From.BodyMod == 183 || m_From.BodyMod == 184) ||
                        (!m_From.CanBeginAction(typeof(IncognitoSpell)) || m_From.IsBodyMod) ||
                        (DisguiseTimers.IsDisguised(m_From)) ||
                        (!m_From.CanBeginAction(typeof(PolymorphSpell))) ||
                        (Factions.Sigil.ExistsOn(m_From))
                        )
                    {
                        m_From.SendMessage("You cannot impersonate in that form.");
                    }
                    else
                    {
                        m_From.SendMessage("You are casting Impersonate!");
                        m_From.Target = new ImpersonateTarget(m_From, m_Book);
                    }
                }
            }
            else
            {
                m_From.SendMessage("The Spellbook must be in your backpack.");
            }
        }