Advertisement
deadx2

Untitled

Nov 4th, 2017
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 28.82 KB | None | 0 0
  1. quest badania_biologa begin
  2.     state start begin
  3.         function refresh()
  4.             local etap = pc.getqf("biolog_etap")
  5.             local oddane = pc.getqf("oddane")
  6.             local czas = pc.getqf("czas")
  7.             local szansa = pc.getqf("szansa")
  8.             if pc.getqf("czas") < get_global_time() then
  9.                 pc.setqf("czas", 0)
  10.             end
  11.             local czas = pc.getqf("czas")
  12.             cmdchat("BiologWczytaj "..etap.." "..oddane.." "..szansa.." "..czas)
  13.         end
  14.        
  15.         when login begin
  16.             --timer("petla_automatycznego_odswiezania_1", 1)
  17.             cmdchat("OddajBiolog "..q.getcurrentquestindex())
  18.             chat(get_global_time())
  19.         end
  20.        
  21.         when login with pc.get_level() >= 0 begin
  22.             if pc.getqf("biolog_etap") == 0 then
  23.                 pc.setqf("biolog_etap", 1)
  24.                 pc.setqf("szansa", 70)
  25.                 pc.setqf("poziom", 30)
  26.                 badania_biologa.refresh()
  27.             else
  28.                 badania_biologa.refresh()
  29.             end
  30.         end
  31.        
  32.         when 28001.use begin
  33.             pc.setqf("czas", 0)
  34.             pc.remove_item(28001, 1)
  35.             badania_biologa.refresh()
  36.         end
  37.  
  38. ---- BIOLOG 30 LV.
  39.         when kill with npc.get_race() == 1301 or npc.get_race() == 1302 or npc.get_race() == 1303 or npc.get_race() == 1304 or npc.get_race() == 1305 or npc.get_race() == 1311 or npc.get_race() == 1312 or npc.get_race() == 1313 or npc.get_race() == 1314 or npc.get_race() == 1315 or npc.get_race() == 1331 or npc.get_race() == 1332 or npc.get_race() == 1333 or npc.get_race() == 1334 or npc.get_race() == 1335 or npc.get_race() == 1336 or npc.get_race() == 1337 or npc.get_race() == 1341 or npc.get_race() == 1342 or npc.get_race() == 1343 or npc.get_race() == 1344 or npc.get_race() == 1345 or npc.get_race() == 1346 or npc.get_race() == 1347 begin
  40.             if pc.getqf("biolog_etap") == 1 then
  41.                 local s = number(1, 50)
  42.                 if s == 1 then
  43.                     game.drop_item_with_ownership(28003, 1)
  44.                 end
  45.             end
  46.         end
  47.  
  48.         when button or info with pc.getqf("biolog_etap") == 1 begin
  49.             if pc.get_level() < 30 then
  50.                 syschat(">> Nie posiadasz minimum 30 poziomu aby rozpocząć to badanie!")
  51.                 return
  52.             end
  53.             if pc.count_item(28003) < 1 then
  54.                 syschat(">> Nie posiadasz przy sobie "..item_name(28003).." - zdobądź go i spróbuj ponownie!")
  55.                 return
  56.             end
  57.             if get_global_time() < pc.getqf("czas") then
  58.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  59.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  60.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  61.             else
  62.                 pc.remove_item(28003, 1)
  63.                 pc.setqf("czas", get_global_time()+10-1)
  64.                 local pass_percent = 70
  65.                 local s = number(1,100)
  66.                 if s <= pass_percent then
  67.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  68.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28003)..") został przyjęty pomyślnie.")
  69.                     badania_biologa.refresh()
  70.                 else
  71.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28003)..") był wadliwy, spróbuj ponownie.")
  72.                     badania_biologa.refresh()
  73.                 end
  74.                 if pc.getqf("oddane") == 10 then
  75.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  76.                     pc.setqf("oddane", 0)
  77.                     pc.setqf("czas", 0)
  78.                     pc.setqf("szansa", 70)
  79.                     pc.setqf("poziom", 50)
  80.                     pc.setqf("biolog_etap", 2)
  81.                     -- szybkość ruchu
  82.                     affect.add_collect(8, 20, 60*60*24*365*60) -- 60Years
  83.                     badania_biologa.refresh()
  84.                 end
  85.             end
  86.         end
  87.        
  88.  
  89.  
  90.  
  91. ---- BIOLOG 50 LV.
  92.         when kill with npc.get_race() == 601 or npc.get_race() == 602 or npc.get_race() == 603 or npc.get_race() == 604 or npc.get_race() == 631 or npc.get_race() == 632 or npc.get_race() == 633 or npc.get_race() == 634 or npc.get_race() == 635 or npc.get_race() == 636 or npc.get_race() == 637 or npc.get_race() == 651 or npc.get_race() == 652 or npc.get_race() == 653 or npc.get_race() == 654 or npc.get_race() == 655 or npc.get_race() == 656 or npc.get_race() == 657 begin
  93.             if pc.getqf("biolog_etap") == 2 then
  94.                 local s = number(1, 50)
  95.                 if s == 1 then
  96.                     game.drop_item_with_ownership(28005, 1)
  97.                 end
  98.             end
  99.         end
  100.        
  101.         when button or info with pc.getqf("biolog_etap") == 2 begin
  102.             if pc.get_level() < 50 then
  103.                 syschat(">> Nie posiadasz minimum 50 poziomu aby rozpocząć to badanie!")
  104.                 return
  105.             end
  106.             if pc.count_item(28005) < 1 then
  107.                 syschat(">> Nie posiadasz przy sobie "..item_name(28005).." - zdobądź go i spróbuj ponownie!")
  108.                 return
  109.             end
  110.             if get_global_time() < pc.getqf("czas") then
  111.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  112.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  113.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  114.             else
  115.                 pc.remove_item(28005, 1)
  116.                 pc.setqf("czas", get_global_time()+10-1)
  117.                 local pass_percent = 70
  118.                 local s = number(1,100)
  119.                 if s <= pass_percent then
  120.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  121.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28005)..") został przyjęty pomyślnie.")
  122.                     badania_biologa.refresh()
  123.                 else
  124.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28005)..") był wadliwy, spróbuj ponownie.")
  125.                     badania_biologa.refresh()
  126.                 end
  127.                 if pc.getqf("oddane") == 10 then
  128.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  129.                     pc.setqf("oddane", 0)
  130.                     pc.setqf("czas", 0)
  131.                     pc.setqf("szansa", 70)
  132.                     pc.setqf("poziom", 50)
  133.                     pc.setqf("biolog_etap", 3)
  134.                     -- szybkość ataku
  135.                     affect.add_collect(7, 6, 60*60*24*365*60) -- 60Years
  136.                     badania_biologa.refresh()
  137.                 end
  138.             end
  139.         end
  140.        
  141.  
  142.  
  143.  
  144. ---- BIOLOG 70 LV.
  145.         when kill with npc.get_race() == 1121 or npc.get_race() == 1122 or npc.get_race() == 1123 or npc.get_race() == 1124 or npc.get_race() == 1125 or npc.get_race() == 1126 or npc.get_race() == 1127 or npc.get_race() == 1131 or npc.get_race() == 1132 or npc.get_race() == 1133 or npc.get_race() == 1134 or npc.get_race() == 1135 or npc.get_race() == 1136 or npc.get_race() == 1137 begin
  146.             if pc.getqf("biolog_etap") == 3 then
  147.                 local s = number(1, 50)
  148.                 if s == 1 then
  149.                     game.drop_item_with_ownership(28007, 1)
  150.                 end
  151.             end
  152.         end
  153.        
  154.         when button or info with pc.getqf("biolog_etap") == 3 begin
  155.             if pc.get_level() < 70 then
  156.                 syschat(">> Nie posiadasz minimum 70 poziomu aby rozpocząć to badanie!")
  157.                 return
  158.             end
  159.             if pc.count_item(28007) < 1 then
  160.                 syschat(">> Nie posiadasz przy sobie "..item_name(28007).." - zdobądź go i spróbuj ponownie!")
  161.                 return
  162.             end
  163.             if get_global_time() < pc.getqf("czas") then
  164.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  165.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  166.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  167.             else
  168.                 pc.remove_item(28007, 1)
  169.                 pc.setqf("czas", get_global_time()+10-1)
  170.                 local pass_percent = 70
  171.                 local s = number(1,100)
  172.                 if s <= pass_percent then
  173.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  174.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28007)..") został przyjęty pomyślnie.")
  175.                     badania_biologa.refresh()
  176.                 else
  177.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28007)..") był wadliwy, spróbuj ponownie.")
  178.                     badania_biologa.refresh()
  179.                 end
  180.                 if pc.getqf("oddane") == 15 then
  181.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  182.                     pc.setqf("oddane", 0)
  183.                     pc.setqf("czas", 0)
  184.                     pc.setqf("szansa", 70)
  185.                     pc.setqf("poziom", 90)
  186.                     pc.setqf("biolog_etap", 4)
  187.                     -- obrona
  188.                     affect.add_collect(54, 50, 60*60*24*365*60) -- 60Years
  189.                     badania_biologa.refresh()
  190.                 end
  191.             end
  192.         end
  193.  
  194.  
  195. ---- BIOLOG 90 LV.
  196.         when kill with npc.get_race() == 1501 or npc.get_race() == 1502 or npc.get_race() == 1503 or npc.get_race() == 1504 or npc.get_race() == 1505 or npc.get_race() == 1511 or npc.get_race() == 1512 or npc.get_race() == 1513 or npc.get_race() == 1514 or npc.get_race() == 1515 or npc.get_race() == 1521 or npc.get_race() == 1522 or npc.get_race() == 1523 or npc.get_race() == 1524 or npc.get_race() == 1525 or npc.get_race() == 1531 or npc.get_race() == 1532 or npc.get_race() == 1533 or npc.get_race() == 1534 or npc.get_race() == 1535 begin
  197.             if pc.getqf("biolog_etap") == 4 then
  198.                 local s = number(1, 70)
  199.                 if s == 1 then
  200.                     game.drop_item_with_ownership(28009, 1)
  201.                 end
  202.             end
  203.         end
  204.        
  205.         when button or info with pc.getqf("biolog_etap") == 4 begin
  206.             if pc.get_level() < 90 then
  207.                 syschat(">> Nie posiadasz minimum 90 poziomu aby rozpocząć to badanie!")
  208.                 return
  209.             end
  210.             if pc.count_item(28009) < 1 then
  211.                 syschat(">> Nie posiadasz przy sobie "..item_name(28009).." - zdobądź go i spróbuj ponownie!")
  212.                 return
  213.             end
  214.             if get_global_time() < pc.getqf("czas") then
  215.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  216.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  217.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  218.             else
  219.                 pc.remove_item(28009, 1)
  220.                 pc.setqf("czas", get_global_time()+60*60*1-1)
  221.                 local pass_percent = 70
  222.                 local s = number(1,100)
  223.                 if s <= pass_percent then
  224.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  225.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28009)..") został przyjęty pomyślnie.")
  226.                     badania_biologa.refresh()
  227.                 else
  228.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28009)..") był wadliwy, spróbuj ponownie.")
  229.                     badania_biologa.refresh()
  230.                 end
  231.                 if pc.getqf("oddane") == 20 then
  232.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  233.                     pc.setqf("oddane", 0)
  234.                     pc.setqf("czas", 0)
  235.                     pc.setqf("szansa", 70)
  236.                     pc.setqf("poziom", 110)
  237.                     pc.setqf("biolog_etap", 5)
  238.                     -- wartość ataku
  239.                     affect.add_collect(53, 50, 60*60*24*365*60) -- 60Years
  240.                     badania_biologa.refresh()
  241.                 end
  242.             end
  243.         end
  244.  
  245.  
  246. ---- BIOLOG 110 LV.
  247.         when kill with npc.get_race() == 2001 or npc.get_race() == 2002 or npc.get_race() == 2003 or npc.get_race() == 2004 or npc.get_race() == 2005 or npc.get_race() == 2011 or npc.get_race() == 2012 or npc.get_race() == 2013 or npc.get_race() == 2014 or npc.get_race() == 2015 or npc.get_race() == 2101 or npc.get_race() == 2102 or npc.get_race() == 2103 or npc.get_race() == 2104 or npc.get_race() == 2105 or npc.get_race() == 2111 or npc.get_race() == 2112 or npc.get_race() == 2113 or npc.get_race() == 2114 or npc.get_race() == 2115 begin
  248.             if pc.getqf("biolog_etap") == 5 then
  249.                 local s = number(1, 100)
  250.                 if s == 1 then
  251.                     game.drop_item_with_ownership(28011, 1)
  252.                 end
  253.             end
  254.         end
  255.        
  256.         when button or info with pc.getqf("biolog_etap") == 5 begin
  257.             if pc.get_level() < 110 then
  258.                 syschat(">> Nie posiadasz minimum 110 poziomu aby rozpocząć to badanie!")
  259.                 return
  260.             end
  261.             if pc.count_item(28011) < 1 then
  262.                 syschat(">> Nie posiadasz przy sobie "..item_name(28011).." - zdobądź go i spróbuj ponownie!")
  263.                 return
  264.             end
  265.             if get_global_time() < pc.getqf("czas") then
  266.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  267.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  268.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  269.             else
  270.                 pc.remove_item(28011, 1)
  271.                 pc.setqf("czas", get_global_time()+60*60*2-1)
  272.                 local pass_percent = 70
  273.                 local s = number(1,100)
  274.                 if s <= pass_percent then
  275.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  276.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28011)..") został przyjęty pomyślnie.")
  277.                     badania_biologa.refresh()
  278.                 else
  279.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28011)..") był wadliwy, spróbuj ponownie.")
  280.                     badania_biologa.refresh()
  281.                 end
  282.                 if pc.getqf("oddane") == 25 then
  283.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  284.                     pc.setqf("oddane", 0)
  285.                     pc.setqf("czas", 0)
  286.                     pc.setqf("szansa", 70)
  287.                     pc.setqf("poziom", 130)
  288.                     pc.setqf("biolog_etap", 6)
  289.                     -- punkty życia
  290.                     affect.add_collect(1, 5000, 60*60*24*365*60) -- 60Years
  291.                     badania_biologa.refresh()
  292.                 end
  293.             end
  294.         end
  295.  
  296.  
  297. ---- BIOLOG 130 LV.
  298.         when kill with npc.get_race() == 3001 or npc.get_race() == 3002 or npc.get_race() == 3003 or npc.get_race() == 3004 or npc.get_race() == 3005 or npc.get_race() == 3011 or npc.get_race() == 3012 or npc.get_race() == 3013 or npc.get_race() == 3014 or npc.get_race() == 3015 or npc.get_race() == 3101 or npc.get_race() == 3102 or npc.get_race() == 3103 or npc.get_race() == 3104 or npc.get_race() == 3105 or npc.get_race() == 3111 or npc.get_race() == 3112 or npc.get_race() == 3113 or npc.get_race() == 3114 or npc.get_race() == 3115 or npc.get_race() == 3201 or npc.get_race() == 3202 or npc.get_race() == 3203 or npc.get_race() == 3204 or npc.get_race() == 3205 or npc.get_race() == 3211 or npc.get_race() == 3212 or npc.get_race() == 3213 or npc.get_race() == 3214 or npc.get_race() == 3215 begin
  299.             if pc.getqf("biolog_etap") == 6 then
  300.                 local s = number(1, 300)
  301.                 if s == 1 then
  302.                     game.drop_item_with_ownership(28013, 1)
  303.                 end
  304.             end
  305.         end
  306.        
  307.         when button or info with pc.getqf("biolog_etap") == 6 begin
  308.             if pc.get_level() < 130 then
  309.                 syschat(">> Nie posiadasz minimum 130 poziomu aby rozpocząć to badanie!")
  310.                 return
  311.             end
  312.             if pc.count_item(28013) < 1 then
  313.                 syschat(">> Nie posiadasz przy sobie "..item_name(28013).." - zdobądź go i spróbuj ponownie!")
  314.                 return
  315.             end
  316.             if get_global_time() < pc.getqf("czas") then
  317.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  318.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  319.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  320.             else
  321.                 pc.remove_item(28013, 1)
  322.                 pc.setqf("czas", get_global_time()+60*60*3-1)
  323.                 local pass_percent = 70
  324.                 local s = number(1,100)
  325.                 if s <= pass_percent then
  326.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  327.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28013)..") został przyjęty pomyślnie.")
  328.                     badania_biologa.refresh()
  329.                 else
  330.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28013)..") był wadliwy, spróbuj ponownie.")
  331.                     badania_biologa.refresh()
  332.                 end
  333.                 if pc.getqf("oddane") == 30 then
  334.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  335.                     pc.setqf("oddane", 0)
  336.                     pc.setqf("czas", 0)
  337.                     pc.setqf("szansa", 70)
  338.                     pc.setqf("poziom", 140)
  339.                     pc.setqf("biolog_etap", 7)
  340.                     -- silny na potwory
  341.                     affect.add_collect(63, 10, 60*60*24*365*60) -- 60Years
  342.                     badania_biologa.refresh()
  343.                 end
  344.             end
  345.         end
  346.        
  347. ---- BIOLOG 140 LV.
  348.         when kill with npc.get_race() == 4001 or npc.get_race() == 4002 or npc.get_race() == 4003 or npc.get_race() == 4004 or npc.get_race() == 4005 or npc.get_race() == 4011 or npc.get_race() == 4012 or npc.get_race() == 4013 or npc.get_race() == 4014 or npc.get_race() == 4015 or npc.get_race() == 4101 or npc.get_race() == 4102 or npc.get_race() == 4103 or npc.get_race() == 4104 or npc.get_race() == 4105 or npc.get_race() == 4106 or npc.get_race() == 4111 or npc.get_race() == 4112 or npc.get_race() == 4113 or npc.get_race() == 4114 or npc.get_race() == 4115 or npc.get_race() == 4116 or npc.get_race() == 4201 or npc.get_race() == 4202 or npc.get_race() == 4203 or npc.get_race() == 4204 or npc.get_race() == 4205 or npc.get_race() == 4206 or npc.get_race() == 4211 or npc.get_race() == 4212 or npc.get_race() == 4213 or npc.get_race() == 4214 or npc.get_race() == 4215 or npc.get_race() == 4216 begin
  349.             if pc.getqf("biolog_etap") == 7 then
  350.                 local s = number(1, 300)
  351.                 if s == 1 then
  352.                     game.drop_item_with_ownership(28015, 1)
  353.                 end
  354.             end
  355.         end
  356.        
  357.         when button or info with pc.getqf("biolog_etap") == 7 begin
  358.             if pc.get_level() < 140 then
  359.                 syschat(">> Nie posiadasz minimum 140 poziomu aby rozpocząć to badanie!")
  360.                 return
  361.             end
  362.             if pc.count_item(28015) < 1 then
  363.                 syschat(">> Nie posiadasz przy sobie "..item_name(28015).." - zdobądź go i spróbuj ponownie!")
  364.                 return
  365.             end
  366.             if get_global_time() < pc.getqf("czas") then
  367.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  368.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  369.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  370.             else
  371.                 pc.remove_item(28015, 1)
  372.                 pc.setqf("czas", get_global_time()+60*60*4-1)
  373.                 local pass_percent = 70
  374.                 local s = number(1,100)
  375.                 if s <= pass_percent then
  376.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  377.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28015)..") został przyjęty pomyślnie.")
  378.                     badania_biologa.refresh()
  379.                 else
  380.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28015)..") był wadliwy, spróbuj ponownie.")
  381.                     badania_biologa.refresh()
  382.                 end
  383.                 if pc.getqf("oddane") == 35 then
  384.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  385.                     pc.setqf("oddane", 0)
  386.                     pc.setqf("czas", 0)
  387.                     pc.setqf("szansa", 70)
  388.                     pc.setqf("poziom", 150)
  389.                     pc.setqf("biolog_etap", 8)
  390.                     -- szansa na krytyka
  391.                     affect.add_collect(15, 10, 60*60*24*365*60) -- 60Years
  392.                     badania_biologa.refresh()
  393.                 end
  394.             end
  395.         end
  396.        
  397. ---- BIOLOG 150 LV.
  398.         when kill with npc.get_race() == 5001 or npc.get_race() == 5002 or npc.get_race() == 5003 or npc.get_race() == 5004 or npc.get_race() == 5005 or npc.get_race() == 5011 or npc.get_race() == 5012 or npc.get_race() == 5013 or npc.get_race() == 5014 or npc.get_race() == 5015 begin
  399.             if pc.getqf("biolog_etap") == 8 then
  400.                 local s = number(1, 300)
  401.                 if s == 1 then
  402.                     game.drop_item_with_ownership(28017, 1)
  403.                 end
  404.             end
  405.         end
  406.  
  407.         when button or info with pc.getqf("biolog_etap") == 8 begin
  408.             if pc.get_level() < 150 then
  409.                 syschat(">> Nie posiadasz minimum 140 poziomu aby rozpocząć to badanie!")
  410.                 return
  411.             end
  412.             if pc.count_item(28017) < 1 then
  413.                 syschat(">> Nie posiadasz przy sobie "..item_name(28017).." - zdobądź go i spróbuj ponownie!")
  414.                 return
  415.             end
  416.             if get_global_time() < pc.getqf("czas") then
  417.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  418.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  419.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  420.             else
  421.                 pc.remove_item(28017, 1)
  422.                 pc.setqf("czas", get_global_time()+60*60*5-1)
  423.                 local pass_percent = 60
  424.                 local s = number(1,100)
  425.                 if s <= pass_percent then
  426.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  427.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28017)..") został przyjęty pomyślnie.")
  428.                     badania_biologa.refresh()
  429.                 else
  430.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28017)..") był wadliwy, spróbuj ponownie.")
  431.                     badania_biologa.refresh()
  432.                 end
  433.                 if pc.getqf("oddane") == 40 then
  434.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  435.                     pc.setqf("oddane", 0)
  436.                     pc.setqf("czas", 0)
  437.                     pc.setqf("szansa", 60)
  438.                     pc.setqf("poziom", 150)
  439.                     pc.setqf("biolog_etap", 9)
  440.                     -- szansa na przeszywke
  441.                     affect.add_collect(16, 10, 60*60*24*365*60) -- 60Years
  442.                     badania_biologa.refresh()
  443.                 end
  444.             end
  445.         end
  446.        
  447. ---- BIOLOG 151 LV.
  448.         when kill with npc.get_race() == 5201 or npc.get_race() == 5202 or npc.get_race() == 5203 or npc.get_race() == 5204 or npc.get_race() == 5205 or npc.get_race() == 5211 or npc.get_race() == 5212 or npc.get_race() == 5213 or npc.get_race() == 5214 or npc.get_race() == 5215 begin
  449.             if pc.getqf("biolog_etap") == 9 then
  450.                 local s = number(1, 300)
  451.                 if s == 1 then
  452.                     game.drop_item_with_ownership(28019, 1)
  453.                 end
  454.             end
  455.         end
  456.        
  457.         when button or info with pc.getqf("biolog_etap") == 9 begin
  458.             if pc.get_level() < 151 then
  459.                 syschat(">> Nie posiadasz minimum 151 poziomu aby rozpocząć to badanie!")
  460.                 return
  461.             end
  462.             if pc.count_item(28019) < 1 then
  463.                 syschat(">> Nie posiadasz przy sobie "..item_name(28019).." - zdobądź go i spróbuj ponownie!")
  464.                 return
  465.             end
  466.             if get_global_time() < pc.getqf("czas") then
  467.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  468.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  469.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  470.             else
  471.                 pc.remove_item(28019, 1)
  472.                 pc.setqf("czas", get_global_time()+60*60*6-1)
  473.                 local pass_percent = 50
  474.                 local s = number(1,100)
  475.                 if s <= pass_percent then
  476.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  477.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28019)..") został przyjęty pomyślnie.")
  478.                     badania_biologa.refresh()
  479.                 else
  480.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28019)..") był wadliwy, spróbuj ponownie.")
  481.                     badania_biologa.refresh()
  482.                 end
  483.                 if pc.getqf("oddane") == 45 then
  484.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  485.                     pc.setqf("oddane", 0)
  486.                     pc.setqf("czas", 0)
  487.                     pc.setqf("szansa", 50)
  488.                     pc.setqf("poziom", 152)
  489.                     pc.setqf("biolog_etap", 10)
  490.                     -- silny na ludzi
  491.                     affect.add_collect(17, 8, 60*60*24*365*60) -- 60Years
  492.                     badania_biologa.refresh()
  493.                 end
  494.             end
  495.         end
  496.        
  497. ---- BIOLOG 152 LV.
  498.          when kill with npc.get_race() == 5101 or npc.get_race() == 5102 or npc.get_race() == 5103 or npc.get_race() == 5104 or npc.get_race() == 5105 or npc.get_race() == 5111 or npc.get_race() == 5112 or npc.get_race() == 5113 or npc.get_race() == 5114 or npc.get_race() == 5115 begin
  499.             if pc.getqf("biolog_etap") == 10 then
  500.                 local s = number(1, 300)
  501.                 if s == 1 then
  502.                     game.drop_item_with_ownership(28021, 1)
  503.                 end
  504.             end
  505.         end
  506.        
  507.         when button or info with pc.getqf("biolog_etap") == 10 begin
  508.             if pc.get_level() < 152 then
  509.                 syschat(">> Nie posiadasz minimum 152 poziomu aby rozpocząć to badanie!")
  510.                 return
  511.             end
  512.             if pc.count_item(28021) < 1 then
  513.                 syschat(">> Nie posiadasz przy sobie "..item_name(28021).." - zdobądź go i spróbuj ponownie!")
  514.                 return
  515.             end
  516.             if get_global_time() < pc.getqf("czas") then
  517.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  518.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  519.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  520.             else
  521.                 pc.remove_item(28021, 1)
  522.                 pc.setqf("czas", get_global_time()+60*60*8-1)
  523.                 local pass_percent = 40
  524.                 local s = number(1,100)
  525.                 if s <= pass_percent then
  526.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  527.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28021)..") został przyjęty pomyślnie.")
  528.                     badania_biologa.refresh()
  529.                 else
  530.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28021)..") był wadliwy, spróbuj ponownie.")
  531.                     badania_biologa.refresh()
  532.                 end
  533.                 if pc.getqf("oddane") == 45 then
  534.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  535.                     pc.setqf("oddane", 0)
  536.                     pc.setqf("czas", 0)
  537.                     pc.setqf("szansa", 40)
  538.                     pc.setqf("poziom", 153)
  539.                     pc.setqf("biolog_etap", 11)
  540.                     -- odporność na ludzi
  541.                     affect.add_collect(92, 8, 60*60*24*365*60) -- 60Years
  542.                     badania_biologa.refresh()
  543.                 end
  544.             end
  545.         end
  546.        
  547. ---- BIOLOG 153 LV.
  548.          when kill with npc.get_race() == 5301 or npc.get_race() == 5302 or npc.get_race() == 5303 or npc.get_race() == 5304 or npc.get_race() == 5305 or npc.get_race() == 5311 or npc.get_race() == 5312 or npc.get_race() == 5313 or npc.get_race() == 5314 or npc.get_race() == 5315 begin
  549.             if pc.getqf("biolog_etap") == 11 then
  550.                 local s = number(1, 400)
  551.                 if s == 1 then
  552.                     game.drop_item_with_ownership(28023, 1)
  553.                 end
  554.             end
  555.         end
  556.        
  557.         when button or info with pc.getqf("biolog_etap") == 11 begin
  558.             if pc.get_level() < 153 then
  559.                 syschat(">> Nie posiadasz minimum 153 poziomu aby rozpocząć to badanie!")
  560.                 return
  561.             end
  562.             if pc.count_item(28023) < 1 then
  563.                 syschat(">> Nie posiadasz przy sobie "..item_name(28023).." - zdobądź go i spróbuj ponownie!")
  564.                 return
  565.             end
  566.             if get_global_time() < pc.getqf("czas") then
  567.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  568.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  569.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  570.             else
  571.                 pc.remove_item(28023, 1)
  572.                 pc.setqf("czas", get_global_time()+60*60*10-1)
  573.                 local pass_percent = 30
  574.                 local s = number(1,100)
  575.                 if s <= pass_percent then
  576.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  577.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28023)..") został przyjęty pomyślnie.")
  578.                     badania_biologa.refresh()
  579.                 else
  580.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28023)..") był wadliwy, spróbuj ponownie.")
  581.                     badania_biologa.refresh()
  582.                 end
  583.                 if pc.getqf("oddane") == 50 then
  584.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  585.                     pc.setqf("oddane", 0)
  586.                     pc.setqf("czas", 0)
  587.                     pc.setqf("szansa", 30)
  588.                     pc.setqf("poziom", 154)
  589.                     pc.setqf("biolog_etap", 12)
  590.                     -- odpornośc na dzieci
  591.                     affect.add_collect(96, 10, 60*60*24*365*60) -- 60Years
  592.                     badania_biologa.refresh()
  593.                 end
  594.             end
  595.         end
  596.        
  597. ---- BIOLOG 154 LV.
  598.         when kill with npc.get_race() == 5401 or npc.get_race() == 5402 or npc.get_race() == 5403 or npc.get_race() == 5404 or npc.get_race() == 5405 or npc.get_race() == 5411 or npc.get_race() == 5412 or npc.get_race() == 5413 or npc.get_race() == 5414 or npc.get_race() == 5415 begin
  599.             if pc.getqf("biolog_etap") == 12 then
  600.                 local s = number(1, 450)
  601.                 if s == 1 then
  602.                     game.drop_item_with_ownership(28025, 1)
  603.                 end
  604.             end
  605.         end
  606.        
  607.         when button or info with pc.getqf("biolog_etap") == 12 begin
  608.             if pc.get_level() < 154 then
  609.                 syschat(">> Nie posiadasz minimum 154 poziomu aby rozpocząć to badanie!")
  610.                 return
  611.             end
  612.             if pc.count_item(28025) < 1 then
  613.                 syschat(">> Nie posiadasz przy sobie "..item_name(28025).." - zdobądź go i spróbuj ponownie!")
  614.                 return
  615.             end
  616.             if get_global_time() < pc.getqf("czas") then
  617.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  618.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  619.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  620.             else
  621.                 pc.remove_item(28025, 1)
  622.                 pc.setqf("czas", get_global_time()+60*60*12-1)
  623.                 local pass_percent = 20
  624.                 local s = number(1,100)
  625.                 if s <= pass_percent then
  626.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  627.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28025)..") został przyjęty pomyślnie.")
  628.                     badania_biologa.refresh()
  629.                 else
  630.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28025)..") był wadliwy, spróbuj ponownie.")
  631.                     badania_biologa.refresh()
  632.                 end
  633.                 if pc.getqf("oddane") == 55 then
  634.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  635.                     pc.setqf("oddane", 0)
  636.                     pc.setqf("czas", 0)
  637.                     pc.setqf("szansa", 20)
  638.                     pc.setqf("poziom", 155)
  639.                     pc.setqf("biolog_etap", 13)
  640.                     -- silny na wojowników
  641.                     affect.add_collect(59, 10, 60*60*24*365*60) -- 60Years
  642.                     -- silny na ninje
  643.                     affect.add_collect(60, 10, 60*60*24*365*60) -- 60Years
  644.                     badania_biologa.refresh()
  645.                 end
  646.             end
  647.         end
  648.        
  649. ---- BIOLOG 155 LV.
  650.         when 5014.kill begin
  651.             if pc.getqf("biolog_etap") == 13 then
  652.                 local s = number(1, 5)
  653.                 if s == 1 then
  654.                     game.drop_item_with_ownership(28027, 1)
  655.                 end
  656.             end
  657.         end
  658.        
  659.         when button or info with pc.getqf("biolog_etap") == 13 begin
  660.             if pc.get_level() < 155 then
  661.                 syschat(">> Nie posiadasz minimum 155 poziomu aby rozpocząć to badanie!")
  662.                 return
  663.             end
  664.             if pc.count_item(28027) < 1 then
  665.                 syschat(">> Nie posiadasz przy sobie "..item_name(28027).." - zdobądź go i spróbuj ponownie!")
  666.                 return
  667.             end
  668.             if get_global_time() < pc.getqf("czas") then
  669.                 local minutes = math.floor((pc.getqf("czas")-get_global_time())/60)
  670.                 local seconds = (pc.getqf("czas")-get_global_time())-minutes*60
  671.                 syschat(">> Do następnego oddania pozostało: "..minutes.." minut "..seconds.." sekund")
  672.             else
  673.                 pc.remove_item(28027, 1)
  674.                 pc.setqf("czas", get_global_time()+60*60*24-1)
  675.                 local pass_percent = 10
  676.                 local s = number(1,100)
  677.                 if s <= pass_percent then
  678.                     pc.setqf("oddane", pc.getqf("oddane")+1)
  679.                     syschat(">> Przedmiot do Badania Biologa ("..item_name(28027)..") został przyjęty pomyślnie.")
  680.                     badania_biologa.refresh()
  681.                 else
  682.                     syschat(">> Niestety ten przedmiot do Badania Biologa ("..item_name(28027)..") był wadliwy, spróbuj ponownie.")
  683.                     badania_biologa.refresh()
  684.                 end
  685.                 if pc.getqf("oddane") == 10 then
  686.                     syschat(">> Zebrałeś już wszystkie przedmioty do tego Badania Biologa!")
  687.                     pc.setqf("oddane", 0)
  688.                     pc.setqf("czas", 0)
  689.                     pc.setqf("szansa", 10)
  690.                     pc.setqf("poziom", 160)
  691.                     pc.setqf("biolog_etap", 14)
  692.                     -- silny na sure
  693.                     affect.add_collect(61, 10, 60*60*24*365*60) -- 60Years
  694.                     -- silny na szamana
  695.                     affect.add_collect(62, 10, 60*60*24*365*60) -- 60Years
  696.                     badania_biologa.refresh()
  697.                 end
  698.             end
  699.         end
  700.  
  701.         when petla_automatycznego_odswiezania_1.timer begin
  702.             badania_biologa.refresh()
  703.             timer("petla_automatycznego_odswiezania_2", 1)
  704.         end
  705.        
  706.         when petla_automatycznego_odswiezania_2.timer begin
  707.             badania_biologa.refresh()
  708.             timer("petla_automatycznego_odswiezania_1", 1)
  709.         end
  710.     end
  711. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement