Skocz do zawartości
  • 0

Skrypt na kilof


yt987

Pytanie

Witam. Czy ktoś mógłby napisać dla mnie skrypt. Ten skrypt ma dodawać kilof z którego co każde wykopane 2000 bloków stone daje losowy przedmiot.

Kilof ma mieć zaklęcie wydajność 5 i musi być diamentowy

Permisja: brush.daj

I komenda przywołująca kilof: /superkilof

Z Góry Dziękuję.

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/
Udostępnij na innych stronach

19 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /superkilof:
	permission: brush.daj
	trigger:
		add diamond pickaxe named "&6Super kilof" with lore "&60/2000"
on break:
	if name of player's tool is "&6Super kilof":
		set {_l} to uncolored lore of player's tool
		replace all "/2000" with "" in {_l}
		set {_l} to {_l} parsed as number
		add 1 to {_l}
		set lore of player's tool to "&6%{_l}%/2000"

 

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-254148
Udostępnij na innych stronach

  • 0

[12:55:53 INFO]: [Skript] Reloading the config and all scripts...
[12:55:53 INFO]: Loaded a total of 11504 english aliases
[12:55:53 WARN]: There are no aliases defined for the following ids: 165, 166, 167, 168, 169, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 409, 410, 411, 412, 413, 414, 415, 416, 423, 424, 425, 427, 428, 429, 430, 431
[12:55:53 ERROR]: Can't understand this condition/effect: add diamond pickaxe named "&6Super kilof" with lore "&60/2000" (brush.sk, line 4: add diamond pickaxe named "&6Super kilof" with lore "&60/2000"')
[12:55:53 INFO]: Loaded 1 script with a total of 0 triggers and 1 command in 0.02 seconds
[12:55:53 INFO]: [Skript] Encountered 1 error while reloading the config and all scripts!

skrypt nie działa

 

Edytowane przez yt987
Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-254151
Udostępnij na innych stronach

  • 0
command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe with lore "0/2000" to player

break:
	event-block = stone:
		first line of lore of tool of player contains "/2000":
			set {_} to first line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0:
				add (random item out of all items) named "nagroda za wykopanie 2000 kamienia" to player
			set first line of lore of tool of player to "%{_s::1}%/2000"

 

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-254179
Udostępnij na innych stronach

  • 0
5 godzin temu, yt987 napisał:

Witam. Czy ktoś mógłby napisać dla mnie skrypt. Ten skrypt ma dodawać kilof z którego co każde wykopane 2000 bloków stone daje losowy przedmiot.
Kilof ma mieć zaklęcie wydajność 5 i musi być diamentowy
Permisja: brush.daj
I komenda przywołująca kilof: /superkilof

command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe of efficiency 5 with lore "0/2000" to player

break:
	event-block = stone:
		first line of lore of tool of player contains "/2000":
			set {_} to first line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0:
				add (random item out of all items) named "nagroda za wykopanie 2000 kamienia" to player
			set first line of lore of tool of player to "%{_s::1}%/2000"

Wymagane SkQuery lub Skript przynajmniej 2.3

Edytowane przez PanMaruda
Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-254180
Udostępnij na innych stronach

  • 0
W dniu 1.08.2020 o 17:21, PanMaruda napisał:

command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe of efficiency 5 with lore "0/2000" to player

break:
	event-block = stone:
		first line of lore of tool of player contains "/2000":
			set {_} to first line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0:
				add (random item out of all items) named "nagroda za wykopanie 2000 kamienia" to player
			set first line of lore of tool of player to "%{_s::1}%/2000"

Wymagane SkQuery lub Skript przynajmniej 2.3

Mam Skript 2.4 i SkQuery-4.1.3 i skrypt nadal nie działa :/ 

mam w konsoli taki błąd

[Server thread/WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (skilof.sk, line 13: set {_s::1} to 0:')
[12:49:05] [Server thread/ERROR]: can't understand this condition: 'first line of lore of tool of player contains "/2000"' (skilof.sk, line 8: first line of lore of tool of player contains "/2000":')
[12:49:05] [Server thread/INFO]: [Skript] Encountered 1 error while reloading skilof.sk!

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255280
Udostępnij na innych stronach

  • 0
7 minut temu, yt987 napisał:

Mam Skript 2.4 i SkQuery-4.1.3 i skrypt nadal nie działa :/ 

mam w konsoli taki błąd

[Server thread/WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (skilof.sk, line 13: set {_s::1} to 0:')
[12:49:05] [Server thread/ERROR]: can't understand this condition: 'first line of lore of tool of player contains "/2000"' (skilof.sk, line 8: first line of lore of tool of player contains "/2000":')
[12:49:05] [Server thread/INFO]: [Skript] Encountered 1 error while reloading skilof.sk!

command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe of efficiency 5 with lore "0/2000" to player

break:
	event-block = stone:
		if 1st line of lore of player's tool contains "/2000":
			set {_} to 1st line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0
				add (random item out of all items) named "nagroda za wykopanie 2000 kamienia" to player
			set 1st line of lore of tool of player to "%{_s::1}%/2000"

Poprawiłem błędy. Wszystko powinno działać.

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255281
Udostępnij na innych stronach

  • 0
13 minut temu, Kormic napisał:

command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe of efficiency 5 with lore "0/2000" to player

break:
	event-block = stone:
		if 1st line of lore of player's tool contains "/2000":
			set {_} to 1st line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0
				add (random item out of all items) named "nagroda za wykopanie 2000 kamienia" to player
			set 1st line of lore of tool of player to "%{_s::1}%/2000"

Poprawiłem błędy. Wszystko powinno działać.

Wszystko działa :) dzięki 

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255283
Udostępnij na innych stronach

  • 0
20 minut temu, Kormic napisał:

command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe of efficiency 5 with lore "0/2000" to player

break:
	event-block = stone:
		if 1st line of lore of player's tool contains "/2000":
			set {_} to 1st line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0
				add (random item out of all items) named "nagroda za wykopanie 2000 kamienia" to player
			set 1st line of lore of tool of player to "%{_s::1}%/2000"

Poprawiłem błędy. Wszystko powinno działać.

A jest możliwość dodania konkretnych dropów, np. 

Barwnik z nazwą "Banknot 10zl" ?

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255285
Udostępnij na innych stronach

  • 0
3 minuty temu, yt987 napisał:

Tak. Dziękuję

command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe of efficiency 5 with lore "0/2000" to player

break:
	event-block = stone:
		if 1st line of lore of player's tool contains "/2000":
			set {_} to 1st line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0
				add (random item out of all items) named "nagroda za wykopanie 2000 kamienia" to player
			set 1st line of lore of tool of player to "%{_s::1}%/2000"
			drop 1 of lime dye named "&aBanknot &610zl" at event-block

Powinno wszystko ładnie działać.

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255288
Udostępnij na innych stronach

  • 0
4 minuty temu, Kormic napisał:

command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe of efficiency 5 with lore "0/2000" to player

break:
	event-block = stone:
		if 1st line of lore of player's tool contains "/2000":
			set {_} to 1st line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0
				add (random item out of all items) named "nagroda za wykopanie 2000 kamienia" to player
			set 1st line of lore of tool of player to "%{_s::1}%/2000"
			drop 1 of lime dye named "&aBanknot &610zl" at event-block

Powinno wszystko ładnie działać.

mi konkretnie chodziło o to, że za te wykopanie 2000 kamienia można dostać jedną z paru rzeczy zamiast wszystkich w grze, np.

add 1 lime dye  named "&aBanknot 10zl" or 1 paper named "&c Zwój życia"

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255289
Udostępnij na innych stronach

  • 0
4 minuty temu, yt987 napisał:

mi konkretnie chodziło o to, że za te wykopanie 2000 kamienia można dostać jedną z paru rzeczy zamiast wszystkich w grze, np.

add 1 lime dye  named "&aBanknot 10zl" or 1 paper named "&c Zwój życia"

on load:
	set {nagrody::*} to 1 of lime dye named "&aBanknot 10zl", 1 of paper named "&c Zwój życia"

command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe of efficiency 5 with lore "0/2000" to player

break:
	event-block = stone:
		if 1st line of lore of player's tool contains "/2000":
			set {_} to 1st line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0
				add (random item out of {nagrody::*}) to player
			set 1st line of lore of tool of player to "%{_s::1}%/2000"

Teraz powinno działać jak chciałeś. Itemy sobie ustawiasz w drugiej linijce.

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255291
Udostępnij na innych stronach

  • 0
8 minut temu, Kormic napisał:

on load:
	set {nagrody::*} to 1 of lime dye named "&aBanknot 10zl", 1 of paper named "&c Zwój życia"

command superkilof:
	permission: brush.daj
	trigger:
		add 1 of diamond pickaxe of efficiency 5 with lore "0/2000" to player

break:
	event-block = stone:
		if 1st line of lore of player's tool contains "/2000":
			set {_} to 1st line of lore of tool of player
			set {_s::*} to {_} split at "/"
			set {_s::1} to (({_s::1} parsed as integer) + 1)
			if {_s::1} >= 2000:
				set {_s::1} to 0
				add (random item out of {nagrody::*}) to player
			set 1st line of lore of tool of player to "%{_s::1}%/2000"

Teraz powinno działać jak chciałeś. Itemy sobie ustawiasz w drugiej linijce.

tylko nie wiem czemu jak wykopałem te 2000 kamienia to wypadł mi barwnik z nazwą "zwój życia" a przy następnym wykopaniu normalny zwój :/

Edytowane przez yt987
Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255294
Udostępnij na innych stronach

  • 0
Teraz, yt987 napisał:

tylko nie wiem czemu jak wykopałem te 2000 kamienia to wypadł mi barwnik z nazwą "zwój życia" a przy następnym wykopaniu normalny zwój :/

Nie wiem szczerze, nie powinno tak być.

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255295
Udostępnij na innych stronach

  • 0
16 minut temu, Kormic napisał:

Nie wiem szczerze, nie powinno tak być.

Dzięki za skrypt ;) Pogrzebałem i zrobiłem :) a trzeba było zrobić tak:

