Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Higher score Yahtzee

Solution changed the 2nd to last version of Foxy's yahtzee 6 script to a higher more fair scoring system I think were full house & half house both score 60 each. I raised straights to 70, 80, 90 points. Yahtzees can be changed to but thought this was fair. I use a template which is free for the asking. Haven't had time to do a tutorial yet of how to apply it to pics. But its quite simple. I can also do some pics to match script if you send pic. Animated rooms yahtzee script I can also post but think most who come this far and have done the door locks can figure out how to add the animated script. Plus pics for animation. Heres the script with higher scores.
ROOM
ID 141
NOPAINTING
HIDDEN
NAME "Yahtzee 6 Corvette"
PICT "yahtcorv.jpg"
PICTURE ID 1
NAME "onept.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 2
NAME "dice1w.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 3
NAME "dice2w.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 4
NAME "dice3w.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 5
NAME "dice4w.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 6
NAME "dice5w.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 7
NAME "dice6w.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 8
NAME "yaholdw.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 9
NAME "1mark.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 10
NAME "2mark.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 11
NAME "3mark.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 12
NAME "4mark.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 13
NAME "4lightf1.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 14
NAME "dicer1.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 15
NAME "dicer2.gif"
TRANSCOLOR 0
ENDPICTURE
PICTURE ID 16
NAME "dicer3.gif"
TRANSCOLOR 0
ENDPICTURE
SPOT
ID 1
OUTLINE 25,150 55,150 55,177 25,177
LOC 39,161
PICTS
1,0,0
2,0,0
3,0,0
4,0,0
5,0,0
6,0,0
7,0,0
14,0,0
15,0,0
16,0,0
ENDPICTS
ENDSPOT
SPOT
ID 2
OUTLINE 66,150 96,150 96,177 66,177
LOC 80,161
PICTS
1,0,0
2,0,0
3,0,0
4,0,0
5,0,0
6,0,0
7,0,0
14,0,0
15,0,0
16,0,0
ENDPICTS
ENDSPOT
SPOT
ID 3
OUTLINE 107,150 137,150 137,177 107,177
LOC 121,161
PICTS
1,0,0
2,0,0
3,0,0
4,0,0
5,0,0
6,0,0
7,0,0
14,0,0
15,0,0
16,0,0
ENDPICTS
ENDSPOT
SPOT
ID 4
OUTLINE 148,150 178,150 178,177 148,177
LOC 163,161
PICTS
1,0,0
2,0,0
3,0,0
4,0,0
5,0,0
6,0,0
7,0,0
14,0,0
15,0,0
16,0,0
ENDPICTS
ENDSPOT
SPOT
ID 5
OUTLINE 189,150 219,150 219,177 189,177
LOC 204,161
PICTS
1,0,0
2,0,0
3,0,0
4,0,0
5,0,0
6,0,0
7,0,0
14,0,0
15,0,0
16,0,0
ENDPICTS
ENDSPOT
SPOT
ID 6
OUTLINE 228,150 258,150 258,177 228,177
LOC 243,161
PICTS
1,0,0
2,0,0
3,0,0
4,0,0
5,0,0
6,0,0
7,0,0
14,0,0
15,0,0
16,0,0
ENDPICTS
ENDSPOT
SPOT
ID 13
DONTMOVEHERE
OUTLINE 116,21 170,21 170,37 116,37
LOC 144,32
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 0 GET crv = ME co =
"@160,28 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 14
DONTMOVEHERE
OUTLINE 116,39 170,39 170,54 116,54
LOC 144,49
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 1 GET 2 * crv = ME co =
"@160,44 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 15
DONTMOVEHERE
OUTLINE 116,55 170,55 170,71 116,71
LOC 144,66
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 2 GET 3 * crv = ME co =
"@160,60 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 16
DONTMOVEHERE
OUTLINE 116,72 170,72 170,88 116,88
LOC 144,83
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 3 GET 4 * crv = ME co =
"@160,76 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 17
DONTMOVEHERE
OUTLINE 116,89 170,89 170,105 116,105
LOC 144,100
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 4 GET 5 * crv = ME co =
"@160,94 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 18
DONTMOVEHERE
OUTLINE 116,106 170,106 170,121 116,121
LOC 144,116
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL
myturn GLOBAL
{ dd STRTOATOM EXEC 5 GET 6 * crv = ME co =
"@160,110 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 19
DONTMOVEHERE
OUTLINE 312,5 367,5 367,20 312,20
LOC 341,16
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "[3456]" GREPSTR dt * crv =
ME co =
"@355,7 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 20
DONTMOVEHERE
OUTLINE 312,21 367,21 367,38 312,38
LOC 341,33
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "[456]" GREPSTR dt * crv =
ME co =
"@355,28 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 21
DONTMOVEHERE
OUTLINE 312,39 367,39 367,54 312,54
LOC 341,49
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "[56]" GREPSTR dt * crv =
ME co =
"@355,44 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 22
DONTMOVEHERE
OUTLINE 312,55 367,55 367,70 312,70
LOC 341,66
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "3.*3" GREPSTR 60 * crv =
ME co =
"@355,60 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 23
DONTMOVEHERE
OUTLINE 312,71 367,71 367,86 312,86
LOC 341,83
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd "4" SUBSTR dd "2" SUBSTR AND 60 * crv =
ME co =
"@355,76 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 24
DONTMOVEHERE
OUTLINE 312,105 367,105 367,120 312,120
LOC 341,117
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dt crv = ME co =
"@355,110 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 25
DONTMOVEHERE
OUTLINE 465,22 509,22 509,37 465,37
LOC 488,32
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd " [123] [123] [123] [123] " GREPSTR 70 * crv =
ME co =
"@480,28 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 26
DONTMOVEHERE
OUTLINE 465,38 509,38 509,54 465,54
LOC 488,49
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd " [12] [12] [12] [12] [12] " GREPSTR 80 * crv =
ME co =
"@480,44 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 27
DONTMOVEHERE
OUTLINE 465,56 509,56 509,72 465,72
LOC 488,66
PICTS
1,0,0
9,0,0
ENDPICTS
SCRIPT
ON SELECT { dd GLOBAL crv GLOBAL co GLOBAL dt GLOBAL
myturn GLOBAL
{ dd " 1 1 1 1 1 1 " GREPSTR 90 * crv =
ME co =
"@480,60 That will give you a score of " crv ITOA & LOCALMSG
} myturn ME GETSPOTSTATE NOT AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 28
DONTMOVEHERE
OUTLINE 312,88 367,88 367,104 312,104
LOC 341,100
PICTS
1,0,0
9,0,0
10,0,0
11,0,0
12,0,0
12,0,0
12,0,0
12,0,0
12,0,0
12,0,0
12,0,0
12,0,0
12,0,0
12,0,0
12,0,0
12,0,0
ENDPICTS
SCRIPT
ON SELECT { yhtz GLOBAL co GLOBAL dd GLOBAL myturn GLOBAL
crv GLOBAL mysc GLOBAL btt GLOBAL
{ dd "6" SUBSTR yts =
{
{ "Sorry, as you zeroed out your Yahtzee line earlier, you are ineligible for a bonus." LOCALMSG
} yts yhtz 0 < AND IF
{ ")applause " USERNAME " collects a YAHTZEE6 BONUS! CONGRATULATIONS!!" & & ROOMMSG
"@511,0 Joker rules-- you get to score it on a regular line as well!" LOCALMSG
200 mysc += ME GETSPOTSTATE 1 + ME SETSPOTSTATE
1 btt = yhtz ++
} yts yhtz 0 > AND btt NOT AND IF
}
{ ;yahtzee for the first time, -1 if yts is 0, 1 if yts is 1
yts 100 * crv = ME co =
"@355,94 This will score you a " crv ITOA & LOCALMSG
{ "!WARNING: zeroing out this box makes you ineligible for Yahtzee bonuses!" LOCALMSG
} crv NOT IF
} yhtz IFELSE
} myturn IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 29
DONTMOVEHERE
OUTLINE 469,84 488,84 488,98 469,98
LOC 487,92
PICTS
1,0,0
9,9,0
ENDPICTS
SCRIPT
ON SELECT { ut GLOBAL myturn GLOBAL
{
{ "@483,85 You need " 80 ut - ITOA & " more points to get the upper table bonus" & LOCALMSG }
{ "@483,85 You already have the upper table bonus!" LOCALMSG
} ME GETSPOTSTATE NOT IFELSE
} myturn IF
ENDSCRIPT
ENDSPOT
SPOT
ID 12
DONTMOVEHERE
OUTLINE 232,140 266,140 266,184 232,184
LOC 244,162
PICTS
1,0,0
8,0,0
ENDPICTS
SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 11
DONTMOVEHERE
OUTLINE 184,140 231,140 231,184 184,184
LOC 204,162
PICTS
1,0,0
8,0,0
ENDPICTS
SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 10
DONTMOVEHERE
OUTLINE 141,140 183,140 183,184 141,184
LOC 163,162
PICTS
1,0,0
8,0,0
ENDPICTS
SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 9
DONTMOVEHERE
OUTLINE 99,140 140,140 140,184 99,184
LOC 122,162
PICTS
1,0,0
8,0,0
ENDPICTS
SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 8
DONTMOVEHERE
OUTLINE 58,140 98,140 98,184 58,184
LOC 81,162
PICTS
1,0,0
8,0,0
ENDPICTS
SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 7
DONTMOVEHERE
OUTLINE 17,140 57,140 57,184 17,184
LOC 40,162
PICTS
1,0,0
8,0,0
ENDPICTS
SCRIPT
ON SELECT { myturn GLOBAL
{ ME GETSPOTSTATE NOT ME SETSPOTSTATE
} myturn 32 GETSPOTSTATE AND IF
}
ENDSCRIPT
ENDSPOT
SPOT
ID 31
NAME "Start Game"
DONTMOVEHERE
LOC 459,27
SCRIPT
ON ENTER { { "A game of Yahtzee6 is currently being played, please click play to join!" LOCALMSG } ME GETSPOTSTATE WHONAME "." GREPSTR IF
{ 0 ME SETSPOTSTATE } ME GETSPOTSTATE WHOME == IF
{ POSX 160 RANDOM 224 + SETPOS } POSY 225 < IF

ad GLOBAL "" ad =
"Script by Foxy! " STATUSMSG

{ DUP GLOBAL 0 SWAP =
} [ ref rollt crv mysc ut yhtz plyrs ckbxs myturn co lastroll] FOREACH

al27 GLOBAL
{ dt GLOBAL dd GLOBAL lastroll GLOBAL
{ { EXEC SETSPOTSTATE
} lastroll STRTOATOM EXEC FOREACH
} lastroll 0 != IF
0 dt = [ 0 0 0 0 0 0 ] dd =
"[ " lastroll =
{ dc = dc 6 + GETSPOTSTATE lck =
{ 6 RANDOM 1 + dv = dv dc SETSPOTSTATE }
{ dc GETSPOTSTATE dv = } lck NOT IFELSE
dv dt += dd dv 1 - GET 1 + dd dv 1 - PUT
lastroll "{" + dv ITOA + " " + dc ITOA + " }" + lastroll =
} [ 1 2 3 4 5 6 ] FOREACH
"[ " { ITOA + " " + } dd FOREACH
" ]" & dd =
lastroll "]" + lastroll =
{ "@105,268 )applause !YAHTZEE6 CONGRATULATIONS!!" ROOMMSG
} dd "6" SUBSTR IF
} al27 DEF

al26 GLOBAL
{ rollt GLOBAL dd GLOBAL dt GLOBAL
crv GLOBAL 0 crv = co GLOBAL 0 co =
{ ")dice2" SAY } rollt 6 == IF
{ 0 cr = rollt --
{ cr ++
{ 7 rollt cr + DUP 3 / 3 * - + cr SETSPOTSTATE
} cr 6 + GETSPOTSTATE NOT IF
} { cr 6 < } WHILE
al26 GLOBAL al26 30 ALARMEXEC
}
{ al27 GLOBAL al27 EXEC
} rollt IFELSE
} al26 DEF

al24 GLOBAL
{ plyrs GLOBAL hsc GLOBAL phsc GLOBAL ref GLOBAL
{ { "@0,100 !Game over!" ROOMMSG
{ "@100,100 *Congrats the winner is: " ROOMMSG
"@160,160 )applause !" phsc & "!!" & ROOMMSG
} hsc IF
0 ref = 1 sp =
{ 0 sp SETSPOTSTATE sp ++ } { sp 33 < } WHILE
{ ";?5" SAY } 60 ALARMEXEC
} plyrs "." GREPSTR NOT IF
} ref IF
} al24 DEF

al25 GLOBAL
{ plyrs GLOBAL al25 GLOBAL al24 GLOBAL
plyrs "^-([0-9]+)-(.*)$" GREPSTR POP
"$1" GREPSUB cp = "$2" GREPSUB oth =
{ oth GREPSUB plyrs = plyrs "^-([0-9]+)-(.*)$" GREPSTR POP
"$1" GREPSUB cp = "$2" GREPSUB oth =
} { cp ATOI WHONAME "." GREPSTR NOT plyrs "" == NOT AND } WHILE
{ "@" cp ATOI WHOPOS ITOA SWAP ITOA " " & SWAP & & cp ATOI WHONAME " is up!" & & ROOMMSG
";?3" cp & cp ATOI PRIVATEMSG
oth "-" & cp & "-" & plyrs =
}
{ al24 30 ALARMEXEC
} plyrs "" == NOT IFELSE
} al25 DEF


}
ON SELECT { ref GLOBAL plyrs GLOBAL ad GLOBAL hsc GLOBAL phsc GLOBAL
{ { "A game is currently in session. Click play to join." LOCALMSG }
{ "Resetting game, click again to start a new one." LOCALMSG
0 ME SETSPOTSTATE ";?5" SAY
{ cr ++ 0 cr SETSPOTSTATE } { cr 29 < } WHILE
} ME GETSPOTSTATE WHONAME "." GREPSTR IFELSE
}
{ WHOME ME SETSPOTSTATE 1 ref = "" plyrs = "-" ad = 0 hsc = "" phsc =
USERNAME " has started a game of Yahtzee6! Click play to join!" & ROOMMSG
"@511,0" USERNAME & ", click the roll button to start play after everyone joins." & LOCALMSG
} ME GETSPOTSTATE IFELSE
}

ON INCHAT { ref GLOBAL plyrs GLOBAL phsc GLOBAL hsc GLOBAL
{
{ DUP GLOBAL 0 SWAP =
} [ ref rollt crv mysc ut yhtz plyrs ckbxs myturn co phsc hsc btt lastroll] FOREACH
"" plyrs =
} CHATSTR ";?5" == IF
{ 0 ref = "" plyrs = "" phsc = 0 hsc =
} ref WHOME ME GETSPOTSTATE <> AND IF

;26 inchat

mysc GLOBAL ckbxs GLOBAL ut GLOBAL yhtz GLOBAL
rollt GLOBAL myturn GLOBAL co GLOBAL dd GLOBAL dt GLOBAL
{ { 0 SWAP SETSPOTSTATE } [ 7 8 9 10 11 12] FOREACH
1 myturn = 13 sp = ckbxs tckbxs =
{ tckbxs DUP 2 / 2 * - sp SETSPOTSTATE
2 tckbxs /= sp ++
} { sp 28 < } WHILE
{ 1 28 SETSPOTSTATE
{ yhtz 28 SETSPOTSTATE } yhtz 1 > IF
}
{ 0 28 SETSPOTSTATE } yhtz IFELSE
0 32 SETSPOTSTATE 0 crv = 0 co =
"[0 0 0 0 0 0]" dd = 0 dt =
ut 80 >= 29 SETSPOTSTATE
{ 0 SWAP SETSPOTSTATE } [ 1 2 3 4 5 6 ] FOREACH
} ";?3" WHOME ITOA & CHATSTR == IF



;25 inchat

ref GLOBAL plyrs GLOBAL ad GLOBAL
mysc GLOBAL ckbxs GLOBAL ut GLOBAL yhtz GLOBAL
plyrs GLOBAL hsc GLOBAL phsc GLOBAL al25 GLOBAL
ad "." GREPSTR stt =
{ "-" WHOCHAT ITOA & "-" & ad =
{ "You're already in the game, " WHOCHAT WHONAME &
WHOCHAT PRIVATEMSG
}
{ WHOCHAT WHONAME " has joined the game! GOOD LUCK!!" & ROOMMSG
";?2" WHOCHAT ITOA & WHOCHAT PRIVATEMSG
ad plyrs & plyrs =
} plyrs ad SUBSTR IFELSE
{ "" ad = } stt NOT IF
} CHATSTR ";?1" == ref AND IF
{ ;initialize variables to play
0 mysc = 0 ckbxs = 0 ut = 0 yhtz =
} CHATSTR ";?2" WHOME ITOA & == IF
{ al25 90 ALARMEXEC
} ";?3" CHATSTR == ref AND IF
{ "-$1-" GREPSUB pq =
"$2" GREPSUB ATOI ps =
")applause !" "$1" GREPSUB ATOI WHONAME " has finished with a final score of " & &
"$2!" GREPSUB & DUP SUSRMSG ROOMMSG
{ "@150,0 !New high score for the game!" ROOMMSG
"$1" GREPSUB ATOI WHONAME phsc = ps hsc =
} ps hsc > IF
plyrs "^(.*)" pq & "(.*)$" & GREPSTR POP
"$1$2" GREPSUB plyrs =
al24 GLOBAL al24 60 ALARMEXEC al25 120 ALARMEXEC
} CHATSTR "^;?4([0-9]+)-([0-9]+)$" GREPSTR ref AND IF
{ { "$1$2" GREPSUB plyrs =
WHOCHAT WHONAME " has left the game. SOBBING!!" & ROOMMSG
{ al25 EXEC } "$2" GREPSUB "" == IF
} plyrs "^(.*)-" WHOCHAT ITOA "-(.*)$" & & GREPSTR IF
} CHATSTR ";?6" == ref AND IF


}
ON OUTCHAT { { "" CHATSTR = } CHATSTR "^;?" GREPSTR IF

ref GLOBAL plyrs GLOBAL al25 GLOBAL
{ "" CHATSTR = plyrs tp = "[ " plar = "$1" GREPSUB ATOI drp =
{ plar " $1 " GREPSUB & plar = "$2" GREPSUB tp =
} { tp "^-([0-9]+)-(.*)$" GREPSTR } WHILE
plar "]" & STRTOATOM EXEC plar =
{ drp -- "" plyrs = 0 cnt =
{ ts =
{ plyrs "-" & ts ITOA & "-" & plyrs = }
{ "Dropping " ts WHONAME & " from the game" & LOGMSG
} cnt drp != IFELSE
cnt ++
} plar FOREACH
} drp 0 > plar LENGTH drp >= AND IF
{ al25 25 ALARMEXEC } plar LENGTH drp 1 + == IF

} ref CHATSTR "player drop *([0-9]+)$" GREPSTR AND IF

{ "" CHATSTR = plyrs tp = 0 ps =
"Current players:" LOGMSG
{ ps ++ ps ITOA ". " & "$1" GREPSUB ATOI WHONAME & LOGMSG
"$2" GREPSUB tp =
} { tp "^-([0-9]+)-(.*)$" GREPSTR } WHILE
} ref CHATSTR "player list" == AND IF

}
ON LEAVE { ";?6" SAY }
ENDSCRIPT
ENDSPOT
SPOT
ID 32
NAME "Start - Play - Roll - Help - Quit"
DONTMOVEHERE
OUTLINE 301,134 502,134 502,189 301,189
LOC 390,156
PICTS
13,79,-39
13,98,-39
13,117,-39
13,136,-39
1,0,0
ENDPICTS
SCRIPT
ON SELECT { MOUSEPOS POP ys =
0 ss =
{ ys < ss += } [ 341 383 423 464 ] FOREACH
[
;"Start"
{31 SELECT}

;"Play"
{ myturn GLOBAL btt GLOBAL lastroll GLOBAL
{ co GLOBAL crv GLOBAL mysc GLOBAL ut GLOBAL ckbxs GLOBAL
dd GLOBAL yhtz GLOBAL
{ crv mysc +=
0 btt =
{ { "@491,91 )POP !UPPER TABLE BONUS! CONGRATULATIONS!!" ROOMMSG
50 mysc +=
} ut 80 < crv ut + 80 >= AND IF
crv ut +=
} co 19 < IF
"I have a score of " mysc ITOA & SAY
{ 1 co SETSPOTSTATE } co 28 < IF
{ 1 co SETSPOTSTATE dd "6" SUBSTR 2 * 1 - yhtz =
} co 28 == yhtz NOT AND IF
12 cs = 0 ckbxs = 1 vl =
{ cs ++ cs GETSPOTSTATE ckd = { 1 ckd = } cs co == IF
{ vl ckbxs += } ckd IF 2 vl *=
} { cs 27 < } WHILE
0 myturn =
{ ";?3" SAY }
{ ; { 50 mysc += } ut 80 > IF
";?4" WHOME ITOA & "-" & mysc ITOA & SAY
{ DUP GLOBAL 0 SWAP =
} [ rollt crv mysc ut yhtz ckbxs myturn co btt ] FOREACH
} ckbxs 32767 < yhtz NOT OR IFELSE
} co IF
}
{ ";?1" SAY "dice2" SOUND } myturn IFELSE
}

;"Roll"
{ ref GLOBAL ad GLOBAL rollt GLOBAL crv GLOBAL myturn GLOBAL al25 GLOBAL
{ "" ad = al25 EXEC }
{ { { ME GETSPOTSTATE 1 + ME SETSPOTSTATE
6 rollt = 0 crv =
al26 GLOBAL al26 EXEC
}ME GETSPOTSTATE 4 < IF
} myturn IF
} ref ad ".." GREPSTR AND IFELSE
}

;"Instructions"
{
"Instructions are in your log" STATUSMSG
{ LOGMSG } [
"" "***YAHTZEE6 RULES***" ""
"Six dice, four rolls!"
"Upper Table, Triples, Quads, Short & Full Straights, & Chance ALL qualify the same as regular Yahtzee"
"Yahtzee is now 6 of a kind"
"Pents is five of a kind"
"Six Straight is 1, 2, 3, 4, 5, and 6, in any order"
"Full House is 2 of a kind and 4 of a kind"
"Half House is 3 of a kind and 3 of a kind"
"Upper Table Bonus is fifty points when you score eighty in the upper table"
"Check the board for other score changes!"
"" "***General Play***" ""
"To start a Yahtzee6 game, one person clicks on the Start button and becomes the referee."
"Everyone who wants to play, including the referee, clicks on the Play button to join the game."
"When everyone has joined, the referee clicks the Roll button to start play."
"Anyone can join at any time by clicking the Play button."
"Anyone who wants to quit can click the Quit button to do so."
"Anyone who leaves the room automatically quits!"
"If the referee leaves the room, the game is over!"
"Click on the Start button to reset the game if that happens."
"When play starts, the person whose turn it is clicks Roll button to roll for the first time and get their dice."
"You lock and unlock the dice by clicking on them, locked dice are marked."
"Click on the score sheet in the blank spot you want to score in, or click the Roll button up to three times more."
"When you click on the score sheet, it tells you what you'll score with that option. If you like it, click the Play button to score that and finish your turn."
"Clicking on the Upper Table Bonus button tells you how many points you need to get that bonus"
"Scoring YAHTZEES, you score your first Yahtzee the same way you score other scores, by clicking on Yahtzee and then the Play button. Score Yahtzee bonuses automatically by first clicking on Yahtzee when you roll one."
"When someone fills out their score card, they automatically give their final score."
"Stick around after you're through as the referee remembers the highest score, and will announce it when everyone finishes!"
"Players can click Play to rejoin an ongoing game after they finish. In that case the game continues until everyone either quits or finishes their game."
"" "***Referee Commands" ""
"\x22Player List\x22 produces a list in your log of all current players and numbers - THIS CHANGES EACH TURN"
"\x22Player Drop x\x22 removes player number x from play and goes to the next one if needed"
"NOTE: it is highly recommended that the referee have the new palace client!"
] FOREACH
}

;"Quit"
{ ref GLOBAL ";?6" SAY
{ { DUP GLOBAL 0 SWAP =
} [ rollt crv mysc ut yhtz ckbxs myturn co btt lastroll] FOREACH
}
{";?5" WHOME PRIVATEMSG } ref IFELSE
}

] ss GET EXEC
}
ENDSCRIPT
ENDSPOT
ENDROOM
 
Was this article helpful? yes / no
Article details
Article ID: 233
Category: Room Scripts
Date added: 07-11-2011 22:12:23
Views: 1227
Rating (Votes): Article rated 5.0/5.0 (1)

 
<< Go back

Powered by Help Desk Software HESK™