Skocz do zawartości
  • 0

kantor


4929149

Pytanie

siema potrzebuje skript na
/kantor - otwiera gui (gui 27 slotow) 1 przycisk - wymienienie przedmiotu (np zlota) na pieniadze z ekonomii vaulta UWAGA zloto musi miec odpowiednia nazwe np. &6Zloto (przedmiot z inna nazwa nie zadziala) (1 zloto = 1$) 2 przycisk - wymienia pieniadze na to samo zloto z pierwszego przycisku (1$ = 1 zloto)

dzieki

Odnośnik do komentarza
https://skript.pl/temat/54564-kantor/
Udostępnij na innych stronach

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 1
options:
	GUICantorRows: 3 #Wielkość GUI (max 6)
	GUICantorName: &bKantor #Nazwa GUI
	GUICantorBackground: blue glass pane named " " #Tło GUI
	GUICantorGoldItem: gold ingot named "&6Złoto" #Wymieniany przedmiot
	GUICantorGoldToMoneySlot: 11
	GUICantorMoneyToGoldSlot: 15
	GUICantorExitSlot: 22
command /kantor:
	trigger:
		openCantor(player)
function openCantor(player: player):
	set {_gui} to chest inventory with {@GUICantorRows} rows named "{@GUICantorName}"
	set slot (integers between 0 and ({@GUICantorRows}*9)-1) of {_gui} to {@GUICantorBackground}
	set slot {@GUICantorGoldToMoneySlot} of {_gui} to gold ingot named "&6Wymień złoto na pieniądze" with lore "&bLPM - Wymień 1 złoto na $1" and "&bPPM - Wymień 64 złota na $64"
	set slot {@GUICantorMoneyToGoldSlot} of {_gui} to paper named "&aWymień pieniądze na złoto" with lore "&bLPM - Wymień $1 na 1 złoto" and "&bPPM - Wymień $64 na 64 złota"
	set slot {@GUICantorExitSlot} of {_gui} to barrier named "&cWyjdź"
	open {_gui} to {_player}
on inventory click:
	if event-inventory is player's inventory:
		stop
	if name of event-inventory is not "{@GUICantorName}":
		stop
	cancel event
	if index of clicked slot is {@GUICantorGoldToMoneySlot}:
		set {_zloto} to number of {@GUICantorGoldItem} in player's inventory
		if click type is left mouse button:
			if {_zloto} is 0:
				send "&cNie masz 1 złota w ekwipunku."
				stop
			remove 1 {@GUICantorGoldItem} from player's inventory
			add 1 to player's money
			send "&aWymieniłeś 1 złoto na $1."
			stop
		if click type is right mouse button:
			if {_zloto} is less than 64:
				send "&cNie masz 64 złota w ekwipunku."
				stop
			remove 64 {@GUICantorGoldItem} from player's inventory
			add 64 to player's money
			send "&aWymieniłeś 64 złota na $64."
			stop
	if index of clicked slot is {@GUICantorMoneyToGoldSlot}:
		if click type is left mouse button:
			if player's money is less than 1:
				send "&cNie masz $1."
				stop
			if player cannot hold 1 {@GUICantorGoldItem}:
				send "&cNie masz miejsca w ekwipunku."
				stop
			add 1 {@GUICantorGoldItem} to player's inventory
			remove 1 from player's money
			send "&aWymieniłeś $1 na 1 złoto."
			stop
		if click type is right mouse button:
			if player's money is less than 64:
				send "&cNie masz $64."
				stop
			if player cannot hold 64 {@GUICantorGoldItem}:
				send "&cNie masz miejsca w ekwipunku."
				stop
			add 64 {@GUICantorGoldItem} to player's inventory
			remove 64 from player's money
			send "&aWymieniłeś $64 na 64 złota."
			stop
	if index of clicked slot is {@GUICantorExitSlot}:
		close player's inventory
		stop

 

Odnośnik do komentarza
https://skript.pl/temat/54564-kantor/#findComment-330854
Udostępnij na innych stronach

  • 0
8 godzin temu, Shooterowy napisał:
options:
	GUICantorRows: 3 #Wielkość GUI (max 6)
	GUICantorName: &bKantor #Nazwa GUI
	GUICantorBackground: blue glass pane named " " #Tło GUI
	GUICantorGoldItem: gold ingot named "&6Złoto" #Wymieniany przedmiot
	GUICantorGoldToMoneySlot: 11
	GUICantorMoneyToGoldSlot: 15
	GUICantorExitSlot: 22
command /kantor:
	trigger:
		openCantor(player)
