Skocz do zawartości
  • 0

setslot pomoc


Jamnior
 Udostępnij

Pytanie

# =============================================
#  _____      _     ______    _       
# |  ___|    (_)    | ___ \  | |      
# | |__ _ __  _  ___| |_/ /__| |_ ___ 
# |  __| '_ \| |/ __|  __/ _ \ __/ __|
# | |__| |_) | | (__| | |  __/ |_\__ \
# \____/ .__/|_|\___\_|  \___|\__|___/
#      | |                            
#      |_|                            
#              By iOmega__
# =============================================

# Permissions:
#   epicpets.pets - access to the general pet things
#   epicpets.clearpets - access to global pet clearing

# =========
# CONFIG
# =========

options:
    prefix: &9&lEpicPets                    # The prefix used in messages
    spawn-sound: ENTITY_PLAYER_LEVELUP      # The sound played to the player when they spawn a pet
    success-sound: UI_BUTTON_CLICK          # The sound played when something succeeds
    fail-sound: BLOCK_ANVIL_LAND            # The sound played when an event fails
    cost: 100                           # The amount of money each pet will cost

# =========
# CODE
# =========

on join:
    if {pet.selected.%uuid of player%} is not set:
        set {pet.selected.%uuid of player%} to "&c&lNone"

command /epicpets:
    permission: epicpets.pets
    trigger:
        play "{@success-sound}" to player at volume 10
        open virtual chest inventory with 3 rows named "&6&lPETS" to player
        format gui slot 0 and 1 and 2 and 3 and 5 and 6 and 7 and 8 and 9 and 17 and 18 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 of player with yellow stained glass pane named "&7" to do nothing
        format gui slot 4 of player with paper named "&aSelected Pet: &d&l%{pet.selected.%uuid of player%}%"
        format gui slot 22 of player with barrier named "&cClear Pet" with lore "&7Removes your currently active pet." to close:
            make player execute command "/clearpet"
        set {petcost} to {@cost}
        # ---------
        # BEE 
        # --------
        if {pet.bee.%uuid of player%} is 1:
            format gui slot 11 of player with ("Xisuma" parsed as offline player)'s skull named "&e&lBee" with lore "&a&l✔ UNLOCKED" and "" and "&7Click to select the &e&lBee &7pet!" to close:
                set {pet.bee.%uuid of player%} to 1
                set {pet.selected.%uuid of player%} to "Bee"
                play "{@spawn-sound}" to player at volume 10
                send "&8[{@prefix}&8] &aYou have selected the &2Bee &apet!"
                loop all entities:
                    if display name of loop-entity contains "&e%player%&e's Pet":
                        kill loop-entity
                spawn a bee at location of player
                make spawned bee invulnerable
                set the display name of the spawned bee to "&e%player%&e's Pet"
                while spawned bee is alive:
                    if distance between player and spawned bee is less than 10:
                        if distance between player and spawned bee is bigger than 3:
                            make spawned bee pathfind to location of player with speed 1.3
                    else:
                        teleport spawned bee to position of player
                        wait 1 tick
                    wait 1 tick

Czy ktos moze mi zamienic format gui na setsloty poniewaz kiedy probowałem sam wywala mi serwer jak przeladowuje skrypt.

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

19 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
23 godziny temu, KaWaNoS napisał:

Zamień 


format gui slot 4 of player with

na:


set slot 4 of player's current inventory to

🙂

zrobiłem tak ale porblem jest taki ze wyskakuje blad dotyczacy tego polecenia 

if {pet.bee.%uuid of player%} is 1:

 

Glicz

Wstawiam kod w code, poprawiam formatowanie na ciemnym motywie.

Notatka dodana przez Glicz

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
# =============================================
#  _____      _     ______    _       
# |  ___|    (_)    | ___ \  | |      
# | |__ _ __  _  ___| |_/ /__| |_ ___ 
# |  __| '_ \| |/ __|  __/ _ \ __/ __|
# | |__| |_) | | (__| | |  __/ |_\__ \
# \____/ .__/|_|\___\_|  \___|\__|___/
#      | |                            
#      |_|                            
#              By iOmega__
# =============================================

# Permissions:
#   epicpets.pets - access to the general pet things
#   epicpets.clearpets - access to global pet clearing

# =========
# CONFIG
# =========

