Skocz do zawartości
  • 0

Zdrapki na 3 itemy


TheFightaz

Pytanie

Siemka,
Potrzebuje, aby ktoś mi zaczął skrypt, bo nie mam pojęcia jak go zacząć.

Mianowicie, otwiera nam sie gui po komendzie, i okienko 3x3 (gui juz mam) gdy gracz kliknie na któreś okienko to szkło zamienia się w item, następnie ma jeszcze 3 próby, gdy trafi 3 razy ten sam przedmiot, to gui się zamyka i gracz dostaje ten przedmiot, gdy gracz nie trafi 3 razy tego samego przedmiotu gui się zamyka i nic nie dostaje. 

Odnośnik do komentarza
Udostępnij na innych stronach

Rekomendowane odpowiedzi

  • 0
2 minuty temu, CoFFeIN04 napisał:

pokaż twój aktualny kod i powiedz, czy oczekujesz pomocy, czy gotowego kodu?

options:
	item1: 1 dirt
	item2: 1 stone
	item3: 1 diamond
	item4: 1 emerald
	item5: 1 obsidian
	item6: 1 chest
	item7: 1 sand
	item8: 1 sandstone
	item9: 5 diamond


command /zdrapka [<text>]:
	trigger:
		open chest with 5 rows named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" to player
		wait 2 tick
		set slot 0 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 1 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 2 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 3 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 4 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 5 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 6 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 7 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 8 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 9 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 10 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 11 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 12 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
		set slot 13 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
		set slot 14 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
		set slot 15 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 16 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 17 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 18 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 19 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 20 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 21 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
		set slot 22 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
		set slot 23 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
		set slot 24 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 25 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 26 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 27 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 28 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 29 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 30 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
		set slot 31 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
		set slot 32 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"
		set slot 33 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 34 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 35 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 36 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 37 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 38 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 39 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 40 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 41 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 42 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 43 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 44 of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 45 of player's current inventory to gray stained glass pane named "" with lore ""
on inventory click:
	inventory name of current inventory of player is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|":
		cancel event

Edit:
Potrzebuje raczej gotowego kodu, bo nie mam pojęcia jak się za to zabrać

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

  • 0
options:
	item1: 1 dirt
	item2: 1 stone
	item3: 1 diamond
	item4: 1 emerald
	item5: 1 obsidian
	item6: 1 chest
	item7: 1 sand
	item8: 1 sandstone
	item9: 5 diamond

command /zdrapka [<text>]:
	trigger:
		open chest with 5 rows named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" to player
		set slot (integers from 0 to 9), 17, 18, (integers from 35 to 45) of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 10,11,15,16,19,20,24,25,28,29,33,34 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 11,12,13,14,21,22,23,39,31,32 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 12 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"

on inventory click:
	inventory name of current inventory of player is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|"
	cancel event

Sprawdź na początek czy działa wszystko, bo nie wiem czy można tak mieszać

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

  • 0
3 minuty temu, CoFFeIN04 napisał:

options:
	item1: 1 dirt
	item2: 1 stone
	item3: 1 diamond
	item4: 1 emerald
	item5: 1 obsidian
	item6: 1 chest
	item7: 1 sand
	item8: 1 sandstone
	item9: 5 diamond

command /zdrapka [<text>]:
	trigger:
		open chest with 5 rows named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" to player
		set slot (integers from 0 to 9), 17, 18, (integers from 35 to 45) of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 10,11,15,16,19,20,24,25,28,29,33,34 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 11,12,13,14,21,22,23,39,31,32 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 12 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"

on inventory click:
	inventory name of current inventory of player is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|"
	cancel event

Sprawdź na początek czy działa wszystko, po nie wiem czy można tak mieszać

Teoretycznie działa, ale wyskakuje takie coś https://imgur.com/a/pmGoavI

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
options:
	item1: 1 dirt
	item2: 1 stone
	item3: 1 diamond
	item4: 1 emerald
	item5: 1 obsidian
	item6: 1 chest
	item7: 1 sand
	item8: 1 sandstone
	item9: 5 diamond

command /zdrapka [<text>]:
	trigger:
		open chest with 5 rows named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" to player
		set slot (integers from 0 to 9), 17, 18, 26, 27, (integers from 35 to 45) of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 10,11,15,16,19,20,24,25,28,29,33 and 34 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 12,13,14,21,22,23,30,31 and 32 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"

on inventory click:
	inventory name of current inventory of player is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|"
	cancel event

Teraz sprawdź, coś mi się wcześniej pomieszało xd

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
1 minutę temu, CoFFeIN04 napisał:

options:
	item1: 1 dirt
	item2: 1 stone
	item3: 1 diamond
	item4: 1 emerald
	item5: 1 obsidian
	item6: 1 chest
	item7: 1 sand
	item8: 1 sandstone
	item9: 5 diamond

command /zdrapka [<text>]:
	trigger:
		open chest with 5 rows named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" to player
		set slot (integers from 0 to 9), 17, 18, 26, 27, (integers from 35 to 45) of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 10,11,15,16,19,20,24,25,28,29,33 and 34 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 12,13,14,21,22,23,30,31 and 32 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"

on inventory click:
	inventory name of current inventory of player is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|"
	cancel event

Teraz sprawdź, coś mi się wcześniej pomieszało xd

