; _ _ _ _ _ _ _ _ _ _ ;[_][_][_][_][_][_][_][_][_][_] ;| | ;| The Land of SPUR | ;| | ;| (C)opyright 1987 | ;| | ;| Greg W. Davis/Peripherals+ | ;|____________________________| ;| | ;| SPUR Guilds | ;| Main Segment | ;| | ;| 09/29/87 09:30 | ;|_ _ _ _ _ _ _ _ _ _| ;[_][_][_][_][_][_][_][_][_][_] on nocar goto linkterm public main start dy$=dx$+"guild.data" open #1,dy$:a=mark(1):if a close:gosub create:goto start position #1,41,0 input #1,ng close lt$=left$(" ",((35-len(g$))/2)) rt$=left$(" ",(35-(len(lt$)+len(g$)))) ; ******************************** ; * Guilds Main Menu * ; ******************************** main on nocar goto linkterm input\"GuildHalls (?=Menu): "i$ push main if not instr(i$,"?*SRHMFQLACG") return if i$="Q" pop:goto linkgame if i$="L" goto list.g if i$="M" goto msg.mem if i$="H" f$=dx$+"guild.help":print\md$\:copy f$:return if i$="A" goto apply.g if i$="S" goto g.stat if i$="R" goto quit.g if i$="C" goto c.guild if i$="F" goto feed.g if i$="G" dy$=dz$+"guildmaster":pop:link dy$ if (i$="*") and (info(5)) goto sysop.g if (i$="*") and (dm=sn) goto sysop.g menu setint(1):print \s$\' *^^^^^^^^^* *^^^^^^^^^* [(^^^^^^^)] ___ ___ ___ [(^^^^^^^)] | o |___| |__| |__| |___| o | | |' print" |"lt$;g$;rt$"|" print' | Guild Halls | |:::::::::::::::::::::::::::::::::::| | L: List Guilds & Members | | S. Status of Guilds | | A: Apply to a Guild | | R: Resign from a Guild | | M: Messages to Guild Members | | F: Feedback to GuildMasters | | C: Create a new Guild | | G: GuildMaster | | | |:::::::::::::::::::::::::::::::::::| | H: Help w/Guild Q: Quit to Shoppe | [][][][][][][][][]*[][][][][][][][][]':setint(""):return ; **************** ; * List Guilds * ; **************** list.g print\"[ Guilds and Members List ]" print\"Guild 1-"ng" or [A]ll: ";:input @2 i$:if i$="" return if i$="A" gosub listall:goto list.g x=val(i$):if (x<1) or (x>ng) print\"No such Guild":goto list.g gosub list.g0 goto list.g listall x=1 listall0 gosub list.g0 x=x+1:if x>ng return goto listall0 listall1 x=1 listall2 gosub rd.data:if (not gm) print\x"> No Guild":goto listall3 gosub rd.guild gosub list.g1 listall3 x=x+1:if x>ng return goto listall2 list.g0 gosub rd.data:if (not gm) print\x"> No Guild":return gosub rd.guild:gosub list.g1 if gu<2 print\"No members":return gosub view.g:return ; ******************************** ; * List Guilds & Guild Masters * ; ******************************** list.g1 a=val(mid$(gu$,1)):dy$=dx$+"spur.users":open #1,dy$ position #1,130,a:input #1,n$,a$:close gn$=left$(gn$+" ",25) print\"# Guild Name Guild Master"\ print x"> "gn$" "n$\ return ; ************************ ; * List Guild Members * ; ************************ view.g b=2:dy$=dx$+"spur.users" z=1:dr$=dx$+"room.level"+str$(z):ready dr$ open #1,dy$ gosub view.g4 view.g1 y=(b*4)-3:a=val(mid$(gu$,y)) position #1,130,a input #1,n$,l1,b1,b2,b3,b4 input #1,n1,n2,n3,n4,n5,n6 input #1,g1,g2,f,f,f,f,f,f,f1,f2,m,m1 setint(1) if (not l1) goto view.g3 if a=pn then b2=cl:lo$="Market":m=mm:f2=mk:b4=hp:f1=ep:n1=ps:n2=pt:n3=pi:n4=pe:n5=pw:n6=pd:g1=gh:g2=gl:goto view.g2 if b3=0 then lo$="Market":goto view.g2 if z<>b2 then dr$=dx$+"room.level"+str$(b2):ready dr$:z=b2 input #msg(b3),lo$,f setint(1) view.g2 gosub prt.gold print right$(" "+str$(b),3)" "; print left$(n$+" ",15)" "; print "$"gd$" "; print right$(" "+str$(f2),4)" "; print right$(" "+str$(m),4)" "; print right$(" "+str$(b2),3)"-"lo$ view.g3 b=b+1:if (b>gu) or (key(1)) close:return goto view.g1 view.g4 print \" # Guild Member Gold/Hand Kills Moves Dungeon Level/Room" print "--- --------------- ---------- ----- ----- -----------------------------" return ; **************************** ; * Status of Guilds * ; **************************** g.stat print\"[ Status of Guilds ]" print\ "Guild 1-"ng" or [L]ist: ";:input@2 i$:if i$=""return if i$="L" :gosub listall1:goto g.stat x=val(i$):if (x<1) or (x>ng) print\"No such Guild":goto g.stat tk=0:g7=0:g8=0:gosub rd.data if (not gm) print\"Guild dissolved":goto g.stat gosub rd.guild dy$=dx$+"spur.users":open #1,dy$ for b=1 to gu y=(b*4)-3:a=val(mid$(gu$,y)) position #1,130,a input #1,p1$,p2$ input #1,p3$ input #1,g1,g2,g3,g4,f,f,f,f,f,f2,f,f if b=1 gm$=p1$ if a=pn then f2=mk:g1=gh:g2=gl:g3=bh:g4=bl tk=tk+f2 gosub add.gold:g1=g3:g2=g4:gosub add.gold next:close g1=g7:g2=g8:gosub prt.gold print\ "[ Statistics for "gn$" Guild ]"\ print "GuildMaster :"gm$ print "Number of Members :"gu print "Monster Kills :"tk print "Guild Treasury :"gd$" gold" print "Guild Spell Points :"gs if info(5) print "GuildMaster Password :"gw$ goto g.stat ; **************************** ; * Apply to a Guild * ; **************************** apply.g if gn print\"Thou art already a member of a Guild!":return print\"[ Apply to a Guild ]"\ print"Guild 1-"ng" or [L]ist: ";:input@2 i$:if i$=""return if i$="L" :gosub listall1:goto apply.g x=val(i$):if (x<1) or (x>ng) print\"No such Guild":goto apply.g gosub rd.data if (not gm) print\"Guild dissolved":goto apply.g dy$=dx$+"spur.users":open #1,dy$ position #1,130,gm:input #1,n$,a$:close gn$=left$(gn$+" ",25) print\"# Guild Name Guild Master"\ print x"> "gn$" "n$\ input\"Apply to this Guild ? "i$ if i$<>"Y" return print\' Please give your qualifications and your reason for wanting to join my Guild. Type ".s" when done.':edit(0) apply.g1 edit(1) if edit(2)>3900 print\"Message too long, please shorten!":goto apply.g1 if edit(2)=0 return dy$=dx$+"guild.req"+str$(x) create dy$:open #1,dy$:append #1 print #1,n1$ print #1,sn,pn copy #8,#1:append #1:print #1,chr$(0):close print\"Your request has been recorded.":return ; ************************* ; * Resign from a Guild * ; ************************* quit.g print\"[ Resign from Guilds ]" if not gn print\"Thou art NOT a Guild Member!":return input@0\"Resign from your Guild ? "i$ if i$<>"Y" return x=gn:b2=pn:gosub del.p1 gn=0:return ; ******************************** ; * Send E-Mail to Guild Master * ; ******************************** feed.g print\"[ Feedback to GuildMaster ]" if gn goto feed.g1 print\' You are NOT a member of any Guild. You may APPLY from the Main Menu':return feed.g1 x=gn:gosub rd.data if (not gm) print\"Guild abolished!!!!":return x=gm:h$="** Feedback to the Guild Master **" goto sendmail ; ******************************** ; * Send E-Mail to Guild Member * ; ******************************** msg.mem print\"[ Messages to Guild Members ]" if (not gn) goto msg.mem1 x=gn:gosub rd.guild if gu<2 print\"No members":return msg.mem0 input@2\"Member # ([L]ist, C/R=Abort):"i$:if i$="" return if i$="L" gosub view.g:goto msg.mem0 x=val(i$):if (x<1) or (x>gu) print\"Not a Guild Member":goto msg.mem0 gosub ck.plr print\"Send message to "n$"? ";:input i$:if i$<>"Y" goto msg.mem0 h$="** > Message from a fellow Guild Member < **":goto sendmail msg.mem1 print\' You are NOT a member of any Guild. You may APPLY from the Main Menu':return ; **************** ; * Send E-Mail * ; **************** sendmail dw$=dm$+"mail" a=clock(2):clock(2)=0 print \"Enter Thy message now, Type thee 'done'" print "when all is well!" edit(0):edit(1) if not edit(2) then clock(2)=a:return print \"Wait...";: ready dw$ if info(6)<29 print \"Mail bit-map full":return print #msg(x),un:if h$<>"" print #6,h$\ print #6,"From -> "n1$" (SYS #"sn" - SPUR #"pn")" print #6,"Date -> "date$" "time$\ copy #8,#6:print #msg(x),chr$(4);chr$(0); msg(x)=1:update:clock(2)=a print"...sent!":return ; ********************** ; * Create New Guild * ; ********************** c.guild if gn print\"Thou art already a Guild member!":return input@0\"Do you wish to begin a Guild? "i$ if i$<>"Y" return dy$=dx$+"weapons":open #1,dy$ for i=1 to xw:y=(i*4)-3:x=val(mid$(xw$,y)) position #1,34,x,2 input #1,n0$:if instr("STAFF",n0$) then i=xw:next:close:goto c.guild.0 next:close:goto gm.note c.guild.0 print\"Enter the name of your Guild (25 chr. max.)" input@3\"--> "gn$ if len(gn$)>25 goto c.guild.0 c.guild.1 print\"Enter your GuildMaster Password (8 chr. max.)" input\"--> "gw$ if len(gw$)>8 goto c.guild.1 print\"Saving your request...." dy$=dx$+"new.guild":create dy$:open #1,dy$:append#1 print #1,sn print #1,pn,n1$,gn$,gw$:close print\"The Dungeon Master will review your request!":return gm.note print\' Thou must find a STAFF of POWER first to become a GUILDMASTER!!'\:return ; ************************* ; * SPUR Sysop/DM * ; ************************* sysop.g input@2\"Guild Sysop (?=Menu): "i$:if i$="" return if not instr(i$,"RDKSCQ?") goto sysop.g if i$="R" goto g.req if i$="K" goto kill.g if i$="S" goto ed.spell if i$="D" goto del.p if i$="C" gosub create:goto sysop.g if i$="Q" return print\' Guild Sysop Menu ---------------- [R]ead Requests [K]ill Guild [D]elete players [S]pell Points [C]onfig Guilds [Q]uit ----------------':goto sysop.g ; **************** ; * Kill Guild * ; **************** kill.g print\"Kill which Guild 1-"ng"? ";:input@2i$:if i$="" goto sysop.g x=val(i$):if (x<1) or (x>ng) print\"No such Guild":goto kill.g gosub rd.guild:if (not gu) goto kill.g1 for i=1 to gu y=(i*4)-3:gm=val(mid$(gu$,y)) if gm=pn gn=0:next:goto kill.g1 gosub rd.user:gx=0:gosub wr.user next kill.g1 gu=0:gu$="":gosub wr.guild gm=0:gosub wr.data:print\"Guild Killed..":goto kill.g ; *********************** ; * Edit Spell Points * ; *********************** ed.spell print\"Edit Spell Points" print\"Guild #1-"ng"? ";:inputi$ x=val(i$):if (x<1) or (x>ng) print\"No such Guild":goto ed.spell gosub rd.data:if (not gm) print\"No such Guild":goto ed.spell gosub rd.guild:gosub list.g1 print\"Current Spell points: "gs input@2\"Change Spell points? "i$ if (i$="") or (i$<>"Y") goto sysop.g ed.spel1 input\"New Spell points (1-100): "gs if (gs<1) or (gs>100) print\"** 1 to 100 only **":goto ed.spel1 gosub wr.data goto sysop.g ; ************************** ; * Check Guild Requests * ; ************************** g.req print\"Requests to begin new Guild" dy$=dx$+"new.guild" open #1,dy$:if mark(1) close:print\"Request file Empty":goto sysop.g g.req1 input #1,x:if x goto g.req2 close:print:input@0\"Delete Request File ?"i$ if i$="Y" kill dy$:print\"Request File Killed." dy$=dx$+"guild.data":open #1,dy$ position #1,41,0 print #1,ng:close goto sysop.g g.req2 input #1,gm,n$,gn$,gw$ print\md$\"Request to become a GuildMaster" print\"Adventurers Name: "n$ print"Player #: "gm print"System #: "x print"Guild Name: "gn$ input@0\"Accept new GuildMaster ?"i$ if i$="Y" gosub g.req5:goto g.req1 goto g.req1 g.req5 if (pn=gm) and (gn) print\"Player Already a Guildmember!":return if pn<>gm gosub rd.user:if gx print\"Player Already a Guildmember!":return h$="** > Feedback to New GuildMaster < **" gosub sendmail gs=3:gu=1:x=1 dw$=dx$+"guild.data":open #2,dw$ g.req5a position #2,41,x input #2,a:if (not a) goto g.req5b x=x+1:goto g.req5a g.req5b if x>ng then ng=x position #2,41,x print #2,gm,gs,gn$,gw$:close #2 b$=right$("000"+str$(gm),3)+"," dw$=dx$+"guild.members":open #2,dw$ position #2,85,x print #2,gu\b$:close #2 if gm=pn gn=x:return gosub rd.user:gx=x:gosub wr.user return ; ******************************* ; * Delete Player from Guilds * ; ******************************* del.p print\"Delete Players from Guilds" input@2\"Player #"i$:if i$="" return gm=val(i$):if (gm<1) or (gm>np) print\"No such player.":goto del.p if gm=pn gx=gn:n$=n1$:goto del.p0 gosub rd.user del.p0 if (not gx) print\"Player is not a GuildMember.":goto del.p print\"Delete "n$"? ";:input i$:if i$<>"Y" goto del.p x=gx:gx=0:if gm=pn gosub del.p1:gn=gx:goto del.p gosub wr.user:gosub del.p1:goto del.p del.p1 dw$=dx$+"guild.members":open #2,dw$ position #2,85,x input #2,gu\gu$ for i=1 to gu y=(i*4)-3:a=val(mid$(gu$,y)) if a=b2 i=gu:next:goto del.p2 next:close #2:return del.p2 if y=1 then print\"You may NOT delete a GuildMaster!":close #2:pop:return l=len(gu$):gu=gu-1 if (y+4)>l then gu$=left$(gu$,y-1):goto del.p3 gu$=left$(gu$,y-1)+mid$(gu$,y+4) del.p3 position #2,85,x print #2,gu\gu$:close #2:return ; ****************** ; * Sub-routines * ; ****************** rd.user dw$=dx$+"spur.users" open #2,dw$ position #2,130,gm input #2,n$,b1,b2,n7,n8,b3 input #2,n1,n2,n3,n4,n5,n6 input #2,g3,g4,g5,g6,s,a,z1,z2,m1,m2,m3,m4 input #2,dx,lx,sx,gx close #2:return wr.user dw$=dx$+"spur.users" open #2,dw$ position #2,130,gm print #2,n$,b1,b2,n7,n8,b3 print #2,n1,n2,n3,n4,n5,n6 print #2,g3,g4,g5,g6,s,a,z1,z2,m1,m2,m3,m4 print #2,dx,lx,sx,gx close #2:return rd.guild dy$=dx$+"guild.members" open #1,dy$ position #1,85,x input #1,gu\gu$:close return wr.guild dy$=dx$+"guild.members" open #1,dy$ position #1,85,x print #1,gu\gu$:close return rd.data dy$=dx$+"guild.data":open #1,dy$ position #1,41,x input #1,gm,gs,gn$,gw$:close return wr.data dy$=dx$+"guild.data":open #1,dy$ position #1,41,x print #1,gm,gs,gn$,gw$:close return ck.plr y=(x*4)-3:a=val(mid$(gu$,y)) dy$=dx$+"spur.users":open #1,dy$ position #1,130,a input #1,n$,x close:if (not x) print\"No such player":pop:return return ; ********************** ; * GOLD Subroutines * ; ********************** prt.gold a$=str$(g1):gd$="0000":if g1=0 then gd$=" ":a$=" " gd$=right$(" "+a$,5)+right$(gd$+str$(g2),4) return add.gold g8=g8+g2:if g8=> 10000 then g8=g8-10000:g7=g7+1 g7=g7+g1 return ; **************************** ; * Create Guild Data Files * ; **************************** create if (not info(5)) print\"GuildHalls closed.":pop:goto linkgame input@0\"Configure New Data Files? "i$:if i$<>"Y" pop:goto linkgame dy$=dx$+"guild.data":kill dy$:create dy$ open #1,dy$:position #1,41,0:print #1,0,i$:close dy$=dx$+"guild.members":kill dy$:create dy$ open #1,dy$:position #1,85,1:print #1,0:close gn=0:for gm=1 to np if gm=pn next:goto create2 create1 gosub rd.user if (not b1) next:goto create2 gx=0:gosub wr.user next create2 print\"Data files created..." return ; ********************** ; * Quit from Guilds * ; ********************** linkterm dy$=dz$+"spur.logon" link dy$,"quit3" linkgame dy$=dz$+"spur.shop" link dy$,"main1" ; ********************** ; * GOLD Subroutines * ; ********************** 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 g7>g1 then a=1:return if (g7=g1) and (g8=>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 add.gold g8=g8+g2:if g8=> 10000 then g8=g8-10000:g7=g7+1 g7=g7+g1 return sub.gold if g2>g8 then g8=g8+10000:g7=g7-1 g8=g8-g2:g7=g7-g1:return