Пример #1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is EtherealMount)
                {
                    EtherealMount mount = targeted as EtherealMount;

                    if (mount is GMEthereal)
                    {
                        from.SendMessage("You cannot use it on this!");
                    }
                    else if (mount.IsChildOf(from.Backpack) && RewardSystem.CheckIsUsableBy(from, m_Tool, null))
                    {
                        if (m_Table.ContainsKey(mount.GetType()))
                        {
                            EtherealEntry entry = m_Table[mount.GetType()];

                            if (mount.MountedID == entry.NormalID)
                            {
                                mount.MountedID = entry.TransparentID;
                                from.SendLocalizedMessage(1113817); // Your ethereal mount's transparency has been restored.
                            }
                            else
                            {
                                mount.MountedID = entry.NormalID;
                                from.SendLocalizedMessage(1113816); // Your ethereal mount's body has been solidified.
                            }

                            if (mount.EtherealHue != 0 && mount.Hue == 0)
                            {
                                mount.EtherealHue = 0;
                            }
                        }
                        else
                        {
                            if (mount.EtherealHue != EtherealMount.DefaultEtherealHue)
                            {
                                mount.EtherealHue = EtherealMount.DefaultEtherealHue;
                                from.SendLocalizedMessage(1113817); // Your ethereal mount's transparency has been restored.
                            }
                            else
                            {
                                mount.EtherealHue = mount.OriginalHue;
                                from.SendLocalizedMessage(1113816); // Your ethereal mount's body has been solidified.
                            }
                        }

                        mount.InvalidateProperties();
                        from.PlaySound(0x242);
                    }
                }
            }
Пример #2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_Tool.IsChildOf(from.Backpack) && targeted is EtherealMount)
                {
                    EtherealMount mount = targeted as EtherealMount;

                    if (mount is GMEthereal)
                    {
                        from.SendMessage("You cannot use it on this!");
                    }
                    else if (mount.IsChildOf(from.Backpack) && RewardSystem.CheckIsUsableBy(from, m_Tool, null))
                    {
                        mount.Transparent = mount.Transparent ? false : true;
                        from.PlaySound(0x242);

                        mount.InvalidateProperties();
                    }
                }
            }
Пример #3
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (!m_Tool.IsChildOf(from.Backpack))
                {
                    from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
                }
                else if (targeted is EtherealMount)
                {
                    EtherealMount mount = targeted as EtherealMount;

                    if (!mount.IsChildOf(from.Backpack))
                    {
                        from.SendLocalizedMessage(1045158); // You must have the item in your backpack to target it.
                    }
                    else if (mount is GMEthereal || mount is EtherealWarBoar)
                    {
                        from.SendLocalizedMessage(1071117); // You cannot use this item for it.
                    }
                    else if (RewardSystem.CheckIsUsableBy(from, m_Tool, null))
                    {
                        if (mount.Transparent)
                        {
                            from.SendLocalizedMessage(1113816); // Your ethereal mount's body has been solidified.
                        }
                        else
                        {
                            from.SendLocalizedMessage(1113817); // Your ethereal mount's transparency has been restored.
                        }
                        mount.Transparent = mount.Transparent ? false : true;
                        mount.InvalidateProperties();
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1046439); // That is not a valid target.
                }
            }