Skocz do zawartości
  • 0

Skrypt na kity - czy wszystko jest ok?


Dorek
 Udostępnij

Pytanie

Witam, posiadam skrypt na kity co 24 godziny. Niestety nie działa on do końca tak jak powinien, ponieważ po 24h dalej nie można wziąć zestawu. Nie ukrywam, o 00:00 jest restart ale ten licznik który jest tutaj nie powinien do tego dopuścić. Będę wdzięczny za poprawę skryptu tak, żeby mimo restartu licznik się nie resetował :D Oto skrypt:
 

Spoiler
options:
#===Gracz===#
	kitgracz1: stone sword named "&8[&6&lD&2Craft&8] &7Miecz gracza"
	kitgracz2: stone pickaxe named "&8[&6&lD&2Craft&8] &7Kilof gracza"
	kitgracz3: stone axe named "&8[&6&lD&2Craft&8] &7Siekiera gracza"
	kitgracz4: stone shovel named "&8[&6&lD&2Craft&8] &7Lopata gracza"
	kitgracz5: leather helmet named "&8[&6&lD&2Craft&8] &7Helm gracza"
	kitgracz6: leather tunic named "&8[&6&lD&2Craft&8] &7Tunika gracza"
	kitgracz7: leather pants named "&8[&6&lD&2Craft&8] &7Spodnie gracza"
	kitgracz8: leather boots named "&8[&6&lD&2Craft&8] &7Buty gracza"
	kitgracz9: 3 ender chest named "&8[&6&lD&2Craft&8] &9Skrzynia kresu"
	kitgracz10: 64 steak named "&8[&6&lD&2Craft&8] &6Jedzenie"
	kitgracz11: none
	kitgracz12: none
#===VIP===#
	kitvip1: diamond sword of efficiency 5 named "&8[&6&lD&2Craft&8] &6Miecz VIPA"
	kitvip2: diamond pickaxe of efficiency 5 named "&8[&6&lD&2Craft&8] &6Kilof VIPA"
	kitvip3: diamond axe of efficiency 5 named "&8[&6&lD&2Craft&8] &6Siekiera VIPA"
	kitvip4: diamond shovel of efficiency 5 named "&8[&6&lD&2Craft&8] &6Lopata VIPA"
	kitvip5: diamond helmet of protection 3  named "&8[&6&lD&2Craft&8] &6Helm VIPA"
	kitvip6: diamond chestplate of protection 3  named "&8[&6&lD&2Craft&8] &6Tunika VIPA"
	kitvip7: diamond leggings of protection 3  named "&8[&6&lD&2Craft&8] &6Spodnie VIPA"
	kitvip8: diamond boots of protection 3 named "&8[&6&lD&2Craft&8] &6Buty VIPA"
	kitvip9: 64 enchanted golden apple named "&8[&6&lD&2Craft&8] &6Koxy VIPA"
	kitvip10: 64 golden apple named "&8[&6&lD&2Craft&8] &6Zlote jablka VIPA"
	kitvip11: 64 ender chest named "&8[&6&lD&2Craft&8] &9Skrzynia kresu"
	kitvip12: 64 steak named "&8[&6&lD&2Craft&8] &6Jedzenie"
#kod
every 1 minutes:
	loop all players:
		add 1 to {dc-core.kit.gracz.%loop-player%}
		add 1 to {dc-core.kit.vip.%loop-player%}
		if {dc-core.kit.gracz.%loop-player%} is 1440:
			set {dc-core.kit.gracz.%loop-player%} to 0
			set {dc-core.kit.status.gracz.%loop-player%} to false
		if {dc-core.kit.vip.%loop-player%} is 1440:
			set {dc-core.kit.vip.%loop-player%} to 0
			set {dc-core.kit.status.vip.%loop-player%} to false
		stop
on join:
    if {dc-core.kit.gracz.%player%} is not set:
        set {dc-core.kit.gracz.%player%} to 0
    if {dc-core.kit.vip.%player%} is not set:
        set {dc-core.kit.gracz.%player%} to 0
    if {dc-core.kit.status.gracz.%player%} is not set:
        set {dc-core.kit.status.gracz.%player%} to false
    if {dc-core.kit.status.vip.%player%} is not set:
        set {dc-core.kit.status.vip.%player%} to false
