Challenge:
Winner?:
No
Code Snippet:
`-------Aquarium Project--------------------------- `-------CREATED BY:NICHOLAS------------------------ `-------horlocker@yahoo.com------------------------ `-------imthecoolest111@hotmail.com---------------- `-------April 2,2005------------------------------- `-------Dont steal my code------------------------- `-------Just the bones of the code----------------- `-------Right click menu buttons to close---------- `-------Can't buy anything yet--------------------- `-------Showcase for fish in right corner of cam--- `-------If you can help with medicine please do---- set display mode 1024,768,32 hide mouse Sync On Sync Rate 60 Randomize Timer() Autocam Off draw sprites first Type Coordinates x as Float y as Float z as Float Endtype Global Object as Coordinates Global Target as Coordinates Global Total as Coordinates Global Count as Float `number of fish with disease Global disease as Float disease=0 `plant growth progress Global plant as Float plant=1 `lighting level Global light as Float light=1 `ph level (acidity or alkaliness of water) Global ph as Float ph=6.5 `dh level(the hardness of the water) Global dh as Float dh=9.0 `bacteria in water Global bacteria as Float bacteria=.5 `temperature ?F and ?C Global temp as Float Global tempc as Float temp=55 tempc=int((temp-32)*(5.0/9.0)) `time variables Global oldtime as Float Global newtime as Float newhr=0:time=1:ampm=1:pm=0:am=1:day=1:week=1:month=1:year=1 `money variables Global money as Float money=200.00 `variables for the inventory Global nextitem as Float:nextitem=1 `variables for if buttons are clicked Global clickaqua as Float:clickaqua=0 Global clicklight as Float:clicklight=0 Global clickfood as Float:clickfood=0 Global clickfilt as Float:clickfilt=0 Global clickheat as Float:clickheat=0 Global clickph as Float:clickph=0 Global clickfish as Float:clickfish=0 Global clickmeds as Float:clickmeds=0 `variable for rotating showcase fish Global rotate as Float:rotate=0 `variables for current fish data Global crntfish as Float:crntfish=0 `wait some time b4 being able to click button again Global wait1 as Float:wait1=0 Global wait2 as Float:wait2=0 `variables for current tank size Global tanksize as Float:tanksize=10 Global newtank as Float:newtank=1 Global crnttank as Float:crnttank=10 Global tank10 as Float:tank10=1 Global tank20 as Float:tank20=0 Global tank40 as Float:tank40=0 Global tank60 as Float:tank60=0 Global tank100 as Float:tank100=0 `variables for current light Global lightsize as Float:lightsize=15 Global crntlight as Float:crntlight=15 Global newlight as Float:newlight=1 Global light15 as Float:light15=0 Global light25 as Float:light25=0 Global light40 as Float:light40=0 Global light20 as Float:light20=0 Global light35 as Float:light35=0 Global light45 as Float:light45=0 `make the aquarium camera set camera to image 0,1,512,512 set camera aspect 800/600 color backdrop RGB(150,150,220) sprite 1,0,0,1 set sprite 1,0,1 set sprite alpha 1,100 size sprite 1,800,600 Create Bitmap 1,100,100 Set Current Bitmap 1 Box 0,0,99,99,RGB(255,128,0),RGB(164,169,213),RGB(233,235,169),RGB(89,91,0) Get Image 2,0,0,99,99 Set Current Bitmap 0 Delete Bitmap 1 `store stuff controlling fish movement Dim m(1000) as Float R# = 50 :` resting length K# = 2 :` spring coefficient v# = 0.0 :` velocity f# = 0.9 :` friction Dim dots(400) as Coordinates Dim vels(400) as Coordinates `amount of fish Global Fish as Float Fish = 9 `make the fish For i = 1 to Fish Fish(i) Position Object i,10,10,22 Turn Object Right i,90 Hide object i Next i `make different fish to buy and reference of which they are color object 1,rgb(211,206,1)`--Madagascar color object 2,rgb(216,169,176)`--Albino Tiger color object 3,rgb(126,5,60)`--Siamese color object 4,rgb(203,163,171)`--Common color object 5,rgb(215,204,206)`--Adolfos color object 6,rgb(179,180,122)`--Pelvicachromis color object 7,rgb(230,230,219)`--Albino Red color object 8,rgb(243,243,243)`--Pearl color object 9,rgb(201,201,201)`--Three spot remstart reference for making more fish that are bought ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Fish(Fish+1) Position Object Fish+1,10,10,22 Turn Object Right Fish+1,rnd(360) Pitch Object Down Fish+1,rnd(360) Roll Object Left Fish+1,rnd(360) Move Object Fish+1,rnd(R#)+.1 m(Fish+1)=rnd(500.0)/10.0+100.0 Return_Object(Fish+1) dots(Fish+1).x=Object.x:dots(Fish+1).y=Object.y:dots(Fish+1).z=Object.z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ remend Make Object Sphere 1001,.5,8,8 Hide Object 1001 Position Object 1001,0,0,100 Turn Object Right 1001,rnd(360) Pitch Object Down 1001,rnd(360) Roll Object Left 1001,rnd(360) Count=249 `make background for time for y=1 to 120 ink rgb(50,50,255-y*2),0 box 0+y,0+y,120-y,120-y next y get image 4,0,0,120,120 `make background for stats for x=1 to 290 ink rgb(50,50,255-x),0 box 0+x,0+x/2,300-x,300-x/2 next x get image 5,0,0,290,290 do gosub movefish gosub stats gosub time gosub buttons gosub inventory if clickaqua=1 then gosub aquarium if clicklight=1 then gosub lights if clickfood=1 then gosub foods if clickfilt=1 then gosub filters if clickfish=1 then gosub fishbuy if clickheat=1 then gosub heater if clickph=1 then gosub phtab if clickmeds=1 then gosub medicine gosub mouse text 10,10, "FPS: " + str$(screen fps()) loop inventory: if over(1,500,600,572,612) ink rgb(255,255,255),0 text 500,600,"Prev Item" if nextitem=0 then nextitem=8 if mouseclick()=1 and wait2=0 then dec nextitem:inc wait2:gosub waitforclick2 else ink rgb(200,200,200),0 text 500,600,"Prev Item" endif if over(1,700,600,772,612) ink rgb(255,255,255),0 text 700,600,"Next Item" if nextitem=9 then nextitem=1 if mouseclick()=1 and wait2=0 then inc nextitem:inc wait2:gosub waitforclick2 else ink rgb(200,200,200),0 text 700,600,"Next Item" endif if nextitem=1 if tank10+tank20+tank40+tank60+tank100=0 then tanksize=0 ink rgb(255,255,255),0:text 500,614,"Tank In Use:"+str$(tanksize)+" Gallons" text 500,626,"Selected Tank:"+str$(crnttank)+" Gallons" if newtank=1 if over(1,500,645,570,667) and tanksize<>10 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" if mouseclick()=1 then tanksize=10 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" endif if over(1,571,645,650,667) and tank10=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" if mouseclick()=1 then inc money,10:tank10=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" endif endif if newtank=2 if over(1,500,645,570,667) and tanksize<>20 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" if mouseclick()=1 then tanksize=20 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" endif if over(1,571,645,650,667) and tank20=1 if mouseclick()=1 then inc money,15:tank20=0 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" endif endif if newtank=3 if over(1,500,645,570,667) and tanksize<>40 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" if mouseclick()=1 then tanksize=40 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" endif if over(1,571,645,650,667) and tank40=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" if mouseclick()=1 then inc money,35:tank40=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" endif endif if newtank=4 if over(1,500,645,570,667) and tanksize<>60 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" if mouseclick()=1 then tanksize=60 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" endif if over(1,571,645,650,667) and tank60=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" if mouseclick()=1 then inc money,60:tank60=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" endif endif if newtank=5 if over(1,500,645,570,667) and tanksize<>100 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" if mouseclick()=1 then tanksize=100 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"Use Tank" endif if over(1,571,645,650,667) and tank100=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" if mouseclick()=1 then inc money,100:tank100=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"Sell Tank" endif endif if over(1,500,675,532,687) ink rgb(0,0,255),0 text 500,675,"Prev" `first set of checking if mouseclick()=1 and newtank=5 and tank60=1 and wait2=0 then newtank=4:crnttank=60:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=5 and tank40=1 and wait2=0 then newtank=3:crnttank=40:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=5 and tank20=1 and wait2=0 then newtank=2:crnttank=20:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=5 and tank10=1 and wait2=0 then newtank=1:crnttank=10:inc wait2:gosub waitforclick2 `second set of checking if mouseclick()=1 and newtank=4 and tank40=1 and wait2=0 then newtank=3:crnttank=40:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=4 and tank20=1 and wait2=0 then newtank=2:crnttank=20:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=4 and tank10=1 and wait2=0 then newtank=1:crnttank=10:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=4 and tank100=1 and wait2=0 then newtank=5:crnttank=100:inc wait2:gosub waitforclick2 `third set of checking if mouseclick()=1 and newtank=3 and tank20=1 and wait2=0 then newtank=2:crnttank=20:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=3 and tank10=1 and wait2=0 then newtank=1:crnttank=10:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=3 and tank100=1 and wait2=0 then newtank=5:crnttank=100:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=3 and tank60=1 and wait2=0 then newtank=4:crnttank=60:inc wait2:gosub waitforclick2 `fourth set of checking if mouseclick()=1 and newtank=2 and tank10=1 and wait2=0 then newtank=1:crnttank=10:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=2 and tank100=1 and wait2=0 then newtank=5:crnttank=100:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=2 and tank60=1 and wait2=0 then newtank=4:crnttank=60:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=2 and tank40=1 and wait2=0 then newtank=3:crnttank=40:inc wait2:gosub waitforclick2 `fifth set of checking if mouseclick()=1 and newtank=1 and tank100=1 and wait2=0 then newtank=5:crnttank=100:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=1 and tank60=1 and wait2=0 then newtank=4:crnttank=60:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=1 and tank40=1 and wait2=0 then newtank=3:crnttank=40:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=1 and tank20=1 and wait2=0 then newtank=2:crnttank=20:inc wait2:gosub waitforclick2 else ink rgb(100,100,255),0 text 500,675,"Prev" endif if over(1,550,675,582,687) ink rgb(0,0,255),0 text 550,675,"Next" `first set of checking if mouseclick()=1 and newtank=5 and tank10=1 and wait2=0 then newtank=1:crnttank=10:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=5 and tank20=1 and wait2=0 then newtank=2:crnttank=20:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=5 and tank40=1 and wait2=0 then newtank=3:crnttank=40:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=5 and tank60=1 and wait2=0 then newtank=4:crnttank=60:inc wait2:gosub waitforclick2 `second set of checking if mouseclick()=1 and newtank=4 and tank100=1 and wait2=0 then newtank=5:crnttank=100:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=4 and tank10=1 and wait2=0 then newtank=1:crnttank=10:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=4 and tank20=1 and wait2=0 then newtank=2:crnttank=20:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=4 and tank40=1 and wait2=0 then newtank=3:crnttank=40:inc wait2:gosub waitforclick2 `third set of checking if mouseclick()=1 and newtank=3 and tank60=1 and wait2=0 then newtank=4:crnttank=60:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=3 and tank100=1 and wait2=0 then newtank=5:crnttank=100:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=3 and tank10=1 and wait2=0 then newtank=1:crnttank=10:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=3 and tank20=1 and wait2=0 then newtank=2:crnttank=20:inc wait2:gosub waitforclick2 `fourth set of checking if mouseclick()=1 and newtank=2 and tank40=1 and wait2=0 then newtank=3:crnttank=40:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=2 and tank60=1 and wait2=0 then newtank=4:crnttank=60:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=2 and tank100=1 and wait2=0 then newtank=5:crnttank=100:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=2 and tank10=1 and wait2=0 then newtank=1:crnttank=10:inc wait2:gosub waitforclick2 `fifth set of checking if mouseclick()=1 and newtank=1 and tank20=1 and wait2=0 then newtank=2:crnttank=20:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=1 and tank40=1 and wait2=0 then newtank=3:crnttank=40:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=1 and tank60=1 and wait2=0 then newtank=4:crnttank=60:inc wait2:gosub waitforclick2 if mouseclick()=1 and newtank=1 and tank100=1 and wait2=0 then newtank=5:crnttank=100:inc wait2:gosub waitforclick2 else ink rgb(100,100,255),0 text 550,675,"Next" endif ink rgb(255,255,255),0 text 592,600,"-Aquariums-" endif if nextitem=2 if lightsize=20 or lightsize=35 or lightsize=45 then flourescent=1 ink rgb(255,255,255),0:text 500,614,"Light In Use:"+str$(lightsize)+" Watts" text 500,626,"Selected Light:"+str$(crntlight)+" Watts" if flourescent=1 then text 668,614,"(Flourescent)":text 684,626,"(Flourescent)" if newlight=1 if over(1,500,645,570,667) and lightsize<>15 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" if mouseclick()=1 then lightsize=15 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" endif if over(1,571,645,650,667) and light15=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" if mouseclick()=1 then inc money,8:light15=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" endif endif if newlight=2 if over(1,500,645,570,667) and lightsize<>25 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" if mouseclick()=1 then lightsize=25 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" endif if over(1,571,645,650,667) and light25=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" if mouseclick()=1 then inc money,15:light25=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" endif endif if newlight=3 if over(1,500,645,570,667) and lightsize<>40 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" if mouseclick()=1 then lightsize=40 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" endif if over(1,571,645,650,667) and light40=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" if mouseclick()=1 then inc money,23:light40=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" endif endif if newlight=4 if over(1,500,645,570,667) and lightsize<>20 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" if mouseclick()=1 then lightsize=20 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" endif if over(1,571,645,650,667) and light20=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" if mouseclick()=1 then inc money,23:light20=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" endif endif if newlight=5 if over(1,500,645,570,667) and lightsize<>35 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" if mouseclick()=1 then lightsize=35 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" endif if over(1,571,645,650,667) and light35=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" if mouseclick()=1 then inc money,33:light35=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" endif endif if newlight=6 if over(1,500,645,570,667) and lightsize<>45 ink rgb(255,255,255),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" if mouseclick()=1 then lightsize=45 else ink rgb(200,200,200),0 box 500,645,570,667 ink 0,0:text 503,648,"UseLight" endif if over(1,571,645,650,667) and light45=1 ink rgb(255,255,255),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" if mouseclick()=1 then inc money,40:light45=0 else ink rgb(200,200,200),0 box 571,645,650,667 ink 0,0:text 574,648,"SellLight" endif endif if over(1,500,675,532,687) ink rgb(0,0,255),0 text 500,675,"Prev" `first set of checking if mouseclick()=1 and newlight=6 and light35=1 and wait2=0 then newlight=1:crntlight=35:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=6 and light20=1 and wait2=0 then newlight=2:crntlight=20:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=6 and light40=1 and wait2=0 then newlight=3:crntlight=40:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=6 and light25=1 and wait2=0 then newlight=4:crntlight=25:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=6 and light15=1 and wait2=0 then newlight=5:crntlight=15:inc wait2:gosub waitforclick2 `second set of checking if mouseclick()=1 and newlight=5 and light20=1 and wait2=0 then newlight=6:crntlight=20:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=5 and light40=1 and wait2=0 then newlight=1:crntlight=40:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=5 and light25=1 and wait2=0 then newlight=2:crntlight=25:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=5 and light15=1 and wait2=0 then newlight=3:crntlight=15:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=5 and light45=1 and wait2=0 then newlight=4:crntlight=45:inc wait2:gosub waitforclick2 `third set of checking if mouseclick()=1 and newlight=4 and light40=1 and wait2=0 then newlight=5:crntlight=40:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=4 and light25=1 and wait2=0 then newlight=6:crntlight=25:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=4 and light15=1 and wait2=0 then newlight=1:crntlight=15:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=4 and light45=1 and wait2=0 then newlight=2:crntlight=45:inc wait2:gosub waitforclick2 if mouseclick()=1 and newlight=4 and light35=1 and wait2=0 then newlight=3:crntlight=35:inc wait2:gosub waitforclick2 `fourth set of checking if mouseclick()=1 and newlight=3 and light25=1 and wait2=0 then newlight=4:crntlight=25:inc wait2:gosub waitforclick2