Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; ******************************
- ; * Targeter *
- ; *<<>><<>><<>><<>><<>><<>><<>>*
- ; * * *
- ; ******************************
- ;
- ;
- ; Targeter uzywa TargetNext do wybrania celu,
- ; -pomija wiekszosc NPC
- ; -ma mozliwosc stworzenie okienka, ktore zawiera liste ostatnich celow
- ; -przy otwartym okienku, mozliwosc wybierania pomiedzy ostatnimi celami
- ; -komunikuje informacje o celu na 3 sposoby
- ;
- ; Mozliwosc przypomnienia celu
- ;
- ; Do niektorych zmiennych nalezy wpisac #true badz #false
- ;------------------------------------------
- ;UWAGA: jezeli nie uzywasz, ktoregos z przyciskow nadaj mu jakas wartosc np: NIEUZYWAMKLAWISZA
- set %nastepny F3 ;wyszukiwanie celu
- ;set %nastepnymod alt ;SHIFT/ALT/CTRL
- set %pokazcel 13
- ;oznaczanie aktualnego celu [X]
- set %pokazcelmod ;SHIFT/ALT/CTRL
- ;---------------- Sahail-Vitt---------------------------------------
- set %znajomi ;Lista ID na zasadzie XYZXYZ_ABCABC_IJKIJK
- ;--------------------------------------
- set %wybieracblue #true ; jesli #false - bedzie omijac postacie blue
- ;-----------------------------------------
- set %delay 100
- ;------------------------------------------
- set %setuotitle #true ; czy ustawiac napis tytule okna (mozna latwo edytowac sposob prezentacji tekstu)
- set %exmsgme #true ; czy wyswietlac informacje o celu nad nasza glowa
- set %exmsgcolme 58 ; kolor
- set %exmsgtarget #true ; czy wyswietlac informacje o celu nad jego glowa
- set %exmsgcoltarget 4000 ; kolor
- set %sysmessage #true ; czy wyswietlac informacje o celu w wiadomosci systemowej
- set %sysmsgcol 88 ; kolor
- ;------------------------------------------
- set %okienko #false ; czy ma tworzyc okienko
- set %LiczbaPrzyciskow 3 ; ile ma zapamietywac celi/ile ma stworzyc przyciskow
- ;------------------------------------------
- set %typy HS_IS_AV_XU_FH_YG
- ;------------------------------------------
- if %okienko
- {
- set #lpc 200
- set %cele 0
- menu window title Targeter
- menu clear
- menu window color $333333
- set %koniec 66
- menu window size 200 %koniec
- menu image create rysunek 0 0 200 800
- menu image create rysunek1 0 0 200 200
- menu image create rysunek2 32 0 100 100
- menu image create rysunek3 96 0 100 100
- menu image create rysunek4 160 0 100 100
- gosub rysujmozajke rysunek1
- gosub rysujmozajke rysunek2
- gosub rysujmozajke rysunek3
- gosub rysujmozajke rysunek4
- menu font bgcolor $333333
- menu font color $aaaaa
- menu font name verdana
- menu font size 17
- menu font style b
- menu font align center
- menu text tytul 45 19 Targeter
- set %n 0
- menu show
- set #lpc 10
- }
- set #menubutton N/A
- set %cel #ltargetid
- ;------------------------------------------
- repeat
- onhotkey %nastepny %nastepnymod
- gosub szukaj
- if %cel <> #ltargetid && #ltargetid <> YC
- {
- ;if %okienko
- ; gosub ZmianaCelu
- ;gosub wyswietl
- set %cel #ltargetid
- }
- onhotkey %pokazcel %pokazcelmod
- gosub pokazcel
- if #menubutton <> N/A
- gosub Przycisk
- until #false
- ;------------------------------------------
- sub szukaj
- szukaj:
- onhotkey %nastepny %nastepnymod
- goto szukaj
- ignoreitem reset
- ignoreitem #charid
- set #sysmsgcol 78
- event sysmessage [Targeter]: Szukam
- nastepny:
- finditem %typy G
- if #findkind = -1
- {
- set #sysmsgcol 50
- event sysmessage [Targeter]: Brak celu
- set #ltargetid YC
- if %setuotitle
- setuotitle Ultima Online - #charname ( , #shard , )
- return
- }
- repeat
- until ( #systime - %systime ) >= %delay
- event macro 26 0
- set %systime #systime
- if #ltargetid = #charid
- event macro 26 0
- finditem #ltargetid G
- event property #ltargetid
- ignoreitem #findid
- if #findtype notin %typy
- goto nastepny
- if #findrep in 2_7 || ( ! %wybieracblue && #findrep = 1 )
- goto nastepny
- if #findid in %znajomi || #findid = #charid
- goto nastepny
- if lucznik in #property || dzikus in #property || cienia in #property || khaldum in #property || wilkolak in #property || upadle in #property || opetan in #property
- goto nastepny
- gosub wyswietl
- if %okienko
- gosub ZmianaCelu
- set %imie N/A
- return
- sub wyswietl
- gosub oczyscimie
- if %setuotitle
- setuotitle Ultima Online - #charname ( , #shard , ) | [Targeter]: %imie
- if %exmsgme
- event exmsg #charid 3 %exmsgcolme %imie
- if %exmsgtarget
- gosub pokazcel
- if %sysmessage
- {
- set #sysmsgcol %sysmsgcol
- event sysmessage [Targeter]: %imie
- }
- set %cel #ltargetid
- return
- sub oczyscimie
- event property #ltargetid
- set %p 1
- str pos #property -
- if #strres > 0
- set %p #strres + 2
- str pos #property $
- set %k #strres
- str pos #property (
- if #strres <> 0 && #strres < %k
- set %k #strres
- str pos #property [
- if #strres <> 0 && #strres < %k
- set %k #strres
- set %k %k - %p
- str mid #property %p %k
- set %imie #strres
- return
- sub pokazcel
- pokazcel:
- onhotkey %pokazcel %pokazcelmod
- goto pokazcel
- fintitem #ltargetid G_16
- if #findkind <> -1
- event ExMsg #ltargetid 3 %exmsgcoltarget [-> \/ <-]
- return
- sub rysujmozajke
- for %i 0 14
- menu Image PixLine %1 0 %i ffffffffffffffffffffffffffffffffffffffffffff
- for %i 17 31
- menu Image PixLine %1 0 %i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
- for %i 34 49
- menu Image PixLine %1 0 %i kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
- for %i 52 66
- menu Image PixLine %1 0 %i jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
- for %i 0 14
- menu Image PixLine %1 16 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
- for %i 17 31
- menu Image PixLine %1 16 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
- for %i 34 49
- menu Image PixLine %1 16 %i llllllllllllllllllllllllllllllllllllllllllll
- for %i 52 66
- menu Image PixLine %1 16 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
- for %i 0 14
- menu Image PixLine %1 32 %i kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
- for %i 17 31
- menu Image PixLine %1 32 %i gggggggggggggggggggggggggggggggggggggggggggg
- for %i 34 49
- menu Image PixLine %1 32 %i kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
- for %i 52 66
- menu Image PixLine %1 32 %i jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
- for %i 0 14
- menu Image PixLine %1 48 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
- for %i 17 31
- menu Image PixLine %1 48 %i hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
- for %i 34 49
- menu Image PixLine %1 48 %i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
- for %i 52 66
- menu Image PixLine %1 48 %i kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
- return
- sub DodajButton
- menu font bgcolor $333333
- menu font color $aaaaa
- if %cele = 1
- {
- menu font bgcolor $aaaaa
- menu font color $333333
- }
- menu font size 8
- menu font style b
- menu font align center
- set %wys 43 + %cele * 23
- set %nazwa target , %cele
- menu Button %nazwa 0 %wys 200 23
- set %koniec %koniec + 23
- menu window size 200 %koniec
- return
- sub Przycisk
- if ! %okienko
- return
- if #menubutton = CLOSED
- set %okienko #false
- str del #menubutton 1 6
- set %ktory #strres
- set #menubutton N/A
- if %ktory = 1 && #ltargetid = %temp1
- {
- set #sysmsgcol 50
- event sysmessage [Targeter]: To jest aktualny target
- gosub pokazcel
- return
- }
- set #lpc 40
- set %temp1 %tab . %ktory
- set %temp2 %tabimiona . %ktory
- gosub PrzesunListe 2 %ktory
- set %tabimiona1 %temp2
- set %tab1 %temp1
- menu set Target1 %tabimiona1
- set #ltargetid %tab1
- gosub wyswietl
- set #lpc 10
- return
- sub ZmianaCelu
- if %tab1 = #ltargetid
- return
- if %imie = N/A
- gosub oczyscimie
- set #lpc 40
- for %i 2 %cele
- {
- if #ltargetid = %tab . %i
- {
- set %temp1 %tab . %i
- set %temp2 %tabimiona . %i
- gosub PrzesunListe 2 %i
- set %tabimiona1 %temp2
- set %tab1 %temp1
- menu set Target1 %tabimiona1
- set %imie N/A
- return
- }
- }
- if %cele < %LiczbaPrzyciskow
- {
- set %cele %cele + 1
- gosub DodajButton
- }
- if %cele > 1
- gosub PrzesunListe 2 %cele
- set %tabimiona1 %imie
- set %tab1 #ltargetid
- menu set Target1 %tabimiona1
- set %imie N/A
- set #lpc 10
- return
- sub PrzesunListe
- for %i %2 %1
- {
- set %j %i - 1
- set %tabimiona . %i %tabimiona . %j
- set %tab . %i %tab . %j
- menu set Target , %i %tabimiona . %i
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement