ShopkeeperKKKXShopkeeper by L.N. Langley from Sinclair User Aug.1985 yBe your own street- corner capitalist in Shopkeeper by L.N. Langley of Bury St Edmunds, Suffolk. The game runs on a 48K Spectrum or Spectrum Plus, and sets you the task of running a corner shop for a yearYou must choose from a large range of goods in stock, & take weather & holidays into account.Those factors can also affect your advertising strategies. Experienced programmersshould find it easy to alter theparameters for various products if they desire, and add extra random events and hazards with ease. A6:2:0:0:0:0:0: )0,11 ;1;"SHOPKEEPER" " You are a prospective shopkeeper. You have to set up your shop and try to run it for a year. You lose if you go bankrupt or if you take less than `100 in any week." @" When answering a question typein the answer in lower case." (" When ordering, select the itemby typing in the character indicated in the far left-hand column. Then follow the instructions and enter the amount of the item you wish to order." 2" Remember to take the weather and the time of year into account when ordering. Certain things sell well at certain times. Others sell according to the weather. Some don't sell!" <,#1;1,10 ;"PRESS ANY KEY" F 0 Pz:" Also remember to take the timeof the year and the weather intoaccount when choosing your advertised products." d,#1;1,10 ;"PRESS ANY KEY" i 0: m*******YOUR CASH******* nz"You have decided to run a shop. You will operate it for one yearand try to make a profit in a very tough business."'' o 500 xcash=200+(*801!) ^"You have dug out all your life savings for this business venture. You have `";cash'' 400 dcash<400a$="You had better work hard or elseyou will go bankrupt with such little money." Pcash>400a$="This is a fair amount of money to set up your shop with." Tcash>800 a$="Well done! You must have saved well to have this much money." a$'' 250 E"Now is the time to decide whether you want a loan or not."'' !"Do you want a loan? (y/n) ";l$ l$="n"l$="N"400 l$"y"l$"Y"176 *******GET LOAN******** "In your town there are 2 banks. One is Barclay's. The other is Lloyd's. Lloyd's charges less interest on loans but have a surcharge of `50 on every loan. Barclay's does not."'' 9"Which bank would you like to geta loan from? (b/l)";b$ !loan=1500+(*1001) -interest=(502+(*110n))/10 b$="L"b$="l"300, b$"B"b$"b"190 4"You have decided to visit Barclay's bank"'' 200 8payments=(loan*(interest/100d+1)/13 ) :"The bank manager decides to giveyou a loan of `";loan''  250 +"The rate of interest is ";interest;"%"''  250 C"Every 4 weeks you will have to pay a repayment of `";payments''  300, " 390 ,2"You have decided to visit Lloyd's bank"'' - 250 6interest=interest-2 @8payments=(loan*(interest/100d+1)/13 ) J9"To get a loan off Lloyd's bank you have to pay `50"'' K 300, Tcash=cash-502 ^$"This means you now have `";cash'' _ 250 hC"The Lloyd's bank manager wishes you luck and loans you `";loan'' i 500 r+"The rate of interest is ";interest;"%"'' s 250 |C"Every 4 weeks you will have to pay a repayment of `";payments'' } 400 cash=cash+loan Q"You now have all the money you will get to run your shop. You have `";cash''  400 *********GET SHOP****** N"It is possible to rent some premises or to buy a shop yourself"''  350^ ("Do you want to rent or buy?(r/b) ";s$ Ra$="Shop 1 is small and is cheap to rent or buy. It is down a narrowminor road." nb$="Shop 2 is a very large store. Ithas a reasonable rent or price. It is down an old disused side street." tc$="Shop 3 is a reasonably sized store. It has a very high rent or price. It is on the corner ofa crossroads." s$="r"s$="R"590N s$"b"s$"B"420 2"Which one of these sites do you wish to buy?"''  250 (a=(*100d+450):a$'"`";a''  750 (b=(*210+550&):b$'"`";b''  750 (c=(*400+700):c$'"`";c''  750 W"Shop number? ";s:s1s2s3520:Check added [JimG] Ws=1cash=cash-a:"You have paid `";a;" for the smallest shop."'':250 Vs=2cash=cash-b:"You have paid `";b;" for the largest shop."'':250 &Us=3cash=cash-c:"You have a well placed shop at aprice of `";c'':250 01"After paying for your shop you have `";cash'' 1 250 :F"You are given the keys to your new shop and are pleased with it"'' ; 300, D 690 NO"Which one of these premises would you like to rent? (prices per week)"'' O 300, X%a=(*4+10 ):a$'"`";a'' Y 500 b%b=(*6+12 ):b$'"`";b'' c 500 l%c=(*8+15):c$'"`";c'' m 500 vW"Shop number? ";s:s1s2s3630v:Check added [JimG] >s=1rent=a:"You rent the smallest shop"'':250 >s=2rent=b:"You rent the largest store"'':250 As=3rent=c:"You rent the well placed shop"'':250 B"The amount of rent you pay per week for your shop is `";rent''  250 `"After having been given the keysto the shop and visited it, you believe you have a bargain"''  500 *****BUY EQUIPMENT***** till=(*30+502)  shelves=(*20+40() counter=(*5+20) %"You have to buy a till @ `";till''  200 /"You have to buy some shelves @ `";shelves''  250 +"You have to buy a counter @ `";counter''  250  cash=cash-counter-shelves-till 1"After buying these things you have `";cash''  250 *****GET INSURANCE***** *insurance=(*5+10 )*10  "An insurance company sees that you are setting up a shop and offer you insurance against major theft and fire. The cost is `";insurance''  750 &"Do you accept the offer? (y/n) ";i$  (i$="y"cash=cash-insurance:830> *i$="n"840H 4 790 >5"After paying for the insurance you have `";cash'' ? 300, H8"You are now ready to start running your store"'' I 300, M 1 R \z$(34",10 ) ff=134" pz$(f) zf A"alcohol","tobacco","chocolate","ice creams","lollies","sweets" w"beef","pork","lamb","poultry","tin veg","fresh veg","fruits","cereals","milk","bread","biscuits","squash","lemonade" B"washpowder","washliquid","soap","shampoo","tissues","loo rolls" V"newspapers","pens","paper","cards","plants","toys","polish","raincoats","umbrellas"  z(34")  p(34") *********************** $f=134" .p(f):p(f)=p(f)/100d 8f B639',41),17,22,10 ,5 Lx129,99c,132,89Y,21,23,13 ,41),20,31,25,19,15 V7100d,568,29,39',22,9 `S15,5,3,12 ,25,150,99c,210,126~ j tw=1524 ~10 ;2;"WEEK ";w Bw=16w=17"Easter is arriving within 2 weeks"'' 6w>28w<37%"It is the school holidays"'' :w<524w>46."Christmas is approaching fast"''  250 Zw<5"It is very cold weather and it is snowing fast"'':rain=1:1250 sw>20w<30w26"It is hot sticky weather in yourarea.It is the height of summer"'':1250 s<.2~L"What a week. It is raining cats and dogs and everywhere is flooded"'':rain=1:1250 <>.73333"This week is good fine weather"'':1250 M"This week is just an ordinary week with average British weather"'' rain=0 ***********************  300, m"It is time for you to fill this week's order in.Just type in theamount of each product that you require"''  750  Fy$="Input the letter of any item youneed & then follow instructions" y$ +3,9 ;1;"CONFECTIONARY"  aaa=1  bbb=6  5000 :y$  (3,11 ;1;"GROCERIES"  aaa=7 bbb=19  5000 #:y$ ()3,11 ;1;"TOILETRIES" -aaa=20 2bbb=25 7 5000 <:y$ A+3,9 ;1;"MISCELLANEOUS" Faaa=26 Kbbb=34" L 5000 M P,"Your order is now finished"'':1380d Q 250 Z:"You are out of money in your account to order any more goods so you will have to do without any more things that you intended to order"'' [ 500 _*********************** dX"You have room outside your shop to do an advertising display for2 of your products"'' e 350^ n"1st advertised product "'j$ xc$=" " j$=j$+c$(10 -j$) f=134" j$=z$(f)1460 f  1390n "2nd advertised product "'k$ k$=k$+c$(10 -k$) f=134" k$=z$(f)1520 f  1460  4: *********************** "Please wait while I work out howmuch of each of your products were sold this week and how muchmoney you made from their sales"''  500 takings=0  62;7'"ITEM PRICE NO.SOLD RECEIPTS" f=134" f<7t=(*25) "'f>6f<11 t=(*10 ) ,(f>10 f<20t=(*30) 6(f>19f<26t=(*24) @f>25t=(*12 ) Ef>32 t=(*20) J%z(f)=0t=0:1735 Y z$(f)=j$z$(f)=k$t=t*2 ^t>z(f)t=z(f) h?w=16w=17f=3f=29t=(t*2.5 ) rNw>28w<37%f=6f=19f=4f=5t=t*2 |$w<5f=24t=t*2 Ow>20w<30w26f=4f=5f=18t=t*2 Jf<35#f>32 t=t*(3rain=1)*(0rain=0) [w<524w>46.f=1f=10 f=13 f=29f=31t=t*3 s=3t=t+10 s=1t=t+5  t=t*3 t>z(f)t=z(f) P(f=23f=22f=32 f=12 f=30)ƥ<.9fffft=0 7(f=4f=5)w>8w<44,t=0 #psale=(p(f)*115s)/100d receipts=psale*t takings=takings+receipts  z(f)=z(f)-t 6z$(f);11 ;psale;19;t;24;receipts f #'"This week you took `";takings''  200 cash=cash+takings $"This means you now have `";cash''  200  1: *********************** takings<100d6000p *"You now take out your wages of `100"'' cash=cash-100d 1"After taking out your wages you have `";cash''  200 !*********************** &s$="b"1870N 0U"You have to pay the rent for your premises for this week which is `";rent'' 1 350^ :cash=cash-rent ?cash<03040 D,"After paying your rent you have `";cash'' E 200 I*********************** Nl$="n"1930 X$w/4=(w/4)1900l b 1930 lX"It is the end of the month and you must pay a repayment of yourloan of `";payments'' m 200 vcash=cash-payments 5"After paying the loan repayment you have `";cash''  200 *********************** >.2~L26102 disaster=(*6) disaster=52490 disaster=42410j disaster=32370B disaster=22240 disaster=121004 *********************** Ф"A crafty sales representative brings some childrens toys into your shop. He says you can buy them for 50p each and sell them at an enormous profit of `1.50"'' "Do you buy any? (y/n) ";d$ 9d$="n""You refuse his offer"'':150:2950 d$"y"2010 $"How many do you want to buy? ";nu &"You buy ";nu;" of the rep's toys"''  150  e"All of the toys turn out to be dangerous so you cannot possiblysell them. You lose `";.5*nu  400 cash=cash-.5*nu  8"As a result of your rash act younow have only `";cash ! 200 * 2950 /*********************** 4n"A fire rages overnight in your store. The firemen save the building but all of your goods are lost"'' 5 500 >i$="n"2200 HGi$="y""You were a wise person in takingthe insurance man's offer"'' I 200 Rcover=0 \f=134" fcover=cover+z(f)*p(f) pf z z(34") S"The insurance firm pays for all the damages. You get `";cover'':cash=cash+cover  200  2950 Y"You had no insurance cover and so you lost all your goods and get no compensation"''  300,  z(34")  2950 *********************** P"During the night a bunch of organised criminals steal all ofyour goods"''  300, i$="n"2340$ D"You were a clever person to invest in some insurance cover"''  200 cover=0 f=134" cover=cover+z(f)*p(f) f  z(34") S"The insurance firm pays for all your losses. You get `";cover'':cash=cash+cover  250  2950 $9"You had no insurance cover and get no compensation"'' % 200 . z(34") 8 2950 =*********************** BC"Some children take a fancy to your sweets and steal the lot"'' C 200 L1"You lose sweets worth `";p(6)*z(6) M 150 Vz(6)=0 ` 2950 e*********************** j@"Animal rights protestors poison all your meat in your shop"'' k 250 tlosses=0 ~f=710 losses=losses+p(f)*z(f) z(f)=0 f !"As a result you lose `";losses 150 2950 *********************** N"A power cut means that all your frozen and refrifgerated food goes bad"'' 300, losses=0 f=710 losses=losses+p(f)*z(f) z(f)=0 f Slosses=losses+z(4)*p(4)+z(5)*p(5)+z(12 )*p(12 ) z(12 )=0 z(4)=0 z(5)=0 8"The goods that you lost were valued at `";losses''  200 ( 2950 -*********************** 2>.1}L2950 <lucky=(*6) Flucky=52710 Plucky=42740 Zlucky=32770 dlucky=22810 nlucky=12880@ s*********************** xj"Well done! You have won an awardfor running the tidiest shop in your area. You get a prize of `100"'' y 350^ cash=cash+100d 2950 *********************** X"One day this week a nearby rivalshop closed down so you had a `50 boost in sales"'' 300, cash=cash+502 2950 *********************** 4"Lucky you has won `75 on the football pools"'' 150 cash=cash+75K 2950 cheque=(*10 )*10 $"You find a cheque for `";cheque'' 150 cash=cash+cheque 2950 *********************** w"A customer complains that one ofyour products that she bought isfaulty. Do you give her a new one or not? (y/n)"''  "(y/n) ";n$ n$="n"28706 n$"y"2820 "Q"You win a prize for being the most polite shopkeeper about. You get `90"'' # 500 ,cash=cash+90Z 6 2950 ;*********************** @q"A polite representative comes into your shop and offers you a new product. Do you buy any? Thecost is 20p"'' A 500 J"How many do you want? ";nx Tnx=02950 ^#"You buy ";nx;" of them at 20p"'' _ 100d hcash=cash-.2~L*nx rJ"The product sells like anything and makes you a profit of ";nx*.5 s 250 |cash=cash+nx*.5  *********************** $"This is the end of the week ";w'' 100d *"At the end of this week you have`";cash 150  "cash=(cash*100d)/100d cash<03040 w ="At the end of the year you have made a profit of `";cash'' 200 )"Well done for staying out of thered"''  ^:"Because you owe money you are forced to liquidate your business after week ";w'' till=(*till) counter=(*counter) shelves=(*shelves) g$="You sell your " g$;"till at `";till g$;"counter at `";counter g$;"shelves at `";shelves !' # cash=cash+shelves+till+counter &""You now have a loss of `";cash 00s$="buy"cash=cash+(*500):3130: 5 3170b :,"After selling your shop you have`";cash'' D{cash<0"You still have a loss and so I suggest you take a long rest before trying to pay off your debts"'': N_"You now have some cash but the bank demands that you give it tothem to pay off your loan"'' X be"You have lost everything and nowyou are out on the streets without a penny in your pockets"''  1;1;5,2;"ITEM";5,11 ;2;"STOCK";5,17;0;"NO.";5,21;3;"PRICE";5,27;1;"COST`"  f=aaabbb 9f+7-aaa,0;(f+64@);" ";z$(f);" ";z(f) f @"Select what you need and press the key or 0 to quit ";v$  v$="0" v=v$-64@ vbbb5040 v+7-aaa,21;p(v) 8("How many ";z$(v);" do you wish"'"to order? ");amount amount<05080 z500-z(v)-amount<1#1;"You have not enough room on the shelves for that amount":200:5080 Dv+7-aaa,17;amount;v+7-aaa,13 ;amount+z(v) cost=p(v)*amount cost>cash1370Z v+7-aaa,26;cost  cash=cash-cost z(v)=z(v)+amount )#1;"You have `";cash;" cash left"  100d ( 5040 p"You cannot proceed to run your shop because you have not made enough money this week to pay your own wages. Consequently youhave died of hunger as you couldnot buy your own food."