@create Skee-Ball=4
@lock Skee-Ball=*Arcade Manager
@Cost Skee-Ball=1
@Desc Skee-Ball=A typical Skee-Ball machine, with target rings of 10, 20, 30, 40, 50 and 100 points. Give it a token to play. Type 'skeehelp' for help.
&ROLL Skee-Ball=$roll:@wait me=@switch [v(currplayer)]=%#,{@pemit %#=You roll a ball up towards the Skee-Ball target...;@trigger me/score[rand(25)]=[num(%#)]},{@pemit %#=You're not currently playing skee-ball, wait your turn!;@notify me}
&CURRSCORE Skee-Ball=410
&THROWSLEFT Skee-Ball=-1
@Apay Skee-Ball=@switch [eq([v(cost)],0)]=1,{@pemit %#=[name([v(currplayer)])] is currently playing, please wait until that person is done.},{@pemit %#=You put a token in the slot. A mechanical clicking noise is heard. A whirring noise is heard as 9 wooden balls come tumbling down the chute.;&throwsleft me=9;&currscore me=0;&currplayer me=%#;@cost me=0}
&SKEEHELP Skee-Ball=$skeehelp:@pemit %#=Commands for Skee-Ball:%r'roll' a ball up the slope to earn points!%r'skeescore' to see your current total score.
&SCORE0 Skee-Ball=@pemit %0=Your throw bounces off the target rims and flies into the bottom. You score 0 points.;@notify me;&currscore me=add([u(#150/currscore)],0);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE1 Skee-Ball=@pemit %0=Your throw bounces off the 50 and lands in the 10. You score 10 points.;@notify me;&currscore me=add([u(#150/currscore)],10);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE2 Skee-Ball=@pemit %0=Your throw bounces off the 40 and lands in the 10. You score 10 points.;@notify me;&currscore me=add([u(#150/currscore)],10);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE3 Skee-Ball=@pemit %0=Your throw bounces off the 30 and lands in the 10. You score 10 points.;@notify me;&currscore me=add([u(#150/currscore)],10);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE4 Skee-Ball=@pemit %0=Your throw bounces off the 20 and lands in the 10. You score 10 points.;@notify me;&currscore me=add([u(#150/currscore)],10);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE5 Skee-Ball=@pemit %0=Your throw lands right in the 10 point target. You score 10 points.;@notify me;&currscore me=add([u(#150/currscore)],10);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE6 Skee-Ball=@pemit %0=Your throw bounces off the 50 and lands in the 20. You score 20 points.;@notify me;&currscore me=add([u(#150/currscore)],20);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE7 Skee-Ball=@pemit %0=Your throw bounces off the 40 and lands in the 20. You score 20 points.;@notify me;&currscore me=add([u(#150/currscore)],20);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE8 Skee-Ball=@pemit %0=Your throw bounces off the 30 and lands in the 20. You score 20 points.;@notify me;&currscore me=add([u(#150/currscore)],20);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE9 Skee-Ball=@pemit %0=Your throw lands right in the 20 point target. You score 20 points.;@notify me;&currscore me=add([u(#150/currscore)],20);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE10 Skee-Ball=@pemit %0=Your ball bounces off the 50 and lands in the 30. You score 30 points.;@notify me;&currscore me=add([u(#150/currscore)],30);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE11 Skee-Ball=@pemit %0=Your ball bounces off the 40 and lands in the 30. You score 30 points.;@notify me;&currscore me=add([u(#150/currscore)],30);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE12 Skee-Ball=@pemit %0=Your ball lands right in the 30 point target. You score 30 points.;@notify me;&currscore me=add([u(#150/currscore)],30);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE13 Skee-Ball=@pemit %0=Your ball bounces off the 50 point target and lands in the 40 point target. You score 40 points.;@notify me;&currscore me=add([u(#150/currscore)],40);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE14 Skee-Ball=@pemit %0=Your ball lands right in the 40 point target. You score 40 points.;@notify me;&currscore me=add([u(#150/currscore)],40);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE15 Skee-Ball=@pemit %0=Your ball lands right in the 50 point target. You score 50 points.;@notify me;&currscore me=add([u(#150/currscore)],50);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE16 Skee-Ball=@pemit %0=Your ball bounces into the 20 point target. You score 20 points.;@notify me;&currscore me=add([u(#150/currscore)],20);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE17 Skee-Ball=@pemit %0=Your ball bounces into the 30 point target. You score 30 points.;@notify me;&currscore me=add([u(#150/currscore)],30);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE18 Skee-Ball=@pemit %0=Your ball bounces into the 40 point target. You score 40 points.;@notify me;&currscore me=add([u(#150/currscore)],40);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE19 Skee-Ball=@pemit %0=Your ball FLIES up and hits the safety net, and plummets to the bottom, scoring 0.;@notify me;&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&MYLOM Skee-Ball=@emit The Clerk grabs [name(%0)], who gets tossed up the Skee-Ball ramp, goes through the hole and out the arcade!;@tel %0=#151;@trigger me/bonus
&BONUS Skee-Ball=@emit A yellow sign lights up: 500 POINT BONUS
@Opay Skee-Ball=tosses a token in Skee-Ball.
&CURRPLAYER Skee-Ball=0
&RESET Skee-Ball=&throwsleft me=0;&currscore me=0;&currplayer me=0;@cost me=1;@drain me;@notify me;@emit A small sign lights up "RESET!"
&SKEESCORE Skee-Ball=$skeescore:@switch [u(#150/currplayer)]=0,{@pemit %#=No one is currently playing. The last score was [v(currscore)].},{@pemit %#=[name([v(currplayer)])]'s current Skee-Ball score is [v(currscore)]. [name([v(currplayer)])] has [v(throwsleft)] throws left.}
&SCORE20 Skee-Ball=@pemit %0=Your ball FLIES up, bounces off the 50 point target, and falls straight into one of the two 100 point targets.;@notify me;&currscore me=add([u(#150/currscore)],100);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE21 Skee-Ball=@pemit %0=Your ball SPINS around the rim of one of the 100 point targets, falls out, and flops into the 30.;@notify me;&currscore me=add([u(#150/currscore)],30);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE22 Skee-Ball=@pemit %0=Your ball SPINS around the rim of one of the 100 point targets and falls straight in!;@notify me;&currscore me=add([u(#150/currscore)],100);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE23 Skee-Ball=@pemit %0=Your ball SPINS around the rim of one of the 100 point targets and falls straight back down into the 10 point target.;@notify me;&currscore me=add([u(#150/currscore)],10);&throwsleft me=sub([u(#150/throwsleft)],1);@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
&SCORE24 Skee-Ball=@pemit %0=Your ball SPINS around the rim of one of the 100 point targets and falls straight back down to the bottom, scoring zero.;&throwsleft me=sub([u(#150/throwsleft)],1);@notify me;@switch [eq([v(throwsleft)],0)]=1,{@emit [name([v(currplayer)])] finishes Skee-Ball with a final score of [v(currscore)].;@cost me=1;&currplayer me=0}
@set Skee-Ball=DARK
@set Skee-Ball=SAFE
@set Skee-Ball=COMMANDS