Skocz do zawartości
  • 0

Zamiana np. 9x emerald w bloki


Pytanie

14 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /bloki [<text>]:
	trigger:
		open chest with 3 rows named "&6Zamiana" to player
		loop 27 times:
			set player's current inventory's slot ((loop-number)-1) to gray glass pane named ""
		set player's current inventory's slot 0 to diamond block named "&bZamien Diaxy na Bloki"
		set player's current inventory's slot 1 to emerald block named "&bZamien Diaxy na Bloki"
		stop
on inventory click:
	if inventory name of current inventory of player is "&6Zamiana":
		cancel event
		if clicked slot is 0:
			if player has 9 diamond:
				set {_n} to amount of diamond in player's inventory
				set {_n} to rounded down {_n}/9
				remove ("%{_n}*9% diamond" parsed as item) from player
				add ("%{_n}% diamond block" parsed as item) to player
				send "&6Zamieniono!"
			else:
				send "&6Nie posiadasz itemu"
		if clicked slot is 1:
			if player has 9 emerald:
				set {_n} to amount of emerald in player's inventory
				set {_n} to rounded down {_n}/9
				remove ("%{_n}*9% emerald" parsed as item) from player
				add ("%{_n}% emerald block" parsed as item) to player
				send "&6Zamieniono!"
			else:
				send "&6Nie posiadasz itemu"

 

Odnośnik do komentarza
https://skript.pl/temat/31295-zamiana-np-9x-emerald-w-bloki/#findComment-203550
Udostępnij na innych stronach

  • 0
W dniu 14.01.2019 o 22:44, xAxee napisał:

command /bloki [<text>]:
	trigger:
		open chest with 3 rows named "&6Zamiana" to player
		loop 27 times:
			set player's current inventory's slot ((loop-number)-1) to gray glass pane named ""
		set player's current inventory's slot 0 to diamond block named "&bZamien Diaxy na Bloki"
		set player's current inventory's slot 1 to emerald block named "&bZamien Diaxy na Bloki"
		stop
on inventory click:
	if inventory name of current inventory of player is "&6Zamiana":
		cancel event
		if clicked slot is 0:
			if player has 9 diamond:
				set {_n} to amount of diamond in player's inventory
				set {_n} to rounded down {_n}/9
				remove ("%{_n}*9% diamond" parsed as item) from player
				add ("%{_n}% diamond block" parsed as item) to player
				send "&6Zamieniono!"
			else:
				send "&6Nie posiadasz itemu"
		if clicked slot is 1:
			if player has 9 emerald:
				set {_n} to amount of emerald in player's inventory
				set {_n} to rounded down {_n}/9
				remove ("%{_n}*9% emerald" parsed as item) from player
				add ("%{_n}% emerald block" parsed as item) to player
				send "&6Zamieniono!"
			else:
				send "&6Nie posiadasz itemu"

 

a dalbys rade zrobic jeszcze taki przycisk ze wszystko zamienia co ma sie w eq ?

 

Odnośnik do komentarza
https://skript.pl/temat/31295-zamiana-np-9x-emerald-w-bloki/#findComment-203660
Udostępnij na innych stronach

  • 0

po za tym zrobilem cos takiego

command /bloki [<text>]:
    trigger:
        open chest with 3 rows named "&a&lWymiana" to player
        loop 27 times:
            set player's current inventory's slot ((loop-number)-1) to gray glass pane named "&cTu nic nie ma! &7Wybierz inna pozycje"
        set player's current inventory's slot 0 to diamond block named "&bWymien Diaxy na bloki!"
        set player's current inventory's slot 1 to coal block named "&8Wymien wegiel na bloki!"
        set player's current inventory's slot 2 to redstone block named "&cWymien redstone na bloki!"
        set player's current inventory's slot 3 to gold block named "&6Wymien zloto na bloki!"
        set player's current inventory's slot 4 to iron block named "&7Wymien zelazo na bloki!"
        set player's current inventory's slot 5 to emerald block named "&aWymien emeraldy na bloki!"

        stop
