mirror of
https://github.com/OpenTrespasser/JurassicParkTrespasser.git
synced 2024-12-24 01:21:57 +00:00
22 lines
423 B
Plaintext
22 lines
423 B
Plaintext
|
Utility FortuneTeller "Fortune Teller"
|
||
|
(
|
||
|
local fortunes
|
||
|
|
||
|
button GetFortune "Tell Fortune" width:140
|
||
|
|
||
|
on FortuneTeller open do
|
||
|
(
|
||
|
fortunes = #()
|
||
|
f = openfile "J:\\Design\\Fortunes\\fortunes.txt"
|
||
|
while not eof f do
|
||
|
append fortunes (readline f)
|
||
|
close f
|
||
|
)
|
||
|
|
||
|
on Getfortune pressed do
|
||
|
(
|
||
|
Index = random 1 fortunes.count
|
||
|
messagebox fortunes[Index] title:"Fortune Teller"
|
||
|
|
||
|
)
|
||
|
)
|