Jump and give item

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

lordmanu

Member
Apr 25, 2022
21
1
3
hello i would need a skript that would allow players to receive a certain ite every time they jump over a pressure plate. i would like to develop it like this: Basically, I place a pressure plate dopra a block, and every time a player jumps over it he will be given 1 lapis. help plss, thx
 
code_language.skript:
command pressureplate <itemtype>:
    trigger:
        set {_item} to wooden pressure plate
        set tag "item" of nbt compound of {_item} to arg-1
        give player 1 of {_item}
       
on place:
    set {_nbt} to tag "item" of nbt compound of event-item
    set tag "custom;int" of nbt compound of event-block to {_nbt}
   
on step on wooden pressure plate:
    set {_item} to tag "custom;item" of nbt compound of event-block
    drop 1 of {_item} at event-block
if you do "/pressureplate lapis lazuli", you will get a wooden pressure plate that if you place and step on, it will drop a lapis lazuli.
you can change the type of pressure plate to stone or something, and do "/pressureplate iron ingot" it will drop an iron ingot.
 
thx but, it gives me 4 error:
'nbt compoun' is not a number (luckyb.sk, line 443: set tag "item" of nbt compound of {_item} to arg-1')
'nbt compoun' is not a number (luckyb.sk, line 447: set {_nbt} to tag "item" of nbt compound of event-item')
'nbt compoun' is not a number (luckyb.sk, line 448: set tag "custom;int" of nbt compound of event-block to {_nbt}')
'nbt compoun' is not a number (luckyb.sk, line 451: set {_item} to tag "custom;item" of nbt compound of event-block')

i have 1.8.9 minecraft server