Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:text:.ldstart:#scripting: {
- if (%ld.%ld != on) {
- set %ld.%ld on
- msg # A Liar's Dice game was started by $+($nick,.) To join, type 04.ldjoin.
- }
- else msg # There is already a game going on!
- }
- on *:text:.ldjoin:#scripting: {
- if (%ld.%ld != on) msg # A game has not started yet! To start a game, type 04.ldstart.
- elseif (!$findtok(%ld.players,$nick,32)) {
- msg # $+(04,$nick,) has joined the game!
- set %ld.players %ld.players $nick
- set %ld.dice [ $+ [ $nick ] ] $r(1,6) $r(1,6) $r(1,6) $r(1,6) $r(1,6)
- set %ld.total %ld.total %ld.dice [ $+ [ $nick ] ]
- notice $nick Your dice rolls are $+(04,%ld.dice [ $+ [ $nick ] ],,.)
- notice $nick To bid, type 04.ldbid <quantity> <face>.
- }
- }
- on $*:text:/^(\.ldbid \d \d)$/Si:#scripting {
- if ($findtok(%ld.players,$nick,32) && (%!ld.bid || (($2 > $gettok(%ld.bid,1,32) && $3 < $gettok(%ld.bid,2,32))) || ($2 >= $gettok(%ld.bid,1,32)))) {
- set %ld.bid $2 $3
- set %ld.person $nick
- set %ld.lie $iif($findtok(%ld.total,$3,0,32) == $2,true,false)
- msg # $+(04,$nick,) claims there are $+(04,$2,) dice numbered $+(04,$3,,!)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment