Inheritance: BaseArmor
            public override void OnResponse(NetState sender, RelayInfo info)
            {
                if (m_Ticket.Deleted)
                {
                    return;
                }

                string number = "";

                Item item  = null;
                Item item2 = null;

                switch (info.ButtonID)
                {
                case 1: item = new Sextant(); number = "A sextant has been placed in your backpack."; break;

                case 2: item = new HairRestylingDeed(); number = "A coupon for a free hair restyling has been placed in your backpack."; break;

                case 3: item = new Spellbook(0xFFFFFFFF); number = "A spellbook with all 1st to 4th circle spells has been placed in your backpack."; break;

                case 4: item = new FireworksWand(); number = "A wand of fireworks has been placed in your backpack."; break;

                case 5:
                {
                    switch (Utility.Random(5))
                    {
                    case 1:
                    {
                        item   = new RangerGloves();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }

                    case 2:
                    {
                        item   = new RangerArms();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }

                    case 3:
                    {
                        item   = new RangerLegs();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }

                    case 4:
                    {
                        item   = new RangerChest();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }

                    case 5:
                    {
                        item   = new RangerGorget();
                        number = "A piece of ranger armor has been placed in your backpack.";
                        break;
                    }
                    }
                    break;
                }

                case 6: item = new DyeTub(); item2 = new Dyes(); number = "The dyes and dye tub have been placed in your backpack."; break;
                }

                if (item != null)
                {
                    m_Ticket.Delete();

                    m_From.SendAsciiMessage(number);
                    m_From.AddToBackpack(item);

                    if (item2 != null)
                    {
                        m_From.AddToBackpack(item2);
                    }
                }
            }
Esempio n. 2
0
            public override void OnResponse( NetState sender, RelayInfo info )
            {
                if ( m_Ticket.Deleted )
                    return;

                string number = "";

                Item item = null;
                Item item2 = null;

                switch ( info.ButtonID )
                {
                    case 1: item = new Sextant(); number = "A sextant has been placed in your backpack."; break;
                    case 2: item = new HairRestylingDeed(); number = "A coupon for a free hair restyling has been placed in your backpack."; break;
                    case 3: item = new Spellbook( 0xFFFFFFFF ); number = "A spellbook with all 1st to 4th circle spells has been placed in your backpack."; break;
                    case 4: item = new FireworksWand(); number = "A wand of fireworks has been placed in your backpack."; break;
                    case 5:
                    {
                        switch ( Utility.Random( 5 ) )
                        {
                            case 1:
                            {
                                item = new RangerGloves();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                            case 2:
                            {
                                item = new RangerArms();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                            case 3:
                            {
                                item = new RangerLegs();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                            case 4:
                            {
                                item = new RangerChest();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                            case 5:
                            {
                                item = new RangerGorget();
                                number = "A piece of ranger armor has been placed in your backpack.";
                                break;
                            }
                        }
                        break;
                    }
                    case 6: item = new DyeTub(); item2 = new Dyes(); number = "The dyes and dye tub have been placed in your backpack."; break;
                }

                if ( item != null )
                {
                    m_Ticket.Delete();

                    m_From.SendAsciiMessage( number );
                    m_From.AddToBackpack( item );

                    if ( item2 != null )
                        m_From.AddToBackpack( item2 );
                }
            }
Esempio n. 3
0
        public override void OnResponse( NetState sender, RelayInfo info )
        {
            int count = m_Count;
            Mobile m = sender.Mobile;

            for ( int i = 0; i<6 && count > 0; i++ )
            {
                Item item = null;
                if ( !m_Old && i>=3 )
                    break;

                if ( !info.IsSwitched( i + 100 ) )
                    continue;

                count--;

                switch ( i )
                {
                    case 0:
                        if ( m_Abyss )
                            m.AddToBackpack( new BankCheck( 5000 ) );
                        else
                            m.AddToBackpack( new FireworksWand() );
                        break;
                    case 1:
                        if ( m_Abyss )
                        {
                            m.AddToBackpack( new BagOfReagents( 100 ) );
                        }
                        else
                        {
                            m.AddToBackpack( item=new Spyglass() );
                            item.LootType = LootType.Newbied;
                        }
                        break;
                    case 2:
                        m.AddToBackpack( new HairRestylingDeed() );
                        break;
                    case 3:
                        switch ( Utility.Random( 5 ) )
                        {
                            case 0:
                                item = new RangerArms();
                                break;
                            case 1:
                                item = new RangerChest();
                                break;
                            case 2:
                                item = new RangerGloves();
                                break;
                            case 3:
                                item = new RangerGorget();
                                break;
                            case 4:
                                item = new RangerLegs();
                                break;
                        }

                        if ( item != null )
                            m.AddToBackpack( item );
                        break;
                    case 4:
                        if ( m_Abyss )
                        {
                            item = new BaseItem( Utility.Random( 6 ) + 0xEf4 );
                            item.Name = "I survived the Abyss!";
                            item.LootType = LootType.Newbied;
                            m.AddToBackpack( item );
                        }
                        else
                        {
                            m.AddToBackpack( new ClothingBlessDeed() );
                        }
                        break;
                    case 5:
                        if ( m_Abyss )
                            m.AddToBackpack( new Server.Multis.SmallDragonBoatDeed() );
                        else
                            m.AddToBackpack( new StrongBoxDeed() );
                        break;
                }
            }

            m.SendAsciiMessage( "Enjoy!" );
            if ( count > 0 )
            {
                ((Account)m.Account).SetTag( "Rewards", count.ToString() );
                m.SendAsciiMessage( "You have {0} reward{1} left.", count, count == 1 ? "" : "s" );
            }
            else
            {
                ((Account)m.Account).RemoveTag( "Rewards" );
                ((Account)m.Account).RemoveTag( "GoodRewards" );
            }
        }