variables:
{enchantsList::*} = "efficiency 5", "fortune 3", "mending 1" and "unbreaking 3"
function guiBlocks(P: player, t: text, item: item):
if {_t} = "disenchanter":
open chest with 3 rows named "%{name_de}%" to {_p}
wait 1 tick
set {_p}'s current inventory's slot 0 to light blue stained glass pane named " "
loop 26 times:
set {_p}'s current inventory's slot loop-number to light blue stained glass pane named " "
set {_p}'s current inventory's slot 4 to {_item}
set {_i} to 10
set {_n} to 1
loop {enchantsList::*}:
if {_p}'s tool is {_item}:
if {_item} is enchanted with {enchanteList::%{_n}%}:
set {_p}'s current inventory's slot {_i} to red concrete
add 1 to {_i}
add 1 to {_n}
send "tak" to {_p}
else:
add 1 to {_n}
send "nie %{_n}% %{_i}%" to {_p}
on right click:
if event-block is {@block_de}:
if {deList::*} contains location of clicked block:
cancel event
if player's tool is any axe or any pickaxe or any shovel or any hoe or any sword or shears or fishing rod or bow or crossbow or trident or any helmet or any chestplate or any leggings or any boots:
if player's tool is enchanted:
set {_tool} to player's tool
guiBlocks(player, "disenchanter", {_tool})
else:
send "{@tag} &cTwój przedmiot nie jest zaklęty!"
else:
send "{@tag} &cMożesz usunąć zaklęcie tylko z narzędzi!"
Potrzebuje pomocy z tą częścią kodu, próbowałem już wiele razy zmieniać różne rzeczy ale dalej nie wiem co jest nie tak. Cały czas wyrzuca mi "nie %{_n}% ..." z cyfrą do 111
Zmieniałem if'a, listę na kilka sposobów ale dalej nie działa
Pytanie
sworip 50
variables: {enchantsList::*} = "efficiency 5", "fortune 3", "mending 1" and "unbreaking 3" function guiBlocks(P: player, t: text, item: item): if {_t} = "disenchanter": open chest with 3 rows named "%{name_de}%" to {_p} wait 1 tick set {_p}'s current inventory's slot 0 to light blue stained glass pane named " " loop 26 times: set {_p}'s current inventory's slot loop-number to light blue stained glass pane named " " set {_p}'s current inventory's slot 4 to {_item} set {_i} to 10 set {_n} to 1 loop {enchantsList::*}: if {_p}'s tool is {_item}: if {_item} is enchanted with {enchanteList::%{_n}%}: set {_p}'s current inventory's slot {_i} to red concrete add 1 to {_i} add 1 to {_n} send "tak" to {_p} else: add 1 to {_n} send "nie %{_n}% %{_i}%" to {_p} on right click: if event-block is {@block_de}: if {deList::*} contains location of clicked block: cancel event if player's tool is any axe or any pickaxe or any shovel or any hoe or any sword or shears or fishing rod or bow or crossbow or trident or any helmet or any chestplate or any leggings or any boots: if player's tool is enchanted: set {_tool} to player's tool guiBlocks(player, "disenchanter", {_tool}) else: send "{@tag} &cTwój przedmiot nie jest zaklęty!" else: send "{@tag} &cMożesz usunąć zaklęcie tylko z narzędzi!"
Potrzebuje pomocy z tą częścią kodu, próbowałem już wiele razy zmieniać różne rzeczy ale dalej nie wiem co jest nie tak. Cały czas wyrzuca mi "nie %{_n}% ..." z cyfrą do 111
Zmieniałem if'a, listę na kilka sposobów ale dalej nie działa
Odnośnik do komentarza
Udostępnij na innych stronach
3 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ą.