-+-+-+-+-+-+-+-+ START OF PART 13 -+-+-+-+-+-+-+-+ X for i=1 to ntships X b$=space$(20) X if s(i)::soldhere=0 and super_user_mode%=0 then iterate end if X a1$=str$(s(i)::neg_cost) X a2$=str$(s(i)::menergy) X a3$=str$(s(i)::mcargo) X select s(i)::slaser X`09 case 0 X`09 a4$="None" X`09 case 1 X`09 a4$="Pulse" X`09 case 2 X`09 a4$="Beam" X`09 case 3 X`09 a4$="Mil." X`09 case 4 X`09 a4$="Excmr" X`09 case 5 X`09 a4$="X-ray" X`09 case else X`09 a4$="Mega" X end select X a5$=str$(s(i)::mmissile) X a$=str$(i)+space$(3-len(str$(i)))+left$(s(i)::sname,36)+ a1$ + & X`09 space$(8-len(a1$)) + & X`09 a2$+space$(8-len(a2$))+a3$+space$(8-len(a3$))+a4$+ & X`09 space$(8-len(a4$))+a5$+space$(8-len(a5$)) X call display(24,a$) X next i X Xselect_ship: X a$="Ship to purchase> "\call display(1,a$)\b=val(a$) X if b<0 or b>ntships then goto select_ship end if X if b=0 and pr::energy<>0 then return end if X if super_user_mode%=1 then X pr::credits=10000000 X goto 6081 X end if X if b=0 and pr::shiptype=0 then`20 X`09call display(23,"Are you planning on trading in a bathtub or what?!?") X`09goto select_ship X end if X if s(b)::soldhere=0 then X`09call display(33,"Not Available here.") X`09goto select_ship X end if X X if (s(b)::temperature = -1) then X temp% = (100 - s(b)::resale) ! starting temp = % below can accept X if tradein%=0 then temp% = int(temp%/10) end if X else X temp% = s(b)::temperature X end if X interested% = 1 X while (interested% > 0) X cost% = s(b)::neg_cost - oldevalue% - tradein% X call display(23, "List price : "+str$(s(b)::neg_cost)) X call display(23, "Your cost : "+str$(cost%)) X a$="Your Offer> (0 to abort) " X call display(1,a$) X if (integerp(a$) = TRUE) then X offer=val(a$) X else X`09 offer=0 X end if X if s(b)::cost = 0 then s(b)::cost = -1 end if X real_offer = offer+oldevalue%+tradein% X if offer=0 then`20 X interested%=0`20 X else`20 X if (abs (( s(b)::neg_cost - real_offer) & X`09`09 /s(b)::neg_cost)*100) > ((rnd*0.3*temp%)+ (0.1*temp%)) then X`09 call display(23,"That offer is so low you CAN'T be interested.") X temp% = temp% * 0.5`20 X else`20 X if (real_offer /s(b)::neg_cost > & X`09 (s(b)::neg_cost -s(b)::neg_cost*(temp%/(10000.0+ & X`09 int(3000*rnd))))/s(b)::neg_cost) then X`09 a$ = "The ship is yours at " + str$(offer) + " credits." X call display(23,a$) X a$ = "Buy it? (y/n)" X call display(1, a$) X if ((a$ = "y") or (a$ = "Y")) then X interested% = -1 X end if X temp% = temp% * 0.7 X s(b)::neg_cost = offer+oldevalue%+tradein% X else X s(b)::neg_cost = int(s(b)::neg_cost - (s(b)::neg_cost - & X`09`09`09real_offer)*temp% *(rnd*.8+.2)/ (1+temp%)) X a$ = "You can have the ship for " + str$(s(b)::neg_cost - & X`09`09`09oldevalue% - tradein%)+"." X call display(23,a$) X a$ = "Buy it? (y/n)" X call display(1, a$) X if ((a$ = "y") or (a$ = "Y")) then X interested% = -1`20 X`09 end if X temp% = temp% * (0.4 + rnd*0.3) X end if X end if X end if X next X cost% = s(b)::neg_cost - oldevalue% - tradein% X s(b)::temperature = temp% X X if pr::shiptype=0 and interested%=0 then`20 X`09call display(23,"Are you planning on trading in a bathtub or what?!?") X`09goto select_ship X end if X if interested%=0 then`20 X return X end if X if pr::totcargo>s(b)::mcargo and pr::energy=0 then`20 X`09pr::totcargo=s(b)::mcargo\pr::cargo(10)=pr::totcargo X`09call display(33,"Excess gold dumped.") X end if X if pr::totcargo>s(b)::mcargo then`20 X a$="You'll have to sell some cargo first - there isn't room for"& X`09+" it all." X call display(23,a$) X return X end if X if s(pr::shiptype)::slaser>1 and pr::equip(1)=1 and rnd>.6 then`20 X`09call display(23,"Trying to pull a fast one huh! Forget it." ) X`09c=int(3000*rnd+500) X`09a$="Surcharge for damage: "+str$(c)+"." X`09call display(23,a$) X`09pr::ban=TRUE X if pr::credits-c>0 then`20 X`09 pr::credits=pr::credits-c`20 X`09else`20 X`09 call display(23,"Kicked out!") X`09 return X end if X end if X if (pr::credits-cost%)<0 then X call display(33,"You don't have enough credits.") X goto select_ship X end if X6081 for i=1 to ntequip\pr::equip(i)=0\next i X call display(23,"") X a$="You buy a used "+edit$(s(b)::sname,128%)+"." X call display(23,a$) X if pr::fuel>s(b)::mfuel then pr::fuel=s(b)::mfuel end if X s(b)::soldhere=0 X if pr::energy=0 then pr::fuel=s(b)::mfuel end if X pr::time_owned = 1 X pr::energy=s(b)::menergy\pr::maxenergy=pr::energy X pr::equip(13)=s(b)::mmissile-1 X pr::equip(s(b)::slaser*2-1)=1\pr::maxmissile=s(b)::mmissile X pr::maxcargo=s(b)::mcargo X pr::credits=pr::credits-cost% X call display(3,) X pr::lsj = 0\pr::cloak=0 X ecm_status%=0`09`09`09 ! ecm (if present) is off X pr::chan1=1 X pr::chan2=2 X pr::legal=1 X pr::shiptype=b X pr::scanrange=3 X pr::maxfuel=s(b)::mfuel\pr::speed=s(b)::mdrive X gosub 1700 X return X X`20 X7800 ! -------------------- Initial Display --------------------- X call display(19,)`09! set up big window X call display(28,"GALACTIC TRADER") X call display(8,"") X call display(8,"") X call display(8," v. 4.55") X call display(8,"") X call display(8," Written by: Stephan Meier") X call display(8,"") X call display(8," Cornell University") X call display(8,"") X call display(8," Playtested by:") X call display(8,"") X call display(8," Elias Michaelides, Cam Haugen, Ben Lee V,") X call display(8," Mike Ahn, Hyung Paek, Sunil William Savk Var") X call display(8,"") X call display(8," (c) Copyright 1989 by Stephan Meier. All rights r Veserved.") X X p$="Enter your name, Commander> " X call display(1,p$) X pr::personalname=p$ X call display(9,) `09! erase input X`20 X7900 ! ------------------------------------------------------------ X ! Introductory Blurb X ! ------------------------------------------------------------ X call display(7,)`09`09! clear big window X X a$= " --------- CONGRATULATIONS COMMANDER "+edit$(pr::personalname, & X`09`09128%)+" ----------" X call display(8,a$) X call display(8,"") X a$= "The democratic government of "+edit$(name$(pr::planet),128)+ & X`09" is pleased to inform you" X call display(8,a$) X a$="That your request for a Trading Permit has been approved. " & X`09+"You are one of " X call display(8,a$) X a$="a select few who will have the opportunity to reap the profits" & X`09 +" and fame" X call display(8,a$) X a$= "associated with the successful trader. Please note that your "& X`09+"Trading Permit" X call display(8,a$) X a$= "may be revoked at any time for conduct in violation of the Code"& X`09+" of Statutes." X call display(8,a$) X a$= "The following is a noncomprehensive list of offences punishable"& X`09+" by the above: " X call display(8,a$) X call display(8,"") X call display(8," - Use of Anti-matter weapons against Federation ships V.") X call display(8," - Excessive overdue taxes.") X call display(8," - Violation of the spirit of Free and Fair Trade.") X call display(8,"") X a$="You have managed to amass the 200,000 credits necessary to" & X`09+" purchase" X call display(8,a$) X a$="get a used Cobra class Trader at list price." X call display(8,a$) X a$= "On behalf of the government of "+ & X`09edit$(name$(pr::planet),128)+" we wish you a profitable" X call display(8,a$) X call display(8,"and rewarding career.") X call display(17,) X return X X7980 ! ------------------ Delete Dead ship ---------------------- X free #1%\free #2%\free #3% X oldplanet=pr::planet\gosub delete_player_from_action X find #2%, key #0% eq pr::username, wait 60%\delete #2%\free #2% X X8000 ! -------------------- Game Over -------------------------- X if quit=0 then X m$="ARGG!! She's breaking up... I can't hold her..." X chan=0 X gosub broadcast_message X call display(21,"") X call display(21,"") X call display(21,"Captain, we're breakin' up...ARGH!!!!") X end if X call display(17,)\scanner_on=0 X call display(9,)`09! clear io X call display(7,) ! clear big window X call display(19,) ! fetch big window X if quit=0 or quit=2 then X call display(8,"") X call display(8,"") X a$=" REST IN PEACE COMMANDER "+edit$(pr::personalname,128%) X call display(8,a$) X end if X call display(8,"") X call display(8,"") X call display(8,"") X call display(8," Ships Destroyed: "+str$(pr::kills)) X call display(8,"") X call display(8," Final Score: "+str$(pr::score)) X call display(8,"") X call display(8," Final Rank: "+rank$(pr::rank)) X call display(8,"") X wealth=pr::credits-pr::debt+s(pr::shiptype)::cost X call display(8," Final Assets: "+str$(wealth)) X call display(8,"") X call display(8,"") X free #1%\free #2%\free #3% X if done<>1 then X oldplanet=pr::planet\gosub delete_player_from_action X find #2%, key #0% eq pr::username, wait 60%\delete #2%\free #2% X end if X menumode$="dead" X `20 X8050 ! -------------- Update Hall of Fame -------------------- X close #4% X open "gal_disk:gal-scores.dat" as file #4%, organization indexed fixed, V & X allow modify, access modify, primary key dummy, & X map scoremap X when error in X restore #4% X get #4%, wait 60 X use X put #4% X end when X p=11 X for i=10 to 1 step -1 X if pr::score>sc(i)::score then p=i end if X next i X if p=11 then X select pr::rank X case 1 X a$="You SUCK big time! Play again rookie" X case 2 X a$="Pretty USELESS peformance!" X case 3 X a$="Not bad - but not good either - just another average trader." X case 4 X a$="Acceptable - but plenty of room for improvement." X case 5 X a$="Good fighting! You had the Thargoids scared for a moment." X case else X a$="Excellent! Too bad others were better..." X end select X call display(8,a$) X else X for i=9 to p step -1 X sc(i+1)=sc(i) X next i X sc(p)::sname=pr::personalname X sc(p)::rank=rank$(pr::rank) X sc(p)::score=pr::score X sc(p)::money=wealth X sc(p)::ships=pr::kills X if p=1 then X if pr::energy>0 then X a$="WOW... A true master Trader!!" X`09 call display(8,a$) X a$="A boring life of gardening and cooking awaits you now..." X`09 call display(8,a$) X else X call display(8,"") X a$="Quite Impressive... But don't go thinking you're master of" V & X +" the universe" X`09 call display(8,a$) X a$="as you're DEAD. Still, even death is a small price to pay" V & X +" for 1st place on" X`09 call display(8,a$) X a$= "the Galactic Hall of Fame." X`09 call display(8,a$) X end if X else X a$="Not bad... you ranked "+str$(p)+" out of 10 on the Galactic Hal Vl"& X +" of Fame." X`09 call display(8,a$) X end if X end if X update #4%\free #4% X8300 ! a$= hall of fame X call display(17,) X call display(7,) X call display(8,"") X call display(8,"") X call display(8,"") X a$=" *********************************************************" X call display(8,a$) X a$=" * GALACTIC TRADER HALL OF FAME *" X call display(8,a$) X a$=" *********************************************************" X call display(8,a$) X call display(8,"") X a$="Commander Score Rank Kills Assets" X call display(8,a$) X a$="-----------------------------------------------------------" X call display(8,a$) X for i=1 to 10 X a1$=str$(sc(i)::score) X a2$=str$(sc(i)::ships) X if len(edit$(sc(i)::sname,132)) <> 0 then X a$=sc(i)::sname+space$(5)+a1$+space$(12-len(a1$))+ & X sc(i)::rank+" "+a2$+space$(12-len(a2$))+str$(sc(i)::money) X call display(8,a$) X end if X next i X close #4% X call display(8,"") X X ! --------------------- Program Data --------------------- X9000 data"Company/Corporation.","Participating Democracy.", & X "Representative Democracy.","Impersonal Bureaucracy", & X "Communist State","Feudal Technocracy","Religious Dictatorship" X data"Balkanization","No Government Structure","Total Anarchy" X data "No prohibitions","Explosives prohibited", & X "Energy weapons prohibited","Military weapons prohibited", & X "Light assault weapons prohibited", & X "Concealable weapons prohibited", & X "All firearms prohibited" X data"Shotguns prohibited","Long bladed weapons controlled", & X "Lethal weapons outlawed","All weapons outlawed" X data"Agricultural","Non-Agricultural","Industrial","Non-Industrial", & X "Rich","Poor","Water World","Desert World","Vacuum World", & X "Asteroid Belt","Ice-capped","Subsector Capital" X data"Stone Age","Bronze Age","Middle Age","Pre Industrial", & X "Early Industrial (Steam Age)","Middle Industrial", & X "Nuclear Age","Computer Age","Space Age","Galactic Age" X data"War Zone","Independent","Unclassified","Alien","Federation", & X "Federation","Federation","Federation","Federation" +-+-+-+-+-+-+-+- END OF PART 13 +-+-+-+-+-+-+-+-