Skocz do zawartości
  • 0

Sprzedawanie danych itemkow


Klaudiusz258
 Udostępnij

Pytanie

  • Siemka, mógł by ktoś dla mnie napisać skrypt na sprzedawanie itemków? chodzi o to ze gdy wpiszemy /sprzedajitem sprzedajemy item ktory mielismy w rece ale ja bym chcial zeby mozna bylo sprzedawac itemki ktore byly dodane za pomoca komendy : /itemdodaj  i ten przedmiot ktory dodalismy za pomoca tej komendy zostal dodany do sprzedaj i np mamy ten miecz co dodalismy w rece i wpisujemy /sprzedajitem i sprzedalismy ten item , ale chcial bym jeszcze ze gdy wpisujemy komende /itemdodaj zeby mozna bylo dodawac ile ten item jest warty zlota. Osoba która dla mnie by taki skrypcik napisała dostanie wielkki spam lajkami.
Edytowane przez Klaudiusz258
Odnośnik do komentarza
Udostępnij na innych stronach

7 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /sprzedajitem:
	trigger:
		set {_} to type of player's tool
		set {_i} to player's tool
		if {_} is air:
			send "&8>> &cW rece musisz trzymac przedmiot!"
			stop
		if {item::%{_}%} is not set:
			send "&8>> &cTego przedmiotu nie da sie sprzedac!"
			stop
		set {_xx} to {item::%{_}%} parsed as number
		add {_xx} to player's balance
		remove {_} from player's inventory
		send "&8>> &aSprzedales &7%{_}% &aza &7%{item::%{_}%}%&a!"
		stop


command /itemdodaj [<number>]:
	permission: item.dodaj
	trigger:
		set {_} to type of player's tool
		set {_i} to player's tool
		if {_} is air:
			send "&8>> &cW rece musisz trzymac przedmiot!"
			stop
		if arg 1 is not set:
			send "&8>> &cWpisz cene!"
			stop
		set {item::%{_}%} to "%arg 1%"
		send "&8>> &aOd teraz &7%{_i}% &akosztuje &7%arg 1%&a!"
		stop

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

A mógł byś to przerobić zamiast kasy na złoto? ze jak wpiszemy /itemdodaj (ilosc zlota) a i mógł byś dodać jeszcze ze wpisujemy /usunitem i ten item co trzymamy w ręce usuwa się z /sprzedajitem , Noi jak sie to to mógł bys zrobić jeszcze ze itemy o innych nazwach mozna tez dodawac ;p bo np: dam zwykły diamond sword a potem dam kolejny diamond sword tylko o nazwie "test" to zalicza je jako ten jeden sam ;p

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

  • 0

 

command /sprzedajitem:
	trigger:
		set {_} to type of player's tool
		set {_i} to player's tool
		if {_} is air:
			send "&8>> &cW rece musisz trzymac przedmiot!"
			stop
		if {item::%{_}%} is not set:
			send "&8>> &cTego przedmiotu nie da sie sprzedac!"
			stop
		set {_xx} to {item::%{_}%} parsed as number
		give {_xx} of gold ingot to player
		remove {_} from player's inventory
		send "&8>> &aSprzedales &7%{_}% &aza &7%{item::%{_}%}% zlota&a!"
		stop

command /itemusun:
	permission: item.usun
	trigger:
		set {_} to type of player's tool
		set {_i} to player's tool
		if {_} is air:
			send "&8>> &cW rece musisz trzymac przedmiot!"
			stop
		if {item::%{_}%} is not set:
			send "&8>> &cTen przedmiot nie jest dodany do sprzedawania!"
			stop
		delete {item::%{_}%}
		send "&8>> &aUsunales &7%{_}%&a!"

command /itemdodaj [<number>]:
	permission: item.dodaj
	trigger:
		set {_} to type of player's tool
		set {_i} to player's tool
		if {_} is air:
			send "&8>> &cW rece musisz trzymac przedmiot!"
			stop
		if arg 1 is not set:
			send "&8>> &cWpisz cene w zlocie!"
			stop
		set {item::%{_}%} to "%arg 1%"
		send "&8>> &aOd teraz &7%{_i}% &akosztuje &7%arg 1% zlota&a!"
		stop

Zamienione na zloto.

Zrobie ci to jutro, bo nie mam czasu już :P

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
command /sprzedajitem:
	trigger:
		set {_} to type of player's tool
		set {_i} to player's tool
		if {_} is air:
			send "&8>> &cW rece musisz trzymac przedmiot!"
			stop
		if {item::%{_}%} is not set:
			send "&8>> &cTego przedmiotu nie da sie sprzedac!"
			stop
		set {_xx} to {item::%{_i}%} parsed as number
		give {_xx} of gold ingot to player
		remove {_i} from player's inventory
		send "&8>> &aSprzedales &7%{_}% &aza &7%{item::%{_i}%}% zlota&a!"
		stop

command /itemusun:
	permission: item.usun
	trigger:
		set {_} to type of player's tool
		set {_i} to player's tool
		if {_} is air:
			send "&8>> &cW rece musisz trzymac przedmiot!"
			stop
		if {item::%{_i}%} is not set:
			send "&8>> &cTen przedmiot nie jest dodany do sprzedawania!"
			stop
		delete {item::%{_i}%}
		send "&8>> &aUsunales &7%{_}%&a!"

command /itemdodaj [<number>]:
	permission: item.dodaj
	trigger:
		set {_} to type of player's tool
		set {_i} to player's tool
		if {_} is air:
			send "&8>> &cW rece musisz trzymac przedmiot!"
			stop
		if arg 1 is not set:
			send "&8>> &cWpisz cene w zlocie!"
			stop
		set {item::%{_i}%} to "%arg 1%"
		send "&8>> &aOd teraz &7%{_i}% &akosztuje &7%arg 1% zlota&a!"
		stop

Prosze

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Teraz nie działa, dodaje np item: diaxowy miecz name: cos lore: cos unbreaking x sharpness x i wpisuje komende /itemdodaj 5 dodało mi item ale potem jak chce ten item sprzedac pisze mi " Tego przedmiotu nie da sie sprzedac."

Edytowane przez Klaudiusz258
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ę...