on load:
    set {nagrody::*} to 1 of lime dye named "&aBanknot 10zl" 
    set {nagrody::*} to 1 of paper named "&cZwój życia"

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255297
Udostępnij na innych stronach

  • 0
8 minut temu, yt987 napisał:

Dzięki za skrypt ;) Pogrzebałem i zrobiłem :) a trzeba było zrobić tak:

on load:
    set {nagrody::*} to 1 of lime dye named "&aBanknot 10zl" 
    set {nagrody::*} to 1 of paper named "&cZwój życia"

Nie, nie powinno tak być, bo wtedy będzie losowało tylko ten papier. Jak już to zrób to tak:

on load:
	clear {nagrody::*}
	add 1 of lime dye named "&aBanknot 10zl" to {nagrody::*}
	add 1 of paper named "&cZwój życia" to {nagrody::*}

 

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255298
Udostępnij na innych stronach

  • 0
3 minuty temu, Kormic napisał:

Nie, nie powinno tak być, bo wtedy będzie losowało tylko ten papier. Jak już to zrób to tak:


on load:
	clear {nagrody::*}
	add 1 of lime dye named "&aBanknot 10zl" to {nagrody::*}
	add 1 of paper named "&cZwój życia" to {nagrody::*}

 

Dzięki ;) właśnie od 1,5minut zastanawiałem się czemu losuje tylko papier

Odnośnik do komentarza
https://skript.pl/temat/40779-skrypt-na-kilof/#findComment-255299
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

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