R8Sentinel

Ride_er_sura

Oct 17th, 2017
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. quest ride begin
  2. state start begin
  3. function Ride( vnum, remain_time )
  4. ride_info = {
  5. [71220] = { 20243, 60*60*1, apply.DEF_GRADE_BONUS, 50, 1, true },
  6. [71222] = { 20244, 60*60*1, apply.ATTBONUS_MONSTER, 15, 1, false },
  7. [71223] = { 20245, 60*60*1, apply.ATTBONUS_MONSTER, 15, 1, true },
  8. [71192] = { 20240, 60*60*1, apply.ATT_GRADE_BONUS, 70, 1, false },
  9. [71193] = { 20239, 60*60*1, apply.ATT_GRADE_BONUS, 100, 1, true },
  10. [71124] = { 20114, 60*60*1, apply.MAX_HP, 3000, 1, false },
  11. [71131] = { 20222, 60*60*1, apply.ATTBONUS_MONSTER, 15, 1, true },
  12. [71171] = { 20227, 60*60*1, apply.MOV_SPEED, 40, 1, false, false, false},
  13. [71172] = { 20226, 60*60*1, apply.MOV_SPEED, 40, 1, false, false, false},
  14. }
  15.  
  16. if pc.level < ride_info[vnum][5] then
  17. syschat("Nu ai nivelul necesar pentru a folosi acest mount.")
  18. else
  19. if 112 == pc.get_map_index() then
  20. return
  21. end
  22. if ride_info[vnum][2] == 0 and remain_time != 0 then
  23. pc.mount( ride_info[vnum][1], remain_time*60 )
  24. pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 )
  25. else
  26. pc.mount( ride_info[vnum][1], ride_info[vnum][2] )
  27. pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] )
  28. end
  29.  
  30. if true == ride_info[vnum][6] then
  31. pc.remove_item(vnum, 1)
  32. end
  33. end
  34. end
  35.  
  36. when login begin
  37. local vnum, remain_time = pc.get_special_ride_vnum()
  38. if vnum <= 71113 or vnum >71121 then
  39. return
  40. end
  41. if 0 != vnum then
  42. ride.Ride(vnum, remain_time)
  43. end
  44. end
  45.  
  46. when 71220.use or 71222.use or 71223.use or 71192.use or 71193.use or 71124.use or 71131.use
  47. or 71171.use or 71172.use begin
  48. if pc.is_polymorphed() then
  49. syschat("Nu poti folosi un mount cand esti transformat..")
  50. elseif false == pc.is_riding() then
  51. if true == horse.is_summon() then
  52. horse.unsummon()
  53. end
  54. ride.Ride(item.vnum, 0)
  55. else
  56. syschat("Calaresti un mount puternic.")
  57. end
  58. end
  59. end
  60. end
Advertisement
Add Comment
Please, Sign In to add comment