Advertisement
Guest User

Untitled

a guest
Oct 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. quest ride begin
  2. state start begin
  3. function Ride( vnum, remain_time )
  4. ride_info = {
  5. [71137] = { 29376, 60*60*24*365, apply.ATTBONUS_MONSTER, 0, 0, false, false },
  6. [71138] = { 29376, 60*60*24*365, apply.MALL_EXPBONUS, 0, 0, true, true },
  7. [71139] = { 29376, 60*60*24*365, apply.MAX_HP, 0, 0, false, false },
  8. [71140] = { 29376, 60*60*24*365, apply.DEF_GRADE_BONUS, 0, 0, false, true },
  9. [71141] = { 29376, 60*60*24*365, apply.ATT_GRADE_BONUS, 0, 0, false, true },
  10. [71142] = { 29376, 60*60*24*365, apply.ATTBONUS_MONSTER, 3, 0, false, true },
  11.  
  12. }
  13. if pc.level < ride_info[vnum][5] then
  14. chat("<Wierzchowiec> Nie jesteś wystarczająco doświadczony, by dosiąść tego wierzchowca...")
  15. else
  16. if ride_info[vnum][2] == 0 and remain_time != 0 then
  17. pc.mount( ride_info[vnum][1], remain_time*60 )
  18. pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 )
  19. else
  20. pc.mount( ride_info[vnum][1], ride_info[vnum][2] )
  21. pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] )
  22. end
  23.  
  24. if true == ride_info[vnum][6] then
  25. pc.remove_item(vnum, 1)
  26. end
  27. end
  28. end
  29.  
  30. when login begin
  31. local vnum, remain_time = pc.get_special_ride_vnum()
  32.  
  33. if 0 != vnum then
  34. ride.Ride(vnum, remain_time)
  35. end
  36. end
  37.  
  38. when 71137.use or 71138.use or 71139.use or
  39. 71140.use or 71141.use or 71152.use begin
  40.  
  41. if pc.is_polymorphed() then
  42. chat("<Wierzchowiec> Nie możesz dosiąść wierzchowca będąc przemienionym.")
  43. elseif false == pc.is_mount() then
  44. if true == horse.is_summon() then
  45. horse.unsummon()
  46. end
  47. item.set_socket(2, 60*24*365*60)
  48. ride.Ride(item.vnum, 0)
  49. else
  50. pc.unmount()
  51. end
  52. end
  53. end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement