; _ _ _ _ _ _ _ _ _ ;[_][_][_][_][_][_][_][_][_] ; ; The Land of SPUR ; ; (C)opyright 1987 ; Greg W. Davis ; and ; Peripherals Plus ; ; 08/02/87 13:13 ;___________________________ ; v3.0 ; Spur Inns Segment ; _ _ _ _ _ _ _ _ _ ;[_][_][_][_][_][_][_][_][_] public wizard public inn public smithy public healer ; ******************* ; * Wizard's Lair * ; ******************* wizard on nocar goto dropped if xs=10 goto wiz2b dy$=dx$+"spells" print \' Ye have enterd the Wizard`s Lair, a dis-embodied voice asks..... "Are you here to learn a spell"? '; input @0 i$:if i$<>"Y" print \"Return when you are ready.":goto linkgame wiz1c print \"Choose carefully your spells to learn." wiz2 input @2\"Learn which spell? (?=List): "i$ if i$="?" goto wiz1 if i$="" goto linkgame:else x=val(i$) if (x<1) or (x>sc) goto wiz2 open #1,dy$:position #1,40,x input #1,cb$\q$,q2$,q3,q4:close if cb$="*" print \"I do not know that spell.":goto wiz2 print \"You have chosen "q$" for "q4" gold" input @0\"Is this correct? "i$ if i$<>"Y" goto wiz2 g3=gh:g4=gl:g1=0:g2=q4:gosub chk.gold if a=0 print \"Ye do not have enough gold.":goto wiz2 wiz2b if xs=10 print' I am sorry but ye have already learned ten spells.'\:goto linkgame wiz3 print \"Teaching spell.."; for a=1 to 50 if not (a mod 5) print "."; next gosub sub.gold b=56:if pi<5 print \' Thy intelligence may hinder thee from learning this spell.'\:b=100 a=random(100):if (a>50) and (asc) or (key(1)) close:goto wiz2 goto wiz1a ; ***************************************** ; * Enter the Smithy's Shoppe * ; * Buy Weapon/Protection - Sell Weapon * ; ***************************************** smithy on nocar goto dropped print\' Ye have entered the Smithy`s Shoppe. Wouldst thou be interested in [P]rotection or [W]eapondry? '; input @2 i$ if i$="P" goto protect if i$="W" goto weapons0 print \"Then BEGONE!!":goto linkgame weapons0 dy$=dx$+"weapons":open #1,dy$ position #1,34,0:input #1,nw weapons print \"Speak "n1$"!" input @2\"Wouldst Thou [B]uy or [S]ell? "i$ if i$="B" goto buy.wep if i$="S" goto sel.wep print \"Then BEGONE!!":goto wp.exit ; ****************** ; * Buy a Weapon * ; ****************** buy.wep if xw<6 goto buy1 print \' I am sorry, but you have no room for more weapons. Do you wish to sell a weapon? ';:input @0 i$ if i$<>"Y" goto wp.exit goto sel.wep buy1 print \' Excellent! Choose Thee well!! From mine hands I have crafted this list of fine weapons!' buy2 input @2\"Your Choice (?=List): "i$ if i$="?" gosub wep.list:goto buy2 if i$="" goto weapons x=val(i$):if (x<1) or (x>wc) goto buy2 position #1,34,x input #1,cb$:if cb$<>"2" print \"Weapon not available for sale!":goto buy2 input #1,w$\s,d,v:w$=mid$(w$,3) print \"You chose "w$" for "v" gold"\ xa$=right$("000"+str$(x),3)+"," a=instr(xa$,xw$) if a print \' I see that you already possess this weapon. You may NOT buy another.':goto buy2 input @0"Correct? "i$:if i$<>"Y" goto buy2 g3=gh:g4=gl:g1=0:g2=v:gosub chk.gold if a=0 print \"Sorry to say, but you do not have"\"enough gold at hand":goto buy2 buy4 xw=xw+1:xw$=xw$+xa$ if x<=10 goto buy5 nw=nw-1 position #1,34,x:print #1,0 buy5 print \"DONE!" gosub sub.gold:g1=gh:g2=gl:gosub prt.gold:print \"You now have "gd$" in gold." if xw=6 print \"No more room for weapons!":goto buy.wep:else goto buy2 ; ******************* ; * Sell a Weapon * ; ******************* sel.wep wr$="":x=0:if xw=0 print \"No weapons.":goto weapons print \"Sell which weapon:"\\ for i=1 to xw:y=(i*4)-3:x=val(mid$(xw$,y)) position #1,34,x:input #1,cb$\w$:w$=mid$(w$,3) print i". "w$ next input @2\"Which : "i$:if i$="" goto weapons:else x=val(i$) if (x<1) or (x>xw) goto sel.wep y=(x*4)-3 x=val(mid$(xw$,y)) if nw=25 print \"My weapons inventory is full.":goto weapons position #1,34,x:input #1,cb$\w$\s,d,v if cb$="2" print \"I already have a "mid$(w$,3)".":goto weapons a=v/16:l=a*pi:if l=>v then l=a*14 if pi=0 then l=a print \"I will give you "l" gold for it."\ input @0 "Doest Thou accept MY offer? "i$ if i$<>"Y" goto weapons print \"Good!":g2=l:gosub add.gold xw=xw-1 if xw=0 then xw$="":goto wr.weap l=len(xw$) if y=1 then xw$=mid$(xw$,5):goto wr.weap if (y+4)>l then xw$=left$(xw$,y-1):goto wr.weap xw$=left$(xw$,y-1)+mid$(xw$,y+4) wr.weap nw=nw+1 position #1,34,x:print #1,"2" goto weapons ; *** List Weapons *** wep.list print \' The Weapons Master leads you to a table where his handcrafted weapons lay....'\ b=0:x=1:print w.list2 position #1,34,x input #1,cb$\w$\s,d,v setint(1) if cb$<>"2" goto w.list3 w$=mid$(w$,3) print right$(" "+str$(x),3)". "left$(w$+" ",20)" - "right$(" "+str$(v),4)" Gold" b=b+1 w.list3 x=x+1:if (b=nw) or (x>wc) return if (key(1)) return goto w.list2 wp.exit position #1,34,0 print #1,nw close:goto linkgame ; *********************** ; * Buy Armor/Shields * ; *********************** protect print \'The Smithy grins with pride and says: "Welcome, Adventurer!! Choose from this fine list of protection for your long journey!"'\ dy$=dx$+"items":open #1,dy$ x=1 pro1 position #1,30,x:input #1,cb$:if cb$="*" goto pro1a input #1,it$\it:it=it*100:it$=left$(mid$(it$,3)+" ",20) print right$(" "+str$(x),3)". "it$" - "right$(" "+str$(it),5)" Gold" pro1a x=x+1:if x>5 goto pro2 goto pro1 pro2 if xi=15 print \"You have no room in your pack!":close:goto linkgame input @2\"Your Choice (?=List): "i$:if i$="" close:goto linkgame if i$="?" then x=1:print:goto pro1 x=val(i$):if (x<1) or (x>5) goto pro2 position #1,30,x:input #1,cb$:if cb$="*" goto pro2 input #1,it$\it:it=it*100 g3=gh:g4=gl:g1=0:g2=it:gosub chk.gold:if a=0 print \"You do not have enough gold.":goto pro2 a$=mid$(it$,3) print \"You choose "a$" for "it" gold? ";:input @0 i$ if i$<>"Y" goto pro2 xa$=right$("000"+str$(x),3)+"," a=instr(xa$,xi$):if a print \"I see you already have "a$"."\"You may buy no more.":goto pro2 print \"Done!":g2=it:gosub sub.gold xi=xi+1:xi$=xi$+xa$:goto pro2 ; ******************** ; * General Stores * ; ******************** inn on nocar goto dropped print\' The Innkeeper greets you: "Hail and well met, mighty adventurer! Art Thou here for [R]est or to [B]uy food and drink for your journey? "';:input@0 i$ if i$="B" goto general if i$<>"R" goto linkgame print\' The Innkeeper says: "That will be 100 gold pieces for the room."' g3=gh:g4=gl:g1=0:g2=100:gosub chk.gold:if a=0 print \"You do not have enough gold.":goto linkgame print\'He collects his rent, and leads you to a room with a bed of straw. "Sleep well, mighty Adventurer!"' g2=100:gosub sub.gold a=random(15):hp=hp+a:ps=25 ex=ev:goto tim.chk0 general print\' The Innkeeper leads you to his stores.' if xf=10 print \"You have no room in your pack!":close:goto linkgame dy$=dx$+"stores":open #1,dy$ print \"Good!! What will you have today?" gen2 input @2\"Your Choice (?=List): "i$:if i$="" close:goto linkgame if i$="?" then x=1:print:goto gen1 x=val(i$):if (x<1) or (x>10) goto gen2 position #1,26,x:input #1,cb$:if cb$="*" goto gen2 input #1,gs$\gs g3=gh:g4=gl:g1=0:g2=gs:gosub chk.gold:if a=0 print \"You do not have enough gold.":goto gen2 a$=mid$(gs$,3) print \"You choose "a$" for "gs" gold? ";:input @0 i$ if i$<>"Y" goto gen2 xa$=right$("000"+str$(x),3)+"," a=instr(xa$,xf$):if a print \"I see you already have "a$"."\"You may buy no more.":goto gen2 print \"Done!":g2=gs:gosub sub.gold xf=xf+1:xf$=xf$+xa$:goto gen2 gen1 position #1,26,x:input #1,cb$:if cb$="*" goto gen1a input #1,gs$\gs:gs$=mid$(gs$,3) print right$(" "+str$(x),3)". "left$(gs$+" ",18)" - "right$(" "+str$(gs),5)" Gold" gen1a x=x+1:if x>10 goto gen2 goto gen1 ; ****************** ; * Healer's Den * ; ****************** healer on nocar goto dropped print \"You have entered the Healer's Den!"\ t=xp*25:if hp>t then hp=t t1=t-hp:if (t1<=0) then print \"You do not need my services...begone! I have work to do!": goto linkgame t=t1*25:print \"Step right this way...I see you need my help."\ print "I will heal all your wounds for "t" pieces of gold." input @2 "Do you agree? " i$: if (i$="N") goto heal.1a heal.1 g3=gh: g4=gl: g1=0: g2=t: gosub chk.gold: if (a<>0) then t2=t1: goto heal.2 heal.1b print \"Do not try my patience adventurer. You do not have enough gold to cover the" print "costs of the healing process." heal.1a input @2 \"Would you like me to bind your wounds instead? " i$ if (i$="N") goto heal.x print "How many hit points would you like to have restored [1-"t1; input @2 "]: " i$: t2=val(i$): if (t2<1) goto heal.x if (t2>t1) then print \"When was your last eye examination?": goto heal.1b g3=gh: g4=gl: g1=0: g2=t2*25: gosub chk.gold: if (a=0) goto heal.1b heal.2 hp=hp+t2: gosub sub.gold: setint(1) print \"Good! This will only take a minute..."\ print "The healer appears to go into a trance for a second and then reaches his" print "hands out to touch you. You feel the blood within your veins start to" print "pulse strongly within you. After awhile, the healer stops and your wounds" print "have been healed." heal.x setint(""): print \"The healer says, 'Come again soon!' as you leave." goto linkgame ; ********************** ; * Gold Subroutines * ; ********************** add.gold gl=gl+g2:if gl=>10000 then gl=gl-10000:gh=gh+1 return sub.gold if g2>gl then gl=gl+10000:gh=gh-1 gl=gl-g2:return put.gold bh=bh+g1 bl=bl+g2:if bl=>10000 then bl=bl-10000:bh=bh+1 if g2>gl then gl=gl+10000:gh=gh-1 gh=gh-g1:gl=gl-g2 return tak.gold if g2>bl then bl=bl+10000:bh=bh-1 bh=bh-g1:bl=bl-g2 gh=gh+g1 gl=gl+g2:if gl=>10000 then gl=gl-10000:gh=gh+1 return prt.gold a$=str$(g1):gd$="0000":if g1=0 then gd$=" ":a$=" " gd$=right$(" "+a$,5)+right$(gd$+str$(g2),4) return spl.gold gd$=right$("00000000"+gd$,9) g1=val(left$(gd$,5)):g2=val(right$(gd$,4)) return chk.gold a=0 if g3>g1 then a=1:return if (g3=g1) and (g4=>g2) then a=1:return return val.gold l=len(gd$) for i=1 to l:a=instr(mid$(gd$,i,1),"0123456789") if (not a) then i=l:next:return next:return ; ********************** ; * Time Subroutines * ; ********************** tim.chk ex=clock(1)-ew tim.chk0 if ex=>ev pop:goto linktime return linkgame di=99 dy$=dz$+"spur.main" link dy$,"travel3" linktime dy$=dz$+"spur.logon" link dy$,"quit1" dropped dy$=dz$+"spur.logon" link dy$,"quit3"