<%@ Language=VBScript %>
<% ' Poker script ' By Cakkie - slisse@planetinternet.be.remove.this.bit ' Free to use and modify, but leave this comment here ' make sure we get different card each time randomize dim Hand, score, bet dim newcard, t, doubles dim card1, card2, card3, card4, card5 dim keep1, keep2, keep3, keep4, keep5 ' get values, and set initial values if first hand Hand = Request.form("hand") Score = Request.Form("score") Bet = Request.Form("bet") if hand = "" then hand = 0 Hand = Hand + 1 if score="" then score = 100 if bet = "" then bet = 10 if hand <> 1 then score = score - bet end if ' get cards passed by previous hand card1 = Request.Form("card1") card2 = Request.Form("card2") card3 = Request.Form("card3") card4 = Request.Form("card4") card5 = Request.Form("card5") ' check which one to keep keep1 = Request.Form("keep1") keep2 = Request.Form("keep2") keep3 = Request.Form("keep3") keep4 = Request.Form("keep4") keep5 = Request.Form("keep5") ' limit the game to 20 hands if hand < 21 then %>
<% ' output new hand redim newcard(4) doubles = True do until doubles = false ' get five new cards for t=0 to 4 newcard(t) = getcard next ' sort them, and check to see if we have any doubles ' if so, we will do it again until we don't SortArray newcard doubles = false for t=0 to 3 if newcard(t) = newcard(t+1) then doubles = true next loop ' display cards for t=0 to 4 %> <% next %> <% ' show checkboxes for t=1 to 5 %> <% next ' show submit button %>
Oynanan: <% = hand %>/ 20
value="<% = newcard(t) %>">
>Sakla
<% end if dim result, numericresult if hand <> 1 then ' check previous hand newcard = Array(card1,card2,card3,card4,card5) doubles = true do until doubles = false if keep1 <> "on" then newcard(0) = getcard if keep2 <> "on" then newcard(1) = getcard if keep3 <> "on" then newcard(2) = getcard if keep4 <> "on" then newcard(3) = getcard if keep5 <> "on" then newcard(4) = getcard doubles = false for t=0 to 3 if newcard(t) = newcard(t+1) then doubles = true next loop ' gethandvalue returns the value of the hand result = GetHandValue(newcard) numericresult = left(result,2) result = mid(result,3) ' replace 11, 12, 13 and 14 with friendly names result = replace(result,"11","jack") result = replace(result,"12","queen") result = replace(result,"13","king") result = replace(result,"14","ace") dim inc ' calculate how much the win is select case numericresult case "00", "01" inc = 0 case "02" ' high pair inc = (bet * 2) case "03" ' two pair inc = (bet * 4) case "04" ' three of a kind inc = (bet * 6) case "05" ' straight inc = (bet * 8) case "06" ' flush inc = (bet * 10) case "07" ' full house inc = (bet * 12) case "08" ' four of a kind inc = (bet * 20) case "09" ' straight flush inc = (bet * 50) case "10" ' royal flush inc = (bet * 100) case "11" ' poker inc = (bet * 200) end select %>
<% ' show our previous hand, but with new cards as requested for t=0 to 4 %> <% next %>
Önceki Oyun: <% = result %>
<% = IIf(Keep1="on","Saklanan","") %> <% = IIf(Keep2="on","Saklanan","") %> <% = IIf(Keep3="on","Saklanan","") %> <% = IIf(Keep4="on","Saklanan","") %> <% = IIf(Keep5="on","Saklanan","") %>
<% end if ' prepare to output score if inc = 0 then ' nothing won, so actually this means we lost inc = (-1 * bet) if hand = 1 then inc = "initial score" else ' we won, add + sign to show this better score = score + bet + inc inc = "+" & inc end if if hand > 20 then ' if we had all our hands, display other options, like submitting score Response.Write "
Final score: " & score & " (" & inc & ")" %> >
<% else ' just dislay score Response.Write "
Şimdiki Skor: " & score & " (" & inc & ")
" end if %> > > Nasıl Oynanır:
JJ,QQ,KK ve 11 ikilileri :20
Herhangi 2 kağıttan 2 şer adet Döper 77 ve QQ gibi:40
3 tane aynı kağıt :60
Farklı Renk Sıralı kağıt 4,5,6,7,8 gibi:80
3 tane aynı kağıt+2 aynı kağıt:100
Herhangi bir renkten 5 kağı olursa Flash olur(hepsi kupa, maça, sinek yada karo olursa) :120 puan
4 tanesi aynı olursa:200
Beş Kağıt aynı olursa:2000

ANA SAYFA