Gui siedzi, ale teraz jeszcze taki mały komunikat https://imgur.com/a/GZXamMn

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
options:
	item1: dirt
	item2: stone
	item3: diamond
	item4: emerald
	item5: obsidian
	item6: chest
	item7: sand
	item8: sandstone
	item9: diamond

on load:
	set {prize::*} to {@item1}, {@item2}, {@item3}, {@item4}, {@item5}, {@item6}, {@item7}, {@item8} and {@item9}

command /zdrapka [<text>]:
	trigger:
		open chest with 5 rows named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" to player
		set slot (integers from 0 to 9), 17, 18, 26, 27, (integers from 35 to 45) of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 10,11,15,16,19,20,24,25,28,29,33 and 34 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 12,13,14,21,22,23,30,31 and 32 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"

on inventory click:
	inventory name of current inventory of player is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|"
	clicked inventory is not player's inventory
	cancel event
	clicked item is blue stained glass
	if amount of blue stained glass in player's current inventory > 6:
		set {_it} to (random element out of {prize::*}) parsed as item
		set {_am} to random integer between 1 and 5
		set slot (index of clicked item) of player's current inventory to {_am} of {_}
		give {_am} of {_} to the player
		stop
	clear player's inventory

Przetestuj

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
2 minuty temu, CoFFeIN04 napisał:

options:
	item1: dirt
	item2: stone
	item3: diamond
	item4: emerald
	item5: obsidian
	item6: chest
	item7: sand
	item8: sandstone
	item9: diamond

on load:
	set {prize::*} to {@item1}, {@item2}, {@item3}, {@item4}, {@item5}, {@item6}, {@item7}, {@item8} and {@item9}

command /zdrapka [<text>]:
	trigger:
		open chest with 5 rows named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" to player
		set slot (integers from 0 to 9), 17, 18, 26, 27, (integers from 35 to 45) of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 10,11,15,16,19,20,24,25,28,29,33 and 34 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 12,13,14,21,22,23,30,31 and 32 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"

on inventory click:
	inventory name of current inventory of player is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|"
	clicked inventory is not player's inventory
	cancel event
	clicked item is blue stained glass
	if amount of blue stained glass in player's current inventory > 6:
		set {_it} to (random element out of {prize::*}) parsed as item
		set {_am} to random integer between 1 and 5
		set slot (index of clicked item) of player's current inventory to {_am} of {_}
		give {_am} of {_} to the player
		stop
	clear player's inventory

Przetestuj

Wywala 3 errory (https://imgur.com/a/1dN8wxM) i po kliknięciu w niebieskie szkło usuwa cały ekwipunek gracza

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
options:
	item1: dirt
	item2: stone
	item3: diamond
	item4: emerald
	item5: obsidian
	item6: chest
	item7: sand
	item8: sandstone
	item9: diamond

on load:
	set {prize::*} to {@item1}, {@item2}, {@item3}, {@item4}, {@item5}, {@item6}, {@item7}, {@item8} and {@item9}

command /zdrapka [<text>]:
	trigger:
		open chest with 5 rows named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" to player
		set slot (integers from 0 to 9), 17, 18, 26, 27, (integers from 35 to 45) of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 10,11,15,16,19,20,24,25,28,29,33 and 34 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 12,13,14,21,22,23,30,31 and 32 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"

on inventory click:
	inventory name of current inventory of player is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|"
	clicked inventory is not player's inventory
	cancel event
	event-item is blue stained glass
	if amount of blue stained glass in player's current inventory > 6:
		set {_it} to (random element out of {prize::*}) parsed as item
		set {_am} to random integer between 1 and 5
		set slot (index of event-item) of player's current inventory to {_am} of {_}
		give {_am} of {_} to the player
		stop
	clear player's inventory
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
2 minuty temu, CoFFeIN04 napisał:

options:
	item1: dirt
	item2: stone
	item3: diamond
	item4: emerald
	item5: obsidian
	item6: chest
	item7: sand
	item8: sandstone
	item9: diamond

on load:
	set {prize::*} to {@item1}, {@item2}, {@item3}, {@item4}, {@item5}, {@item6}, {@item7}, {@item8} and {@item9}

command /zdrapka [<text>]:
	trigger:
		open chest with 5 rows named "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|" to player
		set slot (integers from 0 to 9), 17, 18, 26, 27, (integers from 35 to 45) of player's current inventory to gray stained glass pane named "" with lore ""
		set slot 10,11,15,16,19,20,24,25,28,29,33 and 34 of player's current inventory to white stained glass pane named "" with lore ""
		set slot 12,13,14,21,22,23,30,31 and 32 of player's current inventory to blue stained glass pane named "&6Zdrapka" with lore "&7Zdrap, używając &aLPM!"

on inventory click:
	inventory name of current inventory of player is "&2&lMC&6&lSquare&f&l.pl &8&l| &6&lZDRAPKI &8&l|"
	clicked inventory is not player's inventory
	cancel event
	event-item is blue stained glass
	if amount of blue stained glass in player's current inventory > 6:
		set {_it} to (random element out of {prize::*}) parsed as item
		set {_am} to random integer between 1 and 5
		set slot (index of event-item) of player's current inventory to {_am} of {_}
		give {_am} of {_} to the player
		stop
	clear player's inventory

Teraz nie czysci po kliknięciu w niebieskie szkło, ale taki error https://imgur.com/a/SKCZPjK

Odnośnik do komentarza
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ę...