u mnie git https://www.dailymotion.com/video/x83ae89 (hasło 123)
może zmiana silnika na Purpur pomoże (wydajnościowo na pewno), nie wiem co innego może pomóc, jeśli posiadasz skript 2.5.3 i pozwoliłeś plikom się od nowa utworzyć to już nie wiem
variables:
{punkty::%player%} = 0
command /apunkty [<text>] [<text>] [<text>] [<text>]:
trigger:
if {duty::%player%} is "&4Zarząd" or "&9Supporter" or "&6Developer":
if arg-1 is "dodaj":
add arg-3 parsed as number to {punkty::%arg-2%}
send "Dodałem %arg-3% punktów graczowi %arg-2%, powód: %arg-4%"
add "%now%:::%arg-3%:::%arg-4%:::%player%:::%{punkty::%arg-2%}%" to {punkty::%player%::*}
else if arg-1 is "usun":
remove arg-3 parsed as number from {punkty::%arg-2%}
send "Usunalem %arg-3% punktów graczowi %arg-2%, powód: %arg-4%"
add "%now%:::-%arg-3%:::%arg-4%:::%player%:::%{punkty::%arg-2%}%" to {punkty::%player%::*}
else:
send "Użycie: /apunkty dodaj/usun <gracz> <ilość> <powód>"
else:
send title "&4&lBŁĄD!" with subtitle "&cMusisz być na służbie administratora!"
command /reset <player>:
trigger:
if {duty::%player%} is "&4Zarząd" or "&9Supporter" or "&6Developer":
if arg-1 is set:
send "&cZresetowano punktacje!"
clear {punkty::%arg-1%::*}
set {punkty::%arg-1%} to 0
else:
send title "&4&lBŁĄD!" with subtitle "&cMusisz być na służbie administratora!"
command /punkty:
trigger:
send ""
send " &4&lHISTORIA"
send ""
send "&cAktualna liczba punktów: &7%{punkty::%player%}%"
send ""
loop {punkty::%player%::*}:
set {_historia::*} to split loop-value at ":::"
set {_data} to {_historia::1}
set {_zmiana} to {_historia::2}
set {_punkty} to {_historia::5}
set {_powód} to {_historia::3}
set {_admin} to {_historia::4}
send "&c%{_data}% &8| &7%{_punkty}% &8(+%{_zmiana}%&8) &8| &c%{_powód}% &8| &4%{_admin}%"
send ""
spróbuj ten kod
Bardzo dziwne, u mnie wszystko dobrze działa, wypróbuj kod:
function removeMundane(ilosc:integer,p:player):
set {_ilosc} to 3
if amount of mundane potion in {_p}'s inventory >= {_ilosc}:
loop all items in {_p}'s inventory where [input is mundane potion]:
if {_ilosc} < 1:
stop
delete loop-item
remove 1 from {_ilosc}
command /mundane:
trigger:
removeMundane(3,player)
wpisz komende mundane, wez sobie do eq rozne potki i kilka mundane
więc tak,
po 1 warunek "if player has 3 mundane potion" zastąp warunkiem:
if amount of mundane potion in player's inventory >= 3:
po 2: pętla wykona się 3 razy, a wraz z nią wszystko co w niej jest, czyli to co jest wytabowane w niej, zatem usuń po 1 tabie z każdej linijki poniżej "remove 1 from {_ilosc}"
...
masz odpowiedź
zaktualizuj do najnowszej wersji
nie wiem jaka wersja, ale pewnie 1.8.8 bo na screenie używasz chyba Blazingpacka, więc jeśli tak to na 1.8.8 użyj paperspigot
proszę bardzo
set {_ilosc} to 3
loop all items in player's inventory where [input is mundane potion]:
if {_ilosc} < 1:
stop
delete loop-item
remove 1 from {_ilosc}
tutaj gotowa funkcja:
function removeMundane(ilosc:integer,p:player):
set {_ilosc} to 3
if amount of mundane potion in {_p}'s inventory >= {_ilosc}:
loop all items in {_p}'s inventory where [input is mundane potion]:
if {_ilosc} < 1:
stop
delete loop-item
remove 1 from {_ilosc}