public GamblerStatsGump(Gambler gambler) : base(10, 10) { m_From = gambler; AddPage(0); AddBackground(30, 100, 90, 160, 5120); AddLabel(45, 100, 70, "Blackjack"); AddLabel(45, 115, 600, "Wins: " + m_From.gamestats[0]); AddLabel(45, 130, 600, "Loss: " + m_From.gamestats[1]); AddLabel(45, 145, 600, "Tied: " + m_From.gamestats[2]); AddLabel(45, 165, 70, "Poker"); AddLabel(45, 180, 600, "Wins: " + m_From.gamestats[3]); AddLabel(45, 195, 600, "Loss: " + m_From.gamestats[4]); AddLabel(45, 210, 600, "Tied: " + m_From.gamestats[5]); AddLabel(45, 230, 1500, "Reset"); AddButton(85, 235, 2117, 2118, 101, GumpButtonType.Reply, 0); }
public BlackjackGump(Mobile mobile, Gambler gambler) : base(10, 10) { m_From = gambler; int i, dealervalue = 0, temp = 0; string cardtemp, scoredmsg, scorepmsg; Closable = false; AddPage(0); AddImageTiled(30, 100, 460, 280, 2624); AddAlphaRegion(90, 100, 460, 230); AddLabel(35, 109, 1500, "Dealer:"); AddLabel(35, 229, 600, "Player:"); if (m_From.dwin > 0) { AddLabel(45, 129, 70, "" + m_From.dwin); } if (m_From.pwin > 0) { AddLabel(45, 249, 70, "" + m_From.pwin); } AddButton(40, 333, 2117, 2118, 101, GumpButtonType.Reply, 0); AddLabel(60, 330, 800, "Deal"); AddButton(150, 333, 2117, 2118, 102, GumpButtonType.Reply, 0); AddLabel(170, 330, 800, "Hit"); AddButton(200, 333, 2117, 2118, 103, GumpButtonType.Reply, 0); AddLabel(220, 330, 800, "Stand"); AddButton(280, 333, 2117, 2118, 104, GumpButtonType.Reply, 0); AddLabel(300, 330, 800, "Double Down"); AddButton(90, 333, 2117, 2118, 105, GumpButtonType.Reply, 0); AddButton(33, 363, 3, 4, 666, GumpButtonType.Reply, 0); //show dealer cards for (i = 0; i <= 4; ++i) { temp = m_From.dealercards[i]; if (temp > 0) { if (!m_From.dealercardhidden || (m_From.dealercardhidden && i > 0)) { if (NewCards) { AddImage(25 + ((i + 1) * 75), 110, 4095 + temp); } else { cardtemp = m_From.CardSuit(temp); //129 AddBackground(65 + ((i + 1) * 40), 110, 35, 50, 2171); AddLabel(80 + ((i + 1) * 40), 136, m_From.cardcolor(cardtemp), cardtemp); AddLabel(72 + ((i + 1) * 40), 115, 1500, m_From.CardName(temp)); } dealervalue += m_From.CardValue(temp); } else { if (NewCards) { AddImage(25 + ((i + 1) * 75), 110, 4154); } else { AddBackground(65 + ((i + 1) * 40), 110, 35, 50, 2171); } } } } //show player cards for (i = 0; i <= 4; ++i) { temp = m_From.playercards[i]; if (temp > 0) { if (NewCards) { AddImage(25 + ((i + 1) * 75), 230, 4095 + temp); } else { cardtemp = m_From.CardSuit(temp); AddBackground(65 + ((i + 1) * 40), 230, 35, 50, 2171); AddLabel(80 + ((i + 1) * 40), 256, m_From.cardcolor(cardtemp), cardtemp); AddLabel(72 + ((i + 1) * 40), 235, 600, m_From.CardName(temp)); } } } AddLabel(110, 330, 800, "" + m_From.playerbet); if (!m_From.dealercardhidden) { dealervalue = dealercardvalue(); } if (m_From.CardValue(m_From.dealercards[0]) + m_From.CardValue(m_From.dealercards[1]) == 21 && !m_From.dealercardhidden) { scoredmsg = "BJ"; } else { scoredmsg = dealervalue.ToString(); } if (m_From.CardValue(m_From.playercards[1]) + m_From.CardValue(m_From.playercards[1]) == 21) { scorepmsg = "BJ"; } else { scorepmsg = playercardvalue().ToString(); } AddLabel(63, 155, 1500, "" + scoredmsg); AddLabel(63, 274, 600, "" + scorepmsg); AddLabel(100, 350, 64, m_From.pokermsg); }
public PokerGump(Mobile mobile, Gambler gambler) : base(10, 10) { m_From = gambler; int i, temp = 0; string cardtemp = "Player:"; Closable = false; AddPage(0); AddImageTiled(30, 100, 460, 160, 2624); AddAlphaRegion(90, 100, 460, 105); if (m_From.dwin == 2 || m_From.dwin == 1) { cardtemp = "Player: 1"; } AddLabel(35, 109, 600, cardtemp); AddButton(33, 243, 3, 4, 666, GumpButtonType.Reply, 0); if (m_From.pwin > 0) { AddLabel(45, 129, 70, "" + m_From.pwin); } //show player cards for (i = 0; i <= 4; ++i) { if (m_From.dwin == 1) { m_From.playercards[i] = m_From.pickcard(mobile); } temp = m_From.playercards[i]; if (temp > 0) { if (!NewCards) { AddBackground(65 + ((i + 1) * 40), 108, 35, 50, 2171); cardtemp = m_From.CardSuit(temp); AddLabel(80 + ((i + 1) * 40), 134, m_From.cardcolor(cardtemp), cardtemp); AddLabel(72 + ((i + 1) * 40), 113, 600, m_From.CardName(temp)); AddLabel(65 + ((i + 1) * 40), 180, 500, "redeal"); } if (m_From.dwin == 1 || m_From.dwin == 2) { if (NewCards) { AddCheck(25 + ((i + 1) * 75), 105, 4095 + temp, 4154, false, (i + 1)); } else { AddCheck(74 + ((i + 1) * 40), 162, 210, 211, false, (i + 1)); } } else { if (NewCards) { AddImage(25 + ((i + 1) * 75), 105, 4095 + temp); } else { AddImage(74 + ((i + 1) * 40), 162, 210); } } } } AddLabel(240, 205, 800, "Deal"); AddButton(220, 208, 2117, 2118, 101, GumpButtonType.Reply, 0); AddLabel(160, 205, 800, "" + m_From.playerbet); AddButton(140, 208, 2117, 2118, 105, GumpButtonType.Reply, 0); AddLabel(130, 230, 64, m_From.pokermsg); if (m_From.dwin == 1) { m_From.dwin = 2; } if (m_From.dwin == 3) { m_From.dwin = 0; m_From.roundend = true; } }
public BlackjackGump( Mobile mobile, Gambler gambler ) : base( 10, 10 ) { m_From = gambler; int i,dealervalue=0,temp=0; string cardtemp, scoredmsg, scorepmsg; Closable = false; AddPage( 0 ); AddImageTiled( 30, 100, 460, 280, 2624 ); AddAlphaRegion( 90, 100, 460, 230 ); AddLabel( 35, 109, 1500, "Dealer:" ); AddLabel( 35, 229, 600, "Player:" ); if (m_From.dwin>0) AddLabel( 45, 129, 70, ""+m_From.dwin ); if (m_From.pwin>0) AddLabel( 45, 249, 70, ""+m_From.pwin ); AddButton( 40, 333, 2117, 2118, 101, GumpButtonType.Reply, 0 ); AddLabel( 60, 330, 800, "Deal" ); AddButton( 150, 333, 2117, 2118, 102, GumpButtonType.Reply, 0 ); AddLabel( 170, 330, 800, "Hit" ); AddButton( 200, 333, 2117, 2118, 103, GumpButtonType.Reply, 0 ); AddLabel( 220, 330, 800, "Stand" ); AddButton( 280, 333, 2117, 2118, 104, GumpButtonType.Reply, 0 ); AddLabel( 300, 330, 800, "Double Down" ); AddButton( 90, 333, 2117, 2118, 105, GumpButtonType.Reply, 0 ); AddButton( 33, 363, 3, 4, 666, GumpButtonType.Reply, 0 ); //show dealer cards for ( i = 0; i <= 4; ++i ) { temp = m_From.dealercards[i]; if (temp>0) { if (!m_From.dealercardhidden || (m_From.dealercardhidden && i>0)) { if (NewCards) AddImage ( 25 + ((i+1)*75), 110, 4095+temp); else { cardtemp = m_From.CardSuit( temp ); //129 AddBackground( 65 + ((i+1)*40), 110, 35, 50, 2171 ); AddLabel( 80 + ((i+1)*40), 136, m_From.cardcolor( cardtemp ), cardtemp ); AddLabel( 72 + ((i+1)*40), 115, 1500, m_From.CardName( temp ) ); } dealervalue += m_From.CardValue( temp ); } else { if (NewCards) AddImage ( 25 + ((i+1)*75), 110, 4154); else AddBackground( 65 + ((i+1)*40), 110, 35, 50, 2171 ); } } } //show player cards for ( i = 0; i <= 4; ++i ) { temp = m_From.playercards[i]; if (temp>0) { if (NewCards) AddImage ( 25 + ((i+1)*75), 230, 4095+temp); else { cardtemp = m_From.CardSuit( temp ); AddBackground( 65 + ((i+1)*40), 230, 35, 50, 2171 ); AddLabel( 80 + ((i+1)*40), 256, m_From.cardcolor( cardtemp ), cardtemp ); AddLabel( 72 + ((i+1)*40), 235, 600, m_From.CardName( temp ) ); } } } AddLabel( 110, 330, 800, ""+m_From.playerbet ); if (!m_From.dealercardhidden) dealervalue = dealercardvalue(); if (m_From.CardValue(m_From.dealercards[0]) + m_From.CardValue(m_From.dealercards[1]) == 21 && !m_From.dealercardhidden) scoredmsg = "BJ"; else scoredmsg = dealervalue.ToString(); if (m_From.CardValue(m_From.playercards[1]) + m_From.CardValue(m_From.playercards[1]) == 21) scorepmsg = "BJ"; else scorepmsg = playercardvalue().ToString(); AddLabel( 63, 155, 1500, ""+scoredmsg ); AddLabel( 63, 274, 600, ""+scorepmsg ); AddLabel( 100, 350, 64, m_From.pokermsg ); }
public PokerGump( Mobile mobile, Gambler gambler ) : base( 10, 10 ) { m_From = gambler; int i,temp=0; string cardtemp="Player:"; Closable = false; AddPage( 0 ); AddImageTiled( 30, 100, 460, 160, 2624 ); AddAlphaRegion( 90, 100, 460, 105 ); if (m_From.dwin==2||m_From.dwin==1) cardtemp="Player: 1"; AddLabel( 35, 109, 600, cardtemp ); AddButton( 33, 243, 3, 4, 666, GumpButtonType.Reply, 0 ); if (m_From.pwin>0) AddLabel( 45, 129, 70, ""+m_From.pwin ); //show player cards for ( i = 0; i <= 4; ++i ) { if (m_From.dwin==1) m_From.playercards[i]=m_From.pickcard(mobile); temp = m_From.playercards[i]; if (temp>0) { if (!NewCards) { AddBackground( 65 + ((i+1)*40), 108, 35, 50, 2171 ); cardtemp = m_From.CardSuit( temp ); AddLabel( 80 + ((i+1)*40), 134, m_From.cardcolor( cardtemp ), cardtemp ); AddLabel( 72 + ((i+1)*40), 113, 600, m_From.CardName( temp ) ); AddLabel( 65 + ((i+1)*40), 180, 500, "redeal" ); } if (m_From.dwin==1||m_From.dwin==2) { if (NewCards) AddCheck( 25 + ((i+1)*75), 105, 4095+temp, 4154, false, (i+1) ); else AddCheck( 74 + ((i+1)*40), 162, 210, 211, false, (i+1) ); } else { if (NewCards) AddImage ( 25 + ((i+1)*75), 105, 4095+temp); else AddImage( 74 + ((i+1)*40), 162, 210 ); } } } AddLabel( 240, 205, 800, "Deal" ); AddButton( 220, 208, 2117, 2118, 101, GumpButtonType.Reply, 0 ); AddLabel( 160, 205, 800, ""+m_From.playerbet ); AddButton( 140, 208, 2117, 2118, 105, GumpButtonType.Reply, 0 ); AddLabel( 130, 230, 64, m_From.pokermsg ); if (m_From.dwin==1) m_From.dwin=2; if (m_From.dwin==3) { m_From.dwin=0; m_From.roundend = true; } }
public GamblerStatsGump( Gambler gambler ) : base( 10, 10 ) { m_From = gambler; AddPage( 0 ); AddBackground( 30, 100, 90, 160, 5120 ); AddLabel( 45, 100, 70, "Blackjack" ); AddLabel( 45, 115, 600, "Wins: "+m_From.gamestats[0] ); AddLabel( 45, 130, 600, "Loss: "+m_From.gamestats[1] ); AddLabel( 45, 145, 600, "Tied: "+m_From.gamestats[2] ); AddLabel( 45, 165, 70, "Poker" ); AddLabel( 45, 180, 600, "Wins: "+m_From.gamestats[3] ); AddLabel( 45, 195, 600, "Loss: "+m_From.gamestats[4] ); AddLabel( 45, 210, 600, "Tied: "+m_From.gamestats[5] ); AddLabel( 45, 230, 1500, "Reset" ); AddButton( 85, 235, 2117, 2118, 101, GumpButtonType.Reply, 0 ); }