Example #1
0
        private void ThreadedGump()
        {
            //Don't show the gump if we cant conncet to the SQL - Might be an idea
            //to insert the old anti macro code here, though i doubt this will happend a lot
            if (!MySQLManager.InsertToSQL(m_Owner, m_Seed, DateTime.Now.Subtract(m_LinuxTime).TotalSeconds + c_MaxTime.TotalSeconds))
            {
                m_Owner.SendGump(new OldAntiMacroGump(m_Owner));
                return;
            }

            m_Owner.SendGump(this, false);
        }
Example #2
0
        private void ThreadedValidation()
        {
            if (!MySQLManager.ValidateInput(m_Owner, m_Answer, m_TriesLeft))
            {
                if (m_TriesLeft == 1)
                {
                    new KillTimer(m_Owner).Start(); //Dirty fix to fix any possible threaded issues.
                }
                if (m_TotalTriesLeft <= 0)          //So people can't spam and eventually enter the correct answer
                {
                    m_Owner.SendAsciiMessage("You have entered the incorrect answer too many times and you will now need to page staff to get unfrozen");
                    m_Owner.AntiMacroGump = false;
                    return;
                }

                if (m_TriesLeft > 0)
                {
                    m_TriesLeft--;
                }

                m_TotalTriesLeft--;

                m_Owner.SendAsciiMessage("Wrong answer!");
                AntiMacroGump newGump = new AntiMacroGump(this);
                m_Owner.SendGump(newGump);

                //We dont want to end the timer and free the owner
                return;
            }

            //End the timer
            if (m_MacroTimer != null)
            {
                m_MacroTimer.Stop();
                m_MacroTimer = null;
            }

            FreeOwner();

            m_Owner.SendAsciiMessage(string.Format("Thank you {0} for validating your presence. Have a nice day!", m_Owner.Name));
            m_Owner.CantWalk = false;
            if (m_Owner.Frozen)
            {
                m_Owner.Frozen = false;
            }
        }
Example #3
0
 private void TheadedRemoveFromDataBase()
 {
     MySQLManager.RemoveFromDataBase(m_Owner.Serial.GetHashCode());
 }