im kind of new to skript but i dont get what is wrong with this skript.
options:
KeyType: TRIPWIREHOOK
KeyName: "&7&lUncommon kulcs"
keyLore: "&a&lJobb klikk a &7&lUncommon ládára"
on rightclick on chest:
if block under event-block is gold block:
cancel event
if player is holding {@KeyType} named {@KeyName} with lore {@KeyLore}:
set {_random} to a random integer from 1 to 100
if {_random} is between 1 and 50:
set {_item} to diamond block
if {_random} is between 51 and 80:
set {_item} to netherite block
if {_random} is between 81 and 100:
set {_item} to netherite sword
give player 1 of {_item}
send "&a&lKaptál egy %{_item}%"
play sound "BLOCK_CHEST_OPEN" at volume 100 and pitch 0.5 for player
remove 1 of {@KeyType} named {@KeyName} with lore {@KeyLore} from player's inventory
else:
send "&c&lNincs &7&lUncommon kulcsod!"
command /kulcs:
permission: op
trigger:
give player 1 {@KeyType} named {@KeyName} with lore {@KeyLore}
options:
KeyType: TRIPWIREHOOK
KeyName: "&7&lUncommon kulcs"
keyLore: "&a&lJobb klikk a &7&lUncommon ládára"
on rightclick on chest:
if block under event-block is gold block:
cancel event
if player is holding {@KeyType} named {@KeyName} with lore {@KeyLore}:
set {_random} to a random integer from 1 to 100
if {_random} is between 1 and 50:
set {_item} to diamond block
if {_random} is between 51 and 80:
set {_item} to netherite block
if {_random} is between 81 and 100:
set {_item} to netherite sword
give player 1 of {_item}
send "&a&lKaptál egy %{_item}%"
play sound "BLOCK_CHEST_OPEN" at volume 100 and pitch 0.5 for player
remove 1 of {@KeyType} named {@KeyName} with lore {@KeyLore} from player's inventory
else:
send "&c&lNincs &7&lUncommon kulcsod!"
command /kulcs:
permission: op
trigger:
give player 1 {@KeyType} named {@KeyName} with lore {@KeyLore}