Skocz do zawartości
  • 0

Dowód Osobisty


BeLWeR

Pytanie

Chciałbym jeden skrypcik. Nie duży, ale sam mam problem z jego napisaniem. Chodzi o Dowód osobisty (Imię, nazwisko, wiek (ewentualnie miejscowość do wybrania))

Oraz mam pytanie. Czy zna ktoś plugin dodatkowy do Citizens na sklepy?

Edytowane przez PoweredDragon
Odnośnik do komentarza
https://skript.pl/temat/18220-dow%C3%B3d-osobisty/
Udostępnij na innych stronach

Rekomendowane odpowiedzi

  • 0

@kaol48s Chodzi, żeby to było w gui. Podchodzisz do NPC klikasz prawym i na początku wybierasz imię z listy (np. pod wełną) potem otwiera Ci się kolejne i wybierasz nazwisko, potem wiek i na końcu Miejscowość. A po zakończeniu, żeby można było to kupić za określoną sumę

Odnośnik do komentarza
https://skript.pl/temat/18220-dow%C3%B3d-osobisty/#findComment-125142
Udostępnij na innych stronach

  • 0
on rightclick on villager:
  name of clicked entity is "Urzednik":
    open chest with 4 rows named "Imie" to player
    loop 36 times:
      set {_n::*} to value list "imiona"
      format slot (loop-number - 1) of player with white wool named "&a%{_n::%loop-number%}%" to close then run [set {firstName::%player%} to {_n::%loop-number%}]->[execute console command "dowod %{_p}% nazwisko"]

command /dowod <offlineplayer=player> [<text>]:
	trigger:
		set {_p} to offlineplayer-arg
		arg 2 is not set:
			open chest with 4 rows named "Imie" to {_p}
			loop 36 times:
				set {_n::*} to yml list "imiona" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				format slot (loop-number - 1) of {_p} with white wool named "&a%{_n::%loop-number%}%" to close then run [set {firstName::%player%} to {_n::%loop-number%}]->[execute console command "dowod %{_p}% nazwisko"]
		arg 2 is "nazwisko":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "nazwiska" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				format slot (loop-number - 1) of {_p} with white wool named "&a%{_n::%loop-number%}%" to close then run [set {lastName::%player%} to {_n::%loop-number%}]->[execute console command "dowod %{_p}% wiek"]
		arg 2 is "wiek":
			set {signMode::%{_p}%} to true
			loop 5 times:
				send "&aMasz %5 - loop-number% sekundy na podanie wieku!" to {_p}
				wait 1 second
			{age::%player%} is set:
				execute console command "dowod %{_p}% miasto"
			else:
				send "&cNie wybrales imienia! Proces rejestracji anulowany!" to {_p}
		arg 2 is "miasto":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "miasta" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				format slot (loop-number - 1) of {_p} with white wool named "&a%{_n::%loop-number%}%" to close then run [set {city::%player%} to {_n::%loop-number%}]->[execute console command "dowod %{_p}% kup"]
		arg 2 is "kup":
			{_p}'s balance >= 100: #cena dowodu
				remove 100 from {_p}'s balance
				give paper named "&fDOWOD OSOBISTY" with lore "&aImie: %{firstName::%{_p}%}%||&aNazwisko: %{lastName::%{_p}%}%||&aWiek: %{age::%{_p}%}%||&aMiejsce zamieszkania: %{city::%{_p}%}%" to {_p}

on chat:
	{signMode::%player%} is true:
		set {_n} to "%message%" parsed as number
		{_n} is set:
			set {age::%player%} to {_n}

W pliku config.yml w folderze dowody ustawiasz trzy listy


 

nazwiska:
 - nazwisko1
 - nazwisko2
 - itd.

miasta:
 - miasto1
 - miasto2
 - itd.

imiona:
 - imie1
 - imie2
 - itd.

 

Może ich być nie więcej niż 36 (ale mogę to zwiększyć nawet do 54)

 

EDIT:
Co do pluginu, to Citizens powinno być ok (ma nawet wsparcie w dodatku do Skripta ;D)

Edytowane przez PoweredDragon
Odnośnik do komentarza
https://skript.pl/temat/18220-dow%C3%B3d-osobisty/#findComment-125159
Udostępnij na innych stronach

  • 0

Działające:

on rightclick on villager:
  name of clicked entity is "Urzednik":
    set {_p} to "%player%" parsed as offlineplayer
    open chest with 4 rows named "Imie" to {_p}
    loop 36 times:
      set {_n::*} to yml list "imiona" from file "plugins/Skript/scripts/dowody/config.yml"
      set {_l} to loop-number
      set {_d} to {_l}-1
      format slot {_d} of {_p} with wool:0 named "&a%{_n::%{_l}%}%" to close then run [set {firstName::%{_p}%} to {_n::%{_l}%}]->[execute console command "dowod %{_p}% nazwisko"]

command /dowod <offlineplayer=player> [<text>]:
	trigger:
		set {_p} to offlineplayer-arg
		arg 2 is not set:
			open chest with 4 rows named "Imie" to {_p}
			loop 36 times:
				set {_n::*} to yml list "imiona" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				format slot (loop-number - 1) of {_p} with white wool named "&a%{_n::%loop-number%}%" to close then run [set {firstName::%player%} to {_n::%loop-number%}]->[execute console command "dowod %{_p}% nazwisko"]
		arg 2 is "nazwisko":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "nazwiska" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				format slot (loop-number - 1) of {_p} with white wool named "&a%{_n::%loop-number%}%" to close then run [set {lastName::%player%} to {_n::%loop-number%}]->[execute console command "dowod %{_p}% wiek"]
		arg 2 is "wiek":
			set {signMode::%{_p}%} to true
			loop 5 times:
				send "&aMasz %5 - loop-number% sekundy na podanie wieku!" to {_p}
				wait 1 second
			{age::%player%} is set:
				execute console command "dowod %{_p}% miasto"
			else:
				send "&cNie wybrales imienia! Proces rejestracji anulowany!" to {_p}
		arg 2 is "miasto":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "miasta" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				format slot (loop-number - 1) of {_p} with white wool named "&a%{_n::%loop-number%}%" to close then run [set {city::%player%} to {_n::%loop-number%}]->[execute console command "dowod %{_p}% kup"]
		arg 2 is "kup":
			{_p}'s balance >= 100: #cena dowodu
				remove 100 from {_p}'s balance
				give paper named "&fDOWOD OSOBISTY" with lore "&aImie: %{firstName::%{_p}%}%||&aNazwisko: %{lastName::%{_p}%}%||&aWiek: %{age::%{_p}%}%||&aMiejsce zamieszkania: %{city::%{_p}%}%" to {_p}

on chat:
	{signMode::%player%} is true:
		set {_n} to "%message%" parsed as number
		{_n} is set:
			set {age::%player%} to {_n}

 

Odnośnik do komentarza
https://skript.pl/temat/18220-dow%C3%B3d-osobisty/#findComment-125729
Udostępnij na innych stronach

  • 0
aliases:
  welna = 35:0

on rightclick on villager:
  name of clicked entity is "Urzednik":
    set {_p} to "%player%" parsed as offlineplayer
    open chest with 4 rows named "Imie" to {_p}
    loop 36 times:
      set {_n::*} to yml list "imiona" from file "plugins/Skript/scripts/dowody/config.yml"
      set {_l} to loop-number
      set {_d} to {_l}-1
      format slot {_d} of {_p} with wool:0 named "&a%{_n::%{_l}%}%" to close then run [ set {firstName::%{_p}%} to {_n::%{_l}%} ]->[ execute console command "dowod %{_p}% nazwisko" ]

