Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quest horse_summon begin
- state start begin
- function get_horse_summon_prob_pct() local skill_level=pc.get_skill_level(131) if skill_level==1 then return 15 elseif skill_level==2 then return 20 elseif skill_level==3 then return 30 elseif skill_level==4 then return 40 elseif skill_level==5 then return 50 elseif skill_level==6 then return 60 elseif skill_level==7 then return 70 elseif skill_level==8 then return 80 elseif skill_level==9 then return 90 elseif skill_level>=10 then return 100 end return 10 end
- when 20349.chat."Imaginea calului pierduta. " with horse.get_grade()==1 and pc.countitem("50051")<1 begin
- say_title("Grajdar: ")
- say("Dupa cum vad, ")
- say("þi-ai pierdut Imaginea Calului. ")
- local b=select("Vreau alta noua ", "Nu ma intereseaza ")
- if 1==b then
- if pc.money>=10000 then
- pc.changemoney(-10000)
- say_title("Grajdar: ")
- say("Aici este noua ta imagine de cal. ")
- say("Sper sa nu o mai pierzi. ")
- pc.give_item2("50051", 1)
- else
- say_title("Grajdar: ")
- say("Nu ai destui Yang. ")
- end
- elseif 2==b then
- else
- say("UNKNOWN BUTTON ["..b.."]")
- end
- end
- when 20349.chat."Cartea Arme si Cai pierduta. " with horse.get_grade()==2 and pc.countitem("50052")<1 begin
- say_title("Grajdar: ")
- say("Dupa cum vad, ")
- say("þi-ai pierdut Cartea Arme si Cai. ")
- local b=select("Vreau alta noua ", "Nu ma intereseaza ")
- if 1==b then
- if pc.money>=50000 then
- pc.changemoney(-50000)
- say_title("Grajdar: ")
- say("Aici este noua ta Carte Arme si Cai. ")
- say("Sper sa nu o mai pierzi. ")
- pc.give_item2("50052", 1)
- else
- say_title("Grajdar: ")
- say("Nu ai destui Yang. ")
- end
- elseif 2==b then
- else
- say("UNKNOWN BUTTON ["..b.."]")
- end
- end
- when 20349.chat."Cartea Armata si Cai pierduta. " with horse.get_grade()==3 and pc.countitem("50053")<1 begin
- say_title("Grajdar: ")
- say("Dupa cum vad,")
- say("þi-ai pierdut Cartea Armata si Cai.")
- local b=select("Vreau alta noua ", "Nu ma intereseaza ")
- if 1==b then
- if pc.money>=100000 then
- pc.changemoney(-100000)
- say_title("Grajdar: ")
- say("Aici este noua ta Carte Armata si Cai. ")
- say("Sper sa nu o mai pierzi. ")
- pc.give_item2("50053", 1)
- else
- say_title("Grajdar: ")
- say("Nu ai destui Yang. ")
- end
- elseif 2==b then
- else
- say("UNKNOWN BUTTON ["..b.."]")
- end
- end
- when 50051.use with horse.get_grade()==0 begin
- say_title("Grajdar: ")
- say("Nu deþii un cal! ")
- end
- when 50051.use with horse.get_grade()==1 begin
- if pc.getsp()>=100 then
- if number(1, 100)<=horse_summon.get_horse_summon_prob_pct() then
- horse.summon()
- else
- chat("[HM2]:Armasarul nu a putut fi strigat.")
- end
- pc.change_sp(-100)
- else
- say_title("Informaþie: ")
- say("Nu ai destule MP. Îþi trebuie minim 100 MP")
- say("pentru a chema calul. ")
- end
- end
- when 50051.use with horse.get_grade()==2 begin
- say_title("Informaþie: ")
- say("Ai folosit imaginea de chemare a calului gresita. ")
- end
- when 50051.use with horse.get_grade()==3 begin
- say_title("Informaþie: ")
- say("Ai folosit imaginea de chemare a calului gresita. ")
- end
- when 50052.use with horse.get_grade()==0 begin
- say_title("Informaþie: ")
- say("Ai folosit imaginea de chemare a calului gresita. ")
- end
- when 50052.use with horse.get_grade()==1 begin
- say_title("Informaþie: ")
- say("Ai folosit imaginea de chemare a calului gresita. ")
- end
- when 50052.use with horse.get_grade()==2 begin
- if pc.getsp()>=200 then
- if number(1, 100)<=horse_summon.get_horse_summon_prob_pct() then
- horse.summon()
- else
- chat("[HM2]:Armasarul nu a putut fi strigat.")
- end
- pc.change_sp(-200)
- else
- say_title("Informaþie: ")
- say("Nu ai destule MP. Îþi trebuie minim 200 MP")
- say("pentru a chema calul. ")
- end
- end
- when 50052.use with horse.get_grade()==3 begin
- say_title("Informaþie: ")
- say("Ai folosit imaginea de chemare a calului gresita. ")
- end
- when 50053.use with horse.get_grade()==0 begin
- say_title("Informaþie: ")
- say("Ai folosit imaginea de chemare a calului gresita. ")
- end
- when 50053.use with horse.get_grade()==1 begin
- say_title("Informaþie: ")
- say("Ai folosit imaginea de chemare a calului gresita. ")
- end
- when 50053.use with horse.get_grade()==2 begin
- say_title("Informaþie: ")
- say("Ai folosit imaginea de chemare a calului gresita. ")
- end
- when 50053.use with horse.get_grade()==3 begin
- if pc.getsp()>=300 then
- if number(1, 100)<=horse_summon.get_horse_summon_prob_pct() then
- horse.summon()
- else
- chat("[HM2]:Armasarul nu a putut fi strigat.")
- end
- pc.change_sp(-300)
- else
- say_title("Informaþie: ")
- say("Nu ai destule MP. Îþi trebuie minim 300 MP")
- say("pentru a chema calul. ")
- end
- end
- end
- state __COMPLETE__ begin
- when enter begin
- q.done()
- end
- end
- end
Add Comment
Please, Sign In to add comment