ShooterowyPL

LifeMC

Mar 27th, 2015
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. options:
  2. Initial_Lives: 3 #Poczatkowa ilosc zyc
  3. Max_Lives: 10 #Maksymalna ilosc zyc
  4. Death_Worlds: "world" or "world_nether" #Swiaty w ktorych dziala skrypt. Aby dodac nowy swiat dopisz 'or "swiat"'
  5. Action_Item: ghast tear #Przedmiot, ktory dodaje zycia
  6. Items_per_Life: 3 #Ile przedmiotow trzeba uzyc aby zdobyc 1 zycie.
  7. on connect:
  8. if {LifeMC::lives::%player%} is 0:
  9. kick player due to "&cYou lost all your lives. You cannot join the server."
  10. stop
  11. on join:
  12. wait a tick
  13. if {LifeMC::lives::%player%} is not set:
  14. set {LifeMC::counter::%player%} to 0
  15. set {LifeMC::lives::%player%} to {@Initial_Lives}
  16. send "&a[LifeMC] &bYou have received &c{@Initial_Lives} &blives. Good Luck!"
  17. stop
  18. Send "&a[LifeMc] &bWelcome back, You have &c%{LifeMC::lives::%player%}% &blives left."
  19. if {LifeMC::savior::%player%} is set:
  20. send "&a[LifeMC] &bYou have been revived by &6%{LifeMC::savior::%player%}%&b."
  21. clear {LifeMC::savior::%player%}
  22. stop
  23. on death of player:
  24. if victim is in world {@Death_Worlds}:
  25. wait a tick
  26. remove 1 from {LifeMC::lives::%victim%}
  27. if {LifeMC::lives::%victim%} is not 0:
  28. send "&a[LifeMC] &bYou died and lost a life. You have &c%{LifeMC::lives::%victim%}% &blives left." to victim
  29. stop
  30. set death message to ""
  31. broadcast "&a[LifeMC] &6%victim% &blost all his lives. If you want to revive him type &c""/revive %victim%""&b."
  32. kick victim due to "&cYou lost all your lives."
  33. stop
  34. on rightclick holding {@Action_Item}:
  35. if {LifeMC::lives::%player%} is {@Max_Lives}:
  36. send "&a[LifeMC] &cYou have the maximum amount of lives."
  37. stop
  38. add 1 to {LifeMC::counter::%player%}
  39. remove 1 {@Action_Item} from player
  40. if {LifeMC::counter::%player%} is {@Items_per_Life}:
  41. add 1 to {LifeMC::lives::%player%}
  42. set {LifeMC::counter::%player%} to 0
  43. send "&a[LifeMC] &bYou got an extra life. You have &c%{LifeMC::lives::%player%}% &blives now."
  44. stop
  45. command /revive [<offlineplayer>]:
  46. aliases: ulecz
  47. description: Revives specific player.
  48. trigger:
  49. if player doesn't have the permission "lifemc.revive":
  50. send "&a[LifeMC] &cYou do not have the required permissions."
  51. stop
  52. if arg is not set:
  53. send "&a[LifeMC] &cCorrect usage: &7/revive <player>"
  54. stop
  55. if {LifeMC::lives::%arg%} is not set:
  56. send "&a[LifeMC] &cThe player &6%arg% &cdoes not exist!"
  57. stop
  58. if {LifeMC::lives::%arg%} is more than 0:
  59. send "&a[LifeMC] &cThe player &6%arg% &cdoes not need your help!"
  60. stop
  61. if {LifeMC::lives::%player%} is 1:
  62. send "&a[LifeMC] &cYou have only &c1 life left!"
  63. stop
  64. add 1 to {LifeMC::lives::%arg%}
  65. set {LifeMC::savior::%arg%} to player
  66. remove 1 from {LifeMC::lives::%player%}
  67. send "&a[LifeMC] &bYou revived &6%arg%&b. You have &c%{LifeMC::lives::%player%}% &blives left."
  68. stop
  69. command /lives [<offlineplayer=%player%>]:
  70. aliases: zycia
  71. description: Shows current amount of lives.
  72. trigger:
  73. if player doesn't have the permission "lifemc.lives":
  74. send "&a[LifeMC] &cYou do not have the required permissions."
  75. stop
  76. if {LifeMC::lives::%arg%} is not set:
  77. send "&a[LifeMC] &cThe player &6%arg% &cdoes not exist!"
  78. stop
  79. if arg is "%player%":
  80. send "&a[LifeMC] &bYou have &c%{LifeMC::lives::%arg%}% &blives left."
  81. stop
  82. else:
  83. if player doesn't have the permission "lifemc.lives.other":
  84. send "&a[LifeMC] &cYou do not have the required permissions."
  85. stop
  86. send "&a[LifeMC] &bThe player &6%arg% &bhas &c%{LifeMC::lives::%arg%}% &blives left."
  87. stop
  88.  
  89. command /givelife [<offlineplayer>] [<number>]:
  90. aliases: daj
  91. description: Gives specific amount of life to a specific player.
  92. trigger:
  93. if player doesn't have the permission "lifemc.give":
  94. send "&a[LifeMC] &cYou do not have the required permissions."
  95. stop
  96. if arg 1 is not set:
  97. send "&a[LifeMC] &cCorrect usage: &7/givelife <player> <amount>"
  98. stop
  99. if arg 2 is not set:
  100. send "&a[LifeMC] &cCorrect usage: &7/givelife <player> <amount>"
  101. stop
  102. if {LifeMC::lives::%arg 1%} is not set:
  103. send "&a[LifeMC] &cThe player &6%arg 1% &cdoes not exist!"
  104. stop
  105. add arg 2 to {LifeMC::lives::%arg 1%}
  106. 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."
  107. stop
Add Comment
Please, Sign In to add comment