Advertisement
Guest User

Untitled

a guest
Aug 24th, 2015
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. ;by odzi ver. 1.0
  2. ;[jedzenie - Ciastka, ser, salatka]
  3.  
  4. ;==============================================================================================
  5. set %jedzenie 1 ;<- [1] - jedzenie automatyczne [0] - jedzenie pod bindem
  6. set %key end ;<- Przycisk pod jakim ma jesc
  7. set %ji #jindex
  8. set *stop 0
  9.  
  10. ;============================================================================================
  11. set #sysmsgcol 80
  12. event sysmessage Skrypt na jedzenie (ciastka, ser, salatka) odpalony [Created bY odzi]
  13. repeat
  14. {
  15. if %jedzenie = 1
  16. {
  17. if %ji < #jindex
  18. {
  19. set %ji %ji + 1
  20. scanjournal %ji
  21. if Zapisywanie in #journal
  22. gosub czekaj
  23. if Czujesz_sie in #journal
  24. gosub jedz
  25. }
  26. }
  27. if %jedzenie = 0
  28. {
  29. onhotkey %key
  30. {
  31. set *STOP 1
  32. gosub jedz
  33. set *STOP 0
  34. }
  35. }
  36. }
  37. until #false
  38.  
  39. sub czekaj
  40. repeat
  41. {
  42. if %ji < #jindex
  43. {
  44. set %ji %ji + 1
  45. scanjournal %ji
  46. if Koniec_zapisywania in #journal
  47. return
  48. }
  49. }
  50. until #false
  51. return
  52.  
  53. sub jedz
  54. set *STOP 1
  55. finditem SLI C
  56. if #findkind = -1
  57. {
  58. set #sysmsgcol 55
  59. event sysmessage Nie znalazlem ciasteczek, skrypt wylaczony
  60. halt
  61. }
  62. wait 3
  63. finditem JGI C
  64. if #findkind = -1
  65. {
  66. set #sysmsgcol 55
  67. event sysmessage Nie znalazlem salatki, skrypt wylaczony
  68. halt
  69. }
  70. wait 3
  71. finditem END C
  72. if #findkind = -1
  73. {
  74. set #sysmsgcol 55
  75. event sysmessage Nie znalazlem sera, skrypt wylaczony
  76. halt
  77. }
  78. gosub sprawdz
  79. return
  80.  
  81. sub sprawdz
  82. event macro 1 0 .glod wszystko
  83. wait 2s
  84. set %bialka 0
  85. set %witaminy 0
  86. set %weglowodany 0
  87. repeat
  88. {
  89. if %ji < #jindex
  90. {
  91. set %ji %ji + 1
  92. scanjournal %ji
  93. if Zapisywanie in #journal
  94. gosub czekaj
  95. if Glod:_Norma in #journal || Glod:_Niewiele in #journal
  96. {
  97. if %bialka = 0
  98. {
  99. gosub bialka END
  100. set %ji #jindex
  101. event macro 1 0 .glod wszystko
  102. set %bialka 1
  103. wait 2s
  104. continue
  105. }
  106. if %witaminy = 0
  107. {
  108. gosub witaminy JGI
  109. set %ji #jindex
  110. event macro 1 0 .glod wszystko
  111. set %witaminy 1
  112. wait 2s
  113. continue
  114. }
  115. if %weglowodany = 0
  116. {
  117. gosub weglowodany SLI
  118. set %ji #jindex
  119. event macro 1 0 .glod wszystko
  120. set %bialka 0
  121. set %witaminy 0
  122. wait 2s
  123. continue
  124. }
  125. }
  126. if Bialka:_Norma in #journal || Bialka:_Niewiele in #journal
  127. {
  128. gosub bialka END
  129. set %ji #jindex
  130. event macro 1 0 .glod wszystko
  131. wait 2s
  132. continue
  133. }
  134. if Witaminy:_Norma in #journal || Witaminy:_Niewiele in #journal
  135. {
  136. gosub witaminy JGI
  137. set %ji #jindex
  138. event macro 1 0 .glod wszystko
  139. wait 2s
  140. continue
  141. }
  142. if Weglowodany:_Norma in #journal || Weglowodany:_Niewiele in #journal
  143. {
  144. gosub weglowodany SLI
  145. set %ji #jindex
  146. event macro 1 0 .glod wszystko
  147. wait 2s
  148. continue
  149. }
  150. if Glod:_Optymalne_zaspokojenie in #journal
  151. set %glod 1
  152. if Bialka:_Optymalne_Zaspokojenie in #journal
  153. set %bialko 1
  154. if Witaminy:_Optymalne_Zaspokojenie in #journal
  155. set %witaminka 1
  156. if Weglowodany:_Optymalne_zaspokojenie in #journal
  157. set %wegle 1
  158. }
  159. }
  160. until %glod = 1 && %bialko = 1 && %witaminka = 1 && %wegle = 1
  161. set #sysmsgcol 75
  162. event sysmessage Zakonczono jedzenie
  163. set *STOP 0
  164. set %bialko 0
  165. set %witaminka 0
  166. set %wegle 0
  167. return
  168.  
  169. sub bialka
  170. finditem %1
  171. if #findkind = -1
  172. {
  173. set #sysmsgcol 55
  174. event sysmessage Nie znalazlem sera, skrypt wylaczony
  175. halt
  176. }
  177. set #lobjectid #findid
  178. event macro 17
  179. wait 3
  180. return
  181.  
  182. sub witaminy
  183. finditem %1
  184. if #findkind = -1
  185. {
  186. set #sysmsgcol 55
  187. event sysmessage Nie znalazlem salatki, skrypt wylaczony
  188. halt
  189. }
  190. set #lobjectid #findid
  191. event macro 17
  192. wait 3
  193. return
  194.  
  195. sub weglowodany
  196. finditem %1
  197. if #findkind = -1
  198. {
  199. set #sysmsgcol 55
  200. event sysmessage Nie znalazlem ciasteczek, skrypt wylaczony
  201. halt
  202. }
  203. set #lobjectid #findid
  204. event macro 17
  205. wait 3
  206. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement