; _ _ _ _ _ _ _ _ _ ;[_][_][_][_][_][_][_][_][_] ; ; The Land of SPUR ; ; (C)opyright 1987 ; Greg W. Davis ; and ; Peripherals Plus ; ; 06/15/88 23:49 ;___________________________ ; v3.0 ; Spur Logon Segment ; _ _ _ _ _ _ _ _ _ ;[_][_][_][_][_][_][_][_][_] public quit3 public login2 public start2 public main public deadplr public quit1 on nocar goto quit4 dx$="i2:":ds$="a:":dm$=dx$:dz$=ds$ print chr$(12) print \"Loading the Land Of Spur...." start store "a:var" dc$="":pn=0:sn=0:xn=0:ew=clock(1):wa=0:ma=0:pa=0:sl=0:tm=0 dy$=dx$+"spur.data" open #1,dy$:a=mark(1):close if (a) and ((info(5)) or (dm=un)) dy$=ds$+"spur.util":link dy$,"configure" if (not a) goto start2 print \"Game Closed!" recall "a:var" link "a:main.seg","fromsys" start2 open #1,dy$ input #1,g$,np,go,oh,ol,og,lg$ input #1,lc,mc,ic,sc,wc,ac,cg input #1,pq,sd,mv,td,bd,rd input #1,dh,dl:close print \sn$" presents"\\" "g$ dy$=dx$+"spur.users":x=1 open #1,dy$ start3 position #1,130,x input #1,n1$,n,pn:if n=un close:goto login x=x+1:if x>np close:goto new goto start3 new f$=dx$+"new.player.info":gosub show.file print \\"Do you wish to enter "g$;:input @0"? " i$ if i$<>"Y" print:goto quit2 sn=0:xn=0 new2 on nocar goto quit4 n1$=a1$+" "+a2$:if len(n1$)<16 goto new3 print \"Enter your Players name (15 Char. Max.)" input @1 "-> " n1$:if len(n1$)>15 print \"Name too long..":goto new2 new3 print \'Please Choose a Class: 1) Alchemist 4) Paladin 7) Archer 2) Druid 5) Ranger 8) Assassin 3) Fighter 6) Thief 9) Knight Your Choice (1-9): '; input i$:pc=val(i$) if (pc>9) or (pc<1) goto new3 new4 print \'Please Choose a Race: 1) Human 4) Elf 7) Dwarf 2) Ogre 5) Hobbit 8) Orc 3) Gnome 6) Halfling 9) Half-Elf Your Choice (1-9): '; input i$:pr=val(i$) if (pr<1) or (pr>9) goto new4 input @0\"Is this Correct? "i$ if i$<>"Y" input @0\"[R]edo entry or [A]bort? "i$ if i$="R" goto new2 if i$="A" sn=0:goto quit2.0 sn=xn:xn=0 status print \\"Rolling.."; gosub getnum:pd=b gosub getnum:ps=b gosub getnum:pt=b gosub getnum:pi=b gosub getnum:pw=b gosub getnum:pe=b goto stat1 getnum zz$=rnd$:a=0 getnum1 print "."; b=asc(rnd$)-64:if b>17 b=b-7 if b=>11 return a=a+1:if a<10 zz$=rnd$:goto getnum1 b=b+9:if b<11 goto getnum1 return stat1 if pc=1 pw=pw+2:pt=pt-1:pi=pi+2 if pc=2 pw=pw+2:ps=ps-1:pi=pi+2 if pc=3 pw=pw-1:pt=pt+2:ps=ps+2:pi=pi-1:pd=pd-1:pe=pe+2 if pc=4 ps=ps+1:pi=pi+1:pd=pd+1 if pc=5 ps=ps+1:pi=pi-1:pw=pw+1 if pc=6 pw=pw-1:pd=pd+1:pe=pe+2 if pc=7 pd=pd+2:pe=pe-1 if pc=8 ps=ps+2:pd=pd-1 if pc=9 pt=pt+1:pi=pi+1:pe=pe-1 if pr=1 pd=pd+1:ps=ps-1:pi=pi+2:pw=pw+1:pe=pe-1 if pr=2 pd=pd-1:ps=ps+3:pt=pt+2:pi=pi-2:pw=pw-1 if pr=3 pd=pd-1:ps=ps+1:pw=pw+1 if pr=4 pd=pd+2:pt=pt-1:pi=pi+1:pw=pw+2 if pr=5 pd=pd+1:ps=ps-1:pi=pi+2:pe=pe+1 if pr=6 pd=pd+2:ps=ps-1:pt=pt+1:pi=pi+2 if pr=7 pd=pd-1:ps=ps+2:pt=pt+1 if pr=8 pd=pd+1:ps=ps+2:pi=pi-1:pw=pw-1:pe=pe+2 if pr=9 pd=pd+1:pw=pw+1 zz$=rnd$:hp=((ps+pd+pt+pi+pw+pe)/6)+random(10):ep=0 zz$=rnd$:x=random(10):if x>5 sh=0:ar=0:goto stat2 zz$=rnd$:sh=random(30):zz$=rnd$:ar=random(30) stat2 print \\"Hit Points :"hp print "Strength :"ps print "Dexterity :"pd print "Constitution :"pt print "Intelligence :"pi print "Wisdom :"pw print "Energy Level :"pe print "Shield :";:if sh print sh"%":else print "None" print "Armor :";:if ar print ar"%":else print "None" print \' Hold while you are entered into the BOOK of 'g$'.....' gosub nw.plyr print \' SPUR, the almighty and omnipotent, senses your intrusion into HIS land!! "Thou doust dare to enter MY land? I await thee at the appointed site!"' gosub rd.user goto login1 ; *** Login Routine *** main cl=1:cr=0 gosub dwf.spur goto login1.5 login print \'A Wizard greets you and begs you wait. Your status must be verified to pass...' gosub tim.read gosub rd.user if (n1$=lg$) and (not info(5)) and (un<>dm) print \' You were the last Adventurer. You must wait till another passes through!'\:goto quit2 login1 gosub set.pa:xo=xf:xo$=xf$ if (not td) text:home:print if (not bd) goto login1.5 poke 35,20 if peek(33)=40 a$=a1$+" "+a2$:else a$=a1$+" "+a2$+" in "+g$ l=len(a$)+12:a=peek(33)-l:a=a/2:l=peek(33)-l:l=l-a print #3 @1,22 chr$(45,a)"[ #"right$(" "+str$(un),4)"-"a$" ]-"chr$(45,l):print #3 @1,1 gosub tim.chk:gosub screen login1.5 xt$="":xt=0 print \"Welcome "n1$"! Venture forth!" print \"The last Adventurer was "lg$ print "There have been "np" players in "g$"." if (not info(5)) and (un<>dm) goto login2 dy$=dx$+"new.guild" open #1,dy$:a=mark(1):close if (not a) and ((info(5)) or (dm=un)) print\"There are New GuildMaster Requests!" input @0\"Link to Sysop Utilities? "a$:if a$="Y" dy$=ds$+"spur.sysop":link dy$ login2 tm=0 if cr dy$=dz$+"spur.main":link dy$,"travel3" dy$=dz$+"spur.shop":link dy$ ; *************** ; * Show File * ; *************** show.file setint(1):print \s$\:copy f$:setint(""):return ; *********************** ; * Read Player Stats * ; *********************** rd.user dy$=dx$+"spur.users" open #1,dy$:position #1,130,pn input #1,n1$,sn,pn,cl,cr,hp input #1,ps,pt,pi,pe,pw,pd input #1,gh,gl,bh,bl,sh,ar,pc,pr,ep,mk,mm,xp input #1,df,sl,sr,gn:close dy$=dx$+"spur.allies" open #1,dy$:position #1,78,pn input #1,d1$,a1,h1\d2$,a2,h2\d3$,a3,h3 close dy$=dx$+"spur.weapons" open #1,dy$:position #1,64,pn input #1,xw\xw$:close dy$=dx$+"spur.stores" open #1,dy$:position #1,44,pn input #1,xf\xf$:close dy$=dx$+"spur.items" open #1,dy$:position #1,84,pn input #1,xi\xi$:close dy$=dx$+"spur.monsters" open #1,dy$:position #1,44,pn input #1,xm\xm$:close dy$=dx$+"spur.spells" open #1,dy$:position #1,44,pn input #1,xs\xs$:close return ; ************************ ; * Write Player Stats * ; ************************ wr.user if not pn return dy$=dx$+"spur.users" open #1,dy$:position #1,130,pn print #1,n1$,sn,pn,cl,cr,hp if (not sn) close:return print #1,ps,pt,pi,pe,pw,pd print #1,gh,gl,bh,bl,sh,ar,pc,pr,ep,mk,mm,xp print #1,df,sl,sr,gn:close dy$=dx$+"spur.allies" open #1,dy$:position #1,78,pn print #1,d1$,a1,h1\d2$,a2,h2\d3$,a3,h3 close dy$=dx$+"spur.weapons" open #1,dy$:position #1,64,pn print #1,xw\xw$:close dy$=dx$+"spur.stores" open #1,dy$:position #1,44,pn print #1,xf\xf$:close dy$=dx$+"spur.items" open #1,dy$:position #1,84,pn print #1,xi\xi$:close if xm<=10 goto wr.user3 x=xm-10 for a=1 to x zz$=rnd$:b=random(xm):if b=0 b=1 y=(b*4)-3:l=len(xm$) if y=1 xm$=mid$(xm$,5):goto wr.user2 if (y+4)>l xm$=left$(xm$,y-1):goto wr.user2 xm$=left$(xm$,y-1)+mid$(xm$,y+4) wr.user2 xm=xm-1 next:xm=10 wr.user3 dy$=dx$+"spur.monsters" open #1,dy$:position #1,44,pn print #1,xm\xm$:close dy$=dx$+"spur.spells" open #1,dy$:position #1,44,pn print #1,xs\xs$:close return ; **************** ; * New Player * ; **************** nw.plyr gosub dwf.spur f$=dx$+"spur.users" open #1,f$ if sn goto nw.plyr2 gn=0:sn=un:x=1 nw.plyr1 position #1,130,x:input #1,a$,n if (not n) pn=x:goto nw.plyr2 x=x+1:goto nw.plyr1 nw.plyr2 position #1,130,pn print #1,n1$,sn,pn,1,0,hp print #1,ps,pt,pi,pe,pw,pd print #1,0,1000,0,0,sh,ar,pc,pr,0,0,0,1 print #1,df,sl,sr,gn close f$=dx$+"spur.allies" open #1,f$ position #1,78,pn for x=1 to 3:print #1,"*,0,0":next close:if pn>np np=pn a=0:a$="" f$=dx$+"spur.items" open #1,f$:position #1,84,pn print #1,a\a$:close f$=dx$+"spur.weapons" open #1,f$:position #1,64,pn print #1,a\a$:close f$=dx$+"spur.stores" open #1,f$:position #1,44,pn print #1,a\a$:close dy$=dx$+"spur.monsters" open #1,dy$:position #1,44,pn print #1,a\a$:close dy$=dx$+"spur.spells" open #1,dy$:position #1,44,pn print #1,a\a$:close f$=dx$+"spur.time" open #1,f$:position #1,12,pn print #1,a\a$:close gosub tim.read return ; *************************** ; * Set Player Attributes * ; *************************** set.pa pa=ps+pd+pt+pi+pw+pe:pa=pa mod 10 return dwf.spur if lc=0 print\"Maze undefined... CREATE levels/rooms and re-initialize":return zz=flag:z1=edit(5)+3072:flag=z1:fill z1,255,0 f1$=dx$+"d.level1":gosub rd.lvl zz$=rnd$:df=random(nr) if df=0 df=pn dwf if df>nr df=df mod nr if flag(df) goto spur df=df+1:goto dwf spur fill z1,255,0 sl=sl+1:if sl>lc sl=lc f1$=dx$+"d.level"+str$(sl) gosub rd.lvl zz$=rnd$:sr=random(nr) if sr=0 sr=pn spur.2 if sr>nr sr=sr mod nr if flag(sr) flag=zz:return sr=sr+1:goto spur.2 rd.lvl open #1,f1$ input #1,ln$,nr,ri read #1,z1,255:close:return ; ********************** ; * Time Subroutines * ; ********************** tim.chk ex=clock(1)-ew:if ex=>ev pop:goto quit1 return tim.read dy$=dx$+"spur.time":open #1,dy$ mt=mv:if mv=0 mt=0:goto set.time position #1,12,un input #1,a$,eu b$=left$(date$,5)+"":if a$<>b$ eu=0 set.time close if not flag(4) goto set.1 eu=0:if mt=0 ev=3600:return ev=mt:return set.1 if mt=0 mt=clock(2)-clock(1):eu=0 ev=mt-eu if ev>(clock(2)-clock(1)) ev=clock(2)-clock(1) if ev>0 return gosub tim.mess recall "a:var" link "a:main.seg","fromsys" tim.mess print\' Alas...the sun has set on yet another adventurer within 'g$ print'Wake ye early in the morning after a long rest to resume your quest!!!' return ; ************************ ; * Screen Subroutines * ; ************************ screen print #3 @1,23 "LV: RM: |PS: PC: PW: " print #3 @1,24 "MV: EP: |PE: PD: PI: "; if peek(33)=40 goto scn.rtn print #3 @41,23 "|RT: IT: WP: AR: SH: KL:" print #3 @41,24 "|XL: TI: GH: DR: SR:"; scn.rtn print #3 @1,20 return scn.rst if bd poke 35,24 home:if (not info(5)) print ^ return ; ***************** ; * Player Dies * ; ***************** deadplr on nocar goto quit3 gosub dead:goto dead2 dead mf=0:mw=0:wr$="":xt$="":xt=0:xm$="":xm=0:cp=0 print \"You have not survived "g$ if (sd=1) gosub die dy$=dx$+"weapons" open #1,dy$ if xw=0 goto dead1 for j=1 to xw y=(j*4)-3:x=val(mid$(xw$,y)) if x>10 position #1,34,x:print #1,"1" next dead1 close if d1$<>"*" x=h1:gosub fre.ally if d2$<>"*" x=h2:gosub fre.ally if d3$<>"*" x=h3:gosub fre.ally if (not mv) return dy$=dx$+"spur.time" open #1,dy$ position #1,12,un eu=eu+ex:a$=left$(date$,5)+"":if left$(cm$,5)<>a$ eu=0 print #1,a$,eu:close if gn gosub g.quit:gn=0 return dead2 on nocar goto quit3 print\"Wouldst Thou enter "g$" again? ";:input@0 i$ if i$="Y" ew=clock(1):sl=0:goto new2 cl=0:cr=0:goto quit1 fre.ally dy$=dx$+"allies":open #1,dy$ position #1,26,x print #1,1:close:return g.quit dy$=dx$+"guild.members":open #1,dy$ position #1,85,gn:input #1,gu\gu$ for i=1 to gu y=(i*4)-3:a=val(mid$(gu$,y)) if a=pn i=gu:next:goto g.quit1 next:close:return g.quit1 if y=1 goto g.quit3 l=len(gu$):gu=gu-1 if (y+4)>l gu$=left$(gu$,y-1):goto g.quit2 gu$=left$(gu$,y-1)+mid$(gu$,y+4) g.quit2 position #1,85,gn print #1,gu\gu$:close print\"You have been CAST from your Guild!":return g.quit3 print\"Thou art a GUILDMASTER! Your Guild is NO MORE!!" position #1,85,gn print #1,0\"000":close dy$=dx$+"guild.data" open #1,dy$ position #1,41,gn print #1,0:close dy$=dx$+"spur.users" open #1,dy$ for i=1 to gu y=(i*4)-3:a=val(mid$(gu$,y)) gosub g.quit4 next:close:return g.quit4 position #1,130,a input #1,n$,b1,b2,n7,n8,b3 input #1,n1,n2,n3,n4,n5,n6 input #1,g3,g4,g5,g6,s,ax,z1,z2,m1,m2,m3,m4 input #1,dx,lx,sx,gx gx=0 position #1,130,a print #1,n$,b1,b2,n7,n8,b3 print #1,n1,n2,n3,n4,n5,n6 print #1,g3,g4,g5,g6,s,ax,z1,z2,m1,m2,m3,m4 print #1,dx,lx,sx,gx return 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 ; *********************** ; * Save Player stats * ; *********************** quit if cr=0 goto quit.a if pw<7 pw=pw+2 if pi<7 pi=pi+2 if ps<10 ps=ps+2 if pe<10 pe=pe+2 if hp<20 hp=hp+2 quit.a if (mv>0) and (ex=>ev) gosub tim.mess print \'Hold whilst your adventure is written in the BOOK of 'g$'....' dy$=dx$+"spur.data" open #1,dy$ print #1,g$,np,go,oh,ol,og,n1$ print #1,lc,mc,ic,sc,wc,ac,cg print #1,pq,sd,mv,td,bd,rd print #1,dh,dl:close if (not mv) goto quit.b eu=eu+ex:a$=left$(date$,5)+"":if left$(cm$,5)<>a$ eu=0 dy$=dx$+"spur.time":open #1,dy$ position #1,12,un print #1,a$,eu close quit.b gosub wr.user return ; ***************** ; * Link to BBS * ; ***************** quit1 on nocar goto quit3 gosub quit quit2.0 gosub quit.b quit2 gosub scn.rst:set zz$="":recall "a:var" link "a:main.seg","fromsys" quit3 if sn=0 gosub dead gosub quit quit4 gosub scn.rst:set zz$="":recall "a:var" link "a:main.seg","term1"