public void buildit( JailSystem js ) { m_js = js; AddBackground( 0, 0, 300, 300, 5054 ); AddBlackAlpha( 5, 5, 290, 290 ); AddColorLabel( 8, 8, 288, 288, Color( "Are you sure you wish to ban this account?", SelectedColor32 ) ); AddButton( 120, 200, 241, 243, 10, GumpButtonType.Reply, 0 ); AddButton( 50, 200, 239, 240, 6, GumpButtonType.Reply, 0 ); }
public unJailEntry( Mobile gm, Mobile player ) : base( 5135, 200 ) { m_gm = gm; m_player = player; js = JailSystem.fromMobile( m_player ); if( js == null ) Flags |= CMEFlags.Disabled; else if( !js.jailed ) Flags |= CMEFlags.Disabled; }
public macroerEntry( Mobile gm, Mobile player ) : base( 394, 200 ) { m_gm = gm; m_player = player; js = JailSystem.fromMobile( m_player ); if( js == null ) { } else if( js.jailed ) Flags |= CMEFlags.Disabled; }
public void buildIt( JailSystem tjs, Mobile owner, Mobile prisoner, int page, string error, string reason, string month, string week, string day, string hour, string minute, bool fullreturn ) { js = tjs; m_return = fullreturn; m_page = page; if( ( reason != "" ) && ( reason != null ) ) m_reason = reason; else m_reason = reasons[1]; jailor = owner; badBoy = prisoner; m_reason = reason; jailor.CloseGump( typeof( JailGump ) ); Closable = false; Dragable = false; AddPage( 0 ); AddBackground( 0, 0, 326, 295, 5054 ); AddImageTiled( 9, 6, 308, 140, 2624 ); AddAlphaRegion( 9, 6, 308, 140 ); AddLabel( 16, 98, 200, "Reason" ); AddBackground( 14, 114, 290, 24, 0x2486 ); AddTextEntry( 18, 116, 282, 20, 200, 0, m_reason ); AddButton( 14, 11, 1209, 1210, 3, GumpButtonType.Reply, 0 ); AddLabel( 30, 7, 200, reasons[0] ); AddButton( 14, 29, 1209, 1210, 4, GumpButtonType.Reply, 0 ); AddLabel( 30, 25, 200, reasons[1] ); AddButton( 14, 47, 1209, 1210, 5, GumpButtonType.Reply, 0 ); AddLabel( 30, 43, 200, reasons[2] ); AddButton( 150, 11, 1209, 1210, 6, GumpButtonType.Reply, 0 ); AddLabel( 170, 7, 200, reasons[3] ); AddButton( 150, 29, 1209, 1210, 7, GumpButtonType.Reply, 0 ); AddLabel( 170, 24, 200, reasons[4] ); AddButton( 150, 47, 1209, 1210, 8, GumpButtonType.Reply, 0 ); AddLabel( 170, 43, 200, reasons[5] ); AddButton( 14, 66, 1209, 1210, 9, GumpButtonType.Reply, 0 ); AddLabel( 30, 62, 200, reasons[6] ); AddButton( 14, 84, 1209, 1210, 10, GumpButtonType.Reply, 0 ); AddLabel( 30, 80, 200, reasons[7] ); //ok button AddButton( 258, 268, 2128, 2130, 1, GumpButtonType.Reply, 0 ); AddImageTiled( 8, 153, 308, 113, 2624 ); AddAlphaRegion( 8, 153, 308, 113 ); if( m_return ) AddButton( 15, 210, 2153, 2151, 2, GumpButtonType.Reply, 0 ); else AddButton( 15, 210, 2151, 2153, 2, GumpButtonType.Reply, 0 ); AddLabel( 50, 212, 200, "Return to where jailed from on release" ); if( ( error != "" ) && ( error != null ) ) AddLabel( 10, 235, 200, error ); if( m_page == 0 ) { //auto //auto/manual AddButton( 11, 268, 2111, 2114, 25, GumpButtonType.Reply, 0 ); AddLabel( 16, 160, 200, "Months" ); AddBackground( 19, 178, 34, 24, 0x2486 ); AddTextEntry( 21, 180, 30, 20, 0, 7, month ); AddLabel( 62, 160, 200, "Weeks" ); AddBackground( 63, 178, 34, 24, 0x2486 ); AddTextEntry( 65, 180, 30, 20, 0, 6, week ); AddLabel( 106, 160, 200, "Days" ); AddBackground( 104, 178, 34, 24, 0x2486 ); AddTextEntry( 107, 180, 30, 20, 0, 5, day ); AddLabel( 145, 160, 200, "Hours" ); AddBackground( 145, 178, 34, 24, 0x2486 ); AddTextEntry( 147, 180, 30, 20, 0, 9, hour ); AddLabel( 185, 160, 200, "Minutes" ); AddBackground( 191, 178, 34, 24, 0x2486 ); AddTextEntry( 194, 180, 30, 20, 0, 8, minute ); } else { AddButton( 11, 268, 2114, 2111, 27, GumpButtonType.Reply, 0 ); AddLabel( 14, 160, 200, "Account will be Jailed for one year" ); AddLabel( 14, 178, 200, "or until released, which comes first" ); } }
public JailGump( JailSystem tjs, Mobile owner, Mobile prisoner, int page, string error, string reason, string month, string week, string day, string hour, string minute, bool fullreturn ) : base( 100, 40 ) { buildIt( tjs, owner, prisoner, page, error, reason, month, week, day, hour, minute, fullreturn ); }
public JailGump( JailSystem tjs, Mobile owner, Mobile prisoner, int page, string error, string reason ) : base( 100, 40 ) { buildIt( tjs, owner, prisoner, page, error, reason, "0", "0", "1", "0", "0", true ); }
private void buildReviews() { if( JailSystem.list.Count < m_id ) m_id = 0; if( m_id < 0 ) m_id = JailSystem.list.Count - 1; if( JailSystem.list.Count == 0 ) m_id = -1; int i = 0; if( m_id >= 0 ) foreach( JailSystem tj in JailSystem.list.Values ) { if( ( i == 0 ) || ( i == m_id ) ) js = tj; i++; } if( m_id == -1 ) { AddLabel( BodyX + gutterOffset, BodyY + gutterOffset, 200, "No accounts are currently jailed." ); return; } AddLabel( TitleX + gutterOffset, TitleY + gutterOffset, 200, "Reviewing: " + js.Name ); AddLabel( TitleX + gutterOffset, TitleY + gutterOffset + LineStep, 200, string.Format( "Jailed Account {0} of {1}", m_id + 1, JailSystem.list.Count ) ); //previous button AddButton( TitleX + gutterOffset, TitleY + gutterOffset + LineStep + LineStep + 5, 2466, 2467, 44, GumpButtonType.Reply, 0 ); //next Button AddButton( TitleX + gutterOffset + 80, TitleY + gutterOffset + LineStep + LineStep + 5, 2469, 2470, 45, GumpButtonType.Reply, 0 ); string temp = ""; if( js.Prisoner == null ) js.killJail(); else { foreach( AccountComment note in js.Prisoner.Comments ) if( ( note.AddedBy == JailSystem.JSName + "-warning" ) || ( note.AddedBy == JailSystem.JSName + "-jailed" ) || ( note.AddedBy == JailSystem.JSName + "-note" ) ) temp = temp + note.AddedBy + "\n\r" + note.Content + "\n\r***********\n\r"; AddLabel( BodyX + 17, BodyY + 8, 200, "History" ); AddHtml( BodyX + 13, 141, 300, 82, temp, true, true ); //release AddButton( BodyX + 13, BodyY + 120, 2472, 2473, 41, GumpButtonType.Reply, 0 ); AddLabel( BodyX + 43, BodyY + 123, 200, "Release" ); AddButton( BodyX + 13, BodyY + 150, 2472, 2473, 50, GumpButtonType.Reply, 0 ); AddLabel( BodyX + 43, BodyY + 153, 200, "Ban" ); //add day AddButton( BodyX + 101, BodyY + 120, 250, 251, 43, GumpButtonType.Reply, 0 ); AddButton( BodyX + 116, BodyY + 120, 252, 253, 47, GumpButtonType.Reply, 0 ); AddLabel( 135 + BodyX, BodyY + 123, 200, "Week" ); //add week AddButton( BodyX + 176, BodyY + 120, 250, 251, 42, GumpButtonType.Reply, 0 ); AddButton( BodyX + 191, BodyY + 120, 252, 253, 46, GumpButtonType.Reply, 0 ); AddLabel( BodyX + 210, BodyY + 123, 200, "Day" ); //hours AddButton( BodyX + 251, BodyY + 120, 250, 251, 48, GumpButtonType.Reply, 0 ); AddButton( BodyX + 266, BodyY + 120, 252, 253, 49, GumpButtonType.Reply, 0 ); AddLabel( BodyX + 284, BodyY + 123, 200, "Hour" ); AddLabel( BodyX + 13, BodyY + 170, 200, "Release at: " + js.ReleaseDate ); if( !js.jailed ) message( "This account has been released but currently has characters in jail." ); else message( "This account is currently jailed." ); AddHtml( BodyX + 13, BodyY + 189, 300, 74, js.reason, true, true ); } }
public JailBanGump( JailSystem js ) : base( 10, 30 ) { buildit( js ); }