Hej, mam mały kłopot z jednym skryptem. Jest to skrypt na limit koxów, refilów i pereł. Wszystko działa ok, tylko koxy zamieniają mi się w refile :/. O to kod:
on pick up:
wait 0.1 second
if amount of 322:1 in player's inventory is greater than 4:
set {_kox} to amount of 322:1 in player's inventory
set {_koxy} to {_kox}-4
set {_add} to "%{_koxy}% 322:1"
add "%{_add}%" parsed as item to player's enderchest
remove all 322:1 from player's inventory
add 4 322:1 to player's inventory
message "&c&lOsiagnieto maksymalna ilosc koxow w twoim ekwipunku. Zostawiono 4, reszte odlozono do twojego enderchestu."
if amount of 322 in player's inventory is greater than 10:
set {_amount} to amount of 322 in player's inventory
set {_amountend} to {_amount}-10
set {_add} to "%{_amountend}% 322"
add "%{_add}%" parsed as item to player's enderchest
remove all 322 from player's inventory
add 10 322 to player's inventory
message "&c&lOsiagnieto maksymalna ilosc refilow w twoim ekwipunku. Zostawiono 10, reszte odlozono do twojego enderchestu."
if amount of ender pearl in player's inventory is greater than 5:
set {_perla} to amount of ender pearl in player's inventory
set {_perelki} to {_perla}-5
set {_add} to "%{_perelki}% ender pearl"
add "%{_add}%" parsed as item to player's enderchest
remove all ender pearl from player's inventory
add 5 ender pearl to player's inventory
message "&c&lOsiagnieto maksymalna ilosc ender perel w twoim ekwipunku. Zostawiono 10, reszte odlozono do twojego enderchestu."
stop
on inventory close:
if amount of 322:1 in player's inventory is greater than 4:
set {_kox} to amount of 322:1 in player's inventory
set {_koxy} to {_kox}-4
set {_add} to "%{_koxy}% 322:1"
add "%{_add}%" parsed as item to player's enderchest
remove all 322:1 from player's inventory
add 4 322:1 to player's inventory
message "&c&lOsiagnieto maksymalna ilosc koxow w twoim ekwipunku. Zostawiono 4, reszte odlozono do twojego enderchestu."
if amount of 322 in player's inventory is greater than 10:
set {_amount} to amount of 322 in player's inventory
set {_amountend} to {_amount}-10
set {_add} to "%{_amountend}% 322"
add "%{_add}%" parsed as item to player's enderchest
remove all 322 from player's inventory
add 10 322 to player's inventory
message "&c&lOsiagnieto maksymalna ilosc refow w twoim ekwipunku. Zostawiono 10, reszte odlozono do twojego enderchestu."
if amount of ender pearl in player's inventory is greater than 5:
set {_perla} to amount of ender pearl in player's inventory
set {_perelki} to {_perla}-5
set {_add} to "%{_perelki}% ender pearl"
add "%{_add}%" parsed as item to player's enderchest
remove all ender pearl from player's inventory
add 5 ender pearl to player's inventory
message "&c&lOsiagnieto maksymalna ilosc ender perel w twoim ekwipunku. Zostawiono 5, reszte odlozono do twojego enderchestu."
stop
Pytanie
Magiczny_Miki 29
Hej, mam mały kłopot z jednym skryptem. Jest to skrypt na limit koxów, refilów i pereł. Wszystko działa ok, tylko koxy zamieniają mi się w refile :/. O to kod:
on pick up:
wait 0.1 second
if amount of 322:1 in player's inventory is greater than 4:
set {_kox} to amount of 322:1 in player's inventory
set {_koxy} to {_kox}-4
set {_add} to "%{_koxy}% 322:1"
add "%{_add}%" parsed as item to player's enderchest
remove all 322:1 from player's inventory
add 4 322:1 to player's inventory
message "&c&lOsiagnieto maksymalna ilosc koxow w twoim ekwipunku. Zostawiono 4, reszte odlozono do twojego enderchestu."
if amount of 322 in player's inventory is greater than 10:
set {_amount} to amount of 322 in player's inventory
set {_amountend} to {_amount}-10
set {_add} to "%{_amountend}% 322"
add "%{_add}%" parsed as item to player's enderchest
remove all 322 from player's inventory
add 10 322 to player's inventory
message "&c&lOsiagnieto maksymalna ilosc refilow w twoim ekwipunku. Zostawiono 10, reszte odlozono do twojego enderchestu."
if amount of ender pearl in player's inventory is greater than 5:
set {_perla} to amount of ender pearl in player's inventory
set {_perelki} to {_perla}-5
set {_add} to "%{_perelki}% ender pearl"
add "%{_add}%" parsed as item to player's enderchest
remove all ender pearl from player's inventory
add 5 ender pearl to player's inventory
message "&c&lOsiagnieto maksymalna ilosc ender perel w twoim ekwipunku. Zostawiono 10, reszte odlozono do twojego enderchestu."
stop
on inventory close:
if amount of 322:1 in player's inventory is greater than 4:
set {_kox} to amount of 322:1 in player's inventory
set {_koxy} to {_kox}-4
set {_add} to "%{_koxy}% 322:1"
add "%{_add}%" parsed as item to player's enderchest
remove all 322:1 from player's inventory
add 4 322:1 to player's inventory
message "&c&lOsiagnieto maksymalna ilosc koxow w twoim ekwipunku. Zostawiono 4, reszte odlozono do twojego enderchestu."
if amount of 322 in player's inventory is greater than 10:
set {_amount} to amount of 322 in player's inventory
set {_amountend} to {_amount}-10
set {_add} to "%{_amountend}% 322"
add "%{_add}%" parsed as item to player's enderchest
remove all 322 from player's inventory
add 10 322 to player's inventory
message "&c&lOsiagnieto maksymalna ilosc refow w twoim ekwipunku. Zostawiono 10, reszte odlozono do twojego enderchestu."
if amount of ender pearl in player's inventory is greater than 5:
set {_perla} to amount of ender pearl in player's inventory
set {_perelki} to {_perla}-5
set {_add} to "%{_perelki}% ender pearl"
add "%{_add}%" parsed as item to player's enderchest
remove all ender pearl from player's inventory
add 5 ender pearl to player's inventory
message "&c&lOsiagnieto maksymalna ilosc ender perel w twoim ekwipunku. Zostawiono 5, reszte odlozono do twojego enderchestu."
stop
Odnośnik do komentarza
https://skript.pl/temat/26540-limit-kox%C3%B3w-refil%C3%B3w-i-pere%C5%82/Udostępnij na innych stronach
2 odpowiedzi na to pytanie
Rekomendowane odpowiedzi