Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.03 KB | None | 0 0
  1. options:
  2.  
  3. Initial_Lives: 3 #Poczatkowa ilosc zyc
  4.  
  5. Max_Lives: 10 #Maksymalna ilosc zyc
  6.  
  7. Death_Worlds: "world" or "world_nether" #Swiaty w ktorych dziala skrypt. Aby dodac nowy swiat dopisz 'or "swiat"'
  8.  
  9. Action_Item: scute #Przedmiot, ktory dodaje zycia
  10.  
  11. Action_Item_Name: "&aZycie" #Nazwa przedmiotu
  12.  
  13. Items_per_Life: 1 #Ile przedmiotow trzeba uzyc aby zdobyc 1 zycie.
  14.  
  15. #Crafting
  16.  
  17. item1: diamond
  18.  
  19. item2: diamond
  20.  
  21. item3: diamond
  22.  
  23. item4: diamond
  24.  
  25. item5: golden apple
  26.  
  27. item6: diamond
  28.  
  29. item7: diamond
  30.  
  31. item8: diamond
  32.  
  33. item9: diamond
  34.  
  35. on script load:
  36.  
  37. register new shaped recipe for {@Action_Item} named {@Action_Item_Name} using {@item1}, {@item2}, {@item3}, {@item4}, {@item5}, {@item6}, {@item7}, {@item8}, {@item9}
  38.  
  39. on connect:
  40.  
  41. if {LifeMC::lives::%player%} is 0:
  42.  
  43. kick player due to "&cYou lost all your lives. You cannot join the server."
  44.  
  45. stop
  46.  
  47. on join:
  48.  
  49. wait a tick
  50.  
  51. if {LifeMC::lives::%player%} is not set:
  52.  
  53. set {LifeMC::counter::%player%} to 0
  54.  
  55. set {LifeMC::lives::%player%} to {@Initial_Lives}
  56.  
  57. send "&a[LifeMC] &bYou have received &c{@Initial_Lives} &blives. Good Luck!"
  58.  
  59. stop
  60.  
  61. send "&a[LifeMc] &bWelcome back. You have &c%{LifeMC::lives::%player%}% &blives left."
  62.  
  63. if {LifeMC::savior::%player%} is set:
  64.  
  65. send "&a[LifeMC] &bYou have been revived by &6%{LifeMC::savior::%player%}%&b."
  66.  
  67. clear {LifeMC::savior::%player%}
  68.  
  69. stop
  70.  
  71. on death of player:
  72.  
  73. if victim is in world {@Death_Worlds}:
  74.  
  75. wait a tick
  76.  
  77. remove 1 from {LifeMC::lives::%victim%}
  78.  
  79. if {LifeMC::lives::%victim%} is not 0:
  80.  
  81. send "&a[LifeMC] &bYou died and lost a life. You have &c%{LifeMC::lives::%victim%}% &blives left." to victim
  82.  
  83. stop
  84.  
  85. set death message to ""
  86.  
  87. broadcast "&&6%victim% &blost all his lives. If you want to revive him type &c""/revive %victim%""&b."
  88.  
  89. execute console command "tempban %player% 1 days Straciles wszystkie zycia!"
  90.  
  91. stop
  92.  
  93. on rightclick holding {@Action_Item}:
  94.  
  95. if name of player's tool is {@Action_Item_Name}:
  96.  
  97. if {LifeMC::lives::%player%} is more than or equal to {@Max_Lives}:
  98.  
  99. send "&a[LifeMC] &cYou have the maximum amount of lives."
  100.  
  101. stop
  102.  
  103. add 1 to {LifeMC::counter::%player%}
  104.  
  105. remove 1 {@Action_Item} named {@Action_Item_Name} from player
  106.  
  107. if {LifeMC::counter::%player%} is {@Items_per_Life}:
  108.  
  109. add 1 to {LifeMC::lives::%player%}
  110.  
  111. set {LifeMC::counter::%player%} to 0
  112.  
  113. send "&a[LifeMC] &bYou got an extra life. You have &c%{LifeMC::lives::%player%}% &blives now."
  114.  
  115. stop
  116.  
  117. command /revive [<offlineplayer>]:
  118.  
  119. aliases: ulecz
  120.  
  121. description: Revives specific player.
  122.  
  123. trigger:
  124.  
  125. if player doesn't have the permission "lifemc.revive":
  126.  
  127. send "&a[LifeMC] &cYou do not have the required permissions."
  128.  
  129. stop
  130.  
  131. if arg is not set:
  132.  
  133. send "&a[LifeMC] &cCorrect usage: &7/revive <player>"
  134.  
  135. stop
  136.  
  137. if {LifeMC::lives::%arg%} is not set:
  138.  
  139. send "&a[LifeMC] &cThe player &6%arg% &cdoes not exist!"
  140.  
  141. stop
  142.  
  143. if sender is console:
  144.  
  145. add 1 to {LifeMC::lives::%arg%}
  146.  
  147. set {LifeMC::savior::%arg%} to "CONSOLE"
  148.  
  149. send "&a[LifeMC] &bYou revived &6%arg%&b."
  150.  
  151. stop
  152.  
  153. if {LifeMC::lives::%arg%} is more than 0:
  154.  
  155. send "&a[LifeMC] &cThe player &6%arg% &cdoes not need your help!"
  156.  
  157. stop
  158.  
  159. if {LifeMC::lives::%player%} is 1:
  160.  
  161. send "&a[LifeMC] &cYou have only &c1 life left!"
  162.  
  163. stop
  164.  
  165. add 1 to {LifeMC::lives::%arg%}
  166.  
  167. set {LifeMC::savior::%arg%} to player
  168.  
  169. remove 1 from {LifeMC::lives::%player%}
  170.  
  171. send "&a[LifeMC] &bYou revived &6%arg%&b. You have &c%{LifeMC::lives::%player%}% &blives left."
  172.  
  173. stop
  174.  
  175. command /lives [<offlineplayer=%player%>]:
  176.  
  177. aliases: zycia
  178.  
  179. description: Shows current amount of lives.
  180.  
  181. trigger:
  182.  
  183. if player doesn't have the permission "lifemc.lives":
  184.  
  185. send "&a[LifeMC] &cYou do not have the required permissions."
  186.  
  187. stop
  188.  
  189. if {LifeMC::lives::%arg%} is not set:
  190.  
  191. send "&a[LifeMC] &cThe player &6%arg% &cdoes not exist!"
  192.  
  193. stop
  194.  
  195. if arg is "%player%":
  196.  
  197. send "&a[LifeMC] &bYou have &c%{LifeMC::lives::%arg%}% &blives left."
  198.  
  199. stop
  200.  
  201. else:
  202.  
  203. if player doesn't have the permission "lifemc.lives.other":
  204.  
  205. send "&a[LifeMC] &cYou do not have the required permissions."
  206.  
  207. stop
  208.  
  209. send "&a[LifeMC] &bThe player &6%arg% &bhas &c%{LifeMC::lives::%arg%}% &blives left."
  210.  
  211. stop
  212.  
  213.  
  214. command /givelife [<offlineplayer>] [<number>]:
  215.  
  216. aliases: dajzycie
  217.  
  218. description: Gives specific amount of life to a specific player.
  219.  
  220. trigger:
  221.  
  222. if player doesn't have the permission "lifemc.give":
  223.  
  224. send "&a[LifeMC] &cYou do not have the required permissions."
  225.  
  226. stop
  227.  
  228. if arg 1 is not set:
  229.  
  230. send "&a[LifeMC] &cCorrect usage: &7/givelife <player> <amount>"
  231.  
  232. stop
  233.  
  234. if arg 2 is not set:
  235.  
  236. send "&a[LifeMC] &cCorrect usage: &7/givelife <player> <amount>"
  237.  
  238. stop
  239.  
  240. if {LifeMC::lives::%arg 1%} is not set:
  241.  
  242. send "&a[LifeMC] &cThe player &6%arg 1% &cdoes not exist!"
  243.  
  244. stop
  245.  
  246. add arg 2 to {LifeMC::lives::%arg 1%}
  247.  
  248. send "&a[LifeMC] &bYou gave &c%arg 2% &blives to the player &6%arg 1%&b. He has &c%{LifeMC::lives::%arg 1%}% &blives now."
  249.  
  250. stop
  251.  
  252. command /test:
  253.  
  254. trigger:
  255.  
  256. set {LifeMC::lives::%player%} to 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement