; _ _ _ _ _ _ _ _ _ ;[_][_][_][_][_][_][_][_][_] ; ; The Land of SPUR ; ; (C)opyright 1987 ; Greg W. Davis ; and ; Peripherals Plus ; ; 06/15/88 23:52 ;___________________________ ; v3.0 ; Spur Main ; Game Segment ; _ _ _ _ _ _ _ _ _ ;[_][_][_][_][_][_][_][_][_] public travel3 public flee2 ; ******************** ; * Adventure Menu * ; ******************** advent on nocar goto dropped if ep>300 xp=xp+1:ep=ep-300:gosub lvl.msg gosub tim.chk:if (ev-ex)<120 print \"Dusk approaches..."\ if (pe=0) and (ps=0) print \' Ye have deprived thyself of nourishment for too long. Ye have died of starvation!!'\:xn=sn:sn=0:goto linkdead if (pe<6) and (ps<6) print \' Thy strength is failing. Ye are approaching starvation.'\ if mw gosub m.attack:if pt<8 zz$=rnd$:a=random(10):if a<5 gosub m.attack advent2 di=0 if bd gosub scn.dsp2 if i print "You see "it$:else it$="" if wp print "You see "wp$:else wp$="" if fd print "You see "fd$:else fd$="" if md print \"You see a dead "m$\ print \lo$ if dc$="" dc$="?" print "Return="dc$ print "["hp"] Your Command: ";:input @2 i$ gosub button.events if i$="" i$=dc$ if (i$="#") and (info(5)) print \"Room #:"cr:goto advent2 if i$="EXAMINE" print \"Examine what?":goto advent if i$="GET" print \"Get what?":goto advent if instr("EXAMINE",i$) dc$=i$:gosub examine:goto advent if instr("DROP",i$) dc$=i$:goto drop if instr("CAST",i$) dc$=i$:di=0:goto link.sub if instr("GET",i$) dc$=i$:goto get if instr("READY",i$) dc$=i$:goto link.sub if instr("ATT",i$) dc$="ATTACK":goto p.attack if instr("STAT",i$) dc$="STATUS":dy$=dz$+"spur.sub":link dy$,"show1" if instr("INV",i$) dc$="INVENTORY":dy$=dz$+"spur.sub":link dy$,"show0" if (instr("NORTH",i$)) or (i$="N") di=1:dc$="NORTH":goto travel if (instr("SOUTH",i$)) or (i$="S") di=2:dc$="SOUTH":goto travel if (instr("EAST",i$)) or (i$="E") di=3:dc$="EAST":goto travel if (instr("WEST",i$)) or (i$="W") di=4:dc$="WEST":goto travel if (instr("UP",i$)) or (i$="U") di=5:dc$="UP":goto travel if (instr("DOWN",i$)) or (i$="D") di=6:dc$="DOWN":goto travel if instr("DRINK",i$) dc$="":goto link.sub if (instr("IN",i$)) or (i$="I") di=7:dc$="IN":goto travel if (instr("OUT",i$)) or (i$="O") di=8:dc$="OUT":goto travel if instr("WEAR",i$) dc$="":goto link.sub if instr("USE",i$) dc$="":goto link.sub if instr("PRAY",i$) dc$="PRAY":goto link.sub if instr("EAT",i$) dc$="":goto link.sub if instr("READ",i$) dc$=i$:goto rd.book if instr("DUEL",i$) di=0:goto lnk.duel if i$="?" goto menu if i$="HELP" setint(1):dy$=dx$+"spur.help":open #1,dy$:copy #1,#0:setint(""):close:goto advent if (i$="Q") or (i$="QUIT") goto cnf.quit if i$="LOOK" gosub rd.room2:dc$="LOOK":goto advent if i$="FLEE" goto flee if (i$="*") and ((info(5)) or (un=dm)) di=0:dy$=ds$+"spur.sysop":link dy$ print \"Illegal command"\:goto advent menu lt$=left$(" ",((37-len(g$))/2)) rt$=left$(" ",(37-(len(lt$)+len(g$)))) setint(1):print \s$\' [-------------------------------------]' print"(";lt$;g$;rt$")" print'(------------- Game Menu -------------) [ Ye May Employ these Commands ] ======================================= [ DROP - an item READY - a weapon ] ( GET - an item ATTACK - a monster ) ( CAST - a spell LOOK - at a room ) ( EAT - food DRINK - water/wine ) ( USE - item WEAR - armor ) ( READ - a book DUEL - a player ) ( STAT - Status INV - Inventory ) ( EXAMINE - Examine an object ) ( FLEE - random exit ) [ PRAY - Pray to your Deity ] ======================================= [ Ye may travel: ] ( [N]ORTH [S]OUTH [E]AST [W]EST ) [ [I]n [O]ut [U]p [D]own ] ======================================= [ HELP - Help w/game QUIT - Quit/Save ] ------------------------------------- ':setint(""):print "Press [RETURN] ";:get i$:if i$=chr$(13) print " "; print chr$(8,16);chr$(32,16);chr$(8,16):goto advent ; ***************** ; * Random Move * ; ***************** flee if instr("LABYRINTH",lo$) print\"Ye may not Flee the "lo$"!":goto advent if pe<1 print \"Not enough energy...":goto advent if ep>2 ep=ep-2 if pe<3 pe=0:else pe=pe-3 if pw>0 pw=pw-1 if pi<6 print \' Your lack of intelligence has made it impossible for you to flee!':goto advent flee2 zz$=rnd$:cr=random(nr):if cr=0 goto flee2 goto travel1 ; ******************* ; * Button Events * ; ******************* button.events if peek(-16287)>127 goto bevent.1 if peek(-16286)>127 goto bevent.2 return bevent.1 m=random(mc):m=m+(m=0):gosub rd.mons:mf=1:mw=1:md=0:pop:goto travel2a bevent.2 print \"Oh NO! A nymph!! You turn to flee, but her gaze catches your eye and" print "you stop dead in your tracks. She starts to seduce you..."\ if xw print "...she takes your weapon from your hand..." if sh print "...she relieves you of your shield..." if ar print "...she removes your armor..." print "...she passes her hand over your eyes and everything goes dark..." print\\"You awake feeling very tired....." sh=0:ar=0:hs=0:ra=0:pe=pe/2:ps=ps/2 if (xw=0) goto evnt2.x zz$=rnd$:x=random(xw):if x=0 x=1 dy$=dx$+"weapons":open #1,dy$:gosub drp.wpn evnt2.x pop:goto advent ; ****************** ; * Change Rooms * ; ****************** travel if pe<1 print \"Not enough energy to move...":goto advent if mw zz$=rnd$:a=random(ms):if a>7 print \m$" blocks the path!":goto advent x=nr-ri:y=cr mod ri if (di=1) and (n) cr=(cr<=ri)*nr+cr-ri:goto travel1 if (di=2) and (s) cr=cr+ri-((cr>x)*nr):goto travel1 if (di=3) and (e) cr=cr+1-((y=0)*ri):goto travel1 if (di=4) and (w) cr=cr+((y=1)*ri)-1:goto travel1 if (di=5) and (rc=1) goto travel3 if (di=6) and (rc=2) goto travel3 if (di=7) and (rc=3) goto travel3 if (di=7) and (rc>5) and (rc<10) goto travel3 if (di=8) and (rc=4) goto travel3 print \"No Exit there!":goto advent travel1 if (pe>4) or (ps>4) goto travel1a if pt>0 pt=pt-1 travel1a if (not mw) goto travel2 if wr$="" goto travel1b if (sw<>0) and ((wr$<>sw$) or (p1<>0)) goto travel1b a=wa:b=ma:gosub set.prob a=p1-(p1<>0):a=a-2 if (pi>4) and (pi<16) pi=pi+a if (pw>4) and (pw<16) pw=pw+a if ps<16 ps=ps+(a>0) if ps>5 ps=ps-(a<0) if hp<16 hp=hp+(a>0) travel1b a=pa:b=ma:gosub set.prob zz$=rnd$:x=random(10) if (x<=p1) and (mw>0) print \m$" follows!":mf=1:goto travel2 if mw print \m$" waits for your return":mw=0:mf=0 travel2 ep=ep+1:md=0 gosub rd.room:mm=mm+1:free:print:if bd gosub scn.dsp if (tm-2)=mm print \"The aura surrounding you is fading..." if tm=mm print \"The aura has all but left you..." if (tm<>0) and (tm9999 mm=0 gosub dwarf zz$=rnd$:x=random(50):if (x=27) or (x=33) gosub thief if mf goto travel2a if (cr=df) and (cl=1) zz$=rnd$:m=random(mc):m=m+(m=0):gosub rd.mons:ms=ms+15:mf=1:m$="DWARF":mw=1:md=0:goto travel2a if (cl=sl) and (cr=sr) dy$=dz$+"spur.duel":link dy$ if (not m) and (rd>0) gosub rnd.m if (not m) goto travel2a gosub rd.mons:mw=m:md=0 a$=right$("000"+str$(m),3):if instr(a$,xm$) md=1:mw=0:mf=0 travel2a if (not i) goto travel2b a$=right$("000"+str$(i),3)+"," if (instr(a$,xi$)) or (instr(a$,xt$)) i=0:goto travel2b dy$=dx$+"items":rl=30:d=i:gosub rd.file:it$=d$:i=d:i1$=dp$:iv=f travel2b if (not wp) goto travel2c a$=right$("000"+str$(wp),3)+",":if instr(a$,xw$) wp=0:goto travel2c dy$=dx$+"weapons":rl=34:d=wp:gosub rd.file:wp$=d$:wp=d:wt$=dp$:wv=f travel2c if (not fd) goto advent a$=right$("000"+str$(fd),3)+"," if (instr(a$,xf$)) or (instr(a$,xo$)) fd=0:goto advent dy$=dx$+"stores":rl=26:d=fd:gosub rd.file:fd$=d$:fd=d:ft$=dp$:sv=f goto advent travel3 on nocar goto dropped if (di=6) and (cr=1) dy$=dz$+"spur.shop":mf=0:cr=0:link dy$ if (di=5) and (cl=1) cl=0 if (di=5) and (tp>0) cl=tp:cr=rt if (di=6) and (tp>0) cl=tp:cr=rt if (di=7) and (tp>0) and (rc<6) cl=tp:cr=rt if (di=7) and (rc=6) lk$="wizard":goto travel3a if (di=7) and (rc=7) lk$="inn":goto travel3a if (di=7) and (rc=8) lk$="smithy":goto travel3a if (di=7) and (rc=9) lk$="healer":goto travel3a if (di=8) and (tp>0) cl=tp:cr=rt if rc=5 cl=tp:cr=rt if cl=0 cl=1:mf=0:dy$=dz$+"spur.sub":link dy$,"win" f$=dx$+"d.level"+str$(cl):open #1,f$ input #1,ln$,nr,ri:close #1 if (not nr) print "Undefined level":cl=1:cr=0:dy$=dz$+"spur.sub":link dy$,"quit" print \"You have entered "ln$"!":dr$=dx$+"room.level"+str$(cl):ready dr$ if di=99 goto travel2 goto travel1 travel3a mf=0 dy$=dz$+"spur.inns" link dy$,lk$ dwarf if (not df) return zz$=rnd$:x=random(50):if (x<16) or (x>18) return if ((gh>0) or(gl>0)) print \' A Dwarf runs in, grabs your bag of gold and disappears!'\:g1=dh:g2=dl:gosub add.gold:gh=gh+g1:dh=gh:dl=gl:gh=0:gl=0:return if xi=0 return l=len(xi$) a$=right$("000"+str$(og),3)+",":y=instr(a$,xi$):if y goto dwrf.get zz$=rnd$:b=random(xi):if b=0 b=1 y=(b*4)-3 dwrf.get xi=xi-1:if xi=0 xi$="":goto dwrf.msg if y=1 xi$=mid$(xi$,5):goto dwrf.msg if (y+4)>l xi$=left$(xi$,y-1):goto dwrf.msg xi$=left$(xi$,y-1)+mid$(xi$,y+4) dwrf.msg print \' The dwarf, seeing you are not carrying any gold, steals an item from you!' return thief if tm=>mm print \' The THIEF enters the room and is immediately frightened by the magical aura which surrounds you.':return if xw<2 return zz$=rnd$:x=random(xw):if x<2 x=2 dy$=dx$+"weapons":open #1,dy$:gosub drp.wpn print \' The THIEF enters the room, knocks you down, and vanishes!! In your haste to gather your weapons, you fail to notice one is missing!' return rnd.m zz$=rnd$:x=random(100):if (x<35) or (x>40) return zz$=rnd$:m=random(mc) return ; ************************** ; * Read Spur Data Files * ; ************************** rd.file open #1,dy$ position #1,rl,d input #1,cb$\d$\f dp$=left$(d$,1):d$=mid$(d$,3):f=f mod 10 if cb$<>"1" d$="":d=0:f=0 close:return rd.mons dy$=dx$+"monsters" open #1,dy$ position #1,32,m input #1,cb$\m$\ms,sw\ma ty$=left$(m$,1):m$=mid$(m$,3) if xp>1 ms=((xp+1)*ms)/2 close:if (not sw) sw$="":return dy$=dx$+"weapons" open #1,dy$ position #1,34,sw input #1,cb$\sw$ close:sw$=mid$(sw$,3) return rd.room input #msg(cr),lo$,m,i,wp,fd,n,s,e,w,rc,rt,tp edit(0) copy #6,#8 if (n=0) and (s=0) and (e=0) and (w=0) and (rc=0) cr=cr+3:cr=cr mod nr:cr=cr+1:goto rd.room rd.room2 print if rc=5 pop:goto teleport copy #8,#0 a=pw+pi:if a<10 goto rd.room3 cf=instr("LABYRINTH",lo$) if (cf=0) or (cp=1) goto rd.room4 rd.room3 print \'[ You are Confused... ] You have lost your sense of direction.':return rd.room4 print \"Ye may travel:"; if n print " North"; if s print " South"; if e print " East"; if w print " West"; if (cf>0) and (cp=1) print:return if rc=1 print " Up"; if rc=2 print " Down"; if (rc=3) or ((rc>5) and (rc<10)) print " In"; if rc=4 print " Out"; print return teleport print\"You become lightheaded... everything is spinning around!!" print "You have accidently blundered into a TELEPORT trap!!" goto travel3 rd.book if pi<6 print \"You are not intelligent enough to read...":goto advent if xi=0 print \"You have no books!!":goto advent goto link.sub ; ********************** ; * DROP Subroutines * ; ********************** drop if instr("ITEM",i$) goto drop.itm if instr("WEAPON",i$) goto drop.wpn print \"You must specify ITEM or WEAPON":goto advent drop.itm if xi=0 print "No Items!!":goto advent print \"You are carrying:"\ dy$=dx$+"items" open #1,dy$ for x=1 to xi y=(x*4)-3:a=val(mid$(xi$,y)) position #1,30,a,2 input #1,n$ print right$(" "+str$(x),3)". - "mid$(n$,3) next:print:close input @2\"Which item number? "a$:x=val(a$):if a$="" goto advent if (x<1) or (x>xi) print "You're NOT carrying that!!":goto advent l=len(xi$) y=(x*4)-3 drp.itm close print \"Item Dropped..." drp.itm2 xi=xi-1:if xi=0 xi$="":goto advent if y=1 xi$=mid$(xi$,5):goto advent if (y+4)>l xi$=left$(xi$,y-1):goto advent xi$=left$(xi$,y-1)+mid$(xi$,y+4) goto advent clr.cmps x$="001,":y=instr(x$,xi$):l=len(xi$) if y=0 goto advent goto drp.itm drop.wpn print \"You are carrying:"\ dy$=dx$+"weapons" open #1,dy$ if xw=0 print "No Weapons!!":close:goto advent for x=1 to xw y=(x*4)-3 a=val(mid$(xw$,y)) position #1,34,a,2 input #1,n$ print right$(" "+str$(x),3)". - "mid$(n$,3) next:print input @2\"Which weapon number? "a$:x=val(a$):if a$="" close:goto advent if (x<1) or (x>xw) print "You're NOT carrying that!!":close:goto advent print \"Weapon dropped...":gosub drp.wpn:goto advent drp.wpn l=len(xw$) y=(x*4)-3:a=val(mid$(xw$,y)) xw=xw-1:if xw=0 xw$="":goto drp.wpn2 if y=1 xw$=mid$(xw$,5):goto drp.wpn2 if (y+4)>l xw$=left$(xw$,y-1):goto drp.wpn2 xw$=left$(xw$,y-1)+mid$(xw$,y+4) drp.wpn2 cb$="2":if a>10 cb$="1" position #1,34,a print #1,cb$ close:wr$="":return ; ********************* ; * GET Subroutines * ; ********************* get i$=mid$(i$,5) if i$=wp$ goto get.wpn if i$=it$ goto get.itm if i$=fd$ goto get.fd print \i$" is NOT here.":goto advent get.wpn if wt$="C" d$=wp$:d=wv:goto cursed if (xw=6) or (pd<8) print \"You can carry no more Weapons.":close:goto advent xw=xw+1:a$=right$("000"+str$(wp),3)+",":xw$=xw$+a$ close dy$=dx$+"weapons" open #1,dy$ position #1,34,wp print #1,"0" close:wp=0:wp$="":goto gotit get.itm if i1$="C" d$=it$:d=iv:goto cursed if (xi=15) or (pt<9) print \"You can carry no more Items.":goto advent if instr("COINS",it$) a=random(20)+1:goto get.itm4 if instr("DIAMOND",it$) a=random(30)+1:goto get.itm4 if instr("GOLD",it$) a=random(15)+1:goto get.itm4 if instr("SILVER",it$) a=random(10)+1:goto get.itm4 if instr("JEWEL",it$) a=random(8)+1:goto get.itm4 xi=xi+1:a$=right$("000"+str$(i),3)+",":xi$=xi$+a$ if (i1$="A") or (i1$="S") print \"Got it!!!":goto get.itm5 i=0:it$="":goto gotit get.itm4 g2=iv*a:gosub add.gold g1=gh:g2=gl:gosub prt.gold:print \\"You now have "gd$" in Gold." get.itm5 a$=right$("000"+str$(i),3)+"," i=0:it$="" if xt<60 xt=xt+1:xt$=xt$+a$:goto advent xt$=mid$(xt$,5)+a$:goto advent get.fd if ft$="C" d$=fd$:d=sv:goto cursed if (xf=10) or (pt<9) print \"No room left in your pack.":goto advent xf=xf+1:a$=right$("000"+str$(fd),3)+",":xf$=xf$+a$ fd=0:fd$="" if xo<20 xo=xo+1:xo$=xo$+a$:goto gotit xo$=mid$(xo$,5)+a$ gotit print \"Got it!!!" goto advent cursed if d=0 d=10 print \d$" is Cursed!":a=random(d):d=d-a:pi=pi-a:hp=hp-d:if hp<=0 xn=sn:sn=0:goto linkdead if pi<0 pi=0 goto advent ; ******************** ; * Player Attacks * ; ******************** p.attack x1=0 if wr$="" print \"Must have a weapon readied.":goto subpi if (not mw) print \"No monster here.":goto subpi if (not au) and (sd=1) gosub at.tune ep=ep+1 a=wa:b=ma:gosub set.prob print \"Attack with "wr$:zz$=rnd$:b=random(wd)+2 if (sw$="") or (p1=0) goto p.a0 if wr$<>sw$ print \"Missed":goto advent p2=10 p.a0 zz$=rnd$:a=random(10) if a>p2 print \"Missed":goto p.a1 b=b*ws/10 if sw$<>"" b=b+2 ms=ms-b:if ms<=0 goto p.a2 print \m$" hit!" if b>0 print \m$" takes "b" damage.":else print \"No damage!" if (b>4) and (pd<15) pd=pd+1 p.a1 if a1 x1$=d1$:x1=h1:a0=a1 if a2 x1$=d2$:x1=h2:a0=a2 if a3 x1$=d3$:x1=h3:a0=a3 if not x1 goto advent print \x1$" attacks "m$" - ";: a=a1+a2+a3:a=a mod 10:b=ma:gosub set.prob zz$=rnd$:b=random(a0):b=b*p2/10 if b<3 print "Missed":goto advent b=b-3:if b>5 b=5 ms=ms-b:if ms<=0 goto p.a2 print \m$" Hit!" if b>0 print \m$" takes "b" damage.":else print \"No damage!" goto advent p.a2 print \m$" hit!"\m$" Dead!":md=1 if x1 goto p.a3 if pw<12 pw=pw+1 mk=mk+1 if mf goto p.a3 zz$=rnd$:a=random(10):if a<7 goto p.a3 x$=right$("000"+str$(mw),3)+"," if xm<15 xm=xm+1:xm$=xm$+x$:goto p.a3 xm$=mid$(xm$,5)+x$ p.a3 mf=0:mw=0 if m$<>"DWARF" goto p.a4 g1=dh:g2=dl:gosub prt.gold print \'Upon killing the Dwarf, you claim his treasure of' print gd$" gold!" gosub add.gold:gh=gh+g1:df=0:dh=0:dl=100 goto advent p.a4 a=pa:b=ma:gosub set.prob if x1=0 x=5-p1:else x=(6-p1)/2 if (hp+x)<(xp*25) hp=hp+x:else hp=(xp*25) a=wa:b=ma:gosub set.prob zz$=rnd$:g2=p1*25:g2=g2+random(50) print \"You are awarded "g2" gold pieces" print "for killing the "m$"!" gosub add.gold goto advent subpi if pi>1 pi=pi-1 goto advent ; ********************* ; * Monster Attacks * ; ********************* m.attack a=pa:b=ma:gosub set.prob zz$=rnd$:a=random(10) if (ms<2) and (a<=3) print \m$" Misses!":return print \m$" attacks ";:x=1 zz$=rnd$:a=random(10)+1:if a>4 a=1 a$=n1$:d=1 if (a=2) and (a1>0) a$=d1$:d=2 if (a=3) and (a2>0) a$=d2$:d=3 if (a=4) and (a3>0) a$=d3$:d=4 print a$;:zz$=rnd$:a=random(10) if a<=p2 print " - Hit!":else print " - Misses!":return p2=p2+p1:zz$=rnd$:a=random(7*xp):a=a*p2/10:a=a+1 if d<>1 goto m.a1 zz$=rnd$:z=random(10) if (z<=2) and (sh>0) print "Shield Damaged!":sh=sh-1:a=a-2:if sh<0 sh=0 if (z>=8) and (ar>0) print "Armor Damaged!":ar=ar-2:a=a-3:if ar<0 ar=0 if (sh<=0) and (hs) print \"Shield gone.":hs=0 if (ar<=0) and (ra) print \"Armor gone.":ra=0 if (a<=0) return if d=1 b=a:a=random(a):b=b-a:b=b/6:hp=hp-a:if ps>b ps=ps-b if a print \"You take "a" damage.":else print \"No body damage!" if hp<=0 pop:xn=sn:sn=0:goto linkdead if (a>4) and (pd>0) pd=pd-1 if cp=1 zz$=rnd$:a=random(100):if (a>54) and (a<60) cp=0:print \"Compass damaged!":pop:goto clr.cmps if ps<4 wr$="":print \' Thy strength is fading... Unable to defend thyself!!' return m.a1 if (d=2) and (a1>0) print d1$" takes "a" damage":a1=a1-a:if a1<=0 print d1$" is dead.":d1$="*":a1=0:x=h1:h1=0:gosub fre.ally if (d=3) and (a2>0) print d2$" takes "a" damage":a2=a2-a:if a2<=0 print d2$" is dead.":d2$="*":a2=0:x=h2:h2=0:gosub fre.ally if (d=4) and (a3>0) print d3$" takes "a" damage":a3=a3-a:if a3<=0 print d3$" is dead.":d3$="*":a3=0:x=h3:h3=0:gosub fre.ally return fre.ally dy$=dx$+"allies":open #1,dy$ position #1,26,x print #1,1:close:return ; ************* ; * Examine * ; ************* examine a$=mid$(i$,9) if a$=it$ ty$=i1$:goto exam2 if a$=fd$ ty$=ft$:goto exam2 if a$=wp$ ty$=wt$:goto exam2 goto exam3 exam2 zz$=rnd$:a=random(10):if (a>3) and (a<7) print \"Your examination shows nothing.":return if not instr(ty$,"MCB") goto exam3 if ty$="M" print \"This "a$" is Magical." if ty$="C" print \"This "a$" is Cursed.":if p1<18 pi=pi+2 if ty$="B" print \a$" is a book." return exam3 print \"There is nothing interesting about this "a$".":return ; *********************** ; * Sound Subroutines * ; *********************** at.tune pl$="134,100,81,67,67,67,67,81,81,81,81,100,81,100,134" du$="70,70,90,40,20,20,60,40,20,20,60,70,80,80,180" au=1:goto tune die pl$="100,100,100,100,85,90,90,100,100,109,100" du$="160,100,60,160,100,60,120,60,120,60,200" goto tune tune p=val(pl$):du=val(du$) tone(p,du) a=instr(",",pl$):if a=0 return pl$=mid$(pl$,a+1) a=instr(",",du$):if a=0 return du$=mid$(du$,a+1) goto tune ; ********************** ; * GOLD Subroutines * ; ********************** add.gold gl=gl+g2:if gl=>10000 gl=gl-10000:gh=gh+1 return prt.gold a$=str$(g1):gd$="0000":if g1=0 gd$=" ":a$=" " gd$=right$(" "+a$,5)+right$(gd$+str$(g2),4) return ; ****************************** ; * Experience Level Message * ; ****************************** lvl.msg print' Congratulations - you have survived to be a Level ';:print xp" Player!" ep=ep+50:hp=hp*xp return ; **************** ; * Time Check * ; **************** tim.chk ex=clock(1)-ew:if ex=>ev pop:goto cnf.qt1 return ; *********************** ; * Set Probabilities * ; *********************** set.prob if a>b p1=a-b:else p1=b-a if p1>5 p1=10-p1 p2=p1*2:p2=10-p2+(p1=0) return ; ************************ ; * Screen Subroutines * ; ************************ scn.dsp print #3 @4,23 right$(" "+str$(cl),4) print #3 @13,23 right$(" "+str$(cr),4) print #3 @4,24 right$(" "+str$(mm),4); print #3 @13,24 right$(" "+str$(ep),4); print #3 @1,20 return scn.dsp2 print #3 @13,24 right$(" "+str$(ep),4); print #3 @21,23 right$(" "+str$(ps),3) print #3 @29,23 right$(" "+str$(pt),3) print #3 @37,23 right$(" "+str$(pw),3) print #3 @21,24 right$(" "+str$(pe),3); print #3 @29,24 right$(" "+str$(pd),3); print #3 @37,24 right$(" "+str$(pi),3); print #3 @1,20 if peek(33)=40 goto scn.rtn print #3 @45,23 right$(" "+str$(xf),2) print #3 @51,23 right$(" "+str$(xi),2) print #3 @57,23 right$(" "+str$(xw),2) print #3 @63,23 right$(" "+str$(ar),3) print #3 @70,23 right$(" "+str$(sh),3) print #3 @77,23 right$(" "+str$(mk),3) print #3 @45,24 right$(" "+str$(xp),2); print #3 @51,24 right$(" "+str$((ev-ex)/60),2); g1=gh:g2=gl:gosub prt.gold:print #3 @57,24 gd$; print #3 @70,24 right$(" "+str$(df),3); print #3 @77,24 right$(" "+str$(sr),3); scn.rtn print #3 @1,20 return link.sub dy$=dz$+"spur.sub" link dy$ lnk.duel if mw print\"Ye must kill the "m$" first!":goto advent if dp print \"You may DUEL only once each session!":goto advent dy$=dz$+"spur.duel" link dy$ ; ***************** ; * Player Dies * ; ***************** linkdead dy$=dz$+"spur.logon" link dy$,"deadplr" cnf.quit print \"Leave "g$"? ";:input@0 i$ if i$<>"Y" goto advent cnf.qt1 mw=0:mf=0:dy$=dz$+"spur.sub":link dy$,"quit" dropped if hp<=0 sn=0 dy$=dz$+"spur.logon" link dy$,"quit3"