options:
    prefix: &9&lEpicPets                    # The prefix used in messages
    spawn-sound: ENTITY_PLAYER_LEVELUP      # The sound played to the player when they spawn a pet
    success-sound: UI_BUTTON_CLICK          # The sound played when something succeeds
    fail-sound: BLOCK_ANVIL_LAND            # The sound played when an event fails
    cost: 100                           # The amount of money each pet will cost

# =========
# CODE
# =========

on join:
    if {pet.selected.%uuid of player%} is not set:
        set {pet.selected.%uuid of player%} to "&c&lNone"

command /epicpets:
    permission: epicpets.pets
    trigger:
        set {_gui} to chest inventory with 3 rows named "Nazwa"
        set slot 11 of {_gui} to ("Xisuma" parsed as offline player)'s skull named "&e&lBee" with lore "&7Click to select the &e&lBee &7pet!"
        open {_gui} to player
        set {petcost} to {@cost}
        # ---------
        # BEE 
        # --------
on inventory click:
	event-inventory is not player's inventory
	if name of event-inventory is "Nazwa":
		cancel event
		if clicked slot is 11:
			set {pet.bee.%uuid of player%} to 1
			set {pet.selected.%uuid of player%} to "Bee"
			play "{@spawn-sound}" to player at volume 10
			send "&8[{@prefix}&8] &aYou have selected the &2Bee &apet!"
			loop all entities:
			if display name of loop-entity contains "&e%player%&e's Pet":
			kill loop-entity
			spawn a bee at location of player
			make spawned bee invulnerable
			set the display name of the spawned bee to "&e%player%&e's Pet"
			while spawned bee is alive:
			if distance between player and spawned bee is less than 10:
			if distance between player and spawned bee is bigger than 3:
			make spawned bee pathfind to location of player with speed 1.3
			else:
			teleport spawned bee to position of player
			wait 1 tick

unknown.png

tak napisałem i wyskakują takie bledy

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

  • 0
2 minuty temu, KaWaNoS napisał:

Widocznie gdzieś dodałeś else, a nie było przed nim if.

Wyślij cały kod to postaram się znaleźć błąd.

 

# =============================================
#  _____      _     ______    _       
# |  ___|    (_)    | ___ \  | |      
# | |__ _ __  _  ___| |_/ /__| |_ ___ 
# |  __| '_ \| |/ __|  __/ _ \ __/ __|
# | |__| |_) | | (__| | |  __/ |_\__ \
# \____/ .__/|_|\___\_|  \___|\__|___/
#      | |                            
#      |_|                            
#              By iOmega__
# =============================================

# Permissions:
#   epicpets.pets - access to the general pet things
#   epicpets.clearpets - access to global pet clearing

# =========
# CONFIG
# =========

options:
    prefix: &9&lEpicPets                    # The prefix used in messages
    spawn-sound: ENTITY_PLAYER_LEVELUP      # The sound played to the player when they spawn a pet
    success-sound: UI_BUTTON_CLICK          # The sound played when something succeeds
    fail-sound: BLOCK_ANVIL_LAND            # The sound played when an event fails
    cost: 100                           # The amount of money each pet will cost

# =========
# CODE
# =========

on join:
    if {pet.selected.%uuid of player%} is not set:
        set {pet.selected.%uuid of player%} to "&c&lNone"

command /epicpets:
    permission: epicpets.pets
    trigger:
        set {_gui} to chest inventory with 3 rows named "Nazwa"
        set slot 11 of {_gui} to ("Xisuma" parsed as offline player)'s skull named "&e&lBee" with lore "&7Click to select the &e&lBee &7pet!"
        open {_gui} to player
        set {petcost} to {@cost}
        # ---------
        # BEE 
        # --------
on inventory click:
	event-inventory is not player's inventory
	if name of event-inventory is "Nazwa":
		cancel event
		if {pet.bee.%uuid of player%} is 1:
			if clicked slot is 11:
				set {pet.bee.%uuid of player%} to 1
				set {pet.selected.%uuid of player%} to "Bee"
				play "{@spawn-sound}" to player at volume 10
				send "&8[{@prefix}&8] &aYou have selected the &2Bee &apet!"
				loop all entities:
					if display name of loop-entity contains "&e%player%&e's Pet":
						kill loop-entity
						spawn a bee at location of player
						make spawned bee invulnerable
						set the display name of the spawned bee to "&e%player%&e's Pet"
						while spawned bee is alive:
							if distance between player and spawned bee is less than 10:
								if distance between player and spawned bee is bigger than 3:
									make spawned bee pathfind to location of player with speed 1.3
									else:
										teleport spawned bee to position of player

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Spróbuj z tym

# =============================================
#  _____      _     ______    _       
# |  ___|    (_)    | ___ \  | |      
# | |__ _ __  _  ___| |_/ /__| |_ ___ 
# |  __| '_ \| |/ __|  __/ _ \ __/ __|
# | |__| |_) | | (__| | |  __/ |_\__ \
# \____/ .__/|_|\___\_|  \___|\__|___/
#      | |                            
#      |_|                            
#              By iOmega__
# =============================================

# Permissions:
#   epicpets.pets - access to the general pet things
#   epicpets.clearpets - access to global pet clearing

# =========
# CONFIG
# =========

options:
    prefix: &9&lEpicPets                    # The prefix used in messages
    spawn-sound: ENTITY_PLAYER_LEVELUP      # The sound played to the player when they spawn a pet
    success-sound: UI_BUTTON_CLICK          # The sound played when something succeeds
    fail-sound: BLOCK_ANVIL_LAND            # The sound played when an event fails
    cost: 100                           # The amount of money each pet will cost

# =========
# CODE
# =========

on join:
    if {pet.selected.%uuid of player%} is not set:
        set {pet.selected.%uuid of player%} to "&c&lNone"

command /epicpets:
    permission: epicpets.pets
    trigger:
        set {_gui} to chest inventory with 3 rows named "Nazwa"
        set slot 11 of {_gui} to ("Xisuma" parsed as offline player)'s skull named "&e&lBee" with lore "&7Click to select the &e&lBee &7pet!"
        open {_gui} to player
        set {petcost} to {@cost}
        # ---------
        # BEE 
        # --------
on inventory click:
	event-inventory is not player's inventory
	if name of event-inventory is "Nazwa":
		cancel event
		if {pet.bee.%uuid of player%} is 1:
			if clicked slot is 11:
				set {pet.bee.%uuid of player%} to 1
				set {pet.selected.%uuid of player%} to "Bee"
				play "{@spawn-sound}" to player at volume 10
				send "&8[{@prefix}&8] &aYou have selected the &2Bee &apet!"
				loop all entities:
					if display name of loop-entity contains "&e%player%&e's Pet":
						kill loop-entity
						spawn a bee at location of player
						make spawned bee invulnerable
						set the display name of the spawned bee to "&e%player%&e's Pet"
						while spawned bee is alive:
							if distance between player and spawned bee is less than 10:
								if distance between player and spawned bee is bigger than 3:
									make spawned bee pathfind to location of player with speed 1.3
								else:
									teleport spawned bee to position of player
                            else:
									teleport spawned bee to position of player

Wytabuj ostatniego else, tak aby był pod:

if distance between player and spawned bee is less than 10:

 

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

  • 0
16 godzin temu, Jamnior napisał:
# =============================================
#  _____      _     ______    _       
# |  ___|    (_)    | ___ \  | |      
# | |__ _ __  _  ___| |_/ /__| |_ ___ 
# |  __| '_ \| |/ __|  __/ _ \ __/ __|
# | |__| |_) | | (__| | |  __/ |_\__ \
# \____/ .__/|_|\___\_|  \___|\__|___/
#      | |                            
#      |_|                            
#              By iOmega__
# =============================================

# Permissions:
#   epicpets.pets - access to the general pet things
#   epicpets.clearpets - access to global pet clearing

# =========
# CONFIG
# =========

options:
    prefix: &9&lEpicPets                    # The prefix used in messages
    spawn-sound: ENTITY_PLAYER_LEVELUP      # The sound played to the player when they spawn a pet
    success-sound: UI_BUTTON_CLICK          # The sound played when something succeeds
    fail-sound: BLOCK_ANVIL_LAND            # The sound played when an event fails
    cost: 100                           # The amount of money each pet will cost

# =========
# CODE
# =========

on join:
    if {pet.selected.%uuid of player%} is not set:
        set {pet.selected.%uuid of player%} to "&c&lNone"

command /epicpets:
    permission: epicpets.pets
    trigger:
        play "{@success-sound}" to player at volume 10
        open virtual chest inventory with 3 rows named "&6&lPETS" to player
        format gui slot 0 and 1 and 2 and 3 and 5 and 6 and 7 and 8 and 9 and 17 and 18 and 19 and 20 and 21 and 22 and 23 and 24 and 25 and 26 of player with yellow stained glass pane named "&7" to do nothing
        format gui slot 4 of player with paper named "&aSelected Pet: &d&l%{pet.selected.%uuid of player%}%"
        format gui slot 22 of player with barrier named "&cClear Pet" with lore "&7Removes your currently active pet." to close:
            make player execute command "/clearpet"
        set {petcost} to {@cost}
        # ---------
        # BEE 
        # --------
        if {pet.bee.%uuid of player%} is 1:
            format gui slot 11 of player with ("Xisuma" parsed as offline player)'s skull named "&e&lBee" with lore "&a&l✔ UNLOCKED" and "" and "&7Click to select the &e&lBee &7pet!" to close:
                set {pet.bee.%uuid of player%} to 1
                set {pet.selected.%uuid of player%} to "Bee"
                play "{@spawn-sound}" to player at volume 10
                send "&8[{@prefix}&8] &aYou have selected the &2Bee &apet!"
                loop all entities:
                    if display name of loop-entity contains "&e%player%&e's Pet":
                        kill loop-entity
                spawn a bee at location of player
                make spawned bee invulnerable
                set the display name of the spawned bee to "&e%player%&e's Pet"
                while spawned bee is alive:
                    if distance between player and spawned bee is less than 10:
                        if distance between player and spawned bee is bigger than 3:
                            make spawned bee pathfind to location of player with speed 1.3
                    else:
                        teleport spawned bee to position of player
                        wait 1 tick
                    wait 1 tick

Czy ktos moze mi zamienic format gui na setsloty poniewaz kiedy probowałem sam wywala mi serwer jak przeladowuje skrypt.

osobiście sam został bym na format slocie. Wiem ,że to boli i dużo psuje ale wtedy będzie trzeba edytować cały skrypt, a po co jak masz napisany sam tylko z tym co jest gorsze.

masz np. czekoladę orzechową
i piszesz do producenta "zamieńcie mi czekolade orzechową na truskawkową bo nie lubie orzechów"
a orzechowa to też czekolada która też jest tak samo słodka jak truskawkowa. To po co zmieniać format slota na set slota jak działa.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
13 godzin temu, polsatgraniepl napisał:

osobiście sam został bym na format slocie. Wiem ,że to boli i dużo psuje ale wtedy będzie trzeba edytować cały skrypt, a po co jak masz napisany sam tylko z tym co jest gorsze.

masz np. czekoladę orzechową
i piszesz do producenta "zamieńcie mi czekolade orzechową na truskawkową bo nie lubie orzechów"
a orzechowa to też czekolada która też jest tak samo słodka jak truskawkowa. To po co zmieniać format slota na set slota jak działa.

bo format slot sie buguje i po przeładowaniu mozna wyciagac itemy

 

# =============================================
#  _____      _     ______    _       
# |  ___|    (_)    | ___ \  | |      
# | |__ _ __  _  ___| |_/ /__| |_ ___ 
# |  __| '_ \| |/ __|  __/ _ \ __/ __|
# | |__| |_) | | (__| | |  __/ |_\__ \
# \____/ .__/|_|\___\_|  \___|\__|___/
#      | |                            
#      |_|                            
#              By iOmega__
# =============================================

# Permissions:
#   epicpets.pets - access to the general pet things
#   epicpets.clearpets - access to global pet clearing

# =========
# CONFIG
# =========

options:
    prefix: &9&lEpicPets                    # The prefix used in messages        
    cost: 100                           # The amount of money each pet will cost

# =========
# CODE
# =========

on join:
	if {pet.selected.%uuid of player%} is not set:
		set {pet.selected.%uuid of player%} to "&c&lNone"

command /pet:
    permission: epicpets.pets
    trigger:
        set {_gui} to chest inventory with 3 rows named "Nazwa"
        set slot 12 of {_gui} to ("Xisuma" parsed as offline player)'s skull named "&e&lBee" with lore "&7Click to select the &e&lBee &7pet!"
        open {_gui} to player
        # ---------
        # BEE 
        # --------
