public InternalTarget(LuckyCoin coin) : base(3, false, TargetFlags.None) { m_Coin = coin; }
public InternalTarget(LuckyCoin coin) : base(3, false, TargetFlags.None) { m_Coin = coin; }
public override void OnResponse( GameClient sender, RelayInfo info ) { if ( m_Item.Deleted ) return; Mobile from = sender.Mobile; int id = info.ButtonID; GameBoard board = m_Item.Board; switch ( id ) { case 5: // move up { if ( m_SelectedRow == -1 ) return; board.GamePanel.MoveUp( m_SelectedRow ); board.CurrentMovements++; from.PlaySound( 0xFA ); from.SendGump( new PuzzleBoardGump( m_Item, m_SelectedRow ) ); break; } case 6: // move down { if ( m_SelectedRow == -1 ) return; board.GamePanel.MoveDown( m_SelectedRow ); board.CurrentMovements++; from.PlaySound( 0xFA ); from.SendGump( new PuzzleBoardGump( m_Item, m_SelectedRow ) ); break; } case 7: // apply { if ( board.IsCorrect() ) { from.LocalOverheadMessage( MessageType.Regular, 0x3B2, true, "Correct Code Entered. Crystal Lock Disengaged." ); from.PlaySound( 0xF7 ); m_Item.Delete(); Item reward; switch ( Utility.Random( 10 ) ) { default: case 0: reward = new VoidEssence( 30 ); break; case 1: reward = new SilverSerpentVenom( 30 ); break; case 2: reward = new ScouringToxin( 30 ); break; case 3: reward = new ToxicVenomSac( 30 ); break; case 4: reward = new KneadingBowl(); break; case 5: reward = new TotemPole(); break; case 6: reward = new DustyPillow(); break; case 7: reward = new Plinth(); break; case 8: reward = new FlouredBreadBoard(); break; case 9: reward = new LuckyCoin(); break; } from.PlaceInBackpack( reward ); PlayerMobile pm = from as PlayerMobile; if ( pm != null && !Misc.TestCenter.Enabled ) pm.NextPuzzleAttempt = DateTime.Now + TimeSpan.FromDays( 1.0 ); } else { m_Item.PublicOverheadMessage( MessageType.Regular, 0x3B2, true, "Incorrect Code Sequence. Access Denied" ); from.PlaySound( 0xFD ); } break; } case 8: // cancel { board.Reset(); from.PlaySound( 0xFB ); from.SendGump( new PuzzleBoardGump( m_Item, -1 ) ); break; } default: { if ( id >= 1 && id <= 4 ) from.SendGump( new PuzzleBoardGump( m_Item, id - 1 ) ); break; } } }