Example #1
0
            public override void OnResponse(NetState sender, RelayInfo info)
            {
                if (info.ButtonID == 2)
                {
                    if (info.IsSwitched(1))
                    {
                        if (from.Backpack.ConsumeTotal(typeof(Gold), 5000))
                        {
                            from.SendLocalizedMessage(1060867);                               // You pay the fee.

                            Sphynx.Say(Utility.RandomList(m_Messages));

                            Sphynx.Say(Utility.RandomList(m_Messages));

                            Sphynx.m_Table[from] = true;
                        }
                        else
                        {
                            from.SendLocalizedMessage(1061006);                               // You haven't got the coin to make the proper donation to the Sphynx.  Your fortune has not been read.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(1061007);                           // You decide against having your fortune told.
                    }
                }
            }