Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Szukam skryptu na życie na przycisk po odrodzeniu.


MinecraftXDPL

Rekomendowane odpowiedzi

Opublikowano

 

 

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: diamond #Przedmiot, ktory dodaje zycia
	Action_Item_Name: "&3Mega Diamond" #Nazwa przedmiotu
	Items_per_Life: 3 #Ile przedmiotow trzeba uzyc aby zdobyc 1 zycie.
	#Crafting
	item1: diamond
	item2: diamond
	item3: diamond
	item4: diamond
	item5: golden apple
	item6: diamond
	item7: diamond
	item8: diamond
	item9: diamond
on script load:
	register new shaped recipe for {@Action_Item} named {@Action_Item_Name} using {@item1}, {@item2}, {@item3}, {@item4}, {@item5}, {@item6}, {@item7}, {@item8}, {@item9}
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 name of player's tool is {@Action_Item_Name}:
		if {LifeMC::lives::%player%} is more than or equal to {@Max_Lives}:
			send "&a[LifeMC] &cYou have the maximum amount of lives."
			stop
		add 1 to {LifeMC::counter::%player%}
		remove 1 {@Action_Item} named {@Action_Item_Name} 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 [<offlineplayer>]:
	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 <player>"
			stop
		if {LifeMC::lives::%arg%} is not set:
			send "&a[LifeMC] &cThe player &6%arg% &cdoes not exist!"
			stop
		if sender is console:
			add 1 to {LifeMC::lives::%arg%}
			set {LifeMC::savior::%arg%} to "CONSOLE"
			send "&a[LifeMC] &bYou revived &6%arg%&b."
			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 [<offlineplayer=%player%>]:
	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 [<offlineplayer>] [<number>]:
	aliases: dajzycie
	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 <player> <amount>"
			stop
		if arg 2 is not set:
			send "&a[LifeMC] &cCorrect usage: &7/givelife <player> <amount>"
			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

 


Potrzebne pluginy:
 - Skript
- SkQuery

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...