home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR11 / TADEMO.ZIP / DEMO.SCR < prev    next >
Text File  |  1993-12-03  |  3KB  |  201 lines

  1. ; =====================
  2. ;   Total Automation       
  3. ;  (C) Copyright 1993
  4. ;  by Michael S. Hogg
  5. ; =====================
  6. ; Shareware Demo Version
  7. ;
  8. ; This version is a shareware release. Feel free to distribute,
  9. ; but do not modify the program. All this version will do is fight
  10. ; in the arena. For more information on the registered version,
  11. ; please see doc file.
  12. ;
  13. string Status, Vitality, MVitality, Attack, NAttacks, Sound, XFlag
  14. string Rep, User, LV1, LV2, LV3, ASpell, HSpell, CFlag, CPSpell
  15.  
  16. openfile config.ta read
  17. readfile User
  18. readfile LV1
  19. readfile LV2
  20. readfile LV3
  21. readfile HSpell
  22. readfile ASpell
  23. readfile CPSpell
  24. readfile NAttacks
  25. closefile
  26.  
  27. INIT:
  28. assign XFlag  "off"
  29. assign Sound  "on"
  30. assign CFlag  "off"
  31. if "$0" <> "on" CSOUND
  32. timeout 4 SSCREEN
  33.  
  34. SSCREEN:
  35. assign CFlag "on"
  36. turnon SPLIT
  37. send "=a^M"
  38. waitfor "Ok, ANSI colors will not"
  39.  
  40. CSOUND:
  41. if "$1" <> "off" START
  42. assign Sound "off"
  43.  
  44. START:
  45. turnon CASE
  46. assign Rep "ring gong"
  47. goto READROOM
  48.  
  49. CYCLE:
  50. gosub GETHEALTH
  51. send "act: is running demo of total automation!^M"
  52. gosub T1
  53. pause 10000
  54. gosub T2
  55. if $Vitality > $LV3 OSpell
  56.  
  57. MAIN:
  58. if "$XFlag" = "on" CR
  59. timeout 2 CYCLE
  60. assign 3 $NAttacks
  61.  
  62. RA:
  63. send "a $attack^M"
  64. decr 3
  65. if $3 > 0 RA
  66. waitfor "Sorry, "
  67.  
  68. READROOM:
  69. timeout 4 RMAP
  70.  
  71. CB:
  72. pause 500        
  73. send "^M"
  74. waitfor "There "
  75. getx 0 4 " "
  76. getx Attack 10 " "
  77. getx 1 10 " "
  78. if "$Attack" = "a"     EXTRA
  79. if "$Attack" = "an"    EXTRA
  80. if "$Attack" = "two"   MULTIPLE
  81. if "$Attack" = "three" MULTIPLE
  82. if "$Attack" = "four"  MULTIPLE
  83. if "$XFlag" = "on" CR
  84. goto EMPTY
  85.  
  86. CR:
  87. return
  88.  
  89. EXTRA:
  90. assign Attack $1
  91. goto MAIN
  92.  
  93. MULTIPLE:
  94. pause 500
  95. send "^M"
  96. waitfor "There "
  97. getx 0 4  " "
  98. getx 1 10 " "
  99. getx Attack 10 " "
  100. timeout 2 MAIN
  101. send "a $attack^M"
  102. waitfor "Sorry, you don't see"
  103. pause 500
  104. send "^M"
  105. waitfor "There "
  106. getx 0 4  " "
  107. getx 1 10 " "
  108. getx Attack 3 " "
  109. goto MAIN
  110.  
  111. EMPTY:
  112. if "$Attack" = "nobody" RMAP
  113. timeout 2 MAIN
  114. send "a $attack^M"
  115. waitfor "Sorry, "
  116. goto RMAP
  117.  
  118. RMAP:
  119. send "$Rep^M"
  120. gosub T1
  121. pause 3500
  122. gosub T2
  123. goto READROOM
  124.  
  125. OSPELL:
  126. timeout 2 MAIN
  127. send "$ASpell $Attack^M"
  128. waitfor "The "
  129. assign XFlag "on"
  130. assign 9 $Attack
  131. gosub CB
  132. assign XFlag "off"
  133. if "$Attack" = "nothing" WSPELL
  134. if "$Attack" = "nobody"  WSPELL
  135. assign Attack $9
  136. goto MAIN
  137.  
  138. WSPELL:
  139. gosub T1
  140. pause 5000
  141. gosub T2
  142. goto RMAP
  143.  
  144. GETHEALTH:
  145. timeout 2 GETHEALTH
  146. send "he^M"
  147. waitfor "Vitality:     "
  148. getx Vitality 3 " "
  149. waitfor "/ "
  150. getx MVitality 3 "^M"
  151. waitfor "Status:       "
  152. getx Status 8 "^M"
  153.  
  154. CHKHEALTH:
  155. if "$Status"   = "Thirsty"  THIRSTY
  156. if "$Status"   = "Hungry"   HUNGRY
  157. if "$Status"   = "Poisoned" POISONED
  158. if "$Vitality" < "$LV2"     RUN
  159. if "$Vitality" < "$LV1"     HEL
  160. return
  161.  
  162. HEL:
  163. send "$HSpell $User^M"
  164. return
  165.  
  166. RUN:
  167. send "=$User: .SCRIPT MSG. Vitality was too low.^M"
  168. send "/x^M"
  169. goto TERM
  170.  
  171. THIRSTY:
  172. send "drink waterskin^M"
  173. goto GETHEALTH
  174.  
  175. HUNGRY:
  176. send "eat ration^M"
  177. goto GETHEALTH
  178.  
  179. POISONED:
  180. send "$CPSpell $User^M"
  181. goto GETHEALTH
  182.  
  183. TERM:
  184. if "$CFlag" = "off" END
  185. send "=a^M"
  186. turnOFF split
  187.  
  188. END:
  189. exit
  190.  
  191. T1:
  192. if "$Sound" = "off" CR
  193. beep 10000
  194. return
  195.  
  196. T2:
  197. if "$Sound" = "off" CR
  198. beep 10000
  199. beep 10000
  200. return
  201.