Desk Top Lottery
Keywords: lottery
Here's a simple little lottery program (UK) that is called by holding down the CTRL key during execution of the program. Includes "gang" screen for those who like to see their name in lights!To Download a zip file with all of E.R.'s examples
;Lottery Program goes=0 plural="" sounds(0) if FileExist("U:\DESKTOP\DTLE.BAK") then goto start ;if IsKeyDown(@CTRL & @SHIFT) then goto start if IsKeyDown(@CTRL) then goto start goto end :start Title = "Desktop Lottery Extravanganza!" Boxopen(Title, "") WinPlaceSet(@NORMAL, Title, "180 200 820 350") goes=goes+1 for i = 1 to random(20)+20 :a1 a=random(48)+1 :b1 b=random(48)+1 if b==a then goto b1 :c1 c=random(48)+1 if c==a || c==b then goto c1 :d1 d=random(48)+1 if d==a || d==b || d==c then goto d1 :e1 e=random(48)+1 if e==a || e==b || e==c || e==d then goto e1 :f1 f=random(48)+1 if f==a || f==b || f==c || f==d || f==e then goto f1 boxtext(" %a% %b% %c% %d% %e% %f%") next i if Pause(Title, "For better chances try Lady Luck again.") then goto Start :Cancel BoxShut() if goes>1 then plural="es" Title = "Message from Mystic Meg" TotalMsgs = 11 no=Random(TotalMsgs) Gosub Text%no% Display(4, Title, Text) ;if IsKeyDown(@CTRL & @SHIFT) Display(6, "From the 'A' Team that brought you Desktop", "Sue B%@crlf%Hugh B%@crlf%Marie C%@crlf%Andrew D%@crlf%George D%@crlf%Peter D%@crlf%Peter H%@crlf%Harry HW%@crlf%James M%@crlf%Pete S%@crlf%Ed T%@crlf%Kim T%@crlf%%@crlf%Remember us in your wills!") ;endif goto end :Text0 Text = "You only had %goes% go%plural%, the portents are negative" return :Text1 Text = "Blue eyes are lucky today" return :Text2 Text = "Wear your Wonderbra on Saturday" return :Text3 Text = "Overweight computer staff will be lucky this week" return :Text4 Text = "I like sailors with big muscles" return :Text5 Text = "Big Boobs are always lucky" return :Text6 Text = "Making coffee at the office will help your chances" return :Text7 Text = "Wear your shoes on the wrong feet on Fridays" return :Text8 Text = "Documentation can be hazardous to your luck" return :Text9 Text = "This is the week for anyone with a vowel in their middle name" return :Text10 Text = "Remember to throw salt over your left shoulder tomorrow" return :Text11 Text = "Don't volunteer for VR just yet....." return :end Drop(Title, Text, no, goes, plural, TotalMsgs, a, b, c, d, e, f) return
Article ID: W13796Filename: Simple Little Lottery Program.txt