jahumen

Forma

Apr 18th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.99 KB | None | 0 0
  1. command /forma:
  2. trigger:
  3. set {_forma} to yaml value "forma" from "forma/%player%.yml"
  4. send "&8&m----------------------------------------"
  5. if {_forma} is less than 1000:
  6. send "&fTwoja forma wynosi: &4%{_forma}%"
  7. else if {_forma} is less than 2500:
  8. send "&fTwoja forma wynosi: &c%{_forma}%"
  9. else if {_forma} is less than 4000:
  10. send "&fTwoja forma wynosi: &e%{_forma}%"
  11. else if {_forma} is less than 6000:
  12. send "&fTwoja forma wynosi: &a%{_forma}%"
  13. else if {_forma} is less than 7500:
  14. send "&fTwoja forma wynosi: &e%{_forma}%"
  15. else if {_forma} is less than 9000:
  16. send "&fTwoja forma wynosi: &c%{_forma}%"
  17. else if {_forma} is less than 10000:
  18. send "&fTwoja forma wynosi: &4%{_forma}%"
  19. send "&fOptymalny poziom formy to &a4000-6000"
  20. send "&8&m----------------------------------------"
  21. on jump:
  22. set {_forma} to yaml value "forma" from "forma/%player%.yml"
  23. if {_forma} is more than 0:
  24. if {_forma} is less than 10000:
  25. set {_forma2} to {_forma}+2
  26. set yaml value "forma" from "forma/%player%.yml" to {_forma2}
  27. set {_przetren} to yaml value "przetrenowanie" from "forma/%player%.yml"
  28. set {_przetren2} to {_przetren}+3
  29. set yaml value "przetrenowanie" from "forma/%player%.yml" to {_przetren2}
  30. every 5 second:
  31. loop all players:
  32. set {_forma} to yaml value "forma" from "forma/%loop-player%.yml"
  33. if {_forma} is more than 0:
  34. if {_forma} is less than 10000:
  35. set {_forma2} to {_forma}-3
  36. set yaml value "forma" from "forma/%loop-player%.yml" to {_forma2}
  37. set {_przetren} to yaml value "przetrenowanie" from "forma/%loop-player%.yml"
  38. if {_przetren} is more than 0:
  39. set {_przetren2} to {_przetren}-2
  40. set yaml value "przetrenowanie" from "forma/%loop-player%.yml" to {_przetren2}
  41. if {_forma} is less than 1000:
  42. apply potion of slowness of tier 2 to the loop-player for 5 second
  43. apply potion of nausea of tier 2 to the loop-player for 5 second
  44. else if {_forma} is less than 2500:
  45. apply potion of slowness of tier 1 to the loop-player for 5 second
  46. else if {_forma} is less than 4000:
  47. apply potion of speed of tier 1 to the loop-player for 5 second
  48. else if {_forma} is less than 6000:
  49. apply potion of speed of tier 2 to the loop-player for 5 second
  50. apply potion of strength of tier 1 to the loop-player for 5 second
  51. else if {_forma} is less than 7500:
  52. apply potion of speed of tier 1 to the loop-player for 5 second
  53. else if {_forma} is less than 9000:
  54. apply potion of slowness of tier 1 to the loop-player for 5 second
  55. else if {_forma} is less than 10000:
  56. apply potion of slowness of tier 1 to the loop-player for 5 second
  57. apply potion of nausea of tier 2 to the loop-player for 5 second
  58. apply potion of weakness of tier 2 to the loop-player for 5 second
  59. if {_przetren} is more than 500:
  60. send "&cPrzetrenowales sie! Lepiej odpocznij!" to loop-player
  61. apply potion of slowness of tier 2 to the loop-player for 5 second
  62. apply potion of nausea of tier 3 to the loop-player for 5 second
  63. apply potion of weakness of tier 2 to the loop-player for 5 second
  64.  
  65.  
  66. every 1 second:
  67. loop all players:
  68. if loop-player is sprinting:
  69. set {_forma} to yaml value "forma" from "forma/%loop-player%.yml"
  70. if {_forma} is more than 0:
  71. if {_forma} is less than 10000:
  72. set {_forma2} to {_forma}+1
  73. set yaml value "forma" from "forma/%loop-player%.yml" to {_forma2}
  74. set {_przetren} to yaml value "przetrenowanie" from "forma/%loop-player%.yml"
  75. set {_przetren2} to {_przetren}+1
  76. set yaml value "przetrenowanie" from "forma/%loop-player%.yml" to {_przetren2}
  77.  
  78.  
  79. on script load:
  80. if folder "plugins/Skript/scripts/forma" doesn't exists:
  81. create folder "plugins/Skript/scripts/forma"
  82.  
  83. on join:
  84. if file "plugins/Skript/scripts/forma/%player%.yml" doesn't exists:
  85. create file "plugins/Skript/scripts/forma/%player%.yml"
  86. set yaml value "forma" from "forma/%player%.yml" to 5000
  87. set yaml value "przetrenowanie" from "forma/%player%.yml" to 0
Advertisement
Add Comment
Please, Sign In to add comment