Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | None | 0 0
  1. ;Autor: odzi
  2. ;v. 1.1
  3. ;Skrypt otwiera nam plecak juki i wyrzuca poszczególną rude na ziemie
  4. set %ji #jindex
  5. set *STOP 0
  6. set #lpc 1000
  7. set *PLECAK 0
  8. ;-------------------------------------------
  9. event macro 4 0 PODEJDZCIE!!
  10. repeat
  11. {
  12. Finditem YAB_BO G_1
  13. for #findindex 1 #findcnt
  14. {
  15. if #findtype = BO
  16. {
  17. set #lobjectid #findid
  18. event macro 17
  19. set %czas #scnt + 5
  20. repeat
  21. {
  22. if %czas < #scnt
  23. event macro 17
  24. }
  25. until #contname = container_gump
  26. set %plecak #contid
  27. event property #findid
  28. repeat
  29. {
  30. if #property = N/A
  31. event property #findid
  32. }
  33. until #property <> N/A
  34. set %p1 #property
  35. str Count %p1
  36. str Pos %p1 $
  37. str Del %p1 #strres 1
  38. set %p1 #strres
  39. set #sysmsgcol 75
  40. event sysmessage Zapisalem ID %p1 i jego ID PLECAKA: %plecak
  41. }
  42. }
  43. break
  44. }
  45. until #false
  46. repeat
  47. {
  48. if *STOP = 1
  49. {
  50. repeat
  51. until *STOP = 0
  52. }
  53. if *PLECAK = 1
  54. halt
  55. if %ji < #jindex
  56. {
  57. set %ji %ji + 1
  58. scanjournal %ji
  59. if Zapisywanie in #journal
  60. gosub zapis
  61. }
  62. if #targcurs = 1
  63. {
  64. repeat
  65. until #targcurs = 0
  66. }
  67. IF #contid <> %plecak
  68. {
  69. finditem YAB_BO G_2
  70. for #findindex 1 #findcnt
  71. {
  72. if #findtype = BO
  73. {
  74. if #finddist > 1
  75. event macro 1 0 Podejdzcie!!
  76. set #lobjectid #findid
  77. event macro 17
  78. }
  79. }
  80. }
  81. finditem DWJ C
  82. for #findindex 1 #findcnt
  83. {
  84. if #findtype = DWJ && #findcol = 1209 || #findtype = DWJ && #findcol = 1309 || #findtype = DWJ && #findcol = 1247 || #findtype = DWJ && #findcol = 1320 || #findtype = DWJ && #findcol = 0
  85. {
  86. ignoreitem
  87. continue
  88. }
  89. if #findtype = DWJ
  90. gosub wyrzuc #findid #findstack #findbagid
  91. }
  92. }
  93. until #false
  94.  
  95. sub zapis
  96. repeat
  97. {
  98. if %ji < #jindex
  99. {
  100. set %ji %ji + 1
  101. scanjournal %ji
  102. if Koniec_zapisywania in #journal
  103. return
  104. }
  105. until #false
  106.  
  107. sub wyrzuc
  108. exevent drag %1 %2
  109. repeat
  110. {
  111. finditem %1 C_ , %3
  112. for #findindex 1 #findcnt
  113. {
  114. if #findid = %1
  115. exevent drag %1 %2
  116. }
  117. break
  118. }
  119. until #false
  120. if %ji < #jindex
  121. {
  122. repeat
  123. {
  124. set %ji %ji + 1
  125. scanjournal %ji
  126. if Holding_ in #journal
  127. {
  128. set #sysmsgcol 55
  129. event sysmessage Holding skrypt wraca do poczatku.
  130. return
  131. }
  132. }
  133. until %ji = #jindex
  134. }
  135. exevent dropg #charposx #charposy
  136. repeat
  137. {
  138. finditem %1 G_2
  139. for #findindex 1 #findcnt
  140. {
  141. if #findid = %1
  142. {
  143. event property %1
  144. repeat
  145. {
  146. if #property = N/A
  147. event property %1
  148. }
  149. until #property <> N/A
  150. set %property #property
  151. str count %property
  152. str Pos %property $
  153. str Ins %property #spc #strres
  154. set %property #strres
  155. str count %property
  156. str Pos %property Wydobyl
  157. str Del %property #strres 20
  158. set %property #strres
  159. str Count %property
  160. str Pos %property $
  161. str Del %property #strres 1
  162. set %property #strres
  163. set #sysmsgcol 45
  164. event sysmessage Wyrzucilem %property
  165. return
  166. }
  167. }
  168. exevent dropg #charposx #charposy
  169. }
  170. until #false
  171. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement