options: Initial_Lives: 3 #Poczatkowa ilosc zyc Max_Lives: 10 #Maksymalna ilosc zyc Death_Worlds: "world" or "world_nether" #Swiaty w ktorych dziala skrypt. Aby dodac nowy swiat dopisz 'or "swiat"' Action_Item: ghast tear #Przedmiot, ktory dodaje zycia Items_per_Life: 3 #Ile przedmiotow trzeba uzyc aby zdobyc 1 zycie. on connect: if {LifeMC::lives::%player%} is 0: kick player due to "&cYou lost all your lives. You cannot join the server." stop on join: wait a tick if {LifeMC::lives::%player%} is not set: set {LifeMC::counter::%player%} to 0 set {LifeMC::lives::%player%} to {@Initial_Lives} send "&a[LifeMC] &bYou have received &c{@Initial_Lives} &blives. Good Luck!" stop Send "&a[LifeMc] &bWelcome back, You have &c%{LifeMC::lives::%player%}% &blives left." if {LifeMC::savior::%player%} is set: send "&a[LifeMC] &bYou have been revived by &6%{LifeMC::savior::%player%}%&b." clear {LifeMC::savior::%player%} stop on death of player: if victim is in world {@Death_Worlds}: wait a tick remove 1 from {LifeMC::lives::%victim%} if {LifeMC::lives::%victim%} is not 0: send "&a[LifeMC] &bYou died and lost a life. You have &c%{LifeMC::lives::%victim%}% &blives left." to victim stop set death message to "" broadcast "&a[LifeMC] &6%victim% &blost all his lives. If you want to revive him type &c""/revive %victim%""&b." kick victim due to "&cYou lost all your lives." stop on rightclick holding {@Action_Item}: if {LifeMC::lives::%player%} is {@Max_Lives}: send "&a[LifeMC] &cYou have the maximum amount of lives." stop add 1 to {LifeMC::counter::%player%} remove 1 {@Action_Item} from player if {LifeMC::counter::%player%} is {@Items_per_Life}: add 1 to {LifeMC::lives::%player%} set {LifeMC::counter::%player%} to 0 send "&a[LifeMC] &bYou got an extra life. You have &c%{LifeMC::lives::%player%}% &blives now." stop command /revive []: aliases: ulecz description: Revives specific player. trigger: if player doesn't have the permission "lifemc.revive": send "&a[LifeMC] &cYou do not have the required permissions." stop if arg is not set: send "&a[LifeMC] &cCorrect usage: &7/revive " stop if {LifeMC::lives::%arg%} is not set: send "&a[LifeMC] &cThe player &6%arg% &cdoes not exist!" stop if {LifeMC::lives::%arg%} is more than 0: send "&a[LifeMC] &cThe player &6%arg% &cdoes not need your help!" stop if {LifeMC::lives::%player%} is 1: send "&a[LifeMC] &cYou have only &c1 life left!" stop add 1 to {LifeMC::lives::%arg%} set {LifeMC::savior::%arg%} to player remove 1 from {LifeMC::lives::%player%} send "&a[LifeMC] &bYou revived &6%arg%&b. You have &c%{LifeMC::lives::%player%}% &blives left." stop command /lives []: aliases: zycia description: Shows current amount of lives. trigger: if player doesn't have the permission "lifemc.lives": send "&a[LifeMC] &cYou do not have the required permissions." stop if {LifeMC::lives::%arg%} is not set: send "&a[LifeMC] &cThe player &6%arg% &cdoes not exist!" stop if arg is "%player%": send "&a[LifeMC] &bYou have &c%{LifeMC::lives::%arg%}% &blives left." stop else: if player doesn't have the permission "lifemc.lives.other": send "&a[LifeMC] &cYou do not have the required permissions." stop send "&a[LifeMC] &bThe player &6%arg% &bhas &c%{LifeMC::lives::%arg%}% &blives left." stop command /givelife [] []: aliases: daj description: Gives specific amount of life to a specific player. trigger: if player doesn't have the permission "lifemc.give": send "&a[LifeMC] &cYou do not have the required permissions." stop if arg 1 is not set: send "&a[LifeMC] &cCorrect usage: &7/givelife " stop if arg 2 is not set: send "&a[LifeMC] &cCorrect usage: &7/givelife " stop if {LifeMC::lives::%arg 1%} is not set: send "&a[LifeMC] &cThe player &6%arg 1% &cdoes not exist!" stop add arg 2 to {LifeMC::lives::%arg 1%} 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." stop