My zodiak sign is Sagittarius. Predictable to the day and age, I created the following program.
function setup()
coordx={0,215,430,645,860,1075,0,215,430,645,860,1075}
coordy={240,240,240,240,240,240,0,0,0,0,0,0}
large={205,205,205,205,205,205,205,205,205,205,205,205}
maxspr=12
sprites={}
chargeimage=false
continue=false
http.request("http://img560.imageshack.us/img560/7135/stern12.jpg",didGetImage)
iparameter("d",1,31,19)
iparameter("m",1,12,12)
iparameter("y",1900,2020,1930)
end
-- This function gets called once every frame
function draw()
background(255, 255, 255, 0)
fill(0, 0, 0, 255)
textMode(CENTER)
fontSize(28)
text("YOUR SIGN",WIDTH/2,HEIGHT-50)
text("Wait please. Loading Image from Http...",WIDTH/2,HEIGHT-90)
text("Day: "..d,WIDTH/2,600)
text("Month: "..m,WIDTH/2,575)
text("Year: "..y,WIDTH/2,550)
if chargeimage then
print("Load completed...")
for i=1,maxspr do
sprites[i]=matrice:copy(coordx[i],coordy[i],large[i],245)
end
continue=true
chargeimage=false
end
if continue then
if y<1902 then y=1902 end
timeValue = os.time{year=y,month=m,day=d}
timeValueString = string.format("%.1f", timeValue)
dateString = os.date("%c", timeValue)
t1 = os.time{day=d,month=m,year=y}
t2 = os.time()
k1 = os.date("*t",t1)
k2 = os.date("*t",t2)
text("Finished loading ...",WIDTH/2,HEIGHT-130)
text("Which was on "..k1.day.."."..k1.month.."."..k1.year,WIDTH/2,120)
text("Today is "..k2.day.."."..k2.month.."."..k2.year,WIDTH/2,90)
if k2.month < k1.month then
text("You are "..(k2.year - k1.year -1).." Years old.",WIDTH/2,60)
else
text("You are "..(k2.year - k1.year).." Years old.",WIDTH/2,60)
end
local weekday=(string.sub(dateString ,1,3))
if weekday == "Sun" then weekday = "Sunday - Sonntag" end
if weekday == "Mon" then weekday = "Monday - Montag" end
if weekday == "Tue" then weekday = "Tuesday - Dienstag" end
if weekday == "Wed" then weekday = "Wednesday - Mittwoch" end
if weekday == "Thu" then weekday = "Thursday - Donnerstag" end
if weekday == "Fri" then weekday = "Friday - Freitag" end
if weekday == "Sat" then weekday = "Saturday - Samstag" end
text("You are born on a " ..weekday,WIDTH/2,180)
if m == 1 and d > 20 then
w,h=spriteSize(sprites[1])
text("Wassermann",WIDTH/2,470)
text("Aquarius",WIDTH/2,420)
sprite(sprites[1],WIDTH/2,300,200,200)
end
if m == 2 and d < 19 then
w,h=spriteSize(sprites[1])
text("Wassermann",WIDTH/2,470)
text("Aquarius",WIDTH/2,420)
sprite(sprites[1],WIDTH/2,300,200,200)
end
if m == 2 and d > 18 then
w,h=spriteSize(sprites[8])
text("Fische",WIDTH/2,470)
text("Pisces",WIDTH/2,420)
sprite(sprites[8],WIDTH/2,300,200,200)
end
if m == 3 and d < 21 then
w,h=spriteSize(sprites[8])
text("Fische",WIDTH/2,470)
text("Pisces",WIDTH/2,420)
sprite(sprites[8],WIDTH/2,300,200,200)
end
if m == 3 and d > 20 then
w,h=spriteSize(sprites[2])
text("Widder",WIDTH/2,470)
text("Aries",WIDTH/2,420)
sprite(sprites[2],WIDTH/2,300,200,200)
end
if m == 4 and d < 21 then
w,h=spriteSize(sprites[2])
text("Widder",WIDTH/2,470)
text("Aries",WIDTH/2,420)
sprite(sprites[2],WIDTH/2,300,200,200)
end
if m == 4 and d > 20 then
w,h=spriteSize(sprites[11])
text("Stier",WIDTH/2,470)
text("Taurus",WIDTH/2,420)
sprite(sprites[11],WIDTH/2,300,200,200)
end
if m == 5 and d < 21 then
w,h=spriteSize(sprites[11])
text("Stier",WIDTH/2,470)
text("Taurus",WIDTH/2,420)
sprite(sprites[11],WIDTH/2,300,200,200)
end
if m == 5 and d > 20 then
w,h=spriteSize(sprites[5])
text("Zwillinge",WIDTH/2,470)
text("Gemini",WIDTH/2,420)
sprite(sprites[5],WIDTH/2,300,200,200)
end
if m == 6 and d < 22 then
w,h=spriteSize(sprites[5])
text("Zwillinge",WIDTH/2,470)
text("Gemini",WIDTH/2,420)
sprite(sprites[5],WIDTH/2,300,200,200)
end
if m == 6 and d > 21 then
w,h=spriteSize(sprites[3])
text("Krebs",WIDTH/2,470)
text("Cancer",WIDTH/2,420)
sprite(sprites[3],WIDTH/2,300,200,200)
end
if m == 7 and d < 23 then
w,h=spriteSize(sprites[3])
text("Krebs",WIDTH/2,470)
text("Cancer",WIDTH/2,420)
sprite(sprites[3],WIDTH/2,300,200,200)
end
if m == 7 and d > 22 then
w,h=spriteSize(sprites[6])
text("Löwe",WIDTH/2,470)
text("Leo",WIDTH/2,420)
sprite(sprites[6],WIDTH/2,300,200,200)
end
if m == 8 and d < 23 then
w,h=spriteSize(sprites[6])
text("Löwe",WIDTH/2,470)
text("Leo",WIDTH/2,420)
sprite(sprites[6],WIDTH/2,300,200,200)
end
if m == 8 and d > 22 then
w,h=spriteSize(sprites[12])
text("Jungfrau",WIDTH/2,470)
text("Virgo",WIDTH/2,420)
sprite(sprites[12],WIDTH/2,300,200,200)
end
if m == 9 and d < 24 then
w,h=spriteSize(sprites[12])
text("Jungfrau",WIDTH/2,470)
text("Virgo",WIDTH/2,420)
sprite(sprites[12],WIDTH/2,300,200,200)
end
if m == 9 and d > 23 then
w,h=spriteSize(sprites[7])
text("Waage",WIDTH/2,470)
text("Libra",WIDTH/2,420)
sprite(sprites[7],WIDTH/2,300,200,200)
end
if m == 10 and d < 24 then
w,h=spriteSize(sprites[7])
text("Waage",WIDTH/2,470)
text("Libra",WIDTH/2,420)
sprite(sprites[7],WIDTH/2,300,200,200)
end
if m == 10 and d > 23 then
w,h=spriteSize(sprites[10])
text("Skorpion",WIDTH/2,470)
text("Scorpio",WIDTH/2,420)
sprite(sprites[10],WIDTH/2,300,200,200)
end
if m == 11 and d < 23 then
w,h=spriteSize(sprites[10])
text("Skorpion",WIDTH/2,470)
text("Scorpio",WIDTH/2,420)
sprite(sprites[10],WIDTH/2,300,200,200)
end
if m == 11 and d > 22 then
w,h=spriteSize(sprites[9])
text("Schütze",WIDTH/2,470)
text("Sagittarius",WIDTH/2,420)
sprite(sprites[9],WIDTH/2,300,200,200)
end
if m == 12 and d < 22 then
w,h=spriteSize(sprites[9])
text("Schütze",WIDTH/2,470)
text("Sagittarius",WIDTH/2,420)
sprite(sprites[9],WIDTH/2,300,200,200)
end
if m == 12 and d > 21 then
w,h=spriteSize(sprites[4])
text("Capricornus",WIDTH/2,420)
text("Steinbock",WIDTH/2,470)
sprite(sprites[4],WIDTH/2,300,200,200)
end
if m == 1 and d < 21 then
w,h=spriteSize(sprites[4])
text("Steinbock",WIDTH/2,470)
text("Capricornus",WIDTH/2,420)
sprite(sprites[4],WIDTH/2,300,200,200)
end
end
end
function didGetImage(image)
matrice=image
if spriteSize(matrice)==0 then
print ("Download faulty.....")
setup()
end
chargeimage=true
end