Guest User

Untitled

a guest
Jul 3rd, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. quest horse_summon begin
  2. state start begin
  3. 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
  4.  
  5. when 20349.chat."Imaginea calului pierduta. " with horse.get_grade()==1 and pc.countitem("50051")<1 begin
  6. say_title("Grajdar: ")
  7. say("Dupa cum vad, ")
  8. say("þi-ai pierdut Imaginea Calului. ")
  9. local b=select("Vreau alta noua ", "Nu ma intereseaza ")
  10. if 1==b then
  11. if pc.money>=10000 then
  12. pc.changemoney(-10000)
  13. say_title("Grajdar: ")
  14. say("Aici este noua ta imagine de cal. ")
  15. say("Sper sa nu o mai pierzi. ")
  16. pc.give_item2("50051", 1)
  17. else
  18. say_title("Grajdar: ")
  19. say("Nu ai destui Yang. ")
  20. end
  21. elseif 2==b then
  22. else
  23. say("UNKNOWN BUTTON ["..b.."]")
  24. end
  25. end
  26. when 20349.chat."Cartea Arme si Cai pierduta. " with horse.get_grade()==2 and pc.countitem("50052")<1 begin
  27. say_title("Grajdar: ")
  28. say("Dupa cum vad, ")
  29. say("þi-ai pierdut Cartea Arme si Cai. ")
  30. local b=select("Vreau alta noua ", "Nu ma intereseaza ")
  31. if 1==b then
  32. if pc.money>=50000 then
  33. pc.changemoney(-50000)
  34. say_title("Grajdar: ")
  35. say("Aici este noua ta Carte Arme si Cai. ")
  36. say("Sper sa nu o mai pierzi. ")
  37. pc.give_item2("50052", 1)
  38. else
  39. say_title("Grajdar: ")
  40. say("Nu ai destui Yang. ")
  41. end
  42. elseif 2==b then
  43. else
  44. say("UNKNOWN BUTTON ["..b.."]")
  45. end
  46. end
  47. when 20349.chat."Cartea Armata si Cai pierduta. " with horse.get_grade()==3 and pc.countitem("50053")<1 begin
  48. say_title("Grajdar: ")
  49. say("Dupa cum vad,")
  50. say("þi-ai pierdut Cartea Armata si Cai.")
  51. local b=select("Vreau alta noua ", "Nu ma intereseaza ")
  52. if 1==b then
  53. if pc.money>=100000 then
  54. pc.changemoney(-100000)
  55. say_title("Grajdar: ")
  56. say("Aici este noua ta Carte Armata si Cai. ")
  57. say("Sper sa nu o mai pierzi. ")
  58. pc.give_item2("50053", 1)
  59. else
  60. say_title("Grajdar: ")
  61. say("Nu ai destui Yang. ")
  62. end
  63. elseif 2==b then
  64. else
  65. say("UNKNOWN BUTTON ["..b.."]")
  66. end
  67. end
  68. when 50051.use with horse.get_grade()==0 begin
  69. say_title("Grajdar: ")
  70. say("Nu deþii un cal! ")
  71. end
  72. when 50051.use with horse.get_grade()==1 begin
  73. if pc.getsp()>=100 then
  74. if number(1, 100)<=horse_summon.get_horse_summon_prob_pct() then
  75.  
  76. horse.summon()
  77. else
  78. chat("[HM2]:Armasarul nu a putut fi strigat.")
  79. end
  80. pc.change_sp(-100)
  81. else
  82. say_title("Informaþie: ")
  83. say("Nu ai destule MP. Îþi trebuie minim 100 MP")
  84. say("pentru a chema calul. ")
  85. end
  86. end
  87. when 50051.use with horse.get_grade()==2 begin
  88. say_title("Informaþie: ")
  89. say("Ai folosit imaginea de chemare a calului gresita. ")
  90. end
  91. when 50051.use with horse.get_grade()==3 begin
  92. say_title("Informaþie: ")
  93. say("Ai folosit imaginea de chemare a calului gresita. ")
  94. end
  95. when 50052.use with horse.get_grade()==0 begin
  96. say_title("Informaþie: ")
  97. say("Ai folosit imaginea de chemare a calului gresita. ")
  98. end
  99. when 50052.use with horse.get_grade()==1 begin
  100. say_title("Informaþie: ")
  101. say("Ai folosit imaginea de chemare a calului gresita. ")
  102. end
  103. when 50052.use with horse.get_grade()==2 begin
  104. if pc.getsp()>=200 then
  105. if number(1, 100)<=horse_summon.get_horse_summon_prob_pct() then
  106. horse.summon()
  107. else
  108. chat("[HM2]:Armasarul nu a putut fi strigat.")
  109. end
  110. pc.change_sp(-200)
  111. else
  112. say_title("Informaþie: ")
  113. say("Nu ai destule MP. Îþi trebuie minim 200 MP")
  114. say("pentru a chema calul. ")
  115. end
  116. end
  117. when 50052.use with horse.get_grade()==3 begin
  118. say_title("Informaþie: ")
  119. say("Ai folosit imaginea de chemare a calului gresita. ")
  120. end
  121. when 50053.use with horse.get_grade()==0 begin
  122. say_title("Informaþie: ")
  123. say("Ai folosit imaginea de chemare a calului gresita. ")
  124. end
  125. when 50053.use with horse.get_grade()==1 begin
  126. say_title("Informaþie: ")
  127. say("Ai folosit imaginea de chemare a calului gresita. ")
  128. end
  129. when 50053.use with horse.get_grade()==2 begin
  130. say_title("Informaþie: ")
  131. say("Ai folosit imaginea de chemare a calului gresita. ")
  132. end
  133. when 50053.use with horse.get_grade()==3 begin
  134. if pc.getsp()>=300 then
  135. if number(1, 100)<=horse_summon.get_horse_summon_prob_pct() then
  136.  
  137. horse.summon()
  138. else
  139. chat("[HM2]:Armasarul nu a putut fi strigat.")
  140. end
  141. pc.change_sp(-300)
  142. else
  143. say_title("Informaþie: ")
  144. say("Nu ai destule MP. Îþi trebuie minim 300 MP")
  145. say("pentru a chema calul. ")
  146. end
  147. end
  148. end
  149. state __COMPLETE__ begin
  150. when enter begin
  151. q.done()
  152. end
  153. end
  154. end
Add Comment
Please, Sign In to add comment