Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quest medale begin
- state start begin
- when 50050.use begin
- if not pc.can_warp() then
- syschat(" Nie możesz teraz tego zrobić.")
- elseif horse.get_level() == 10 and pc.level < 35 then
- syschat("Nie posiadasz minimum 35. poziom.")
- elseif horse.get_level() == 20 and pc.level < 50 then
- syschat("Nie posiadasz minimum 50. poziom.")
- elseif horse.get_level() >= 21 then
- syschat("Twój koń osiągnął maksymalny poziom.")
- end
- end
- if get_time() < pc.getqf("durationm") and not pc.is_skill_book_no_delay() then
- local czas = (pc.getqf("durationm") - get_time())/3600 -- 9000 / 3600 = 2.5
- local h = math.floor(czas) -- 2.5 = 2
- local min = (czas - h)*60 -- (2.5 - 2)*60 = 0.5 * 60 = 30
- local m = math.floor(min)
- syschat("Pozostały czas "..h.." godzin, "..m.." min..")
- elseif get_time() < pc.getqf("durationm") and pc.is_skill_book_no_delay() then
- if horse.get_level() >= 0 and horse.get_level() <= 20 then
- local socket0 = item.get_socket(0)
- local plus = horse.get_level()+1
- local s = number(1,100)
- local pass_percent = 40
- if s<= pass_percent then
- if horse.get_level() == 0 then
- pc.remove_item(50050, 1)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Twój Koń osiągnął tytuł Zwykłego Konia.")
- horse.set_level(plus)
- elseif horse.get_level() == 1 or horse.get_level() == 2 or horse.get_level() == 3 or horse.get_level() == 4 or horse.get_level() == 5 or horse.get_level() == 6 or horse.get_level() == 7 or horse.get_level() == 8 or horse.get_level() == 9 then
- pc.remove_item(50050, 1)
- horse.set_level(plus)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Pomyślnie zrozumiałeś wiedzę zawartą w medalu.")
- elseif horse.get_level() == 10 then
- pc.remove_item(50050, 1)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Twój Koń osiągnął tytuł Bojowego Konia.")
- horse.set_level(plus)
- elseif horse.get_level() == 11 or horse.get_level() == 12 or horse.get_level() == 13 or horse.get_level() == 14 or horse.get_level() == 15 or horse.get_level() == 16 or horse.get_level() == 17 or horse.get_level() == 18 or horse.get_level() == 19 then
- pc.remove_item(50050, 1)
- horse.set_level(plus)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Pomyślnie zrozumiałeś wiedzę zawartą w medalu.")
- local czas = (pc.getqf("durationm") - get_time())/3600 -- 9000 / 3600 = 2.5
- local h = math.floor(czas) -- 2.5 = 2
- local min = (czas - h)*60 -- (2.5 - 2)*60 = 0.5 * 60 = 30
- local m = math.floor(min)
- syschat("Potrzeba czasu aby zrozumieć wiedzę zawartą w Medalach Konnych.")
- chat("Pozostały czas "..h.." godzin, "..m.." min..")
- elseif horse.get_level() == 20 then
- pc.remove_item(50050, 1)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Twój Koń osiągnął tytuł Wojskowego Konia.")
- horse.set_level(plus)
- end
- end
- end
- else
- if horse.get_level() >= 0 and horse.get_level() <= 20 then
- local socket0 = item.get_socket(0)
- local plus = horse.get_level()+1
- local s = number(1,100)
- local pass_percent = 40
- if s<= pass_percent then
- if horse.get_level() == 0 then
- pc.remove_item(50050, 1)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Twój Koń osiągnął tytuł Zwykłego Konia.")
- horse.set_level(plus)
- elseif horse.get_level() == 1 or horse.get_level() == 2 or horse.get_level() == 3 or horse.get_level() == 4 or horse.get_level() == 5 or horse.get_level() == 6 or horse.get_level() == 7 or horse.get_level() == 8 or horse.get_level() == 9 then
- pc.remove_item(50050, 1)
- horse.set_level(plus)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Pomyślnie zrozumiałeś wiedzę zawartą w medalu.")
- elseif horse.get_level() == 10 then
- pc.remove_item(50050, 1)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Twój Koń osiągnął tytuł Bojowego Konia.")
- horse.set_level(plus)
- elseif horse.get_level() == 11 or horse.get_level() == 12 or horse.get_level() == 13 or horse.get_level() == 14 or horse.get_level() == 15 or horse.get_level() == 16 or horse.get_level() == 17 or horse.get_level() == 18 or horse.get_level() == 19 then
- pc.remove_item(50050, 1)
- horse.set_level(plus)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Pomyślnie zrozumiałeś wiedzę zawartą w medalu.")
- local czas = (pc.getqf("durationm") - get_time())/3600 -- 9000 / 3600 = 2.5
- local h = math.floor(czas) -- 2.5 = 2
- local min = (czas - h)*60 -- (2.5 - 2)*60 = 0.5 * 60 = 30
- local m = math.floor(min)
- syschat("Potrzeba czasu aby zrozumieć wiedzę zawartą w Medalach Konnych.")
- chat("Pozostały czas "..h.." godzin, "..m.." min..")
- elseif horse.get_level() == 20 then
- pc.remove_item(50050, 1)
- pc.setqf("durationm",get_time()+60*60*1) -- 1 godzina
- syschat("Brawo! Udało się.")
- chat("Twój Koń osiągnął tytuł Wojskowego Konia.")
- horse.set_level(plus)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement