Exemplo n.º 1
0
        public override bool OnMoveOver(Mobile from)
        {
            if (from.AccessLevel > AccessLevel.Player)
            {
                return(true);
            }

            Container pack = from.Backpack;

            if (pack != null)
            {
                Item[] items = pack.FindItemsByType(typeof(ExperimentalGem));

                if (items != null)
                {
                    foreach (Item item in items)
                    {
                        ExperimentalGem gem = (ExperimentalGem)item;

                        if (gem.Active && (gem.CurrentRoom > m_Room || m_Room == Room.RoomZero))
                        {
                            return(true);
                        }
                    }
                }
            }

            //TODO: Message?
            return(false);
        }
Exemplo n.º 2
0
        public override void LockPick(Mobile from)
        {
            base.LockPick(from);

            Timer.DelayCall(TimeSpan.FromSeconds(3), Delete);

            if (m_Key != null)
            {
                m_Key.Decay();
            }

            ExperimentalGem gem = new ExperimentalGem();

            gem.Owner = from;

            from.AddToBackpack(gem);

            from.SendLocalizedMessage(1113382); // You've solved the puzzle!! An item has been placed in your bag.
        }
Exemplo n.º 3
0
            public InternalGump(ExperimentalGem gem) : base(50, 50)
            {
                m_Gem = gem;

                AddPage(0);
                AddBackground(0, 0, 297, 115, 9200);

                AddImageTiled(5, 10, 285, 25, 2624);
                AddHtmlLocalized(10, 15, 275, 25, 1113407, 0x7FFF, false, false); // Experimental Room Access

                AddImageTiled(5, 40, 285, 40, 2624);
                AddHtmlLocalized(10, 40, 275, 40, 1113391, 0x7FFF, false, false); // Click CANCEL to read the instruction book or OK to start the timer now.

                AddButton(5, 85, 4017, 4018, 0, GumpButtonType.Reply, 0);
                AddHtmlLocalized(40, 87, 80, 25, 1011012, 0x7FFF, false, false);   //CANCEL

                AddButton(215, 85, 4023, 4024, 1, GumpButtonType.Reply, 0);
                AddHtmlLocalized(250, 87, 80, 25, 1006044, 0x7FFF, false, false);  //OK
            }
Exemplo n.º 4
0
        public override void Use(Mobile from)
        {
            if (from.AccessLevel > AccessLevel.Player)
            {
                from.SendMessage("You open the door with your godly powers.");
                base.Use(from);
                return;
            }

            Container pack   = from.Backpack;
            bool      hasGem = false;

            if (pack != null)
            {
                Item[] items = pack.FindItemsByType(typeof(ExperimentalGem));

                if (items != null && items.Length > 0)
                {
                    hasGem = true;

                    foreach (Item item in items)
                    {
                        ExperimentalGem gem = (ExperimentalGem)item;

                        if (gem.Active && (gem.CurrentRoom > m_Room || m_Room == Room.RoomZero))
                        {
                            base.Use(from);
                            return;
                        }
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1113410); // You must have an active Experimental Gem to enter that room.
                }
            }

            if (hasGem)
            {
                from.SendLocalizedMessage(1113411); // You have not yet earned access to that room!
            }
        }
Exemplo n.º 5
0
 public InternalTimer(ExperimentalGem gem) : base(TimeSpan.FromSeconds(.5), TimeSpan.FromSeconds(.5))
 {
     m_Gem = gem;
     Start();
 }
        public override int LockPick(Mobile from)
        {
            Timer.DelayCall(TimeSpan.FromSeconds(3), new TimerCallback(Delete));

            if (m_Key != null)
                m_Key.Decay();

            ExperimentalGem gem = new ExperimentalGem();
            gem.Owner = from;

            from.AddToBackpack(gem);

            from.SendLocalizedMessage(1113382); // You've solved the puzzle!! An item has been placed in your bag.

            return base.LockPick(from);
        }
Exemplo n.º 7
0
            public InternalGump(ExperimentalGem gem) : base(50, 50)
            {
                m_Gem = gem;

                AddPage(0);
                AddBackground(0, 0, 297, 115, 9200);

                AddImageTiled(5, 10, 285, 25, 2624);
                AddHtmlLocalized(10, 15, 275, 25, 1113407, 0x7FFF, false, false); // Experimental Room Access

                AddImageTiled(5, 40, 285, 40, 2624);
                AddHtmlLocalized(10, 40, 275, 40, 1113391, 0x7FFF, false, false); // Click CANCEL to read the instruction book or OK to start the timer now.

                AddButton(5, 85, 4017, 4018, 0, GumpButtonType.Reply, 0);
                AddHtmlLocalized(40, 87, 80, 25, 1011012, 0x7FFF, false, false);   //CANCEL

                AddButton(215, 85, 4023, 4024, 1, GumpButtonType.Reply, 0);
                AddHtmlLocalized(250, 87, 80, 25, 1006044, 0x7FFF, false, false);  //OK
            }
Exemplo n.º 8
0
			public InternalTimer(ExperimentalGem gem) : base(TimeSpan.FromSeconds(.5), TimeSpan.FromSeconds(.5))
			{
				m_Gem = gem;
				Start();
			}