ok, this is it. Five 20-liners in 25 days.
Planet Caravan:
You are the captain of an interplanetary trade ship. You make money by
hauling cargo between planets, buying low and selling high. Ten planets
have recently been settled in this sector, and their fledgling economies
are very volatile. Keep an eye on the news headlines for insight into
what prices might be like on a given world.
set display mode 800,600,32 : sync on : sync rate 0 : sync : randomize timer() : autocam off : backdrop on : color backdrop 0 : set text font "Courier" : dim Price(10,10) : dim a$(1000) : dim ex(1000) : dim ey(1000) : dim Duration(1000) : dim AGE(1000) : dim Effect(1000,10) : dim galaxy(8,8) : dim own(10) : dim sn$(70) : dim n$(10)
dim E$(100) : dim EE(100,10) : dim MO$(12) : dim avg(10) : dim p$(10) : dim px(10) : dim py(10) : dim i(10) : dim H$(100) : Dim Knowledge(10,10) : Dim VC$(12) : open to read 1,"TradMed/TraData15.txt" : for t=1 to 31 : read string 1,a$ : center text 400,(t*18),a$ : next t : sync : for t=1 to 68 : read string 1,a$ : sn$(t)=a$
next t : for t=1 to 12 : read string 1,a$ : mo$(t)=a$ : next t : for t=1 to 10 : read string 1,a$ : p$(t)=a$ : next t : for t=1 to 58 : read string 1,a$ : e$(t)=a$ : for u=1 to 10 : read string 1,a$ : ee(t,u)=val(a$) : next u : next t : for t=1 to 12 : read string 1,a$ : VC$(t)=a$
next t : close file 1 : for t=1 to 17 : a$="TradMed/p"+str$(t)+".bmp" : load image a$,t : next t : load image "TradMed/Bbg4.jpg",19 : load image "TradMed/B-EG.jpg",95 : load image "TradMed/B-AC.jpg",96 : load image "TradMed/B-ET.jpg",98 : load image "TradMed/B-LS.jpg",99 : for t=1 to 10 : repeat : no=0 : x=rnd(67)+1 : y=rnd(16)+1 : for u=1 to 10 : if u<>t : if n$(u)=sn$(x) or i(u)=y : no=1
endif : endif : next u : until no=0 : n$(t)=sn$(x) : i(t)=y : next t : n$(0)="None" : for t=1 to 10 : repeat : no=0 : x=rnd(6)+1 : y=rnd(6)+1 : for a=x-1 to x+1 : for b=y-1 to y+1 : if galaxy(a,b)>0 : no=1 : endif : next b : next a : inc tries
until no=0 or tries>500 : galaxy(x,y)=t : if tries>500 : t=0 : tries=0 : for a=1 to 7 : for b=1 to 7 : galaxy(a,b)=0 : next b : next a : endif : px(t)=x : py(t)=y : next t : for t=1 to 10 : e#=(rnd(50)+50)*.01 : for u=1 to 10 : k=0 : if u mod 2=0 : k=rnd(4)*6 : endif
Price(t,u)=((u+k+150-rnd(80))*e#) : next u : next t : IPC=30000 : month=rnd(11)+1 : day=rnd(5)+1 : year=2222+rnd(222) : event=0 : at=rnd(9)+1 : cargo=0 : CargoMax=501 : WAIT KEY : DO : for t=1 to 10 : Knowledge(at,t)=price(at,t) : next t : dest=0 : do : paste image 19,0,0 : for p=1 to 10 : paste image i(p),px(p)*32,py(p)*32,1
center text px(p)*32+16,py(p)*32+26,n$(p) : next p : if dest=at : dest=0 : endif : text 320,4,"Planet "+n$(at) : text 320,20,mo$(month)+" "+str$(day)+", "+str$(year) : text 320,44,str$(IPC)+" IPC. CARGO: " + str$(cargo)+" ("+str$(Cargomax-1)+")" : text 510,4,"Destination: "+n$(dest) : text 510,20,"Travel Time: "+str$(TravelTime) : for t=1 to 10
text 320,60+t*20,p$(t)+" : "+str$(price(at,t)) : text 420,60+t*20,"BUY" : text 460,60+t*20,"SELL" : text 510,60+t*20,STR$(OWN(T)) : if dest>0 : text 560,60+t*20,"("+str$(Knowledge(dest,t))+")" : endif : next t : circle 32*px(at)+16,32*py(at)+16,33 : if dest>0
line 32*px(at)+16,32*py(at)+16,32*px(dest)+16,32*py(dest)+16 : endif : mx=mousex()/10 : my=mousey()/10 : if my>7 and my<27 : com=(my-6)/2 : if mx>41 and mx<50 : if mx<45 : TT=1 : endif : if mx>45 : TT=-1 : endif : endif : if tt<>0 : TP=25*price(at,com) : if mouseclick()=1 : w=150 : else : tt=0 : endif
endif : endif : if tt<>0 : if (ipc-(tp*tt))>=0 : if (cargo+(25*tt))<CargoMax : if (own(com)+(25*tt))>=0 : cargo=cargo+(25*tt) : ipc=ipc-(tp*tt) : own(com)=own(com)+(25*tt) : endif : endif : endif : endif : y=0 : for t=event to 1 step -1 : if age(t)<13 and y<19 : text 20,300+y*16,a$(t) : inc y : endif : next t : mx=mousex()/32
my=mousey()/32 : if mx<8 and my<8 : if galaxy(mx,my)>0 : if mouseclick()=1 : dest=galaxy(mx,my) : TravelTime=sqrt( (px(at)-px(dest))*(px(at)-px(dest)) + (py(at)-py(dest))*(py(at)-py(dest)) ) : endif : endif : endif : if dest>0 and dest<>at : paste image 99,700,4 : else : paste image 98,700,4 :endif : IF TURN>60 : paste image 95,700,4 : ENDIF : if ipc>=25000 and ug=0 : paste image 96,700,96 : endif : sync
if w>0 : wait w : endif : w=0 : if mx>21 and mx<24 : if my>2 and my<5 and ug=0 : if mouseclick()=1 : if ipc>=25000 : inc cargomax,25 : dec ipc,25000 : ug=1 : endif : endif : endif : if my<2 : if mouseclick()=1 : if dest>0 and dest<>at : HowLong=TravelTime : else : HowLong=1 : endif
EXIT : endif : endif : endif : loop : set text to bold : IF IPC<0 : if cargo>0 : CLS : center text 400,200,"You can't end your turn" : center text 400,220,"with negative credits." : center text 400,250,"Your Entire Inventory Has Been Automatically Sold." : sync : for t=1 to 10 : ipc=ipc+own(t)*price(at,t) : own(t)=0 : next t : cargo=0 : wait 3000 : HowLong=0 : else
turn=69 : endif : ENDIF : IF TURN>60 : ipc=ipc+((cargomax-501)*600) : for t=1 to 10 : ipc=ipc+own(t)*price(at,t) : next t : cls : a=ipc/125000 : if a<1 : a=1 : endif : if a>12 : a=12 : endif : center text 400,100,"GAME OVER" : center text 400,200,"Your total net worth is" : center text 400,220,str$(ipc) : center text 400,300,"Based on your performance," : center text 400,320,"in the future you will be"
center text 400,350,upper$(vc$(a)) : center text 400,440,"PRESS ANY KEY TO EXIT" : sync : WAIT KEY : END : ENDIF : for EndOfTurn=1 to HowLong : cls : center text 400,100,"Processing Turn # "+STR$(TURN) : center text 400,200,mo$(month)+", "+str$(year) : sync : wait 1000 : for p=1 to 10 : if rnd(100)<10 : x=rnd(57)+1 : inc Event : b$=n$(p)+", "+mo$(month)+" "+str$(day+rnd(22))+", "+str$(year)+". " : a$(event)=b$+e$(x) : for u=1 to 10 : effect(event,u)=( (rnd(9)+1) * (rnd(2)+1) * ee(x,u) )/6 : Duration(event)=(RND(8)+1)+turn
price(p,u)=price(p,u)+effect(event,u) : age(event)=1 : ex(event)=px(p) : ey(event)=py(p) : next u : endif : next p : for e=1 to event : c=Duration(e)-Turn : if c>0 : for p=1 to 10 : d=int(sqrt( (ex(e)-px(p))*(ex(e)-px(p)) + (ey(e)-py(p))*(ey(e)-py(p)) )) : if d<=age(e) : a#=(1.75/age(e)) * (2.5/(d+1)) : if a#>1.0 : a#=1.0 : endif : for u=1 to 10 : price(p,u)=price(p,u)+ ( effect(e,u)*a# ) : next u : endif
next p : endif : inc age(e) : next e : for t=1 to 10 : avg(t)=0 : next t : for t=1 to 10 : for u=1 to 10 : x=price(t,u)/10 : price(t,u)=price(t,u)+x-(rnd(2*x)) : if price(t,u)<51 : price(t,u)=abs(price(t,u))+rnd(50)+10 : endif : if price(t,u)>249 : price(t,u)=price(t,u)-rnd(75) : endif : avg(u)=avg(u)+price(t,u) : next u : next t : if month mod 4 =0
for t=1 to 10 : avg(t)=avg(t)/10 : next t : for t=1 to 10 : for u=1 to 10 : if price(t,u)<avg(u) : inc price(t,u),rnd(avg(t)/21) : else : dec price(t,u),rnd(avg(t)/21) : endif : next u : next t : endif : inc turn : day=rnd(5)+1 : inc Month : if month>12 : month=1 : inc year : endif : if dest>0
at=dest : endif : ug=0 : next EndOfTurn : ipc=ipc-(HowLong*(100+Cargo)) : TravelTime=0 : dest=0 : set text to normal : LOOP : end