Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. quest wierzchowce begin
  2. state start begin
  3. function mounts_data( vnum, remain_time )
  4. ride_info = {
  5. [52001] = { 20201, 5*60, apply.MOV_SPEED, 0, apply.MOV_SPEED, 0, 1, false },
  6. }
  7.  
  8. if pc.level < ride_info[vnum][5] then
  9. syschat("Twoja postać posiada za mały poziom aby użyć tego wierzchowca.")
  10. else
  11. if ride_info[vnum][2] == 0 and remain_time != 0 then
  12. pc.mount( ride_info[vnum][1], remain_time*60 )
  13. pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 )
  14. pc.mount_bonus( ride_info[vnum][5], ride_info[vnum][6], remain_time*60 )
  15. else
  16. pc.mount( ride_info[vnum][1], ride_info[vnum][2] )
  17. pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] )
  18. pc.mount_bonus( ride_info[vnum][5], ride_info[vnum][6], ride_info[vnum][2] )
  19. end
  20.  
  21. if true == ride_info[vnum][6] then
  22. pc.remove_item(vnum, 1)
  23. end
  24. end
  25. end
  26.  
  27. when login begin
  28. local vnum, remain_time = pc.get_special_ride_vnum()
  29.  
  30. if 0 != vnum then
  31. wierzchowce.mounts_data(vnum, remain_time)
  32. end
  33. end
  34.  
  35. when 52001.use begin
  36. if pc.is_polymorphed() then
  37. syschat("Nie możesz użyć wierzchowca ponieważ jesteś przemieniony.")
  38. elseif false == pc.is_riding() then
  39. if true == horse.is_summon() then
  40. horse.unsummon()
  41. end
  42. wierzchowce.mounts_data(item.vnum, 0)
  43. else
  44. pc.unmount()
  45. end
  46. end
  47. end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement