rendered paste bodymenu channel {
.Poker:dialog -mo poker poker
}
dialog Poker {
title "Poker v1.1"
size -1 -1 235 120
option dbu
button "Call", 2, 40 3 28 10
button "Check", 4, 101 3 28 10
button "Fold", 6, 163 3 30 10
box "Bet", 18, 10 15 80 50
radio "50", 13, 15 23 25 10, group
radio "100", 14, 15 33 25 10
radio "All", 15, 15 43 25 10
radio "Other:", 16, 15 53 25 10
edit "", 17, 45 53 25 10
button "Bet", 19, 50 38 25 10
box "Raise", 20, 120 15 80 50
radio "50", 21, 125 23 25 10, group
radio "100", 22, 125 33 25 10
radio "All", 23, 125 43 25 10
radio "Other:", 24, 125 53 25 10
edit "", 25, 155 53 25 10
button "Raise", 26, 160 38 25 10
box "Your Cards", 8, 10 75 105 30
edit "", 9, 15 87 95 10, read
box "Flop", 10, 120 75 105 30
edit "", 11, 125 87 95 10, read
text "¡YOUR TURN!", 12, 100 105 40 10
}
on *:DIALOG:Poker:INIT:0:{ did -h Poker 12,17,25 }
on *:DIALOG:Poker:SCLICK:*:{
if ($did == 2) { msg #Poker Call }
if ($did == 4) { msg #Poker Check }
if ($did == 6) { msg #Poker Fold }
if ($did == 13 || $did == 14 || $did == 15) { did -h Poker 17 }
if ($did == 16) { did -v Poker 17 }
if ($did == 21 || $did == 22 || $did == 23) { did -h Poker 25 }
if ($did == 24) { did -v Poker 25 }
if ($did == 19) {
if ($did(13).state == 1) { msg #Poker Bet 50 }
if ($did(14).state == 1) { msg #Poker Bet 100 }
if ($did(15).state == 1) { msg #Poker Bet 420420 }
if ($did(16).state == 1) {
if ($remove($did(17).text,.,$chr(44)) isnum) { msg #Poker Bet $did(17).text }
}
}
if ($did == 26) {
if ($did(21).state == 1) { msg #Poker Raise 50 }
if ($did(22).state == 1) { msg #Poker Raise 100 }
if ($did(23).state == 1) { msg #Poker Raise 420420 }
if ($did(24).state == 1) {
if ($remove($did(25).text,.,$chr(44)) isnum) { msg #Poker Raise $did(25).text }
}
}
}
on ^1:NOTICE:*Your*cards*are*:*:{ did -ra Poker 9 $strip($remove($5-,),bc) }
on ^1:NOTICE:*It's your turn*:*:{ did -v Poker 12 }
on *:TEXT:The board is*:#Poker:{ if ($dialog(Poker)) { did -ra Poker 11 $strip($remove($4-,),bc) | did -h Poker 12 } }
on *:TEXT:*wins the pot of*:#Poker:{ if ($dialog(Poker)) { did -h Poker 12 | did -r Poker 9,11 } }
on *:TEXT:*has gone busted!*:#Poker:{ if ($dialog(Poker)) { if ($strip($1,bc) == $me) { dialog -x Poker | echo 4 -agt * You lost all your money,.. Wait for the next round. } } }