- ; Fishing z lodzi by: -=Deathek=-
- ; Makro sluzy do lowienia ryb wedka z lodzi.
- ; Lowi ono we wszystkich mozliwych polach wokol lodzi,
- ; pomijajac te, na ktorych znajduje sie lodz. Zasieg
- ; jest regulowany zmienna %dis - okresla ona ostatnia
- ; kratke od postaci w lini prostej (czyli po
- ; wspolrzednej X, lub Y), w ktorej mozemy lowic ryby.
- ; Makro samo tnie ryby na steki, wywala je kratke
- ; przed postac, pozywia sie, wyrzuca smieci do
- ; wskazanego worka. Otwiera takze muszle, a muszelki
- ; wyrzuca pod nogi postaci.
- ; Po skonczonym lowieniu w danym miejscu, pokazuje
- ; konsole ulatwiajaca nawigacje. Po przemieszczeniu sie,
- ; naciskamy OK, a makro od nowa zaczyna lowic.
- ; Wszelkie pytania kierowac... na gore tego opisu - jest
- ; tutaj raczej wszystko. Kontakt wylacznie na ircu.
- ; Milego makrowania - Deathek.
- ; Jezeli grasz na DM/VF, mozesz dac ta wartosc na #true, a przyspieszy to delikatnie polow siecia
- set %dmvf #true
- ; Czy ma jechac w kolko w jednym miejscu - bez przemieszczen (tak - #true, nie - #false)
- set %perm #true
- ; Czy ma cwiczyc hide'a, czy nie (tak - #true, nie - #false)
- set %hide #false
- ; Zasieg (szczegoly w opisie)
- set %dis 6
- ; Maksymalna waga:
- set %waga 800
- ;---Komendy do sterowania lodzia----
- set %naprzod naprzod
- set %lewo lewo
- set %prawo prawo
- set %tyl wstecz
- set %start wynurz , #spc , kotwice
- set %stop zatrzymaj , #spc , sie
- set %szybciej cala
- set %skret skrec , #spc , w , #spc
- set %obroc obroc
- ;---Koniec komend do poruszania lodka---
- set %mdis 0 - %dis
- finditem XHF_KDF_HSL_ C_ , #BACKPACKID
- if #findkind = -1
- {
- event sysmessage Nie masz wedki/sieci, a chcesz lowic?
- halt
- }
- set %wedka #findid
- set #lobjectid %wedka
- namespace local ns0
- set !kierunek Polnoc
- namespace local ns2
- set !kierunek Wschod
- namespace local ns4
- set !kierunek Poludnie
- namespace local ns6
- set !kierunek Zachod
- event sysmessage Stan przy maszcie od strony kadluba, patrzac w strone kadluba (patrz rysunek) i daj [Enter]
- wait 30
- event sysmessage ____________,
- wait 5
- event sysmessage / I
- wait 5
- event sysmessage < <- O<-< [O] I
- wait 5
- event sysmessage \____________I
- e1:
- onhotkey enter
- goto d1
- goto e1
- d1:
- if #chardir <> 0 && #chardir <> 2 && #chardir <> 4 && #chardir <> 6
- {
- event sysmessage Zle stanales. Kadlub moze byc skierowany tylko na Polnoc/Poludnie/Wschod/Zachod, a Ty nie patrzysz w zadna z tych stron.
- wait 5
- event sysmessage Stan poprawnie i nacisnij [Enter]
- e2:
- onhotkey enter
- goto d1
- goto e2
- }
- once_again:
- set %zarcie #scnt
- namespace local ns , #chardir
- event sysmessage Patrzysz na !kierunek (i w ta strone powinien byc zwrocony kadlub)
- set %sub makro , #chardir
- gosub %sub
- if #result = #true && %perm <> #true
- {
- event sysmessage Wiecej juz w tym miejscu nie zlowisz. Wybierz kierunek,
- + w ktorym chcesz sie poruszac.
- event sysmessage W razie jakiegokolwiek poruszania sie, pamietaj,
- + aby ustawic postac w pozycji poczatkowej.
- gosub menu
- goto once_again
- }
- goto once_again
- sub makro4
- {
- for %x %dis %mdis
- {
- for %y %dis %mdis
- {
- set #ltargetx #charposx + %x
- set #ltargety #charposy + %y
- if ( ( %x = 2 || %x = -2 ) && ( %y > -3 && %y < 1 ) ) || ( ( %x = 1 || %x = -1 ) && ( %y < 4 ) ) || ( %x = 0 && %y <> 6 )
- goto pomin4
- gosub lowienie #ltargetx #ltargety
- pomin4:
- }
- }
- return #true
- }
- sub makro2
- {
- for %x %dis %mdis
- {
- for %y %dis %mdis
- {
- set #ltargetx #charposx + %x
- set #ltargety #charposy + %y
- if ( ( %y = 2 || %y = -2 ) && ( %x > -3 && %x < 1 ) ) || ( ( %y = 1 || %y = -1 ) && ( %x < 4 ) ) || ( %y = 0 && %x <> 6 )
- goto pomin2
- gosub lowienie #ltargetx #ltargety
- pomin2:
- }
- }
- return #true
- }
- sub makro0
- {
- for %x %dis %mdis
- {
- for %y %dis %mdis
- {
- set #ltargetx #charposx + %x
- set #ltargety #charposy + %y
- if ( ( %x = 2 || %x = -2 ) && ( %y < 3 && %y > -1 ) ) || ( ( %x = 1 || %x = -1 ) && ( %y > -4 ) ) || ( %x = 0 && %y <> -6 )
- goto pomin4
- gosub lowienie #ltargetx #ltargety
- pomin4:
- }
- }
- return #true
- }
- sub makro6
- {
- for %x %dis %mdis
- {
- for %y %dis %mdis
- {
- set #ltargetx #charposx + %x
- set #ltargety #charposy + %y
- if ( ( %y = 2 || %y = -2 ) && ( %x < 3 && %x > -1 ) ) || ( ( %y = 1 || %y = -1 ) && ( %x > -4 ) ) || ( %y = 0 && %x <> -6 )
- goto pomin2
- gosub lowienie #ltargetx #ltargety
- pomin2:
- }
- }
- return #true
- }
- sub lowienie
- {
- set %count 0
- set %scnthide #scnt
- subl:
- if %hide = #true
- {
- if #scnt - %scnthide > 10
- {
- event macro 13 21
- set %scnthide #scnt
- }
- }
- gosub check
- set #ltargetkind 2
- finditem %wedka
- if #findkind = -1
- {
- gosub wedka
- set %wedka #result
- }
- set #lobjectid %wedka
- set %scnt #scnt
- event macro 17
- repeat
- until #targcurs = 1 || #scnt - %scnt > 1
- if #targcurs = 0
- goto subl
- set #ltargetx %1
- set #ltargety %2
- event macro 22
- if %dmvf = #true
- set %count %count + 1
- wait 5
- for %i 0 2
- {
- scanjournal #jindex - %i
- if daleko in #journal || widzisz in #journal || mozesz in #journal
- goto retl
- }
- event sysmessage N/A
- repeat
- {
- scanjournal #jindex
- }
- until #journal <> N/A && Zapisywanie notin #journal && #journal <> thx && swiat notin #journal && wyciagac notin #journal
- if miejsca in #sysmsg || miejsca in #journal
- gosub check 1
- if bylo in #journal || okolicy in #journal || %count = 2
- goto retl
- goto subl
- retl:
- return
- }
- sub wedka
- {
- finditem XHF_KDF C_
- if #findkind = -1
- {
- event sysmessage Nie masz wiecej wedek/sieci!
- sound
- halt
- }
- set %wedka #findid
- set #lobjectid %wedka
- event macro 17
- return %wedka
- }
- sub dir0
- if %1 = 1
- set %return %naprzod , #spc , %lewo
- if %1 = 2
- set %return %naprzod
- if %1 = 3
- set %return %naprzod , #spc , %prawo
- if %1 = 4
- set %return %prawo
- if %1 = 5
- set %return %prawo , #spc , %tyl
- if %1 = 6
- set %return %tyl
- if %1 = 7
- set %return %lewo , #spc , %tyl
- if %1 = 8
- set %return %lewo
- return %return
- sub dir2
- if %1 = 1
- set %return %lewo , #spc , %tyl
- if %1 = 2
- set %return %lewo
- if %1 = 3
- set %return %naprzod , #spc , %lewo
- if %1 = 4
- set %return %naprzod
- if %1 = 5
- set %return %naprzod , #spc , %prawo
- if %1 = 6
- set %return %prawo
- if %1 = 7
- set %return %prawo , #spc , %tyl
- if %1 = 8
- set %return %tyl
- return %return
- sub dir4
- if %1 = 1
- set %return %prawo , #spc , %tyl
- if %1 = 2
- set %return %tyl
- if %1 = 3
- set %return %lewo , #spc , %tyl
- if %1 = 4
- set %return %lewo
- if %1 = 5
- set %return %naprzod , #spc , %lewo
- if %1 = 6
- set %return %naprzod
- if %1 = 7
- set %return %naprzod , #spc , %prawo
- if %1 = 8
- set %return %prawo
- return %return
- sub dir6
- if %1 = 1
- set %return %naprzod , #spc , %prawo
- if %1 = 2
- set %return %prawo
- if %1 = 3
- set %return %prawo , #spc , %tyl
- if %1 = 4
- set %return %tyl
- if %1 = 5
- set %return %lewo , #spc , %tyl
- if %1 = 6
- set %return %lewo
- if %1 = 7
- set %return %naprzod , #spc , %lewo
- if %1 = 8
- set %return %naprzod
- return %return
- sub menu
- ;---MENU---
- menu clear
- set %sx 260
- set %sy 140
- menu window title NAWIGACJA
- menu window size %sx %sy
- menu window color black
- menu font size 10
- menu font color lime
- menu font BGColor black
- menu font align left
- menu Image Create p 0 0 250 150
- menu image line p 80 35 80 55 lime 2
- menu image line p 80 85 80 105 lime 2
- menu image line p 45 70 65 70 lime 2
- menu image line p 95 70 115 70 lime 2
- menu image line p 50 40 65 55 lime 2
- menu image line p 110 40 95 55 lime 2
- menu image line p 50 100 65 85 lime 2
- menu image line p 110 100 95 85 lime 2
- menu button ok 66 56 29 29 OK
- menu button 1 72 17 16 16
- menu button 2 111 23 16 16
- menu button 3 117 62 16 16
- menu button 4 111 101 16 16
- menu button 5 72 107 16 16
- menu button 6 33 101 16 16
- menu button 7 27 62 16 16
- menu button 8 33 23 16 16
- menu button start 160 17 38 22 Start
- menu button stop 199 17 38 22 Stop
- menu font size 8
- menu text skrety 180 40 -skrety-
- menu button lewo 160 55 38 22 Lewo
- menu button prawo 199 55 38 22 Prawo
- menu button obroc 160 78 77 22 OBROC
- menu check check 160 101 64 16 #true Szybko
- gosub pokaz
- ;--Koniec--
- repeat
- {
- mtop:
- set #menubutton N/A
- repeat
- until #menubutton <> N/A
- menu get check
- set %check #menures
- if #menubutton = OK
- goto menuend
- set %dir dir , #chardir
- if #menubutton = lewo
- {
- event macro 1 0 %skret , %lewo
- goto mtop
- }
- if #menubutton = prawo
- {
- event macro 1 0 %skret , %prawo
- goto mtop
- }
- if #menubutton = obroc
- {
- event macro 1 0 %obroc
- goto mtop
- }
- if #menubutton = stop
- {
- event macro 1 0 %stop
- goto mtop
- }
- if #menubutton = start
- {
- event macro 1 0 %start
- goto mtop
- }
- gosub %dir #menubutton
- set %msg #result
- set #menubutton N/A
- if %check = #true
- set %msg %szybciej , #spc , %msg
- event macro 1 0 %msg
- menuend:
- }
- until #menubutton = OK
- menu hide
- return
- sub pokaz
- menu window transparent 1
- menu show
- for %i 1 25
- {
- set %wait ( %i * 4 )
- menu window transparent %wait
- wait 1
- }
- return
- sub check
- if %1 = 1
- goto pomin_if
- if #weight > %waga
- {
- pomin_if:
- finditem TSF_FMH
- if #findkind <> -1
- {
- set #lobjectid #findid
- }
- else
- {
- event sysmessage Nie masz noza zeby pociac.
- goto start
- }
- set #ltargetkind 1
- repeat
- {
- finditem FQD_GQD_DQD_EQD_IEF_XDF_HEF_YDF_ C_ , #backpackid
- event property #findid
- if #findkind = -1 || magi in #property
- goto ret
- set #ltargetid #findid
- set %u 0
- rep:
- event macro 17
- repeat
- {
- set %u %u + 1
- if %u >= 6
- {
- set %u 0
- goto rep
- }
- wait 5
- }
- until #targcurs = 1
- event macro 22
- set %w #scnt
- repeat
- {
- scanjournal #jindex
- }
- until Pociales in #journal || plecaka in #journal || razem in #journal || #scnt - %w > 10
- if #scnt - %w > 10
- goto rep
- wait 15
- ret:
- ignoreitem #findid
- }
- until #findkind = -1
- event sysmessage Pociete.
- ignoreitem reset
- repeat
- {
- finditem LXF_YWF_ZWF_GXF C_ , #backpackid
- if #findkind = -1
- goto retci
- event property #findid
- if Many in #property
- {
- ignoreitem #findid
- }
- else
- {
- set #lobjectid #findid
- event macro 17
- }
- wait 10
- retci:
- }
- until #findkind = -1
- repeat
- {
- finditem IND C_ , #backpackid
- if #findkind = -1
- goto retcie2
- exevent drag #findid #findstack
- wait 5
- if #chardir = 0
- {
- set %dx #charposx
- set %dy #charposy - 1
- }
- if #chardir = 2
- {
- set %dx #charposx + 1
- set %dy #charposy
- }
- if #chardir = 4
- {
- set %dx #charposx
- set %dy #charposy + 1
- }
- if #chardir = 6
- {
- set %dx #charposx - 1
- set %dy #charposy
- }
- exevent dropg %dx %dy #charposz
- wait 5
- retcie2:
- }
- repeat
- {
- finditem JJK_OJK_RCK_SCK_TJK_PVI_ZVI_TVI_NVI_KXF_XWF_MJK_GUF_ C_ , #backpackid
- if #findkind = -1
- goto retcie
- exevent drag #findid #findstack
- wait 5
- exevent dropg #charposx #charposy #charposz
- wait 5
- retcie:
- }
- until #findkind = -1
- if #weight > %waga
- {
- display ok waga.
- event sysmessage Zmniejsz wage do co najmniej #maxweight i makro ruszy dalej
- repeat
- until #weight <= #maxweight
- }
- }
- return
- }
- return