Advertisement
Guest User

ESCAPEMAN - TIbasic z80 - Game by Wistaro

a guest
Feb 12th, 2015
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | None | 0 0
  1. //By Wistaro - (c) Février 2015
  2. //Forum link dedicated to this game: http://tiplanet.org/forum/viewtopic.php?f=11&t=16046
  3.  
  4. Lbl A
  5. AxesOff:Full
  6. 0->Xmin:0->Ymin
  7. 1->DeltaX:1->DeltaY
  8. ClrDraw:ClrHome
  9. For(A,20,71,3
  10. Text(18,A,"X
  11. Text(32,A,"X
  12. End
  13. For(A,26,42,2
  14. Pt-On(17,A,2
  15. Pt-On(76,A,2
  16. End
  17. StorePic 1
  18. Text(~1,25,20,"EscapeMan
  19. For(A,0,24,2
  20. Pt-On(29,A,2
  21. Pt-On(64,A,2
  22. End
  23. Line(16,25,0,0
  24. Line(77,43,94,62
  25. Line(77,25,94,0
  26. Line(16,43,0,62
  27. Text(12,50,"Wistaro
  28.  
  29.  
  30. Repeat K=45
  31. getKey->K
  32. If K=92:Goto J
  33. If K=93:Goto O
  34. Text(42,33,"1 - Play
  35. Text(52,33,"2 - Exit
  36. End:ClrHome:ClrDraw:Stop
  37. Lbl J:
  38. DelVar |LB:8->dim(|LB:1->|LB(8
  39. Lbl C:ClrDraw
  40. 5->|LB(5:5->|LB(6
  41.  
  42. DelVar [H]:{8,16->dim([H]
  43. DelVar L1DelVar L2seq(A,A,0,93,6)->L1
  44. seq(B,B,0,57,7->L2
  45. " LOADING..."->Str1
  46. RecallPic 1
  47. Text(~1,25,20,"Level *",|LB(8
  48. For(A,5,14
  49. Text(57,85,int((100*A)/144
  50. Text(L2(9),L1(A),sub(Str1,A,1)
  51. End
  52. 9->P
  53. For(A,1,8
  54. For(B,1,16
  55. P+1->P
  56. Text(57,85,int((100*P)/140
  57. randInt(0,10->E
  58. If E<=5:1->D
  59. If E>5 and E<8:0->D
  60. If E>=8:2->D
  61. randInt(0,8->X
  62. If X>=0 and X<5:0->Z
  63. If X=5:.1->Z
  64. If X=6:.2->Z
  65. If X=7:.3->Z
  66. If X=8:.4->Z
  67. If D:D+Z->[H](A,B
  68. End
  69. End
  70. For(A,1,3
  71. Text(57,85,int((100*(P+A))/140
  72. 0->[H](1,A
  73. 0->[H](2,A
  74. 0->[H](8,17-A
  75. End
  76. "thetaO"->Str1
  77. ClrDraw
  78. For(A,1,8
  79. For(B,1,16
  80. If [H](A,B:Text(L2(A),L1(B),sub(Str1,iPart([H](A,B)),1
  81. End:End
  82. DelVar SDelVar T
  83. Lbl T
  84. Line(0,6,74,6
  85. Line(74,6,74,0
  86. Line(81,0,81,12
  87. Line(81,12,91,12
  88. Line(91,12,91,0
  89. Pt-On(84,6,3
  90. 1->V:1->W
  91. DelVar theta
  92. Repeat K=45 or |LB(5)<=0 or theta
  93. getKey->K
  94. If V=8 and W>=15:1->theta
  95. If K=105:Then
  96. 2+int(|LB(6)/2)->|LB(7
  97. |LB(7->|LB(1
  98. V->|LB(2:W->|LB(3
  99. 3+fPart([H](V,W))->[H](V,W
  100. End
  101. If |LB(1)=1:Then
  102. int(|LB(6)/3)+|LB(8->|LB(4
  103. |LB(4->H
  104. |LB(2->S
  105. |LB(3->T
  106. 0->|LB(1
  107. "L+M?"->Str3
  108. If T<=H:T-1->H
  109. |LB(4->I
  110. If T>=17-I:16-T->I
  111. For(A,T-H,T+I
  112. If S=V and A=W:|LB(5)-1->|LB(5
  113. If |LB(6)>=10 or iPart([H](S,A))!=2:Then
  114. Text(L2(S),L1(A),"X
  115. fPart([H](S,A->[H](S,A
  116. If Ans!=0:Then
  117. sub(Str3,fPart([H](S,A))*10,1->Str4
  118. Else
  119. " "->Str4
  120. End
  121. Text(L2(S),L1(A),Str4
  122. End:End
  123. |LB(4->H
  124. If S<=H:S-1->H
  125. |LB(4->I
  126. If S>=8-I:8-S->I
  127. For(A,S-H,S+I
  128. If A=V and T=W:|LB(5)-1->|LB(5
  129. If iPart([H](A,T))!=2 or |LB(6)>=10:Then
  130. Text(L2(A),L1(T),"X
  131. fPart([H](A,T->[H](A,T
  132. If Ans!=0:Then
  133. sub(Str3,fPart([H](A,T))*10,1->Str4
  134. Else
  135. " "->Str4
  136. End
  137. Text(L2(A),L1(T),Str4
  138. End
  139. End
  140. Text(L2(S),L1(T)," "
  141. End
  142. If |LB(1)>0:Text(L2(|LB(2)),L1(|LB(3)),"B
  143. If K=22:Then
  144. ClrHome
  145. End
  146. If K:Text(L2(V),L1(W)," "
  147. If fPart([H](V,W:Then
  148. 10fPart([H](V,W->Z
  149. 0->Y
  150. If Z=4:randInt(1,3+|LB(8->Y
  151. If Z=1 or Y=1:1+|LB(5->|LB(5
  152. If Z=2 or Y=2:1+|LB(6->|LB(6
  153. If Z=3 or Y=3:|LB(5)-randInt(1,2|LB(8->|LB(5
  154. If Y>=4:|LB(5)-1->|LB(5
  155. 0->[H](V,W
  156. End
  157.  
  158. Text(57,0,"V: ",|LB(5)," - XP: ",|LB(6)," - LvL: ",|LB(8
  159. If W<16:Then
  160. iPart([H](V,W+1:W+(K=26 and not(Ans->W
  161. End
  162. If V<8:Then
  163. iPart([H](V+1,W:V+(K=34 and not(Ans->V
  164. End
  165. If W>1:Then
  166. iPart([H](V,W-1:W-(K=24 and not(Ans->W
  167. End
  168. If V>1:Then
  169. iPart([H](V-1,W:V-(K=25 and not(Ans->V
  170. End
  171. If |LB(1)>0:|LB(1)-1->|LB(1
  172. Text(L2(V),L1(W),"[e]
  173. End
  174. If theta:Then
  175. |LB(8)+1->|LB(8
  176. Text(57,0,"Bravo! LvL suivant...
  177. Pause
  178. Goto C
  179. End
  180. For(A,62,7,~1
  181. Line(0,A,94,A,0
  182. End
  183. For(A,6,0,~1
  184. Line(81,A,91,A,0
  185. End
  186. Text(57,0,"Helas, tu as perdu...
  187. Pause :Goto A
  188. Lbl O
  189. DelVar [H]DelVar L1DelVar |LBDelVar L2
  190. ClrDraw:ClrHome
  191. Disp "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement