daily pastebin goal
51%
SHARE
TWEET

Office Adventure (in 2k)

pacerdawn Aug 28th, 2017 130 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 10 DIM O$(8),R(17,5),I$(6),P$(6),E$(6),I(6),P(6):FOR I=1 TO 8:READ O$(I):IF I>4 THEN O$(I)=O$(I)+" room"
  2. 20 NEXT I
  3. 30 FOR I=1 TO 17:FOR J=1 TO 5:READ R(I,J):NEXT J,I:FOR I=1 TO 6:READ I$(I),P$(I),E$(I):NEXT I
  4. 40 FOR I=1 TO 6:READ I(I):NEXT I:FOR I=1 TO 6:READ P(I):NEXT I
  5. 50 R=1:CLS:PRINT "Office Adventure":PRINT "By Martin Richardson":PRINT
  6. 60 PRINT "The office network is down.  It is up to":PRINT "you to save the business day."
  7. 70 PRINT:PRINT STRING$(40,"-"):PRINT "You are in "+O$(R(R,1)):GOSUB 190:PRINT
  8. 80 IF R(R,2)<>0 THEN PRINT "(n)";
  9. 90 IF R(R,3)<>0 THEN PRINT "(s)";
  10. 100 IF R(R,4)<>0 THEN PRINT "(e)";
  11. 110 IF R(R,5)<>0 THEN PRINT "(w)";
  12. 120 PRINT " Action";:INPUT A$
  13. 130 V$=LEFT$(A$,1):M=0:IF LEN(A$)>3 THEN O$=RIGHT$(A$,3) ELSE O$=""
  14. 140 V=INSTR("nsew",V$):IF V>0 THEN M=R(R,V+1)
  15. 150 ON INSTR("gdiq",V$) GOSUB 220,240,260,180
  16. 160 IF M<>0 THEN R=M ELSE IF V>0 THEN PRINT " **Wrong direction"
  17. 170 GOTO 70
  18. 180 END
  19. 190 FOR I=1 TO 6:IF I(I)=R THEN PRINT "a "+I$(I)+" is here"
  20. 200 IF P(I)=R THEN PRINT P$(I)+" is here";:IF E$(I)<>"" THEN PRINT ", "+E$(I) ELSE PRINT
  21. 210 NEXT I:RETURN
  22. 220 FOR I=1 TO 6:IF O$=RIGHT$(I$(I),3) AND I(I)=R THEN PRINT "You get the "+I$(I):I(I)=-1
  23. 230 NEXT I:RETURN
  24. 240 FOR I=1 TO 6:IF O$=RIGHT$(I$(I),3) AND I(I)=-1 THEN PRINT "You drop the "+I$(I):I(I)=R:GOSUB 280
  25. 250 NEXT I:RETURN
  26. 260 PRINT "You have:":FOR I=1 TO 6:IF I(I)=-1 THEN PRINT "  a "+I$(I)
  27. 270 NEXT I:RETURN
  28. 280 N=0:IF P(I)<>R THEN 340
  29. 290 IF I=4 THEN PRINT:PRINT "The SA uses the cable to fix the":PRINT "network!  You win!":END
  30. 300 IF I=2 THEN PRINT:PRINT "The boss, fearing another lost employee,":PRINT "runs out.  On his desk is a review.":N=1
  31. 310 IF I=1 THEN PRINT:PRINT "Upset by his review, the programmer runs":PRINT "out leaving behind a network cable.":N=4
  32. 320 IF I=5 THEN PRINT:PRINT "The secretary, happy to see her pen,":PRINT "runs out leaving a resume behind.":N=2
  33. 330 IF N>0 THEN I(N)=R:I(I)=0:P(I)=0
  34. 340 RETURN
  35. 350 DATA "a hallway","the lobby","a broom closet","an office","the break","the server","the copy","the mail"
  36. 360 DATA 2,4,0,0,0,6,0,0,3,0,1,7,0,4,2,1,0,1,5,3,1,9,0,0,4,4,0,0,7,0,1,11,3,8,6,4,0,0,0,7,1,12,5,10,0
  37. 370 DATA 4,0,0,0,9,5,13,7,0,0,8,15,9,0,0,1,17,11,14,0,7,0,0,15,13,1,0,12,16,14,4,0,0,0,15,3,0,13,0,0
  38. 380 DATA "annual review","a programmer","looking confident","resume","the boss","looking worried","wad of cash","a janitor","fuming about low pay"
  39. 390 DATA "network cable","the SA","looking puzzled","pen","a secretary","searching a desk","broom","a manager","writing reviews"
  40. 400 DATA 0,0,11,0,12,17,10,16,11,2,1,8
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top