command /dowod <offlineplayer=player> [<text>]:
	trigger:
		set {_p} to offlineplayer-arg
		arg 2 is not set:
			open chest with 4 rows named "Imie" to {_p}
			loop 36 times:
				set {_n::*} to yml list "imiona" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				set {_l} to loop-number
				set {_d} to {_l}-1
				format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {firstName::%{_p}%} to {_n::%{_l}%} ]->[execute console command "dowod %{_p}% nazwisko"]
		arg 2 is "nazwisko":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "nazwiska" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				set {_l} to loop-number
				set {_d} to {_l}-1
				format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {lastName::%{_p}%} to {_n::%{_l}%} ]->[ execute console command "dowod %{_p}% wiek" ]
		arg 2 is "wiek":
			set {signMode::%{_p}%} to true
			loop 5 times:
				send "&aMasz %5 - loop-number% sekundy na podanie wieku!" to {_p}
				wait 1 second
			{age::%player%} is set:
				execute console command "dowod %{_p}% miasto"
			else:
				send "&cNie wybrales imienia! Proces rejestracji anulowany!" to {_p}
		arg 2 is "miasto":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "miasta" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				set {_l} to loop-number
				set {_d} to {_l}-1
				format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {city::%{_p}%} to {_n::%{_l}%} ]->[ execute console command "dowod %{_p}% kup" ]
		arg 2 is "kup":
			{_p}'s balance >= 100: #cena dowodu
				remove 100 from {_p}'s balance
				give paper named "&fDOWOD OSOBISTY" with lore "&aImie: %{firstName::%{_p}%}%||&aNazwisko: %{lastName::%{_p}%}%||&aWiek: %{age::%{_p}%}%||&aMiejsce zamieszkania: %{city::%{_p}%}%" to {_p}

on chat:
	{signMode::%player%} is true:
		set {_n} to "%message%" parsed as number
		{_n} is set:
			set {age::%player%} to {_n}

Jeśli coś nie działa to podaj wersję serwera

Odnośnik do komentarza
https://skript.pl/temat/18220-dow%C3%B3d-osobisty/#findComment-125741
Udostępnij na innych stronach

  • 0
aliases:
  welna = 35:0

on rightclick on villager:
  name of clicked entity is "Urzednik":
    set {_p} to "%player%" parsed as offlineplayer
    open chest with 4 rows named "Imie" to {_p}
    loop 36 times:
      set {_n::*} to yml list "imiona" from file "plugins/Skript/scripts/dowody/config.yml"
      set {_l} to loop-number
      set {_d} to {_l}-1
      format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {firstName::%{_p}%} to {_n::%{_l}%} ]->[ execute console command "dowod %{_p}% nazwisko" ]

command /dowod <offlineplayer=%player%> [<text>]:
	trigger:
		set {_p} to offlineplayer-arg
		arg 2 is not set:
			open chest with 4 rows named "Imie" to {_p}
			loop 36 times:
				set {_n::*} to yml list "imiona" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				set {_l} to loop-number
				set {_d} to {_l}-1
				format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {firstName::%{_p}%} to {_n::%{_l}%} ]->[execute console command "dowod %{_p}% nazwisko"]
		arg 2 is "nazwisko":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "nazwiska" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				set {_l} to loop-number
				set {_d} to {_l}-1
				format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {lastName::%{_p}%} to {_n::%{_l}%} ]->[ execute console command "dowod %{_p}% wiek" ]
		arg 2 is "wiek":
			set {signMode::%{_p}%} to true
			loop 5 times:
				send "&aMasz %5 - loop-number% sekundy na podanie wieku!" to {_p}
				wait 1 second
			{age::%player%} is set:
				execute console command "dowod %{_p}% miasto"
			else:
				send "&cNie wybrales imienia! Proces rejestracji anulowany!" to {_p}
		arg 2 is "miasto":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "miasta" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				set {_l} to loop-number
				set {_d} to {_l}-1
				format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {city::%{_p}%} to {_n::%{_l}%} ]->[ execute console command "dowod %{_p}% kup" ]
		arg 2 is "kup":
			{_p}'s balance >= 100: #cena dowodu
				remove 100 from {_p}'s balance
				give paper named "&fDOWOD OSOBISTY" with lore "&aImie: %{firstName::%{_p}%}%||&aNazwisko: %{lastName::%{_p}%}%||&aWiek: %{age::%{_p}%}%||&aMiejsce zamieszkania: %{city::%{_p}%}%" to {_p}