command /gracz:
	description: Daje gotowy zestaw narzedzi dla gracza
	permission: dc-core.kit.gracz
	permission message: {@nopermission}
	usage: /gracz
	trigger:
		if {dc-core.kit.gracz.%player%} is 0:
			if {dc-core.kit.status.gracz.%player%} is false: 
				send "&2Otrzymales zestaw &7Gracza&2."
				add {@kitgracz1} to player's inventory
				add {@kitgracz2} to player's inventory
				add {@kitgracz3} to player's inventory
				add {@kitgracz4} to player's inventory
				add {@kitgracz5} to player's inventory
				add {@kitgracz6} to player's inventory
				add {@kitgracz7} to player's inventory
				add {@kitgracz8} to player's inventory
				add {@kitgracz9} to player's inventory
				add {@kitgracz10} to player's inventory
				add {@kitgracz11} to player's inventory
				add {@kitgracz12} to player's inventory
				set {dc-core.kit.status.gracz.%player%} to true
				set {dc-core.kit.gracz.%player%} to 0
				stop
			else:
				send "&4&lBLAD: &cKazdy zestaw mozesz brac co 24 godziny!"
				stop
		else:
			send "&4&lBLAD: &cKazdy zestaw mozesz brac co 24 godziny!"
			stop
command /vip:
	description: Daje gotowy zestaw narzedzi dla vipa
	permission: dc-core.kit.vip
	permission message: {@nopermission}
	usage: /vip
	trigger:
		if {dc-core.kit.vip.%player%} is 0:
			if {dc-core.kit.status.vip.%player%} is false: 
				send "&2Otrzymales zestaw &6&lVIPA&2."
				add {@kitvip1} to player's inventory
				add {@kitvip2} to player's inventory
				add {@kitvip3} to player's inventory
				add {@kitvip4} to player's inventory
				add {@kitvip5} to player's inventory
				add {@kitvip6} to player's inventory
				add {@kitvip7} to player's inventory
				add {@kitvip8} to player's inventory
				add {@kitvip9} to player's inventory
				add {@kitvip10} to player's inventory
				add {@kitvip11} to player's inventory
				add {@kitvip12} to player's inventory
				set {dc-core.kit.status.vip.%player%} to true
				set {dc-core.kit.vip.%player%} to 0
				stop
			else:
				send "&4&lBLAD: &cKazdy zestaw mozesz brac co 24 godziny!"
				stop
		else:
			send "&4&lBLAD: &cKazdy zestaw mozesz brac co 24 godziny!"
			stop
command /kit [<text>]:
	trigger:
		if arg 1 is not set:
			send "&7Dostepne zestawy: &c&lGracz&7, &c&lVIP"
			stop
		if arg 1 is "gracz":
			execute player command "gracz"
			stop
		if arg 1 is "vip":
			execute player command "vip"
			stop
		else:
			send "&4&lBLAD: &cTaki zestaw nie istnieje."
			stop
command /kitresettime [<player>]:
	description: Resetuje czas oczekiwania na mozliwosc przyznania kolejnego zestawu
	permission: dc-core.kitresettime
	permission message: {@nopermission}
	usage: /kitresettime [gracz]
	trigger:
		if arg 1 is set:
			set {dc-core.kit.status.gracz.%player%} to false
			set {dc-core.kit.status.vip.%player%} to false
			set {dc-core.kit.gracz.%player%} to 0
			set {dc-core.kit.vip.%player%} to 0
			send "&2Pomyslnie zresetowano czas oczekiwania na mozliwosc przyznania kolejnego zestawu dla &c&l%arg 1%&2."
			send "&2Admin &c&l%player% &2zresetowal czas oczekiwania na mozliwosc przyznania kolejnego zestawu." to arg 1
			stop
		else:
			send "&4&lBLAD: &cTakiego gracza nie ma na serwerze."

 

//Długie kody pakujemy w spoilery ~Derpy

Odnośnik do komentarza
Udostępnij na innych stronach

1 odpowiedź na to pytanie

Rekomendowane odpowiedzi

  • 0

Mam nadzieję, że działa :)

Spoiler
options:
	nopermission: "&cNie masz uprawnien!"
#===Gracz===#
	kitgracz1: stone sword named "&8[&6&lD&2Craft&8] &7Miecz gracza"
	kitgracz2: stone pickaxe named "&8[&6&lD&2Craft&8] &7Kilof gracza"
	kitgracz3: stone axe named "&8[&6&lD&2Craft&8] &7Siekiera gracza"
	kitgracz4: stone shovel named "&8[&6&lD&2Craft&8] &7Lopata gracza"
	kitgracz5: leather helmet named "&8[&6&lD&2Craft&8] &7Helm gracza"
	kitgracz6: leather tunic named "&8[&6&lD&2Craft&8] &7Tunika gracza"
	kitgracz7: leather pants named "&8[&6&lD&2Craft&8] &7Spodnie gracza"
	kitgracz8: leather boots named "&8[&6&lD&2Craft&8] &7Buty gracza"
	kitgracz9: 3 ender chest named "&8[&6&lD&2Craft&8] &9Skrzynia kresu"
	kitgracz10: 64 steak named "&8[&6&lD&2Craft&8] &6Jedzenie"
	kitgracz11: none
	kitgracz12: none
#===VIP===#
	kitvip1: diamond sword of efficiency 5 named "&8[&6&lD&2Craft&8] &6Miecz VIPA"
	kitvip2: diamond pickaxe of efficiency 5 named "&8[&6&lD&2Craft&8] &6Kilof VIPA"
	kitvip3: diamond axe of efficiency 5 named "&8[&6&lD&2Craft&8] &6Siekiera VIPA"
	kitvip4: diamond shovel of efficiency 5 named "&8[&6&lD&2Craft&8] &6Lopata VIPA"
	kitvip5: diamond helmet of protection 3  named "&8[&6&lD&2Craft&8] &6Helm VIPA"
	kitvip6: diamond chestplate of protection 3  named "&8[&6&lD&2Craft&8] &6Tunika VIPA"
	kitvip7: diamond leggings of protection 3  named "&8[&6&lD&2Craft&8] &6Spodnie VIPA"
	kitvip8: diamond boots of protection 3 named "&8[&6&lD&2Craft&8] &6Buty VIPA"
	kitvip9: 64 enchanted golden apple named "&8[&6&lD&2Craft&8] &6Koxy VIPA"
	kitvip10: 64 golden apple named "&8[&6&lD&2Craft&8] &6Zlote jablka VIPA"
	kitvip11: 64 ender chest named "&8[&6&lD&2Craft&8] &9Skrzynia kresu"
	kitvip12: 64 steak named "&8[&6&lD&2Craft&8] &6Jedzenie"
variables:
	{dc-core.kit.gracz.%player%} = 0
	{dc-core.kit.vip.%player%} = 0
	{pierwszy.gracz.%player%} = true
	{pierwszy.vip.%player%} = true
command /gracz:
	description: Daje gotowy zestaw narzedzi dla gracza
	permission: dc-core.kit.gracz
	permission message: {@nopermission}
	usage: /gracz
	trigger:
		if {pierwszy.gracz.%player%} is false:
			if difference between {dc-core.kit.gracz.%player%} and now is more than 24 hours: 
				send "&2Otrzymales zestaw &7Gracza&2."
				add {@kitgracz1} to player's inventory
				add {@kitgracz2} to player's inventory
				add {@kitgracz3} to player's inventory
				add {@kitgracz4} to player's inventory
				add {@kitgracz5} to player's inventory
				add {@kitgracz6} to player's inventory
				add {@kitgracz7} to player's inventory
				add {@kitgracz8} to player's inventory
				add {@kitgracz9} to player's inventory
				add {@kitgracz10} to player's inventory
				add {@kitgracz11} to player's inventory
				add {@kitgracz12} to player's inventory
				set {pierwszy.gracz.%player%} to false # profilaktycznie
				set {dc-core.kit.gracz.%player%} to now
				stop
			else:
				send "&4&lBLAD: &cKazdy zestaw mozesz brac co 24 godziny!"
				stop
		else:	
			send "&2Otrzymales zestaw &7Gracza&2."
			add {@kitgracz1} to player's inventory
			add {@kitgracz2} to player's inventory
			add {@kitgracz3} to player's inventory
			add {@kitgracz4} to player's inventory
			add {@kitgracz5} to player's inventory
			add {@kitgracz6} to player's inventory
			add {@kitgracz7} to player's inventory
			add {@kitgracz8} to player's inventory
			add {@kitgracz9} to player's inventory
			add {@kitgracz10} to player's inventory
			add {@kitgracz11} to player's inventory
			add {@kitgracz12} to player's inventory
			set {pierwszy.gracz.%player%} to false
			set {dc-core.kit.gracz.%player%} to now
			stop
command /vip:
	description: Daje gotowy zestaw narzedzi dla vipa
	permission: dc-core.kit.vip
	permission message: {@nopermission}
	usage: /vip
	trigger:
		if {pierwszy.vip.%player%} is false:
			if difference between {dc-core.kit.vip.%player%} and now is more than 24 hours:
				send "&2Otrzymales zestaw &6&lVIPA&2."
				add {@kitvip1} to player's inventory
				add {@kitvip2} to player's inventory
				add {@kitvip3} to player's inventory
				add {@kitvip4} to player's inventory
				add {@kitvip5} to player's inventory
				add {@kitvip6} to player's inventory
				add {@kitvip7} to player's inventory
				add {@kitvip8} to player's inventory
				add {@kitvip9} to player's inventory
				add {@kitvip10} to player's inventory
				add {@kitvip11} to player's inventory
				add {@kitvip12} to player's inventory
				set {dc-core.kit.status.vip.%player%} to false
				set {dc-core.kit.vip.%player%} to now
				stop
			else:
				send "&4&lBLAD: &cKazdy zestaw mozesz brac co 24 godziny!"
				stop
		else:
			send "&2Otrzymales zestaw &6&lVIPA&2."
			add {@kitvip1} to player's inventory
			add {@kitvip2} to player's inventory
			add {@kitvip3} to player's inventory
			add {@kitvip4} to player's inventory
			add {@kitvip5} to player's inventory
			add {@kitvip6} to player's inventory
			add {@kitvip7} to player's inventory
			add {@kitvip8} to player's inventory
			add {@kitvip9} to player's inventory
			add {@kitvip10} to player's inventory
			add {@kitvip11} to player's inventory
			add {@kitvip12} to player's inventory
			set {pierwszy.vip.%player%} to false
			set {dc-core.kit.vip.%player%} to now
			stop
command /kit [<text>]:
	trigger:
		if arg 1 is not set:
			send "&7Dostepne zestawy: &c&lGracz&7, &c&lVIP"
			stop
		if arg 1 is "gracz":
			execute player command "gracz"
			stop
		if arg 1 is "vip":
			execute player command "vip"
			stop
		else:
			send "&4&lBLAD: &cTaki zestaw nie istnieje."
			stop
command /kitresettime [<player>]:
	description: Resetuje czas oczekiwania na mozliwosc przyznania kolejnego zestawu
	permission: dc-core.kitresettime
	permission message: {@nopermission}
	usage: /kitresettime [gracz]
	trigger:
		if arg 1 is set:
			set {pierwszy.gracz.%player%} to true
			set {pierwszy.vip.%player%} to true
			send "&2Pomyslnie zresetowano czas oczekiwania na mozliwosc przyznania kolejnego zestawu dla &c&l%arg 1%&2."
			send "&2Admin &c&l%player% &2zresetowal czas oczekiwania na mozliwosc przyznania kolejnego zestawu." to arg 1
			stop
		else:
			send "&4&lBLAD: &cTakiego gracza nie ma na serwerze."

 

 

Edytowane przez RedekDMG
Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...