Przy sprawdzaniu ilosci itow u gracza czesto pokazuje ze nie ma przedmiotow chociaz je ma
command /powieksz:
trigger:
if player have 64 iron ingot and 32 gold ingot:
if {Cub::PoziomTerenu::%player%} is "Brak":
remove 64 iron ingot and 32 gold ingot from player
"%player%".Region.setSize{15}
set {Cub::PoziomTerenu::%player%} to "Poziom 1"
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if player have 32 iron block and 64 gold ingot:
if {Cub::PoziomTerenu::%player%} is "Poziom 1":
remove 32 iron block and 64 gold ingot from player
"%player%".Region.setSize{20}
set {Cub::PoziomTerenu::%player%} to "Poziom 2"
stop
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if player have 48 iron block and 80 gold ingot:
if {Cub::PoziomTerenu::%player%} is "Poziom 2":
remove 48 iron block and 80 gold ingot from player
"%player%".Region.setSize{25}
set {Cub::PoziomTerenu::%player%} to "Poziom 3"
stop
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if player have 64 iron block and 120 gold ingot:
if {Cub::PoziomTerenu::%player%} is "Poziom 3":
remove 64 iron block and 120 gold ingot from player
"%player%".Region.setSize{30}
set {Cub::PoziomTerenu::%player%} to "Poziom 4"
stop
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if player have 144 iron block and 32 diamond:
if {Cub::PoziomTerenu::%player%} is "Poziom 4":
remove 144 iron block and 32 diamond from player
"%player%".Region.setSize{35}
set {Cub::PoziomTerenu::%player%} to "Poziom 5"
stop
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if player have 144 gold block and 64 diamond:
if {Cub::PoziomTerenu::%player%} is "Poziom 5":
remove 144 gold block and 64 diamond from player
"%player%".Region.setSize{40}
set {Cub::PoziomTerenu::%player%} to "Poziom 6"
stop
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if player have 220 gold block and 144 diamond:
if {Cub::PoziomTerenu::%player%} is "Poziom 6":
remove 220 gold block and 144 diamond from player
"%player%".Region.setSize{45}
set {Cub::PoziomTerenu::%player%} to "Poziom 7"
stop
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if player have 440 gold block and 64 emerald:
if {Cub::PoziomTerenu::%player%} is "Poziom 7":
remove 440 gold block and 64 emerald from player
"%player%".Region.setSize{50}
set {Cub::PoziomTerenu::%player%} to "Poziom 8"
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if player have 256 diamond block and 144 emerald:
if {Cub::PoziomTerenu::%player%} is "Poziom 8":
remove 256 diamond block and 144 emerald from player
"%player%".Region.setSize{55}
set {Cub::PoziomTerenu::%player%} to "Poziom 9"
stop
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if player have 768 diamond block and 256 emerald:
if {Cub::PoziomTerenu::%player%} is "Poziom 9":
remove 768 diamond block and 256 emerald from player
"%player%".Region.setSize{65}
set {Cub::PoziomTerenu::%player%} to "Poziom 10"
stop
else:
send "{@PrefixDzialki} {@BrakItowNaUlepszenie}"
stop
if {Cub::PoziomTerenu::%player%} is "Poziom 10":
stop
Probowalem na 3 sposoby: taki jak wyzej oraz podwojny warunek sprawdzania i if player has item at inventory
Pytanie
Cinu2421 22
Witam
Przy sprawdzaniu ilosci itow u gracza czesto pokazuje ze nie ma przedmiotow chociaz je ma
command /powieksz: trigger: if player have 64 iron ingot and 32 gold ingot: if {Cub::PoziomTerenu::%player%} is "Brak": remove 64 iron ingot and 32 gold ingot from player "%player%".Region.setSize{15} set {Cub::PoziomTerenu::%player%} to "Poziom 1" else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if player have 32 iron block and 64 gold ingot: if {Cub::PoziomTerenu::%player%} is "Poziom 1": remove 32 iron block and 64 gold ingot from player "%player%".Region.setSize{20} set {Cub::PoziomTerenu::%player%} to "Poziom 2" stop else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if player have 48 iron block and 80 gold ingot: if {Cub::PoziomTerenu::%player%} is "Poziom 2": remove 48 iron block and 80 gold ingot from player "%player%".Region.setSize{25} set {Cub::PoziomTerenu::%player%} to "Poziom 3" stop else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if player have 64 iron block and 120 gold ingot: if {Cub::PoziomTerenu::%player%} is "Poziom 3": remove 64 iron block and 120 gold ingot from player "%player%".Region.setSize{30} set {Cub::PoziomTerenu::%player%} to "Poziom 4" stop else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if player have 144 iron block and 32 diamond: if {Cub::PoziomTerenu::%player%} is "Poziom 4": remove 144 iron block and 32 diamond from player "%player%".Region.setSize{35} set {Cub::PoziomTerenu::%player%} to "Poziom 5" stop else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if player have 144 gold block and 64 diamond: if {Cub::PoziomTerenu::%player%} is "Poziom 5": remove 144 gold block and 64 diamond from player "%player%".Region.setSize{40} set {Cub::PoziomTerenu::%player%} to "Poziom 6" stop else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if player have 220 gold block and 144 diamond: if {Cub::PoziomTerenu::%player%} is "Poziom 6": remove 220 gold block and 144 diamond from player "%player%".Region.setSize{45} set {Cub::PoziomTerenu::%player%} to "Poziom 7" stop else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if player have 440 gold block and 64 emerald: if {Cub::PoziomTerenu::%player%} is "Poziom 7": remove 440 gold block and 64 emerald from player "%player%".Region.setSize{50} set {Cub::PoziomTerenu::%player%} to "Poziom 8" else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if player have 256 diamond block and 144 emerald: if {Cub::PoziomTerenu::%player%} is "Poziom 8": remove 256 diamond block and 144 emerald from player "%player%".Region.setSize{55} set {Cub::PoziomTerenu::%player%} to "Poziom 9" stop else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if player have 768 diamond block and 256 emerald: if {Cub::PoziomTerenu::%player%} is "Poziom 9": remove 768 diamond block and 256 emerald from player "%player%".Region.setSize{65} set {Cub::PoziomTerenu::%player%} to "Poziom 10" stop else: send "{@PrefixDzialki} {@BrakItowNaUlepszenie}" stop if {Cub::PoziomTerenu::%player%} is "Poziom 10": stopProbowalem na 3 sposoby: taki jak wyzej oraz podwojny warunek sprawdzania i if player has item at inventory
Edytowane przez Cinu2421Odnośnik do komentarza
https://skript.pl/temat/36344-blad-przy-sprawdzaniu-ilosci-przedmiotow/Udostępnij na innych stronach
1 odpowiedź 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ą.