Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.80 KB | None | 0 0
  1. ;
  2. ; ******************************
  3. ; * Targeter *
  4. ; *<<>><<>><<>><<>><<>><<>><<>>*
  5. ; * * *
  6. ; ******************************
  7. ;
  8. ;
  9. ; Targeter uzywa TargetNext do wybrania celu,
  10. ; -pomija wiekszosc NPC
  11. ; -ma mozliwosc stworzenie okienka, ktore zawiera liste ostatnich celow
  12. ; -przy otwartym okienku, mozliwosc wybierania pomiedzy ostatnimi celami
  13. ; -komunikuje informacje o celu na 3 sposoby
  14. ;
  15. ; Mozliwosc przypomnienia celu
  16. ;
  17. ; Do niektorych zmiennych nalezy wpisac #true badz #false
  18. ;------------------------------------------
  19. ;UWAGA: jezeli nie uzywasz, ktoregos z przyciskow nadaj mu jakas wartosc np: NIEUZYWAMKLAWISZA
  20. set %nastepny F3 ;wyszukiwanie celu
  21. ;set %nastepnymod alt ;SHIFT/ALT/CTRL
  22. set %pokazcel 13
  23. ;oznaczanie aktualnego celu [X]
  24. set %pokazcelmod ;SHIFT/ALT/CTRL
  25. ;---------------- Sahail-Vitt---------------------------------------
  26. set %znajomi ;Lista ID na zasadzie XYZXYZ_ABCABC_IJKIJK
  27. ;--------------------------------------
  28. set %wybieracblue #true ; jesli #false - bedzie omijac postacie blue
  29. ;-----------------------------------------
  30. set %delay 100
  31. ;------------------------------------------
  32. set %setuotitle #true ; czy ustawiac napis tytule okna (mozna latwo edytowac sposob prezentacji tekstu)
  33. set %exmsgme #true ; czy wyswietlac informacje o celu nad nasza glowa
  34. set %exmsgcolme 58 ; kolor
  35. set %exmsgtarget #true ; czy wyswietlac informacje o celu nad jego glowa
  36. set %exmsgcoltarget 4000 ; kolor
  37. set %sysmessage #true ; czy wyswietlac informacje o celu w wiadomosci systemowej
  38. set %sysmsgcol 88 ; kolor
  39. ;------------------------------------------
  40. set %okienko #false ; czy ma tworzyc okienko
  41. set %LiczbaPrzyciskow 3 ; ile ma zapamietywac celi/ile ma stworzyc przyciskow
  42. ;------------------------------------------
  43. set %typy HS_IS_AV_XU_FH_YG
  44. ;------------------------------------------
  45. if %okienko
  46. {
  47. set #lpc 200
  48. set %cele 0
  49. menu window title Targeter
  50. menu clear
  51. menu window color $333333
  52. set %koniec 66
  53. menu window size 200 %koniec
  54. menu image create rysunek 0 0 200 800
  55. menu image create rysunek1 0 0 200 200
  56. menu image create rysunek2 32 0 100 100
  57. menu image create rysunek3 96 0 100 100
  58. menu image create rysunek4 160 0 100 100
  59. gosub rysujmozajke rysunek1
  60. gosub rysujmozajke rysunek2
  61. gosub rysujmozajke rysunek3
  62. gosub rysujmozajke rysunek4
  63. menu font bgcolor $333333
  64. menu font color $aaaaa
  65. menu font name verdana
  66. menu font size 17
  67. menu font style b
  68. menu font align center
  69. menu text tytul 45 19 Targeter
  70. set %n 0
  71. menu show
  72. set #lpc 10
  73. }
  74. set #menubutton N/A
  75. set %cel #ltargetid
  76. ;------------------------------------------
  77. repeat
  78. onhotkey %nastepny %nastepnymod
  79. gosub szukaj
  80. if %cel <> #ltargetid && #ltargetid <> YC
  81. {
  82. ;if %okienko
  83. ; gosub ZmianaCelu
  84. ;gosub wyswietl
  85. set %cel #ltargetid
  86. }
  87. onhotkey %pokazcel %pokazcelmod
  88. gosub pokazcel
  89. if #menubutton <> N/A
  90. gosub Przycisk
  91. until #false
  92.  
  93.  
  94. ;------------------------------------------
  95. sub szukaj
  96. szukaj:
  97. onhotkey %nastepny %nastepnymod
  98. goto szukaj
  99. ignoreitem reset
  100. ignoreitem #charid
  101. set #sysmsgcol 78
  102. event sysmessage [Targeter]: Szukam
  103. nastepny:
  104. finditem %typy G
  105. if #findkind = -1
  106. {
  107. set #sysmsgcol 50
  108. event sysmessage [Targeter]: Brak celu
  109. set #ltargetid YC
  110. if %setuotitle
  111. setuotitle Ultima Online - #charname ( , #shard , )
  112. return
  113. }
  114. repeat
  115. until ( #systime - %systime ) >= %delay
  116. event macro 26 0
  117. set %systime #systime
  118. if #ltargetid = #charid
  119. event macro 26 0
  120. finditem #ltargetid G
  121. event property #ltargetid
  122. ignoreitem #findid
  123. if #findtype notin %typy
  124. goto nastepny
  125. if #findrep in 2_7 || ( ! %wybieracblue && #findrep = 1 )
  126. goto nastepny
  127. if #findid in %znajomi || #findid = #charid
  128. goto nastepny
  129. if lucznik in #property || dzikus in #property || cienia in #property || khaldum in #property || wilkolak in #property || upadle in #property || opetan in #property
  130. goto nastepny
  131. gosub wyswietl
  132. if %okienko
  133. gosub ZmianaCelu
  134. set %imie N/A
  135. return
  136.  
  137. sub wyswietl
  138. gosub oczyscimie
  139. if %setuotitle
  140. setuotitle Ultima Online - #charname ( , #shard , ) | [Targeter]: %imie
  141. if %exmsgme
  142. event exmsg #charid 3 %exmsgcolme %imie
  143. if %exmsgtarget
  144. gosub pokazcel
  145. if %sysmessage
  146. {
  147. set #sysmsgcol %sysmsgcol
  148. event sysmessage [Targeter]: %imie
  149. }
  150. set %cel #ltargetid
  151. return
  152.  
  153. sub oczyscimie
  154. event property #ltargetid
  155. set %p 1
  156. str pos #property -
  157. if #strres > 0
  158. set %p #strres + 2
  159. str pos #property $
  160. set %k #strres
  161. str pos #property (
  162. if #strres <> 0 && #strres < %k
  163. set %k #strres
  164. str pos #property [
  165. if #strres <> 0 && #strres < %k
  166. set %k #strres
  167. set %k %k - %p
  168. str mid #property %p %k
  169. set %imie #strres
  170. return
  171.  
  172. sub pokazcel
  173. pokazcel:
  174. onhotkey %pokazcel %pokazcelmod
  175. goto pokazcel
  176. fintitem #ltargetid G_16
  177. if #findkind <> -1
  178. event ExMsg #ltargetid 3 %exmsgcoltarget [-> \/ <-]
  179. return
  180.  
  181.  
  182. sub rysujmozajke
  183. for %i 0 14
  184. menu Image PixLine %1 0 %i ffffffffffffffffffffffffffffffffffffffffffff
  185. for %i 17 31
  186. menu Image PixLine %1 0 %i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
  187. for %i 34 49
  188. menu Image PixLine %1 0 %i kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
  189. for %i 52 66
  190. menu Image PixLine %1 0 %i jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
  191. for %i 0 14
  192. menu Image PixLine %1 16 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
  193. for %i 17 31
  194. menu Image PixLine %1 16 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
  195. for %i 34 49
  196. menu Image PixLine %1 16 %i llllllllllllllllllllllllllllllllllllllllllll
  197. for %i 52 66
  198. menu Image PixLine %1 16 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
  199. for %i 0 14
  200. menu Image PixLine %1 32 %i kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
  201. for %i 17 31
  202. menu Image PixLine %1 32 %i gggggggggggggggggggggggggggggggggggggggggggg
  203. for %i 34 49
  204. menu Image PixLine %1 32 %i kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
  205. for %i 52 66
  206. menu Image PixLine %1 32 %i jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
  207. for %i 0 14
  208. menu Image PixLine %1 48 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
  209. for %i 17 31
  210. menu Image PixLine %1 48 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
  211. for %i 34 49
  212. menu Image PixLine %1 48 %i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
  213. for %i 52 66
  214. menu Image PixLine %1 48 %i kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
  215. return
  216.  
  217. sub DodajButton
  218. menu font bgcolor $333333
  219. menu font color $aaaaa
  220. if %cele = 1
  221. {
  222. menu font bgcolor $aaaaa
  223. menu font color $333333
  224. }
  225. menu font size 8
  226. menu font style b
  227. menu font align center
  228. set %wys 43 + %cele * 23
  229. set %nazwa target , %cele
  230. menu Button %nazwa 0 %wys 200 23
  231. set %koniec %koniec + 23
  232. menu window size 200 %koniec
  233. return
  234.  
  235. sub Przycisk
  236. if ! %okienko
  237. return
  238. if #menubutton = CLOSED
  239. set %okienko #false
  240. str del #menubutton 1 6
  241. set %ktory #strres
  242. set #menubutton N/A
  243. if %ktory = 1 && #ltargetid = %temp1
  244. {
  245. set #sysmsgcol 50
  246. event sysmessage [Targeter]: To jest aktualny target
  247. gosub pokazcel
  248. return
  249. }
  250. set #lpc 40
  251. set %temp1 %tab . %ktory
  252. set %temp2 %tabimiona . %ktory
  253. gosub PrzesunListe 2 %ktory
  254. set %tabimiona1 %temp2
  255. set %tab1 %temp1
  256. menu set Target1 %tabimiona1
  257. set #ltargetid %tab1
  258. gosub wyswietl
  259. set #lpc 10
  260. return
  261.  
  262. sub ZmianaCelu
  263. if %tab1 = #ltargetid
  264. return
  265. if %imie = N/A
  266. gosub oczyscimie
  267. set #lpc 40
  268. for %i 2 %cele
  269. {
  270. if #ltargetid = %tab . %i
  271. {
  272. set %temp1 %tab . %i
  273. set %temp2 %tabimiona . %i
  274. gosub PrzesunListe 2 %i
  275. set %tabimiona1 %temp2
  276. set %tab1 %temp1
  277. menu set Target1 %tabimiona1
  278. set %imie N/A
  279. return
  280. }
  281. }
  282. if %cele < %LiczbaPrzyciskow
  283. {
  284. set %cele %cele + 1
  285. gosub DodajButton
  286. }
  287. if %cele > 1
  288. gosub PrzesunListe 2 %cele
  289. set %tabimiona1 %imie
  290. set %tab1 #ltargetid
  291. menu set Target1 %tabimiona1
  292. set %imie N/A
  293. set #lpc 10
  294. return
  295.  
  296. sub PrzesunListe
  297. for %i %2 %1
  298. {
  299. set %j %i - 1
  300. set %tabimiona . %i %tabimiona . %j
  301. set %tab . %i %tab . %j
  302. menu set Target , %i %tabimiona . %i
  303. }
  304. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement