# =============================================
# _____ _ ______ _
# | ___| (_) | ___ \ | |
# | |__ _ __ _ ___| |_/ /__| |_ ___
# | __| '_ \| |/ __| __/ _ \ __/ __|
# | |__| |_) | | (__| | | __/ |_\__ \
# \____/ .__/|_|\___\_| \___|\__|___/
# | |
# |_|
# 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.
Pytanie
Jamnior 2
# ============================================= # _____ _ ______ _ # | ___| (_) | ___ \ | | # | |__ _ __ _ ___| |_/ /__| |_ ___ # | __| '_ \| |/ __| __/ _ \ __/ __| # | |__| |_) | | (__| | | __/ |_\__ \ # \____/ .__/|_|\___\_| \___|\__|___/ # | | # |_| # 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 JamniorOdnośnik do komentarza
Udostępnij na innych stronach
19 odpowiedzi na to pytanie
Rekomendowane odpowiedzi
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ą.