on chat:
	{signMode::%player%} is true:
		set {_n} to "%message%" parsed as number
		{_n} is set:
			set {age::%player%} to {_n}

Jeśli dalej masz błędy, to nie masz pobranego SkUtilities - jest wymagane

Odnośnik do komentarza
https://skript.pl/temat/18220-dow%C3%B3d-osobisty/#findComment-125753
Udostępnij na innych stronach

  • 0
6 minut temu, PoweredDragon napisał:

aliases:
  welna = 35:0

on rightclick on villager:
  name of clicked entity is "Urzednik":
    set {_p} to "%player%" parsed as offlineplayer
    open chest with 4 rows named "Imie" to {_p}
    loop 36 times:
      set {_n::*} to yml list "imiona" from file "plugins/Skript/scripts/dowody/config.yml"
      set {_l} to loop-number
      set {_d} to {_l}-1
      format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {firstName::%{_p}%} to {_n::%{_l}%} ]->[ execute console command "dowod %{_p}% nazwisko" ]

command /dowod <offlineplayer=%player%> [<text>]:
	trigger:
		set {_p} to offlineplayer-arg
		arg 2 is not set:
			open chest with 4 rows named "Imie" to {_p}
			loop 36 times:
				set {_n::*} to yml list "imiona" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				set {_l} to loop-number
				set {_d} to {_l}-1
				format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {firstName::%{_p}%} to {_n::%{_l}%} ]->[execute console command "dowod %{_p}% nazwisko"]
		arg 2 is "nazwisko":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "nazwiska" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				set {_l} to loop-number
				set {_d} to {_l}-1
				format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {lastName::%{_p}%} to {_n::%{_l}%} ]->[ execute console command "dowod %{_p}% wiek" ]
		arg 2 is "wiek":
			set {signMode::%{_p}%} to true
			loop 5 times:
				send "&aMasz %5 - loop-number% sekundy na podanie wieku!" to {_p}
				wait 1 second
			{age::%player%} is set:
				execute console command "dowod %{_p}% miasto"
			else:
				send "&cNie wybrales imienia! Proces rejestracji anulowany!" to {_p}
		arg 2 is "miasto":
			open chest with 4 rows named "Nazwisko" to {_p}
			loop 36 times:
				set {_n::*} to yml list "miasta" from file "plugins/Skript/scripts/dowody/config.yml"
				wait 1 tick
				set {_l} to loop-number
				set {_d} to {_l}-1
				format slot {_d} of {_p} with welna named "&a%{_n::%{_l}%}%" to close then run [ set {city::%{_p}%} to {_n::%{_l}%} ]->[ execute console command "dowod %{_p}% kup" ]
		arg 2 is "kup":
			{_p}'s balance >= 100: #cena dowodu
				remove 100 from {_p}'s balance
				give paper named "&fDOWOD OSOBISTY" with lore "&aImie: %{firstName::%{_p}%}%||&aNazwisko: %{lastName::%{_p}%}%||&aWiek: %{age::%{_p}%}%||&aMiejsce zamieszkania: %{city::%{_p}%}%" to {_p}

on chat:
	{signMode::%player%} is true:
		set {_n} to "%message%" parsed as number
		{_n} is set:
			set {age::%player%} to {_n}

Jeśli dalej masz błędy, to nie masz pobranego SkUtilities - jest wymagane

Ok teraz wszystko działa nie ma błędów ale jak klikne na citizens o nazwie Urzednik to nic się nie robi

I jeszcze nie stworzyło mi żadnego folderu z config

Edytowane przez Bahbros
Odnośnik do komentarza
https://skript.pl/temat/18220-dow%C3%B3d-osobisty/#findComment-125756
Udostępnij na innych stronach

  • 0
2 minuty temu, PoweredDragon napisał:

Nie stworzy configu, bo tu chodzi o kliknięcie na citizena. Użyj tego:


on rightclick:

zamiast


on rightclick on villager:

 

Tak mam i nie działa :/

https://code.skript.pl/rX33J0th/

Odnośnik do komentarza
https://skript.pl/temat/18220-dow%C3%B3d-osobisty/#findComment-125759
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ę...