Facebook
From Emerald Mousedeer, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 151
  1.  
  2.     ;by odzi
  3.     ;ver. 1.1
  4.     ;Kox magii/inta
  5.     ;Skrypt w automacie czaruje anexy, i co 30 min zaczyna rzucac vas flamy, po zabiciu wszystkich mobow w kolo dzwoni i zatrzymuje skrypt
  6.     ;Gdy %automat jest 0, czaruje vas flamy w atakujacy nas cel.
  7.     ;Skrypt leczy nas kiedy dostaniemy obrażenia większe od 30 hp.
  8.  
  9.     set %int 54                  ;<- Ile mamy inta, aby skrypt wiedzial kiedy rzucac blesa
  10.     set %automat 0                ;<- Czy skrypt ma czarowac w automacie anexy, czy automatycznie vas flamy [0 - vas flamy , 1 - anexy]
  11.     set %mana 15                  ;<- Od ilu ma medytowac
  12.     set %sciezka F:ringin.wav    ;<- Sciezka do dzwieku
  13.  
  14.     ;==============================================================================================================================================================
  15.  
  16.     set %ji #jindex
  17.     set #lpc 1000
  18.     set %czar 0
  19.     set *medyt 0
  20.     set *bles 0
  21.     set *czar 0
  22.     set %piorun 0
  23.     set %klatwa 0
  24.     set %timer #scnt + 1800
  25.     set %time 0
  26.  
  27.     ;==============================================================================================================================================================
  28.  
  29.     repeat
  30.     {
  31.           if %automat = 1
  32.           {
  33.              if %time < #scnt
  34.              {
  35.                 set #sysmsgcol 75
  36.                 set %odlicz %timer - #scnt
  37.                 set %odlicz %odlicz / 60
  38.                 event sysmessage Pozostalo: %odlicz min
  39.                 set %time #scnt + 60
  40.              }
  41.              if #enemyid = N/A
  42.              {
  43.                 sound %sciezka
  44.                 halt
  45.              }
  46.           }
  47.     set *medyt 0
  48.     set *bles 0
  49.     set *czar 0
  50.           if #charstatus = A
  51.           {
  52.              repeat
  53.              until #charstatus <> A
  54.           }
  55.           set %hp #maxhits - 30
  56.           if #hits <= %hp && #mana > 10
  57.           {
  58.              if #mana < 10
  59.                 gosub medyt
  60.              gosub lecz
  61.              if #result = strata
  62.                 continue
  63.           }
  64.           if #int = %str
  65.           {
  66.              set *bles 1
  67.              gosub bles
  68.           }
  69.           if #mana <= %mana
  70.           {
  71.              gosub medyt
  72.              if #result = lecz || #result = powrot
  73.                 continue
  74.           }
  75.           if #enemyid <> N/A
  76.           {
  77.              finditem * G_14
  78.              for #findindex 1 #findcnt
  79.              {
  80.                  if #findid = #enemyid
  81.                  {
  82.                     gosub czaruj
  83.                     ;if %czar = 2
  84.                     ;{
  85.                        ;gosub medyt
  86.                        ;set %czar 0
  87.                     ;}
  88.                  }
  89.              }
  90.           }
  91.     }
  92.     until #false
  93.  
  94.     sub bles
  95.     repeat
  96.     {
  97.           event macro 15 16
  98.           set %czas #scnt + 7
  99.             repeat
  100.             {
  101.                   if %ji < #jindex
  102.                   {
  103.                      set %ji %ji + 1
  104.                      scanjournal %ji
  105.                      if Straciles_ in #journal
  106.                      {
  107.                         wait 4s
  108.                         return
  109.                      }
  110.                      if Zapisywanie in #journal
  111.                         gosub zapis
  112.                   }
  113.                   if #charstatus = A
  114.                      return
  115.                   if %czas < #scnt
  116.                                 return
  117.             }
  118.             until #targcurs = 1
  119.             event macro 23
  120.             set %czas #scnt + 1
  121.             repeat
  122.             {
  123.                   if %ji < #jindex
  124.                   {
  125.                      set %ji %ji + 1
  126.                      scanjournal %ji
  127.                      if Straciles_ in #journal
  128.                         return strata
  129.                      if Zapisywanie in #journal
  130.                         gosub zapis
  131.                   }
  132.                   if #charstatus = A
  133.                      return
  134.                   if #targcurs <> 0 && %czas < #scnt
  135.                      event macro 23
  136.             }
  137.             until #targcurs = 0
  138.             event macro 15 14
  139.             wait 3s
  140.             set *bles 0
  141.             return
  142.     }
  143.     until #false
  144.  
  145.     sub lecz
  146.     set #lpc 1000
  147.     repeat
  148.     {
  149.             if #mana < 11
  150.                gosub medyt
  151.             event macro 15 28
  152.             set %czas #scnt + 7
  153.             repeat
  154.             {
  155.                   if %ji < #jindex
  156.                   {
  157.                      set %ji %ji + 1
  158.                      scanjournal %ji
  159.                      if Straciles_ in #journal
  160.                      {
  161.                         wait 4s
  162.                         return
  163.                      }
  164.                      if Zapisywanie in #journal
  165.                         gosub zapis
  166.                   }
  167.                   if #charstatus = A
  168.                      return
  169.                   if %czas < #scnt
  170.                                 return
  171.             }
  172.             until #targcurs = 1
  173.             event macro 23 0
  174.             event macro 23 0
  175.             set %czas #scnt2 + 3
  176.             repeat
  177.             {
  178.                   if %ji < #jindex
  179.                   {
  180.                      set %ji %ji + 1
  181.                      scanjournal %ji
  182.                      if Straciles_ in #journal
  183.                         return strata
  184.                      if Zapisywanie in #journal
  185.                         gosub zapis
  186.                   }
  187.                   if #targcurs <> 0
  188.                      event macro 23 0
  189.                   if #charstatus = A
  190.                      return
  191.             }
  192.             until #targcurs = 0
  193.             wait 1s
  194.             return
  195.     }
  196.     until #false
  197.     return
  198.  
  199.     sub zapis
  200.     set #lpc 1000
  201.     repeat
  202.     {
  203.     if %ji < #jindex
  204.     {
  205.        set %ji %ji + 1
  206.        scanjournal %ji
  207.        if Koniec_zapisywania. in #journal
  208.           return
  209.     }
  210.     }
  211.     until #false
  212.     return
  213.  
  214.     sub czaruj
  215.     set %ji #jindex
  216.         set *czar 1
  217.         set %hp #maxhits - 30
  218.         if #hits < %hp
  219.            return
  220.         if #mana < %mana
  221.            return
  222.         if %automat = 1
  223.         {
  224.            if %timer > #scnt
  225.            {
  226.               event macro 15 37
  227.               repeat
  228.               {
  229.                     event macro 26 0
  230.                     if #ltargetid = #charid || #ltargetid = PZWNG
  231.                        continue
  232.               }
  233.               until #ltargetid <> #charid
  234.            }
  235.            if %timer < #scnt
  236.            {
  237.               set #ltargetid #enemyid
  238.               event macro 15 17 ;37
  239.            }
  240.         }
  241.         if %automat = 0
  242.         {
  243.            set #ltargetid #enemyid
  244.            event macro 15 17
  245.         }
  246.         set %czas #scnt + 5
  247.         repeat
  248.         {
  249.               if %klatwa > 4 && %piorun > 0
  250.               {
  251.                  set %klatwa 0
  252.                  set %piorun 0
  253.               }
  254.               if #hits <= %hp && #mana > 10
  255.           {
  256.               key esc
  257.              if #mana < 10
  258.                 gosub medyt
  259.              return
  260.              if #result = strata
  261.                 continue
  262.           }
  263.               if %czas < #scnt
  264.                  return
  265.               if %ji < #jindex
  266.               {
  267.                  set %ji %ji + 1
  268.                  scanjournal %ji
  269.                  if Zapisywanie in #journal
  270.                     gosub zapis
  271.                  if Czar_sie_nie_ in #journal
  272.                     return
  273.                  if Stracil in #journal
  274.                  {
  275.                     set *czar 0
  276.                     wait 4s
  277.                     return
  278.                  }
  279.               }
  280.               if #charstatus = A
  281.               {
  282.                  set *czar 0
  283.                      return
  284.               }
  285.         }
  286.         until #targcurs = 1
  287.         event macro 22 0
  288.         set %czas #scnt + 1
  289.         repeat
  290.         {
  291.               if #hits <= %hp && #mana > 10
  292.           {
  293.               key esc
  294.              if #mana < 10
  295.                 gosub medyt
  296.              return
  297.              if #result = strata
  298.                 continue
  299.           }
  300.               if #charstatus = A
  301.                      return
  302.               if %czas < #scnt
  303.                  event macro 22
  304.         }
  305.         until #targcurs = 0
  306.         wait 3
  307.         set %czar %czar + 1
  308.         set *czar 0
  309.         if %klatwa > 4 && %piorun > 0
  310.         {
  311.            set %klatwa 0
  312.            set %piorun 0
  313.         }
  314.     return
  315.  
  316.     sub medyt
  317.     set *medyt 1
  318.     event macro 13 46
  319.     set %czas #scnt + 10
  320.     set %czas1 #scnt + 5
  321.     repeat
  322.     {
  323.           if %ji < #jindex
  324.           {
  325.               set %ji %ji + 1
  326.               scanjournal %ji
  327.               if *medytuje* in #journal || Rozpoczynasz_ in #journal
  328.                  break
  329.               if You_must_ in #journal
  330.                  event macro 13 46
  331.               if %czas1 < #scnt
  332.                  event macro 13 46
  333.           }
  334.           set %hp #maxhits - 30
  335.           if #hits <= %hp && #mana > 10
  336.            return lecz
  337.           if #charstatus = A
  338.                      return
  339.     }
  340.     until %czas < #scnt
  341.     set %czas #scnt + 30
  342.     repeat
  343.     {
  344.           set %hp #maxhits - 30
  345.               if #hits <= %hp && #mana > 10
  346.                  return lecz
  347.           set %mana1 #mana
  348.           set %czas2 #scnt + 1
  349.           if #charstatus = A
  350.                      return
  351.           while %czas2 < #scnt
  352.           {
  353.                 if #charstatus = A
  354.                      return
  355.               set %mana2 #mana - %mana1
  356.               if %mana2 < 6
  357.                  event macro 13 46
  358.           }
  359.           if %ji < #jindex
  360.           {
  361.              set %ji %ji + 1
  362.              scanjournal %ji
  363.              if Straciles in #journal || Stracilas in #journal
  364.              {
  365.                 set *medyt 0
  366.                     return strata
  367.              }
  368.              if Nie_mozesz_sie_skoncentrowac. in #journal
  369.              {
  370.                 set *medyt 0
  371.                     return strata
  372.              }
  373.              if Konczysz_ in #journal && #mana < #maxmana
  374.              {
  375.                 set *medyt 0
  376.                 return powrot
  377.              }
  378.           }
  379.           if #charstatus = A
  380.                      return
  381.           if #mana = #maxmana
  382.           {
  383.              set *medyt 0
  384.                 return nie
  385.           }
  386.     }
  387.     until %czas < #scnt
  388.     return
  389.  
  390.  
  391.