function openCantor(player: player):
	set {_gui} to chest inventory with {@GUICantorRows} rows named "{@GUICantorName}"
	set slot (integers between 0 and ({@GUICantorRows}*9)-1) of {_gui} to {@GUICantorBackground}
	set slot {@GUICantorGoldToMoneySlot} of {_gui} to gold ingot named "&6Wymień złoto na pieniądze" with lore "&bLPM - Wymień 1 złoto na $1" and "&bPPM - Wymień 64 złota na $64"
	set slot {@GUICantorMoneyToGoldSlot} of {_gui} to paper named "&aWymień pieniądze na złoto" with lore "&bLPM - Wymień $1 na 1 złoto" and "&bPPM - Wymień $64 na 64 złota"
	set slot {@GUICantorExitSlot} of {_gui} to barrier named "&cWyjdź"
	open {_gui} to {_player}
on inventory click:
	if event-inventory is player's inventory:
		stop
	if name of event-inventory is not "{@GUICantorName}":
		stop
	cancel event
	if index of clicked slot is {@GUICantorGoldToMoneySlot}:
		set {_zloto} to number of {@GUICantorGoldItem} in player's inventory
		if click type is left mouse button:
			if {_zloto} is 0:
				send "&cNie masz 1 złota w ekwipunku."
				stop
			remove 1 {@GUICantorGoldItem} from player's inventory
			add 1 to player's money
			send "&aWymieniłeś 1 złoto na $1."
			stop
		if click type is right mouse button:
			if {_zloto} is less than 64:
				send "&cNie masz 64 złota w ekwipunku."
				stop
			remove 64 {@GUICantorGoldItem} from player's inventory
			add 64 to player's money
			send "&aWymieniłeś 64 złota na $64."
			stop
	if index of clicked slot is {@GUICantorMoneyToGoldSlot}:
		if click type is left mouse button:
			if player's money is less than 1:
				send "&cNie masz $1."
				stop
			if player cannot hold 1 {@GUICantorGoldItem}:
				send "&cNie masz miejsca w ekwipunku."
				stop
			add 1 {@GUICantorGoldItem} to player's inventory
			remove 1 from player's money
			send "&aWymieniłeś $1 na 1 złoto."
			stop
		if click type is right mouse button:
			if player's money is less than 64:
				send "&cNie masz $64."
				stop
			if player cannot hold 64 {@GUICantorGoldItem}:
				send "&cNie masz miejsca w ekwipunku."
				stop
			add 64 {@GUICantorGoldItem} to player's inventory
			remove 64 from player's money
			send "&aWymieniłeś $64 na 64 złota."
			stop
	if index of clicked slot is {@GUICantorExitSlot}:
		close player's inventory
		stop

 

rano sprawdze i dam znac <3

 

Odnośnik do komentarza
https://skript.pl/temat/54564-kantor/#findComment-330887
Udostępnij na innych stronach

  • 0
W dniu 11.03.2023 o 16:22, Shooterowy napisał:
options:
	GUICantorRows: 3 #Wielkość GUI (max 6)
	GUICantorName: &bKantor #Nazwa GUI
	GUICantorBackground: blue glass pane named " " #Tło GUI
	GUICantorGoldItem: gold ingot named "&6Złoto" #Wymieniany przedmiot
	GUICantorGoldToMoneySlot: 11
	GUICantorMoneyToGoldSlot: 15
	GUICantorExitSlot: 22
command /kantor:
	trigger:
		openCantor(player)
function openCantor(player: player):
	set {_gui} to chest inventory with {@GUICantorRows} rows named "{@GUICantorName}"
	set slot (integers between 0 and ({@GUICantorRows}*9)-1) of {_gui} to {@GUICantorBackground}
	set slot {@GUICantorGoldToMoneySlot} of {_gui} to gold ingot named "&6Wymień złoto na pieniądze" with lore "&bLPM - Wymień 1 złoto na $1" and "&bPPM - Wymień 64 złota na $64"
	set slot {@GUICantorMoneyToGoldSlot} of {_gui} to paper named "&aWymień pieniądze na złoto" with lore "&bLPM - Wymień $1 na 1 złoto" and "&bPPM - Wymień $64 na 64 złota"
	set slot {@GUICantorExitSlot} of {_gui} to barrier named "&cWyjdź"
	open {_gui} to {_player}