on inventory click:
	event-inventory is not player's inventory
	if name of event-inventory is "Nazwa":
		cancel event
		if clicked slot is 12:
			if {pet.bee.%uuid of player%} is 1:
				set {pet.bee.%uuid of player%} to 1
				set {pet.selected.%uuid of player%} to "Bee"
				send "&8[{@prefix}&8] &aYou have selected the &2Bee &apet!"
				loop all entities:
					if display name of loop-entity contains "&e%player%&e's Pet":
						kill loop-entity
				spawn a bee at location of player
				make spawned bee invulnerable
				set the display name of the spawned bee to "&e%player%&e's Pet"
				while spawned bee is alive:
					if distance between player and spawned bee is less than 10:
						if distance between player and spawned bee is bigger than 3:
							make spawned bee pathfind to location of player with speed 1.3
					else:
						teleport spawned bee to position of player
						wait 1 tick
					wait 1 tick

napisałem tak ale jest jeszcze jeden problem ze tylko ja moge uzywac tego koledze nic nie pokazuje jak mu mowie zeby wpisal /pet

Glicz

Łączę posty.

Notatka dodana przez Glicz

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
9 godzin temu, Jamnior napisał:

bo format slot sie buguje i po przeładowaniu mozna wyciagac itemy

 



# =============================================
#  _____      _     ______    _       
# |  ___|    (_)    | ___ \  | |      
# | |__ _ __  _  ___| |_/ /__| |_ ___ 
# |  __| '_ \| |/ __|  __/ _ \ __/ __|
# | |__| |_) | | (__| | |  __/ |_\__ \
# \____/ .__/|_|\___\_|  \___|\__|___/
#      | |                            
#      |_|                            
#              By iOmega__
# =============================================

# Permissions:
#   epicpets.pets - access to the general pet things
#   epicpets.clearpets - access to global pet clearing

# =========
# CONFIG
# =========

options:
    prefix: &9&lEpicPets                    # The prefix used in messages        
    cost: 100                           # The amount of money each pet will cost

# =========
# CODE
# =========

on join:
	if {pet.selected.%uuid of player%} is not set:
		set {pet.selected.%uuid of player%} to "&c&lNone"

command /pet:
    permission: epicpets.pets
    trigger:
        set {_gui} to chest inventory with 3 rows named "Nazwa"
        set slot 12 of {_gui} to ("Xisuma" parsed as offline player)'s skull named "&e&lBee" with lore "&7Click to select the &e&lBee &7pet!"
        open {_gui} to player
        # ---------
        # BEE 
        # --------
on inventory click:
	event-inventory is not player's inventory
	if name of event-inventory is "Nazwa":
		cancel event
		if clicked slot is 12:
			if {pet.bee.%uuid of player%} is 1:
				set {pet.bee.%uuid of player%} to 1
				set {pet.selected.%uuid of player%} to "Bee"
				send "&8[{@prefix}&8] &aYou have selected the &2Bee &apet!"
				loop all entities:
					if display name of loop-entity contains "&e%player%&e's Pet":
						kill loop-entity
				spawn a bee at location of player
				make spawned bee invulnerable
				set the display name of the spawned bee to "&e%player%&e's Pet"
				while spawned bee is alive:
					if distance between player and spawned bee is less than 10:
						if distance between player and spawned bee is bigger than 3:
							make spawned bee pathfind to location of player with speed 1.3
					else:
						teleport spawned bee to position of player
						wait 1 tick
					wait 1 tick

napisałem tak ale jest jeszcze jeden problem ze tylko ja moge uzywac tego koledze nic nie pokazuje jak mu mowie zeby wpisal /pet

Jeżeli nie działa i da się wyciągać to podaj w rawie plik .log po zreloadowaniu bo może być to błąd wersji skripta. Podaj wersję serwera, silnik, wersję skripta, dodatki i plik log.txt wtedy będzie można zobaczyć dlaczeo można wyciągać. Bo napewno nie jest to wina format slota. Tylko pluginu który go nie obsługuje i wywala

bo tak jakby jest to niemożliwe ,że można wyciągać przy format slocie

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

  • 0
2 godziny temu, polsatgraniepl napisał:

bo tak jakby jest to niemożliwe ,że można wyciągać przy format slocie

Format slot z tego co wiem jest porzucony w nowszych wersjach w SkQuery przez to że był zbugowany. 

I fakt, był zbugowany, dlatego lepiej użyć tego formatowania z czystego skripta, ewentualnie TuSke (ale tego nie testowałem) 

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.

 Udostępnij

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

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