on inventory click:
    if inventory name of current inventory of player is "&a&lWymiana":
        cancel event
        if clicked slot is 0:
            if player has 9 diamond:
                set {_n} to amount of diamond in player's inventory
                set {_n} to rounded down {_n}/9
                remove ("%{_n}*9% diamond" parsed as item) from player
                add ("%{_n}% diamond block" parsed as item) to player
                send "&a&lPomyslnie wymieniles na bloki!"
            else:
                send "&c&lNie posiadasz itemu na ktory chcesz zamienic!"
        if clicked slot is 5:
            if player has 9 emerald:
                set {_n} to amount of emerald in player's inventory
                set {_n} to rounded down {_n}/9
                remove ("%{_n}*9% emerald" parsed as item) from player
                add ("%{_n}% emerald block" parsed as item) to player
                send "&a&lPomyslnie wymieniles na bloki!"
            else:
                send "&c&lNie posiadasz itemu na ktory chcesz zamienic!"
        if clicked slot is 1:
            if player has 9 coal:
                set {_n} to amount of coal in player's inventory
                set {_n} to rounded down {_n}/9
                remove ("%{_n}*9% coal" parsed as item) from player
                add ("%{_n}% coal block" parsed as item) to player
                send "&a&lPomyslnie wymieniles na bloki!"
            else:
                send "&c&lNie posiadasz itemu na ktory chcesz zamienic!"
        if clicked slot is 2:
            if player has 9 redstone:
                set {_n} to amount of redstone in player's inventory
                set {_n} to rounded down {_n}/9
                remove ("%{_n}*9% redstone" parsed as item) from player
                add ("%{_n}% redstone block" parsed as item) to player
                send "&a&lPomyslnie wymieniles na bloki!"
            else:
                send "&c&lNie posiadasz itemu na ktory chcesz zamienic!"
        if clicked slot is 3:
            if player has 9 gold ingot:
                set {_n} to amount of gold ingot in player's inventory
                set {_n} to rounded down {_n}/9
                remove ("%{_n}*9% gold ingot" parsed as item) from player
                add ("%{_n}% gold block" parsed as item) to player
                send "&a&lPomyslnie wymieniles na bloki!"
            else:
                send "&c&lNie posiadasz itemu na ktory chcesz zamienic!"

        if clicked slot is 4:
            if player has 9 iron ingot:
                set {_n} to amount of iron ingot in player's inventory
                set {_n} to rounded down {_n}/9
                remove ("%{_n}*9% iron ingot" parsed as item) from player
                add ("%{_n}% iron block" parsed as item) to player
                send "&a&lPomyslnie wymieniles na bloki!"
            else:
                send "&c&lNie posiadasz itemu na ktory chcesz zamienic!"

 

Odnośnik do komentarza
https://skript.pl/temat/31295-zamiana-np-9x-emerald-w-bloki/#findComment-203698
Udostępnij na innych stronach

  • 0
14 godzin temu, Ytaru napisał:

@xAxee zrobilbys mi takie cos zeby wszystko sprzedac?

Kiedys zaaktualizowalem tamten kod wiec tam sa wszystkie bloki i ta czerwona welna na kompie jeszcze mam inna wersje.

 

Odnośnik do komentarza
https://skript.pl/temat/31295-zamiana-np-9x-emerald-w-bloki/#findComment-204111
Udostępnij na innych stronach

  • 0
20 godzin temu, xAxee napisał:

Kiedys zaaktualizowalem tamten kod wiec tam sa wszystkie bloki i ta czerwona welna na kompie jeszcze mam inna wersje.

 

@xAxee wyskakuja errory [19:29:28] [Client thread/INFO]: [CHAT] [Skript] Reloading blok.sk...
[19:29:28] [Client thread/INFO]: [CHAT] 'Block(p: player, 1: item, 2: item)' is not a text (blok.sk, line 1: function Block(p: player, 1: item, 2: item):')
[19:29:28] [Client thread/INFO]: [CHAT] 'inventory' is not an item type (blok.sk, line 26: if inventory type of clicked inventory is "CHEST":')
[19:29:28] [Client thread/INFO]: [CHAT] [Skript] Encountered 2 errors while reloading blok.sk!

i da sie wyjmowac te bloki :/

 

Odnośnik do komentarza
https://skript.pl/temat/31295-zamiana-np-9x-emerald-w-bloki/#findComment-204144
Udostępnij na innych stronach

  • 0
1 godzinę temu, Ytaru napisał:

@xAxee wyskakuja errory [19:29:28] [Client thread/INFO]: [CHAT] [Skript] Reloading blok.sk...
[19:29:28] [Client thread/INFO]: [CHAT] 'Block(p: player, 1: item, 2: item)' is not a text (blok.sk, line 1: function Block(p: player, 1: item, 2: item):')
[19:29:28] [Client thread/INFO]: [CHAT] 'inventory' is not an item type (blok.sk, line 26: if inventory type of clicked inventory is "CHEST":')
[19:29:28] [Client thread/INFO]: [CHAT] [Skript] Encountered 2 errors while reloading blok.sk!

i da sie wyjmowac te bloki :/

 

Masz odpowoednia wersje skripta? 2 error jest bo nie masz jakiegos dodatku ale spokojnie mozesz usunac ta linijke. Wyjmowac sie da bo jest ten warunek z 2 bledu

Odnośnik do komentarza
https://skript.pl/temat/31295-zamiana-np-9x-emerald-w-bloki/#findComment-204156
Udostępnij na innych stronach

  • 0
W dniu 24.01.2019 o 11:42, Ytaru napisał:

No najnowsza z bukkit pobrana i powiedz jaki dodatek

Upewnij aie czy masz wersje skripta 2.2 i czy nadal wyskakuje blad w pierwszej linijce

Jezeli nie chcesz usunac calej tej linijki z drugiego errora pobierz Skellet (ewentualnie Umbaska)

Mi dziala na tym skripcie

 

Edytowane przez xAxee
Odnośnik do komentarza
https://skript.pl/temat/31295-zamiana-np-9x-emerald-w-bloki/#findComment-204322
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ę...