Kacperski89

HEV

May 17th, 2016
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. # Skrypt - Overalls ( Kombinezon )
  2.  
  3. variables:
  4. {hev::status} = true
  5.  
  6. {hev::%player%} = false
  7.  
  8. {hev::health::%player%} = false
  9.  
  10. {hev::battery::%player%} = 0
  11.  
  12. options:
  13.  
  14. # Nazwa kombinezonu (HEV)
  15. hev_Name: &6Kombinezon HEV
  16.  
  17. # Minimalny poziom serc - Aby leczylo
  18. minimumLevelOfHearts: 1.5
  19.  
  20. # Gui - /overalls
  21.  
  22. permission: overalls.hev.all
  23. permission send: &cYou do not have special permission!
  24.  
  25. rows: 3
  26. name_GUI: &6Ustawienia kombinezonu &cHEV
  27.  
  28. # Ogolne:
  29.  
  30. tag: &8[&6Overalls]
  31. command /overalls [<text>]:
  32. permission: {@permission}
  33. permission send: {@permission send}
  34. description: Kombinezony HEV! Pomagają podczas walki.
  35. trigger:
  36. if argument 1 isn't set:
  37. if {hev::status} is true:
  38. if {hev::%player%} is true:
  39. if {hev::health::%player%} is set:
  40. open chest with {@rows} rows named "{@name_GUI}" to the player
  41. format slot 0 of player with 1 of paper named "&4Informacje" with lore "&7-||&7- &6Kombinezon HEV pomaga podczas walki kiedy jestes podczas walki ;)||&7- &cMiedzy innymi leczy graczy przy minimalnej ilosci serc" to be unstealable
  42. format slot 1 of player with 1 of redstone named "&cUleczanie" with lore "&6Status: &7%{hev::health::%player%}%" to run [execute player command "overalls heal"]
  43. format slot 2 of player with 1 of diamond chestplate named "&3Podladuj kombinezon" with lore "&aBateria: %{hev::battery::%player%}%" to run [execute player command "Overalls charge"]
  44. stop trigger
  45. else:
  46. send "{@tag} &cNie masz ustawionego leczenia..."
  47. stop trigger
  48. else:
  49. send "{@tag} &cMasz wylaczony kombinezon."
  50. stop trigger
  51. else:
  52. send "{@tag} &cKombinezony sa wylaczone ;("
  53. stop trigger
  54. if argument 1 is "heal":
  55. if {hev::health::%player%} is true:
  56. set {hev::health::%player%} to false
  57. send "{@tag} &cWylaczono uleczanie"
  58. stop trigger
  59. else:
  60. set {hev::health::%player%} to true
  61. send "{@tag} &aWlaczono uleczanie"
  62. stop trigger
  63. if argument 1 is "charge":
  64. if {hev::battery::%player%} < 50:
  65. if {hev::charge::%player%} is false:
  66. set {hev::charge::%player%} to true
  67. send "{@tag} &6Ladowanie!"
  68. stop trigger
  69. else:
  70. send "{@tag} &cKombinezon jest w trakcie ladowania!"
  71. stop trigger
  72. else:
  73. send "{@tag} &cJeszcze nie masz ponizej 50% bateri!"
  74. stop trigger
  75. every 3 seconds:
  76. loop all players:
  77. {hev::charge::%player%} is true:
  78. {hev::battery::%player%} < 100:
  79. add 1 to {hev::battery::%loop-player%}
  80. {hev::battery::%loop-player%} = 100:
  81. send "{@tag} &aTwoj kombinezon juz naladowany w 100%"
  82. set {hev::charge::%loop-player%} to false
  83. stop trigger
  84. stop trigger
  85. stop trigger
  86. stop trigger
  87. stop
  88. on damage of player:
  89. if {hev::%victim%} is set:
  90. if {hev::health::%victim%} is true:
  91. if victim's heart = {@minimumLevelOfHearts}:
  92. if player's chestplate is diamond chestplate named {@hev_name}:
  93. heal the victim
  94. set {_x} to a random integer between 1 and 9
  95. subtract {_x} from {hev::battery::%victim%}
  96. stop
  97. stop
  98. stop
  99. stop
  100.  
  101. command /hevGiven:
  102. permission: hev.give
  103. trigger:
  104. add diamond chestplate named {@hev_name} to the player
  105. send "&aOtrzymales HEV!"
  106. stop
Add Comment
Please, Sign In to add comment