heres a funny game ive made
don't blame my messy code, im not very good programmer i am only **
[Mod Edit] ** You are not allowed to put your age! Don't you know this yet???
Font$ = "Trebuchet MS"
Dim str(100) As String
str(0) = ""
str(1) = "--- HIGH SCORES ---"
str(2) = "--- LOTTO ---"
str(3) = "Main Menu"
str(4) = "1 - New Game"
str(5) = "2 - Load Game"
str(6) = "3 - See Highscores"
str(7) = "Saving ..."
str(8) = "Game Saved"
str(9) = "--- SAVES ---"
str(10) = " - Save : "
str(11) = " - Load : "
str(12) = "1 - Load"
str(13) = "2 - Delete"
str(14) = "3 - Cancel"
str(15) = "Deleting ..."
str(16) = "Game Deleted"
str(17) = "Enter your name : "
str(18) = "Enter your birthday day > "
str(19) = "Enter your birthday month > "
str(20) = "January"
str(21) = "February"
str(22) = "March"
str(23) = "April"
str(24) = "May"
str(25) = "June"
str(26) = "July"
str(27) = "August"
str(28) = "September"
str(29) = "October"
str(30) = "November"
str(31) = "December"
str(32) = "Monday"
str(33) = "Tuesday"
str(34) = "Wednesday"
str(35) = "Thursday"
str(36) = "Friday"
str(37) = "Saturday"
str(38) = "Sunday"
str(39) = "On your way to the bar, "
str(40) = "a car crashes into you ... and you die ..."
str(41) = "END"
str(42) = "Your Best score has been saved"
str(43) = "What a nice day ! Nice time to go play lotto !"
str(44) = "seem's its gonna rain today ... Let's go buy a lotto ticket ..."
str(45) = "It's raining today ! I should go buy a lotto ticket"
str(46) = " and quickly get back home ..."
str(47) = "You enter into the lotto ticket bar shop"
str(48) = "Please Choose your ticket :"
str(49) = "1 - Normal Ticket (2 §)"
str(50) = "2 - Bronze Ticket (10 §)"
str(51) = "3 - Silver Ticket (50 §)"
str(52) = "4 - Gold Ticket (200 §)"
str(53) = "5 - Crystal Ticket (1000 §)"
str(54) = "6 - Diamond Ticket (5000 §)"
str(55) = "You get the Normal Ticket - 2 §"
str(56) = "You get the Bronze Ticket - 10 §"
str(57) = "You get the Silver Ticket - 50 §"
str(58) = "You get the Gold Ticket - 200 §"
str(59) = "You get the Crystal Ticket - 1000 §"
str(60) = "You get the Diamond Ticket - 5000 §"
str(61) = "You scratch it ..."
str(62) = "The numbers are : "
str(63) = "You get back home and look at the TV ..."
str(64) = "The Lotto Numbers are :"
str(65) = "Sorry, none of your numbers is the same than on the tv, you are a looser ..."
str(66) = " §"
str(67) = "Good ! You get "
str(68) = " corresponding number(s) and "
str(69) = " number(s) in the good order. CASH = "
str(70) = " "
str(71) = "Would you like to save the game ?"
str(72) = "1 - Yes"
str(73) = "2 - No"
str(74) = "1 - Continue to play"
str(75) = "2 - Go back to main menu"
str(76) = "The shopkeeper say that you don't have enough money, "
str(77) = "you jump on him and try to kill him"
str(78) = "Unfortunately, he call the police and they jail you"
str(79) = "GAME OVER"
str(80) = "Super new year lotto day !!! (x3) win as much as 4,500,000 § !"
str(81) = "Super Friday 13 lotto day ! (x7) win as much as 10,500,000 § !"
str(82) = "Super Saint Valentine's lotto day ! (x2) win as much as 3,000,000 §"
str(83) = "Super Christmas lotto day !!! (x4) win as much as 6,000,000 § !"
str(84) = "It's your birthday ! Xin 2 times cash !!!"
str(85) = "Today it's "
str(86) = "You got "
Sync On
Sync
Sync Sleep 1
Sync
If path exist("saves")=0 Then Make Directory "saves"
If file exist("savessavescfg.cfg")=0
Open To Write 1, "savessavescfg.cfg"
Write String 1,"saves=00"
Close File 1
Endif
If file exist("saveshighscores.cfg")=0
Open To Write 1, "saveshighscores.cfg"
Write String 1,str(1)
Close File 1
Endif
Randomize Timer()
game()
function game()
repeat : until inkey$()=""
main_menu()
endfunction
function main_menu()
Cls
Set Text Font Font$
Set Text Size 24
green = Rgb(0, 255, 0)
Ink green, 0
Print str(2)
Print str(3)
Print str(4)
Print str(5)
Print str(6)
Sync
Repeat : Until Inkey$()="1" Or Inkey$()="2" Or Inkey$()="3" Or Inkey$()="4"
If Inkey$()="1" then new_game()
If Inkey$()="2" then load_game()
If Inkey$()="3" then high_scores()
Sync
endfunction
function save_game(firstdate, date, year, btday, btmonth, name$, money, maxmoney, save_num)
print str(7)
if save_num = 0
open to read 1, "savessavescfg.cfg"
read string 1, string$
save_num = (int(val(right$(lower$(string$), 2))) + 1)
DIM svcfg$(save_num)
for a = 1 to (save_num - 1)
read string 1, svcfg$(a-1)
next a
svcfg$(save_num - 1) = ("save=" + name$)
close file 1
delete file "savessavescfg.cfg"
open to write 1, "savessavescfg.cfg"
if save_num < 10 then write string 1, ("saves=0" + str$(save_num)) else write string 1, ("saves=" + str$(save_num))
for a = 0 to (save_num - 1)
write string 1, svcfg$(a)
next a
close file 1
open to write 1, ("saves" + name$ + ".svg")
write word 1, firstdate
write word 1, date
write word 1, year
write byte 1, btday
write byte 1, btmonth
write long 1, money
write long 1, maxmoney
close file 1
else
delete file ("saves" + name$ + ".svg")
open to write 1, ("saves" + name$ + ".svg")
write word 1, firstdate
write word 1, date
write word 1, year
write byte 1, btday
write byte 1, btmonth
write long 1, money
write long 1, maxmoney
close file 1
endif
print str(8)
Sync
wait key
Sync
endfunction save_num
function load_game()
cls
ink rgb(0, 255, 0), 0
print str(9)
open to read 1, "savessavescfg.cfg"
read string 1, string$
z = (int(val(right$(lower$(string$), 2))))
dim st$(z)
for a = 1 to z
read string 1, st$(a - 1)
if a >= 10 then print str$(a) + str(10) + RIGHT$(st$(a - 1), LEN(st$(a - 1)) - 5) else print "0" + str$(a) + str(11) + RIGHT$(st$(a - 1), LEN(st$(a - 1)) - 5)
wait 200
next a
repeat
Sync
repeat : until inkey$()="0" or inkey$()="1" or inkey$()="2" or inkey$()="3" or inkey$()="4" or inkey$()="5" or inkey$()="6" or inkey$()="7" or inkey$()="8" or inkey$()="9"
db$ = inkey$()
repeat : until inkey$()=""
Sync
repeat : until inkey$()="0" or inkey$()="1" or inkey$()="2" or inkey$()="3" or inkey$()="4" or inkey$()="5" or inkey$()="6" or inkey$()="7" or inkey$()="8" or inkey$()="9"
sync
db$ = db$ + inkey$()
until (val(db$) <= z)
repeat : until inkey$()=""
save_num = int(val(db$))
close file 1
print str(12)
print str(13)
print str(14)
Sync
repeat : until inkey$()="1" or inkey$()="2" or inkey$()="3"
if inkey$()="1"
name$ = RIGHT$(st$(save_num - 1), LEN(st$(save_num - 1)) - 5)
open to read 1, "saves" + name$ + ".svg"
read word 1, firstdate
read word 1, date
read word 1, year
read byte 1, btday
read byte 1, btday
read long 1, money
read long 1, maxmoney
close file 1
Sync
game_main_loop(firstdate, date, money, maxmoney, year, btday, btmonth, name$, save_num)
endif
if inkey$()="2"
repeat : until inkey$()=""
print str(15)
Sync
open to read 1, "savessavescfg.cfg"
read string 1, string$
num = (int(val(Right$(string$, 2))) - 1)
DIM clsv$(num+1)
for a = 0 to num
if (a + 1) <> save_num
if dd = 1
read string 1, clsv$(a-1)
rename file str$(a+1) + right$(clsv$(a-1), len(clsv$(a-1)) - 5) + ".svg", str$(a) + right$(clsv$(a-1), len(clsv$(a-1)) - 5) + ".svg"
else
read string 1, clsv$(a)
endif
else
dd = 1
read string 1, name$
name$ = Right$(name$, Len(name$) - 5)
endif
next a
close file 1
delete file "savessavescfg.cfg"
open to write 1, "savessavescfg.cfg"
if num < 10 then write string 1, "saves=0" + str$(num) else write string 1, "saves=" + str$(num)
for a = 0 to num
write string 1, clsv$(a)
next a
close file 1
file$ = "saves" + name$ + ".svg"
undim clsv$(0)
delete file file$
print str(16)
Sync
wait key
Sync
game()
endif
if inkey$()="3" then game()
endfunction
function high_scores()
cls
open to read 1, "saveshighscores.cfg"
repeat
read string 1, e$
print e$
until file end(1) = 1
close file 1
Sync
wait key
Sync
game()
endfunction
function new_game()
year = 2008
green = Rgb(0, 255, 0)
firstdate = def_random_date(year)
cls
input str(17);name$
Sync
ink green, 0
Sync
repeat
input str(18);btday$
Sync
btday = int(val(btday$))
until btday >= 1 and btday <= 31
ink green, 0
repeat
input str(19);btmonth$
Sync
btmonth = int(val(btmonth$))
Sync
until btmonth >= 1 and btmonth <= 12
btmonth = btmonth - 1
save_num = 0
date = firstdate
money = 10
maxmoney = 10
Sync
game_main_loop(firstdate, date, money, maxmoney, year, btday, btmonth, name$, save_num)
endfunction
function game_main_loop(firstdate, date, money, maxmoney, year, btday, btmonth, name$, save_num)
yearmonths = 12
dim yearmonthname$(12)
yearmonthname$(0) = str(20)
yearmonthname$(1) = str(21)
yearmonthname$(2) = str(22)
yearmonthname$(3) = str(23)
yearmonthname$(4) = str(24)
yearmonthname$(5) = str(25)
yearmonthname$(6) = str(26)
yearmonthname$(7) = str(27)
yearmonthname$(8) = str(28)
yearmonthname$(9) = str(29)
yearmonthname$(10) = str(30)
yearmonthname$(11) = str(31)
dim monthdays(12)
monthdays(0) = 31
monthdays(1) = 28
monthdays(2) = 31
monthdays(3) = 30
monthdays(4) = 31
monthdays(5) = 30
monthdays(6) = 31
monthdays(7) = 31
monthdays(8) = 30
monthdays(9) = 31
monthdays(10) = 30
monthdays(11) = 31
weekdays = 7
dim weekdayname$(7)
weekdayname$(0) = str(32)
weekdayname$(1) = str(33)
weekdayname$(2) = str(34)
weekdayname$(3) = str(35)
weekdayname$(4) = str(36)
weekdayname$(5) = str(37)
weekdayname$(6) = str(38)
green = Rgb(0, 255, 0)
ink green, 0
REPEAT
Randomize Timer()
Cls
cagnotte = 1
printdate(date, year)
cagnotte = IsSpecialDay(firstdate, date, year, btday, btmonth)
Sync
if cagnotte = 0
print str(39)
print str(40)
Sync
wait key
Sync
set text size 100
cls
open to read 1, "saveshighscores.cfg"
a = 0
repeat
read string 1, a$
a = a + 1
until file end(1) = 1
close file 1
open to read 1, "saveshighscores.cfg"
dim hgst$(a)
for t = 0 to (a - 1)
read string 1, hgst$(t)
next t
close file 1
delete file "saveshighscores.cfg"
open to write 1, "saveshighscores.cfg"
for t = 0 to (a - 1)
write string 1, hgst$(t)
next t
write string 1, "--- " + name$ + " : " + str$(maxmoney) + " --- "
close file 1
print str(41)
set text size 24
print " "
print " "
print str(42)
Sync
wait key
Sync
game()
endif
Sync
Wait Key
Sync
random = rnd(2)
select random
case 0
print str(43)
endcase
case 1
print str(44)
endcase
case 2
print str(45)
print str(46)
endcase
endselect
Sync
wait key
Sync
print str(47)
printmoney(money)
Sync
wait key
Sync
print str(48)
print str(49)
print str(50)
print str(51)
print str(52)
print str(53)
print str(54)
undim lottery(0)
dim lottery(6)
lottery(0) = (rnd(48) + 1)
repeat
lottery(1) = (rnd(48) + 1)
until lottery(1) <> lottery(0)
repeat
lottery(2) = (rnd(48) + 1)
until lottery(2) <> lottery(1) and lottery(2) <> lottery(0)
repeat
lottery(3) = (rnd(48) + 1)
until lottery(3) <> lottery(2) and lottery(3) <> lottery(1) and lottery(3) <> lottery(0)
repeat
lottery(4) = (rnd(48) + 1)
until lottery(4) <> lottery(3) and lottery(4) <> lottery(2) and lottery(4) <> lottery(1) and lottery(4) <> lottery(0)
repeat
lottery(5) = (rnd(48) + 1)
until lottery(5) <> lottery(4) and lottery(5) <> lottery(3) and lottery(5) <> lottery(2) and lottery(5) <> lottery(1) and lottery(5) <> lottery(0)
Sync
repeat : until (inkey$()="1" and money >= 2) or (inkey$()="2" and money >= 10) or (inkey$()="3" and money >= 50) or (inkey$()="4" and money >= 200) or (inkey$()="5" and money >= 1000) or (inkey$()="6" and money >= 5000)
Sync
If Inkey$()="1" and money >= 2
money = money - 2
print str(55)
d = 0
Endif
If Inkey$()="2" and money >= 10
money = money - 10
print str(56)
d = 1
Endif
If Inkey$()="3" and money >= 50
money = money - 50
print str(57)
d = 2
Endif
If Inkey$()="4" and money >= 200
money = money - 200
print str(58)
d = 3
Endif
If Inkey$()="5" and money >= 1000
money = money - 1000
print str(59)
d = 4
Endif
If Inkey$()="6" and money >= 5000
money = money - 5000
print str(60)
d = 5
Endif
printmoney(money)
undim billet(0)
undim typb(0)
undim typl(0)
dim billet(6)
dim typb(6)
dim typl(6)
typb(0) = 0
typb(1) = 0
typb(2) = 0
typb(3) = 0
typb(4) = 0
typb(5) = 0
typl(0) = 0
typl(1) = 0
typl(2) = 0
typl(3) = 0
typl(4) = 0
typl(5) = 0
billet(0) = (rnd(48) + 1)
repeat
billet(1) = (rnd(48) + 1)
until billet(1) <> billet(0)
repeat
billet(2) = (rnd(48) + 1)
until billet(2) <> billet(1) and billet(2) <> billet(0)
repeat
billet(3) = (rnd(48) + 1)
until billet(3) <> billet(2) and billet(3) <> billet(1) and billet(3) <> billet(0)
repeat
billet(4) = (rnd(48) + 1)
until billet(4) <> billet(3) and billet(4) <> billet(2) and billet(4) <> billet(1) and billet(4) <> billet(0)
repeat
billet(5) = (rnd(48) + 1)
until billet(5) <> billet(4) and billet(5) <> billet(3) and billet(5) <> billet(2) and billet(5) <> billet(1) and billet(5) <> billet(0)
if billet(0) = lottery(0)
typb(0) = 1
typl(0) = 1
endif
if billet(0) = lottery(1)
typb(0) = 1
typl(1) = 1
endif
if billet(0) = lottery(2)
typb(0) = 1
typl(2) = 1
endif
if billet(0) = lottery(3)
typb(0) = 1
typl(3) = 1
endif
if billet(0) = lottery(4)
typb(0) = 1
typl(4) = 1
endif
if billet(0) = lottery(5)
typb(0) = 1
typl(5) = 1
endif
if billet(1) = lottery(0)
typb(1) = 1
typl(0) = 1
endif
if billet(1) = lottery(1)
typb(1) = 1
typl(1) = 1
endif
if billet(1) = lottery(2)
typb(1) = 1
typl(2) = 1
endif
if billet(1) = lottery(3)
typb(1) = 1
typl(3) = 1
endif
if billet(1) = lottery(4)
typb(1) = 1
typl(4) = 1
endif
if billet(1) = lottery(5)
typb(1) = 1
typl(5) = 1
endif
if billet(2) = lottery(0)
typb(2) = 1
typl(0) = 1
endif
if billet(2) = lottery(1)
typb(2) = 1
typl(1) = 1
endif
if billet(2) = lottery(2)
typb(2) = 1
typl(2) = 1
endif
if billet(2) = lottery(3)
typb(2) = 1
typl(3) = 1
endif
if billet(2) = lottery(4)
typb(2) = 1
typl(4) = 1
endif
if billet(2) = lottery(5)
typb(2) = 1
typl(5) = 1
endif
if billet(3) = lottery(0)
typb(3) = 1
typl(0) = 1
endif
if billet(3) = lottery(1)
typb(3) = 1
typl(1) = 1
endif
if billet(3) = lottery(2)
typb(3) = 1
typl(2) = 1
endif
if billet(3) = lottery(3)
typb(3) = 1
typl(3) = 1
endif
if billet(3) = lottery(4)
typb(3) = 1
typl(4) = 1
endif
if billet(3) = lottery(5)
typb(3) = 1
typl(5) = 1
endif
if billet(4) = lottery(0)
typb(4) = 1
typl(0) = 1
endif
if billet(4) = lottery(1)
typb(4) = 1
typl(1) = 1
endif
if billet(4) = lottery(2)
typb(4) = 1
typl(2) = 1
endif
if billet(4) = lottery(3)
typb(4) = 1
typl(3) = 1
endif
if billet(4) = lottery(4)
typb(4) = 1
typl(4) = 1
endif
if billet(4) = lottery(5)
typb(4) = 1
typl(5) = 1
endif
if billet(5) = lottery(0)
typb(5) = 1
typl(0) = 1
endif
if billet(5) = lottery(1)
typb(5) = 1
typl(1) = 1
endif
if billet(5) = lottery(2)
typb(5) = 1
typl(2) = 1
endif
if billet(5) = lottery(3)
typb(5) = 1
typl(3) = 1
endif
if billet(5) = lottery(4)
typb(5) = 1
typl(4) = 1
endif
if billet(5) = lottery(5)
typb(5) = 1
typl(5) = 1
endif
if d > 0
for t = 1 to 6
random1 = rnd(5)
if random1 = 0
d = d - 1
repeat
random2 = rnd(5)
random3 = rnd(5)
until typb(random2) = 0 and typl(random3) = 0
billet(random2) = lottery(random3)
typb(random2) = 1
typl(random3) = 1
endif
if d <= 0 then exit
next t
endif
print str(61)
Sync
wait key
Sync
print str(62)
Sync
wait key
Sync
t_delay = 100
print str$(billet(0));" "; : wait t_delay : Sync : print str$(billet(1));" "; : wait t_delay : Sync : print str$(billet(2));" "; : wait t_delay : Sync : print str$(billet(3));" "; : wait t_delay : Sync : print str$(billet(4));" "; : wait t_delay : Sync : print str$(billet(5)) : Sync
Sync
wait key
Sync
print str(63)
Sync
wait key
Sync
print str(64)
Sync
wait key
print str$(lottery(0));" "; : wait t_delay : Sync : print str$(lottery(1));" "; : wait t_delay : Sync : print str$(lottery(2));" "; : wait t_delay : Sync : print str$(lottery(3));" "; : wait t_delay : Sync : print str$(lottery(4));" "; : wait t_delay : Sync : print str$(lottery(5)) : Sync
Sync
wait key
Sync
total = 0
corresponding = 0
if billet(0) = lottery(0)
total = total + 1
corresponding = corresponding + 1
endif
if billet(0) = lottery(1)
total = total + 1
corresponding = corresponding + 0
endif
if billet(0) = lottery(2)
total = total + 1
corresponding = corresponding + 0
endif
if billet(0) = lottery(3)
total = total + 1
corresponding = corresponding + 0
endif
if billet(0) = lottery(4)
total = total + 1
corresponding = corresponding + 0
endif
if billet(0) = lottery(5)
total = total + 1
corresponding = corresponding + 0
endif
if billet(1) = lottery(0)
total = total + 1
corresponding = corresponding + 0
endif
if billet(1) = lottery(1)
total = total + 1
corresponding = corresponding + 1
endif
if billet(1) = lottery(2)
total = total + 1
corresponding = corresponding + 0
endif
if billet(1) = lottery(3)
total = total + 1
corresponding = corresponding + 0
endif
if billet(1) = lottery(4)
total = total + 1
corresponding = corresponding + 0
endif
if billet(1) = lottery(5)
total = total + 1
corresponding = corresponding + 0
endif
if billet(2) = lottery(0)
total = total + 1
corresponding = corresponding + 0
endif
if billet(2) = lottery(1)
total = total + 1
corresponding = corresponding + 0
endif
if billet(2) = lottery(2)
total = total + 1
corresponding = corresponding + 1
endif
if billet(2) = lottery(3)
total = total + 1
corresponding = corresponding + 0
endif
if billet(2) = lottery(4)
total = total + 1
corresponding = corresponding + 0
endif
if billet(2) = lottery(5)
total = total + 1
corresponding = corresponding + 0
endif
if billet(3) = lottery(0)
total = total + 1
corresponding = corresponding + 0
endif
if billet(3) = lottery(1)
total = total + 1
corresponding = corresponding + 0
endif
if billet(3) = lottery(2)
total = total + 1
corresponding = corresponding + 0
endif
if billet(3) = lottery(3)
total = total + 1
corresponding = corresponding + 1
endif
if billet(3) = lottery(4)
total = total + 1
corresponding = corresponding + 0
endif
if billet(3) = lottery(5)
total = total + 1
corresponding = corresponding + 0
endif
if billet(4) = lottery(0)
total = total + 1
corresponding = corresponding + 0
endif
if billet(4) = lottery(1)
total = total + 1
corresponding = corresponding + 0
endif
if billet(4) = lottery(2)
total = total + 1
corresponding = corresponding + 0
endif
if billet(4) = lottery(3)
total = total + 1
corresponding = corresponding + 0
endif
if billet(4) = lottery(4)
total = total + 1
corresponding = corresponding + 1
endif
if billet(4) = lottery(5)
total = total + 1
corresponding = corresponding + 0
endif
if billet(5) = lottery(0)
total = total + 1
corresponding = corresponding + 0
endif
if billet(5) = lottery(1)
total = total + 1
corresponding = corresponding + 0
endif
if billet(5) = lottery(2)
total = total + 1
corresponding = corresponding + 0
endif
if billet(5) = lottery(3)
total = total + 1
corresponding = corresponding + 0
endif
if billet(5) = lottery(4)
total = total + 1
corresponding = corresponding + 0
endif
if billet(5) = lottery(5)
total = total + 1
corresponding = corresponding + 1
endif
select total
case 0
gain = 0
money = money + gain
print str(65)
endcase
case 1
gain = (rnd(4) + 1) * (corresponding + 1) * cagnotte
money = money + gain
print str(67) + str$(total)
print str(68) + str$(corresponding) + str(69) + str$(gain) + str(66)
endcase
case 2
gain = (rnd(15) + 5) * (corresponding + 1) * cagnotte
money = money + gain
print str(67) + str$(total)
print str(68) + str$(corresponding) + str(69) + str$(gain) + str(66)
endcase
case 3
gain = (rnd(180) + 20) * (corresponding + 1) * cagnotte
money = money + gain
print str(67) + str$(total)
print str(68) + str$(corresponding) + str(69) + str$(gain) + str(66)
endcase
case 4
gain = (rnd(1900) + 100) * (corresponding + 1) * cagnotte
money = money + gain
print str(67) + str$(total)
print str(68) + str$(corresponding) + str(69) + str$(gain) + str(66)
endcase
case 5
gain = (rnd(45000) + 5000) * (corresponding + 1) * cagnotte
money = money + gain
print str(67) + str$(total)
print str(68) + str$(corresponding) + str(69) + str$(gain) + str(66)
endcase
case 6
gain = (rnd(1000000) + 500000) * (corresponding + 1) * cagnotte
money = money + gain
print str(67) + str$(total)
print str(68) + str$(corresponding) + str(69) + str$(gain) + str(66)
endcase
endselect
if money > maxmoney then maxmoney = money
Sync
wait key
Sync
if money >= 2
date = date + 1
if IsbsxYear(year) = 1
if date = 367
date = 1
year = year + 1
endif
else
if date = 366
date = 1
year = year + 1
endif
endif
print " "
print str(71)
print str(72)
print str(73)
Sync
repeat : until inkey$()="1" or inkey$()="2"
Sync
if inkey$()="1" then save_num = save_game(firstdate, date, year, btday, btmonth, name$, money, maxmoney, save_num)
Sync
repeat : until inkey$()=""
Sync
print " "
print str(74)
print str(75)
Sync
repeat : until inkey$()="1" or inkey$()="2"
Sync
if inkey$()="2" then game()
Sync
repeat : until inkey$()=""
Sync
else
print str(76)
print str(77)
print str(78)
Sync
wait key
Sync
cls
Set text size 100
print str(79)
Sync
wait 2000
Sync
game()
endif
until ex >= 1
Sync
endfunction
function IsSpecialDay(firstdate, date, year, btday, btmonth)
ink rgb(0, 255, 0), 0
cagnotte = 1
if date = 1
print str(80)
cagnotte = 3
endif
if getdate_num(date, year) = 13 and getdate_day(date, year) = 4
print str(81)
cagnotte = 7
endif
if getdate_num(date, year) = 14 and getdate_month(date, year) = 1
print str(82)
cagnotte = 2
endif
if getdate_num(date, year) = 25 and getdate_month(date, year) = 11
print str(83)
cagnotte = 4
endif
if getdate_num(date, year) = btday and getdate_month(date, year) = btmonth
print str(84)
cagnotte = cagnotte * 2
endif
if getdate_num(date, year) = firstdate and year = 2009
cagnotte = 0
endif
Sync
endfunction cagnotte
function printdate(date, year)
Print str(85) + weekdayname$(getdate_day(date, year)) + " " + str$(getdate_num(date, year)) + " " + yearmonthname$(getdate_month(date, year)) + " " + str$(year)
endfunction
function printmoney(money)
print str(86) + str$(money) + " §"
endfunction
function getdate_month(date, year)
IF IsBsxYear(year) = 1
IF date >= 1 AND date <= 31 then month = 0
IF date >= 32 AND date <= 60 then month = 1
IF date >= 61 AND date <= 91 then month = 2
IF date >= 92 AND date <= 121 then month = 3
IF date >= 122 AND date <= 152 then month = 4
IF date >= 153 AND date <= 182 then month = 5
IF date >= 183 AND date <= 213 then month = 6
IF date >= 214 AND date <= 244 then month = 7
IF date >= 245 AND date <= 274 then month = 8
IF date >= 275 AND date <= 305 then month = 9
IF date >= 306 AND date <= 335 then month = 10
IF date >= 336 AND date <= 366 then month = 11
ELSE
IF date >= 1 AND date <= 31 then month = 0
IF date >= 32 AND date <= 59 then month = 1
IF date >= 60 AND date <= 90 then month = 2
IF date >= 91 AND date <= 120 then month = 3
IF date >= 121 AND date <= 151 then month = 4
IF date >= 152 AND date <= 181 then month = 5
IF date >= 182 AND date <= 212 then month = 6
IF date >= 213 AND date <= 243 then month = 7
IF date >= 244 AND date <= 273 then month = 8
IF date >= 274 AND date <= 304 then month = 9
IF date >= 305 AND date <= 334 then month = 10
IF date >= 335 AND date <= 365 then month = 11
ENDIF
endfunction month
function getdate_num(date, year)
IF IsBsxYear(year) = 1
If getdate_month(date, year) = 0 then num = date - 0
If getdate_month(date, year) = 1 then num = date - 31
If getdate_month(date, year) = 2 then num = date - 60
If getdate_month(date, year) = 3 then num = date - 91
If getdate_month(date, year) = 4 then num = date - 121
If getdate_month(date, year) = 5 then num = date - 152
If getdate_month(date, year) = 6 then num = date - 182
If getdate_month(date, year) = 7 then num = date - 213
If getdate_month(date, year) = 8 then num = date - 244
If getdate_month(date, year) = 9 then num = date - 274
If getdate_month(date, year) = 10 then num = date - 305
If getdate_month(date, year) = 11 then num = date - 335
ELSE
If getdate_month(date, year) = 0 then num = date - 0
If getdate_month(date, year) = 1 then num = date - 31
If getdate_month(date, year) = 2 then num = date - 59
If getdate_month(date, year) = 3 then num = date - 90
If getdate_month(date, year) = 4 then num = date - 120
If getdate_month(date, year) = 5 then num = date - 151
If getdate_month(date, year) = 6 then num = date - 181
If getdate_month(date, year) = 7 then num = date - 212
If getdate_month(date, year) = 8 then num = date - 243
If getdate_month(date, year) = 9 then num = date - 273
If getdate_month(date, year) = 10 then num = date - 304
If getdate_month(date, year) = 11 then num = date - 334
ENDIF
endfunction num
function getdate_day(date, year)
c = 0
FOR y = 2008 TO year
fyd = 1 + c
if IsBsxYear(y) = 1
c = c + 2
else
c = c + 1
endif
if c >= 7 then c = 0
NEXT y
day = fyd - 1
for dt = 1 to date
day = day + 1
if day >= 7 then day = 0
next dt
endfunction day
function def_random_date(year)
If IsBsxYear(year) = 1
date = (rnd(365) + 1)
Else
date = (rnd(364) + 1)
Endif
endfunction date
function IsBsxYear(year)
bool = 0
repeat
year = year - 4
until year <= 2000
if year = 2000 then bool = 1
endfunction bool
PS : if my english is not very good, try to improve it for me please