Ejemplo n.º 1
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile    from = sender.Mobile;
            Container pack = from.Backpack;
            SailTimer waitTime;

            switch (info.ButtonID)
            {
            case 1:
            {
                if (pack.ConsumeTotal(typeof(Gold), m_cost / 4))
                {
                    from.Location = m_sendTo;
                    if (m_cost > 60)
                    {
                        m_cost = 60;
                    }
                    waitTime = new SailTimer(from, m_SailTo, TimeSpan.FromSeconds(m_cost / 10));
                    waitTime.Start();
                    //Give items
                }
                else
                {
                    from.SendMessage("HA, You cannot afford to sail with that little gold");
                }
                break;
            }

            case 2:
            {
                if (pack.ConsumeTotal(typeof(SailboatMembershipcard), 0))
                {
                    from.Location = m_sendTo;
                    if (m_cost > 60)
                    {
                        m_cost = 60;
                    }
                    waitTime = new SailTimer(from, m_SailTo, TimeSpan.FromSeconds(m_cost / 10));
                    waitTime.Start();
                }
                else
                {
                    from.SendMessage("It might be usefull if you actualy have a membership card...");
                }
                break;
            }

            case 3:
            {
                from.SendMessage("Perhaps later then");
                break;
            }

            default:
            {
                from.SendMessage("Perhaps later then");
                break;
            }
            }
        }
Ejemplo n.º 2
0
        public override void OnResponse( NetState sender, RelayInfo info )
        {
            Mobile from = sender.Mobile;
            Container pack = from.Backpack;
            SailTimer waitTime;

            switch ( info.ButtonID )
            {
                case 1:
                {
                    if ( pack.ConsumeTotal( typeof( Gold ), m_cost/4 ) )
                    {
                        from.Location = m_sendTo;
                        if (m_cost > 60)
                            m_cost = 60;
                        waitTime = new SailTimer(from,m_SailTo,TimeSpan.FromSeconds(m_cost/10 ));
                        waitTime.Start();
                        //Give items
                    }
                    else
                    {
                        from.SendMessage("HA, You cannot afford to sail with that little gold");
                    }
                    break;
                }
                case 2:
                {
                    if ( pack.ConsumeTotal( typeof( SailboatMembershipcard ), 0 ) )
                    {
                        from.Location = m_sendTo;
                        if (m_cost > 60)
                            m_cost = 60;
                        waitTime = new SailTimer(from,m_SailTo,TimeSpan.FromSeconds(m_cost/10 ));
                        waitTime.Start();
                    }
                    else
                    {
                        from.SendMessage("It might be usefull if you actualy have a membership card...");
                    }
                    break;
                }
                case 3:
                {
                    from.SendMessage("Perhaps later then");
                    break;
                }

                default:
                {
                    from.SendMessage("Perhaps later then");
                    break;
                }
            }
        }