Example #1
0
        public override void OnDoubleClick(Mobile from)
        {
            Party party = LeverPuzzle.Party;

            if (from.Location == LeverPuzzle.m_PlayerLocations[ID] && !m_Pressed)
            {
                if (party != null)
                {
                    if (Party.Get(from) == party)
                    {
                        PublicOverheadMessage(0, 0, false, "*Click*");
                        Pressed = true;
                        LeverPuzzle.LeverSwitched(ID);
                    }

                    else
                    {
                        from.SendLocalizedMessage(1062054, party.Leader.Name);     //You are not in a party with ~1_NAME~ and can therefore not assist with the puzzle at this time.
                    }
                }

                else
                {
                    LeverPuzzle.Party = Party.Get(from);
                    PublicOverheadMessage(0, 0, false, "*Click*");
                    Pressed = true;
                    LeverPuzzle.LeverSwitched(ID);
                }
            }
        }
Example #2
0
 public static void Initialize()
 {
     SecretRoom.Deactivate();
     PoisonRoom.Deactivate();
     LeverPuzzle.GenerateAnswer();
     EventSink.Disconnected += new DisconnectedEventHandler(EventSink_Disconnected);
     CommandSystem.Register("GenDoomSystem", AccessLevel.Administrator, new CommandEventHandler(GenDoomSystem_OnCommand));
 }