on inventory click:
	if event-inventory is player's inventory:
		stop
	if name of event-inventory is not "{@GUICantorName}":
		stop
	cancel event
	if index of clicked slot is {@GUICantorGoldToMoneySlot}:
		set {_zloto} to number of {@GUICantorGoldItem} in player's inventory
		if click type is left mouse button:
			if {_zloto} is 0:
				send "&cNie masz 1 złota w ekwipunku."
				stop
			remove 1 {@GUICantorGoldItem} from player's inventory
			add 1 to player's money
			send "&aWymieniłeś 1 złoto na $1."
			stop
		if click type is right mouse button:
			if {_zloto} is less than 64:
				send "&cNie masz 64 złota w ekwipunku."
				stop
			remove 64 {@GUICantorGoldItem} from player's inventory
			add 64 to player's money
			send "&aWymieniłeś 64 złota na $64."
			stop
	if index of clicked slot is {@GUICantorMoneyToGoldSlot}:
		if click type is left mouse button:
			if player's money is less than 1:
				send "&cNie masz $1."
				stop
			if player cannot hold 1 {@GUICantorGoldItem}:
				send "&cNie masz miejsca w ekwipunku."
				stop
			add 1 {@GUICantorGoldItem} to player's inventory
			remove 1 from player's money
			send "&aWymieniłeś $1 na 1 złoto."
			stop
		if click type is right mouse button:
			if player's money is less than 64:
				send "&cNie masz $64."
				stop
			if player cannot hold 64 {@GUICantorGoldItem}:
				send "&cNie masz miejsca w ekwipunku."
				stop
			add 64 {@GUICantorGoldItem} to player's inventory
			remove 64 from player's money
			send "&aWymieniłeś $64 na 64 złota."
			stop
	if index of clicked slot is {@GUICantorExitSlot}:
		close player's inventory
		stop

 

wszystko smiga, dzieki

 

Odnośnik do komentarza
https://skript.pl/temat/54564-kantor/#findComment-330939
Udostępnij na innych stronach

  • 0
W dniu 11.03.2023 o 16:22, Shooterowy napisał:
options:
	GUICantorRows: 3 #Wielkość GUI (max 6)
	GUICantorName: &bKantor #Nazwa GUI
	GUICantorBackground: blue glass pane named " " #Tło GUI
	GUICantorGoldItem: gold ingot named "&6Złoto" #Wymieniany przedmiot
	GUICantorGoldToMoneySlot: 11
	GUICantorMoneyToGoldSlot: 15
	GUICantorExitSlot: 22
command /kantor:
	trigger:
		openCantor(player)
function openCantor(player: player):
	set {_gui} to chest inventory with {@GUICantorRows} rows named "{@GUICantorName}"
	set slot (integers between 0 and ({@GUICantorRows}*9)-1) of {_gui} to {@GUICantorBackground}
	set slot {@GUICantorGoldToMoneySlot} of {_gui} to gold ingot named "&6Wymień złoto na pieniądze" with lore "&bLPM - Wymień 1 złoto na $1" and "&bPPM - Wymień 64 złota na $64"
	set slot {@GUICantorMoneyToGoldSlot} of {_gui} to paper named "&aWymień pieniądze na złoto" with lore "&bLPM - Wymień $1 na 1 złoto" and "&bPPM - Wymień $64 na 64 złota"
	set slot {@GUICantorExitSlot} of {_gui} to barrier named "&cWyjdź"
	open {_gui} to {_player}
on inventory click:
	if event-inventory is player's inventory:
		stop
	if name of event-inventory is not "{@GUICantorName}":
		stop
	cancel event
	if index of clicked slot is {@GUICantorGoldToMoneySlot}:
		set {_zloto} to number of {@GUICantorGoldItem} in player's inventory
		if click type is left mouse button:
			if {_zloto} is 0:
				send "&cNie masz 1 złota w ekwipunku."
				stop
			remove 1 {@GUICantorGoldItem} from player's inventory
			add 1 to player's money
			send "&aWymieniłeś 1 złoto na $1."
			stop
		if click type is right mouse button:
			if {_zloto} is less than 64:
				send "&cNie masz 64 złota w ekwipunku."
				stop
			remove 64 {@GUICantorGoldItem} from player's inventory
			add 64 to player's money
			send "&aWymieniłeś 64 złota na $64."
			stop
	if index of clicked slot is {@GUICantorMoneyToGoldSlot}:
		if click type is left mouse button:
			if player's money is less than 1:
				send "&cNie masz $1."
				stop
			if player cannot hold 1 {@GUICantorGoldItem}:
				send "&cNie masz miejsca w ekwipunku."
				stop
			add 1 {@GUICantorGoldItem} to player's inventory
			remove 1 from player's money
			send "&aWymieniłeś $1 na 1 złoto."
			stop
		if click type is right mouse button:
			if player's money is less than 64:
				send "&cNie masz $64."
				stop
			if player cannot hold 64 {@GUICantorGoldItem}:
				send "&cNie masz miejsca w ekwipunku."
				stop
			add 64 {@GUICantorGoldItem} to player's inventory
			remove 64 from player's money
			send "&aWymieniłeś $64 na 64 złota."
			stop
	if index of clicked slot is {@GUICantorExitSlot}:
		close player's inventory
		stop

 

Hej, mógłbyś przerobić aby coin miał jeszcze enchant unbreaking 10? Z góry dzięki!

Odnośnik do komentarza
https://skript.pl/temat/54564-kantor/#findComment-332154
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Nieaktywny
Odpowiedz na pytanie...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

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

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