#By Szokon
options:
item: Emerald named "&6Dany item" with lore "<akie tam"
on right click:
if player's tool is {@item}:
if {przyklad.%player%} is 0:
add 1 to {przyklad.%player%}
apply jump boost to player for 60 second
apply speed to player for 60 second
apply Resistance to player for 60 second
send "&3&lOtrzymales efekty. Twoja zmienna = 0. Dodano 1 do zmiennej."
else:
add 1 to {przyklad.%player%}
send "&c&lNie otrzymano efektów. Dodano do zmiennej 1. Aktualnie zmienna wynosi: &a&l%{przyklad.%player%}%."
command /dodaj [<player>]:
trigger:
if player has permission "daj.admin":
if arg 1 is set:
give {@item} to arg 1
send "&eOtrzymales specjanly item!" to the arg 1
else:
give {@item} to the player
send "&eOtrzymales specjalny item!" to the player
else:
send "&cNie masz uprawnień!"
command /devitem [<text>] [<player>]:
trigger:
if player has permission "devitem.admin":
if arg 1 is "wyzeruj":
set {przyklad.%arg 2%} to 0
send "&5Wyzerowano zmienną graczowi %arg 2%!" to the player
send "&5%player% wyzerowal Ci punkty!" to the arg 2
else if arg 1 is "dodaj":
add 1 to {przyklad.%arg 2%}
send "&5Dodano 1 do zmiennej graczowi %arg 2%!" to the player
send "&5%player% dodał Ci 1 do zmiennej!" to the arg 2
else if arg 1 is "zabierz":
add -1 to {przyklad.%arg 2%}
send "&5Odjęto 1 od zmiennej graczowi %arg 2%!" to the player
send "&5%player% odjął Ci 1 od zmiennej!" to the arg 2
command /sprawdz:
trigger:
if player has permission "sprawdz":
send "&7&lTwoja liczba zmiennych: &a&l%{przyklad.%player%}%"
every 30 minutes:
loop all players:
if {przyklad.%loop-player%} is bigger than 0:
add -1 to {przyklad.%loop-player%}
broadcast "&c&lMineło 30 minut. Odjęto każdemu 1 od zmiennej!"
Nie wiem czy o to chodziło. Dorobiłem jeszcze komendy "admina":
• /daj nick - daje ten item danemu graczowi,
• /devitem wyzeruj nick - zeruje danemu graczowi zmienną,
• /devitem dodaj nick - dodaje graczowi 1 do zmiennej,
• /devitem zabierz nick - zabiera 1 z zmiennej graczowi wpisanemu.