Facebook
From Coral Hamster, 7 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 276
  1.  ; Fishing z lodzi by: -=Deathek=-
  2. ; Makro sluzy do lowienia ryb wedka z lodzi.
  3. ; Lowi ono we wszystkich mozliwych polach wokol lodzi,
  4. ; pomijajac te, na ktorych znajduje sie lodz. Zasieg
  5. ; jest regulowany zmienna %dis - okresla ona ostatnia
  6. ; kratke od postaci w lini prostej (czyli po
  7. ; wspolrzednej X, lub Y), w ktorej mozemy lowic ryby.
  8. ; Makro samo tnie ryby na steki, wywala je kratke
  9. ; przed postac, pozywia sie, wyrzuca smieci do
  10. ; wskazanego worka. Otwiera takze muszle, a muszelki
  11. ; wyrzuca pod nogi postaci.
  12. ; Po skonczonym lowieniu w danym miejscu, pokazuje
  13. ; konsole ulatwiajaca nawigacje. Po przemieszczeniu sie,
  14. ; naciskamy OK, a makro od nowa zaczyna lowic.
  15. ; Wszelkie pytania kierowac... na gore tego opisu - jest
  16. ; tutaj raczej wszystko. Kontakt wylacznie na ircu.
  17. ; Milego makrowania - Deathek.
  18.  
  19. ; Jezeli grasz na DM/VF, mozesz dac ta wartosc na #true, a przyspieszy to delikatnie polow siecia
  20. set %dmvf #true
  21. ; Czy ma jechac w kolko w jednym miejscu - bez przemieszczen (tak - #true, nie - #false)
  22. set %perm #true
  23. ; Czy ma cwiczyc hide'a, czy nie (tak - #true, nie - #false)
  24. set %hide #false
  25. ; Zasieg (szczegoly w opisie)
  26. set %dis 6
  27. ; Maksymalna waga:
  28. set %waga 800
  29.  
  30. ;---Komendy do sterowania lodzia----
  31. set %naprzod naprzod
  32. set %lewo lewo
  33. set %prawo prawo
  34. set %tyl wstecz
  35. set %start wynurz , #spc , kotwice
  36. set %stop zatrzymaj , #spc , sie
  37. set %szybciej cala
  38. set %skret skrec , #spc , w , #spc
  39. set %obroc obroc
  40. ;---Koniec komend do poruszania lodka---
  41.  
  42. set %mdis 0 - %dis
  43. finditem XHF_KDF_HSL_ C_ , #BACKPACKID
  44. if #findkind = -1
  45. {
  46.  event sysmessage Nie masz wedki/sieci, a chcesz lowic?
  47.  halt
  48. }
  49. set %wedka #findid
  50. set #lobjectid %wedka
  51. namespace local ns0
  52. set !kierunek Polnoc
  53. namespace local ns2
  54. set !kierunek Wschod
  55. namespace local ns4
  56. set !kierunek Poludnie
  57. namespace local ns6
  58. set !kierunek Zachod
  59. event sysmessage Stan przy maszcie od strony kadluba, patrzac w strone kadluba (patrz rysunek) i daj [Enter]
  60. wait 30
  61. event sysmessage    ____________,
  62. wait 5
  63. event sysmessage  /                         I
  64. wait 5
  65. event sysmessage <   <-  O<-< [O]        I
  66. wait 5
  67. event sysmessage   \____________I
  68. e1:
  69. onhotkey enter
  70. goto d1
  71. goto e1
  72. d1:
  73.  
  74. if #chardir <> 0 && #chardir <> 2 && #chardir <> 4 && #chardir <> 6
  75. {
  76.  event sysmessage Zle stanales. Kadlub moze byc skierowany tylko na Polnoc/Poludnie/Wschod/Zachod, a Ty nie patrzysz w zadna z tych stron.
  77.  wait 5
  78.  event sysmessage Stan poprawnie i nacisnij [Enter]
  79.  e2:
  80.  onhotkey enter
  81.  goto d1
  82.  goto e2
  83. }
  84. once_again:
  85. set %zarcie #scnt
  86. namespace local ns , #chardir
  87. event sysmessage Patrzysz na !kierunek (i w ta strone powinien byc zwrocony kadlub)
  88. set %sub makro , #chardir
  89. gosub %sub
  90. if #result = #true && %perm <> #true
  91. {
  92.  event sysmessage Wiecej juz w tym miejscu nie zlowisz. Wybierz kierunek,
  93.  + w ktorym chcesz sie poruszac.
  94.  event sysmessage W razie jakiegokolwiek poruszania sie, pamietaj,
  95.  + aby ustawic postac w pozycji poczatkowej.
  96.  gosub menu
  97.  goto once_again
  98. }
  99. goto once_again
  100.  
  101. sub makro4
  102. {
  103.  for %x %dis %mdis
  104.  {
  105.   for %y %dis %mdis
  106.   {
  107.    set #ltargetx #charposx + %x
  108.    set #ltargety #charposy + %y
  109.    if ( ( %x = 2 || %x = -2 ) && ( %y > -3 && %y < 1 ) ) || ( ( %x = 1 || %x = -1 ) && ( %y < 4 ) ) || ( %x = 0 && %y <> 6 )
  110.     goto pomin4
  111.    gosub lowienie #ltargetx #ltargety
  112.    pomin4:
  113.   }
  114.  }
  115.  return #true
  116. }
  117.  
  118. sub makro2
  119. {
  120.  for %x %dis %mdis
  121.  {
  122.   for %y %dis %mdis
  123.   {
  124.    set #ltargetx #charposx + %x
  125.    set #ltargety #charposy + %y
  126.    if ( ( %y = 2 || %y = -2 ) && ( %x > -3 && %x < 1 ) ) || ( ( %y = 1 || %y = -1 ) && ( %x < 4 ) ) || ( %y = 0 && %x <> 6 )
  127.     goto pomin2
  128.    gosub lowienie #ltargetx #ltargety
  129.    pomin2:
  130.   }
  131.  }
  132.  return #true
  133. }
  134.  
  135. sub makro0
  136. {
  137.  for %x %dis %mdis
  138.  {
  139.   for %y %dis %mdis
  140.   {
  141.    set #ltargetx #charposx + %x
  142.    set #ltargety #charposy + %y
  143.    if ( ( %x = 2 || %x = -2 ) && ( %y < 3 && %y > -1 ) ) || ( ( %x = 1 || %x = -1 ) && ( %y > -4 ) ) || ( %x = 0 && %y <> -6 )
  144.     goto pomin4
  145.    gosub lowienie #ltargetx #ltargety
  146.    pomin4:
  147.   }
  148.  }
  149.  return #true
  150. }
  151.  
  152. sub makro6
  153. {
  154.  for %x %dis %mdis
  155.  {
  156.   for %y %dis %mdis
  157.   {
  158.    set #ltargetx #charposx + %x
  159.    set #ltargety #charposy + %y
  160.    if ( ( %y = 2 || %y = -2 ) && ( %x < 3 && %x > -1 ) ) || ( ( %y = 1 || %y = -1 ) && ( %x > -4 ) ) || ( %y = 0 && %x <> -6 )
  161.     goto pomin2
  162.    gosub lowienie #ltargetx #ltargety
  163.    pomin2:
  164.   }
  165.  }
  166.  return #true
  167. }
  168.  
  169. sub lowienie
  170. {
  171.  set %count 0
  172.  set %scnthide #scnt
  173.  subl:
  174.  if %hide = #true
  175.  {
  176.   if #scnt - %scnthide > 10
  177.   {
  178.    event macro 13 21
  179.    set %scnthide #scnt
  180.   }
  181.  }
  182.  gosub check
  183.  set #ltargetkind 2
  184.  finditem %wedka
  185.  if #findkind = -1
  186.  {
  187.   gosub wedka
  188.   set %wedka #result
  189.  }
  190.  set #lobjectid %wedka
  191.  set %scnt #scnt
  192.  event macro 17
  193.  repeat
  194.  until #targcurs = 1 || #scnt - %scnt > 1
  195.  if #targcurs = 0
  196.   goto subl
  197.  set #ltargetx %1
  198.  set #ltargety %2
  199.  event macro 22
  200.  if %dmvf = #true
  201.   set %count %count + 1
  202.  wait 5
  203.  for %i 0 2
  204.  {
  205.   scanjournal #jindex - %i
  206.   if daleko in #journal || widzisz in #journal || mozesz in #journal
  207.    goto retl
  208.  }
  209.  event sysmessage N/A
  210.  repeat
  211.  {
  212.   scanjournal #jindex
  213.  }
  214.  until #journal <> N/A && Zapisywanie notin #journal && #journal <> thx && swiat notin #journal && wyciagac notin #journal
  215.  if miejsca in #sysmsg || miejsca in #journal
  216.   gosub check 1
  217.  if bylo in #journal || okolicy in #journal || %count = 2
  218.   goto retl
  219.  goto subl
  220.  retl:
  221.  return
  222. }
  223.  
  224. sub wedka
  225. {
  226.  finditem XHF_KDF C_
  227.  if #findkind = -1
  228.  {
  229.   event sysmessage Nie masz wiecej wedek/sieci!
  230.   sound
  231.   halt
  232.  }
  233.  set %wedka #findid
  234.  set #lobjectid %wedka
  235.  event macro 17
  236.  return %wedka
  237. }
  238.  
  239. sub dir0
  240.  if %1 = 1
  241.   set %return %naprzod , #spc , %lewo
  242.  if %1 = 2
  243.   set %return %naprzod
  244.  if %1 = 3
  245.   set %return %naprzod , #spc , %prawo
  246.  if %1 = 4
  247.   set %return %prawo
  248.  if %1 = 5
  249.   set %return %prawo , #spc , %tyl
  250.  if %1 = 6
  251.   set %return %tyl
  252.  if %1 = 7
  253.   set %return %lewo , #spc , %tyl
  254.  if %1 = 8
  255.   set %return %lewo
  256. return %return
  257.  
  258. sub dir2
  259.  if %1 = 1
  260.   set %return %lewo , #spc , %tyl
  261.  if %1 = 2
  262.   set %return %lewo
  263.  if %1 = 3
  264.   set %return %naprzod , #spc , %lewo
  265.  if %1 = 4
  266.   set %return %naprzod
  267.  if %1 = 5
  268.   set %return %naprzod , #spc , %prawo
  269.  if %1 = 6
  270.   set %return %prawo
  271.  if %1 = 7
  272.   set %return %prawo , #spc , %tyl
  273.  if %1 = 8
  274.   set %return %tyl
  275. return %return
  276.  
  277. sub dir4
  278.  if %1 = 1
  279.   set %return %prawo , #spc , %tyl
  280.  if %1 = 2
  281.   set %return %tyl
  282.  if %1 = 3
  283.   set %return %lewo , #spc , %tyl
  284.  if %1 = 4
  285.   set %return %lewo
  286.  if %1 = 5
  287.   set %return %naprzod , #spc , %lewo
  288.  if %1 = 6
  289.   set %return %naprzod
  290.  if %1 = 7
  291.   set %return %naprzod , #spc , %prawo
  292.  if %1 = 8
  293.   set %return %prawo
  294. return %return
  295.  
  296. sub dir6
  297.  if %1 = 1
  298.   set %return %naprzod , #spc , %prawo
  299.  if %1 = 2
  300.   set %return %prawo
  301.  if %1 = 3
  302.   set %return %prawo , #spc , %tyl
  303.  if %1 = 4
  304.   set %return %tyl
  305.  if %1 = 5
  306.   set %return %lewo , #spc , %tyl
  307.  if %1 = 6
  308.   set %return %lewo
  309.  if %1 = 7
  310.   set %return %naprzod , #spc , %lewo
  311.  if %1 = 8
  312.   set %return %naprzod
  313. return %return
  314.  
  315. sub menu
  316.  ;---MENU---
  317.  menu clear
  318.  set %sx 260
  319.  set %sy 140
  320.  menu window title NAWIGACJA
  321.  menu window size %sx %sy
  322.  menu window color black
  323.  menu font size 10
  324.  menu font color lime
  325.  menu font BGColor black
  326.  menu font align left
  327.  menu Image Create p 0 0 250 150
  328.  menu image line p 80 35 80 55 lime 2
  329.  menu image line p 80 85 80 105 lime 2
  330.  menu image line p 45 70 65 70 lime 2
  331.  menu image line p 95 70 115 70 lime 2
  332.  menu image line p 50 40 65 55 lime 2
  333.  menu image line p 110 40 95 55 lime 2
  334.  menu image line p 50 100 65 85 lime 2
  335.  menu image line p 110 100 95 85 lime 2
  336.  menu button ok 66 56 29 29 OK
  337.  menu button 1 72 17 16 16
  338.  menu button 2 111 23 16 16
  339.  menu button 3 117 62 16 16
  340.  menu button 4 111 101 16 16
  341.  menu button 5 72 107 16 16
  342.  menu button 6 33 101 16 16
  343.  menu button 7 27 62 16 16
  344.  menu button 8 33 23 16 16
  345.  menu button start 160 17 38 22 Start
  346.  menu button stop 199 17 38 22 Stop
  347.  menu font size 8
  348.  menu text skrety 180 40  -skrety-
  349.  menu button lewo 160 55 38 22 Lewo
  350.  menu button prawo 199 55 38 22 Prawo
  351.  menu button obroc 160 78 77 22 OBROC
  352.  menu check check 160 101 64 16 #true Szybko
  353.  gosub pokaz
  354.  ;--Koniec--
  355.  repeat
  356.  {
  357.   mtop:
  358.   set #menubutton N/A
  359.   repeat
  360.   until #menubutton <> N/A
  361.   menu get check
  362.   set %check #menures
  363.   if #menubutton = OK
  364.    goto menuend
  365.   set %dir dir , #chardir
  366.   if #menubutton = lewo
  367.   {
  368.    event macro 1 0 %skret , %lewo
  369.    goto mtop
  370.   }
  371.   if #menubutton = prawo
  372.   {
  373.    event macro 1 0 %skret , %prawo
  374.    goto mtop
  375.   }
  376.   if #menubutton = obroc
  377.   {
  378.    event macro 1 0 %obroc
  379.    goto mtop
  380.   }
  381.   if #menubutton = stop
  382.   {
  383.    event macro 1 0 %stop
  384.    goto mtop
  385.   }
  386.   if #menubutton = start
  387.   {
  388.    event macro 1 0 %start
  389.    goto mtop
  390.   }
  391.   gosub %dir #menubutton
  392.   set %msg #result
  393.   set #menubutton N/A
  394.   if %check = #true
  395.    set %msg %szybciej , #spc , %msg
  396.   event macro 1 0 %msg
  397.   menuend:
  398.  }
  399.  until #menubutton = OK
  400.  menu hide
  401. return
  402.  
  403. sub pokaz
  404.  menu window transparent 1
  405.  menu show
  406.  for %i 1 25
  407.  {
  408.   set %wait ( %i * 4 )
  409.   menu window transparent %wait
  410.   wait 1
  411.  }
  412. return
  413.  
  414. sub check
  415. if %1 = 1
  416. goto pomin_if
  417. if #weight > %waga
  418. {
  419.  pomin_if:
  420.  finditem TSF_FMH
  421.  if #findkind <> -1
  422.  {
  423.  set #lobjectid #findid
  424.  }
  425.  else
  426.  {
  427.  event sysmessage Nie masz noza zeby pociac.
  428.   goto start
  429.  }
  430.  set #ltargetkind 1
  431.  repeat
  432.  {
  433.   finditem FQD_GQD_DQD_EQD_IEF_XDF_HEF_YDF_ C_ , #backpackid
  434.   event property #findid
  435.   if #findkind = -1 || magi in #property
  436.    goto ret
  437.   set #ltargetid #findid
  438.   set %u 0
  439.   rep:
  440.   event macro 17
  441.   repeat
  442.   {
  443.    set %u %u + 1
  444.    if %u >= 6
  445.    {
  446.     set %u 0
  447.     goto rep
  448.    }
  449.    wait 5
  450.   }
  451.  until #targcurs = 1
  452.  event macro 22
  453.  set %w #scnt
  454.  repeat
  455.  {
  456.   scanjournal #jindex
  457.  }
  458.  until Pociales in #journal || plecaka in #journal || razem in #journal || #scnt - %w > 10
  459.  if #scnt - %w > 10
  460.   goto rep
  461.  wait 15
  462.  ret:
  463.  ignoreitem #findid
  464.  }
  465.  until #findkind = -1
  466.  event sysmessage Pociete.
  467.  ignoreitem reset
  468.  repeat
  469.  {
  470.   finditem LXF_YWF_ZWF_GXF C_ , #backpackid
  471.   if #findkind = -1
  472.    goto retci
  473.   event property #findid
  474.   if Many in #property
  475.   {
  476.    ignoreitem #findid
  477.   }
  478.   else
  479.   {
  480.    set #lobjectid #findid
  481.    event macro 17
  482.   }
  483.   wait 10
  484.   retci:
  485.  }
  486.  until #findkind = -1
  487.  repeat
  488.  {
  489.   finditem IND C_ , #backpackid
  490.   if #findkind = -1
  491.    goto retcie2
  492.   exevent drag #findid #findstack
  493.   wait 5
  494.  if #chardir = 0
  495.  {
  496.   set %dx #charposx
  497.   set %dy #charposy - 1
  498.  }
  499.  if #chardir = 2
  500.  {
  501.   set %dx #charposx + 1
  502.   set %dy #charposy
  503.  }
  504.  if #chardir = 4
  505.  {
  506.   set %dx #charposx
  507.   set %dy #charposy + 1
  508.  }
  509.  if #chardir = 6
  510.  {
  511.   set %dx #charposx - 1
  512.   set %dy #charposy
  513.  }
  514.  exevent dropg %dx %dy #charposz
  515.   wait 5
  516.   retcie2:
  517.  }
  518.  repeat
  519.  {
  520.   finditem JJK_OJK_RCK_SCK_TJK_PVI_ZVI_TVI_NVI_KXF_XWF_MJK_GUF_ C_ , #backpackid
  521.   if #findkind = -1
  522.    goto retcie
  523.   exevent drag #findid #findstack
  524.   wait 5
  525.   exevent dropg #charposx #charposy #charposz
  526.   wait 5
  527.   retcie:
  528.  }
  529.  until #findkind = -1
  530.  if #weight > %waga
  531.  {
  532.   display ok waga.
  533.   event sysmessage Zmniejsz wage do co najmniej #maxweight i makro ruszy dalej
  534.   repeat
  535.   until #weight <= #maxweight
  536.  }
  537. }
  538. return
  539.  
  540.  
  541. }
  542. return