Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. quest zone begin
  2. state start begin
  3. function Ride( vnum, remain_time )
  4. ride_info = {
  5. [ID_OBJETO] = { ID_MONTURA_PROTO, item.get_socket(2)*60, apply.MOV_SPEED, 200, 1, false },
  6. }
  7.  
  8. if pc.level < ride_info[vnum][5] then
  9. say("")
  10. say(gameforge.ride._010_say)
  11. say("")
  12. else
  13. if 236 == pc.get_map_index() then
  14. return
  15. end
  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. if vnum != ID_OBJETO then
  33. return
  34. end
  35. if 0 != vnum then
  36. ride_mystery_boxes.Ride(vnum, remain_time)
  37. end
  38. end
  39.  
  40. when ID_OBJETO.use begin
  41. if pc.is_polymorphed() then
  42. say("")
  43. say(gameforge.ride._020_say)
  44. say("")
  45. elseif false == pc.is_riding() then
  46. if true == horse.is_summon() then
  47. horse.unsummon()
  48. end
  49. ride_mystery_boxes.Ride(item.vnum, 0)
  50. else
  51. say("")
  52. say(gameforge.ride._030_say)
  53. say("")
  54. end
  55. end
  56. end
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement