Hey. i want to make a grave skript but i get errors any time can anybody help me with this?
Here is my code:
on death:
set block at victim to victim's skull
set {grave.%block at victim%} to true
set {grave.owner.%block at victim%} to victim
setinv(victim)
on right click on any block:
if player is sneaking:
if {grave.%event-block%} is true:
if {grave.owner.%event-block%} is player:
set the helmet of player to {inv.%player%.helmet}
set the chestplate of player to {inv.%player%.chestplate}
set the leggings of player to {inv.%player%.leggings}
set the boots of player to {inv.%player%.boots}
set {_count} to 0
loop 36 times:
set slot {_count} of player's inventory to {inv.%player%.%{_count}%}
add 1 to {_count}
message "&7(&bGraves&7) &f- &7You picked up your grave"
else:
if player doesn't have permission "graves.get.other":
message "&7(&bGraves&7) &f- &7This is not your grave!"
else:
set the helmet of player to {inv.%{grave.owner.%event-block%}%.helmet}
set the chestplate of player to {inv.%{grave.owner.%event-block%}%.chestplate}
set the leggings of player to {inv.%{grave.owner.%event-block%}%.leggings}
set the boots of player to {inv.%{grave.owner.%event-block%}%.boots}
set {_count} to 0
loop 36 times:
set slot {_count} of player's inventory to {inv.%{grave.owner.%event-block%}%.%{_count}%}
add 1 to {_count}
message "&7(&bGraves&7) &f- &7You picked up &8%{grave.owner.%event-block%}%&7's grave"
function setinv(p: player):
set {_count} to 0
loop 36 times:
set {inv.%{_p}%.%{_count}%} to slot {_count} of {_p}'s inventory
add 1 to {_count}
set {inv.%{_p}%.helmet} to {_p}'s helmet
set {inv.%{_p}%.chestplate} to {_p}'s chestplate
set {inv.%{_p}%.leggings} to {_p}'s leggings
set {inv.%{_p}%.boots} to {_p}'s boots
on skript start:
loop all players:
if loop-player has permission "message.warn.see":
send "&7(&bGraves&7) &f- &7A grave can not be opened after a reload!" to loop-player
And the error:
can't understand this event: 'on right click on any block' (grave.sk, line 7: on right click on any block:')
Here is my code:
on death:
set block at victim to victim's skull
set {grave.%block at victim%} to true
set {grave.owner.%block at victim%} to victim
setinv(victim)
on right click on any block:
if player is sneaking:
if {grave.%event-block%} is true:
if {grave.owner.%event-block%} is player:
set the helmet of player to {inv.%player%.helmet}
set the chestplate of player to {inv.%player%.chestplate}
set the leggings of player to {inv.%player%.leggings}
set the boots of player to {inv.%player%.boots}
set {_count} to 0
loop 36 times:
set slot {_count} of player's inventory to {inv.%player%.%{_count}%}
add 1 to {_count}
message "&7(&bGraves&7) &f- &7You picked up your grave"
else:
if player doesn't have permission "graves.get.other":
message "&7(&bGraves&7) &f- &7This is not your grave!"
else:
set the helmet of player to {inv.%{grave.owner.%event-block%}%.helmet}
set the chestplate of player to {inv.%{grave.owner.%event-block%}%.chestplate}
set the leggings of player to {inv.%{grave.owner.%event-block%}%.leggings}
set the boots of player to {inv.%{grave.owner.%event-block%}%.boots}
set {_count} to 0
loop 36 times:
set slot {_count} of player's inventory to {inv.%{grave.owner.%event-block%}%.%{_count}%}
add 1 to {_count}
message "&7(&bGraves&7) &f- &7You picked up &8%{grave.owner.%event-block%}%&7's grave"
function setinv(p: player):
set {_count} to 0
loop 36 times:
set {inv.%{_p}%.%{_count}%} to slot {_count} of {_p}'s inventory
add 1 to {_count}
set {inv.%{_p}%.helmet} to {_p}'s helmet
set {inv.%{_p}%.chestplate} to {_p}'s chestplate
set {inv.%{_p}%.leggings} to {_p}'s leggings
set {inv.%{_p}%.boots} to {_p}'s boots
on skript start:
loop all players:
if loop-player has permission "message.warn.see":
send "&7(&bGraves&7) &f- &7A grave can not be opened after a reload!" to loop-player
And the error:
can't understand this event: 'on right click on any block' (grave.sk, line 7: on right click on any block:')