If play has item in specific slot

  • 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!

Status
Not open for further replies.

Nailes

Member
Apr 10, 2019
20
0
0
Hello, i am trying to figure out how to make skript register if a player has a item in a specific slot, kinda like this:
Code:
command /plotmineset [<text>]:
    description: Gives a player a plotmine to set and removes one from their virtual nonset plotmines
    executable by: players
    permission: plotmine.set
    trigger:
        if slot 0 of player has a item:
            message "Fail"
        else if
            give stick named "&9Plotmine Opsætning" with lore "&7Kig i chatten for hjælp."
            message "Worked"
 
Hello, i am trying to figure out how to make skript register if a player has a item in a specific slot, kinda like this:
Code:
command /plotmineset [<text>]:
    description: Gives a player a plotmine to set and removes one from their virtual nonset plotmines
    executable by: players
    permission: plotmine.set
    trigger:
        if slot 0 of player has a item:
            message "Fail"
        else if
            give stick named "&9Plotmine Opsætning" with lore "&7Kig i chatten for hjælp."
            message "Worked"
Not tested, but try with:
code_language.skript:
command /plotmineset [<text>]:
    description: Gives a player a plotmine to set and removes one from their virtual nonset plotmines
    executable by: players
    permission: plotmine.set
    trigger:
        if slot 0 of player = air:
            message "Fail"
        else:
            give stick named "&9Plotmine Opsætning" with lore "&7Kig i chatten for hjælp."
            message "Worked"
 
It worked! Thanks, but when i on the next line write give player stick named "&9Plotmine Opsætning" with lore "&7Kig i chatten for hjælp."
The skript reloads with no errors but it gives me and internal problem when i execute the command.
 
It worked! Thanks, but when i on the next line write give player stick named "&9Plotmine Opsætning" with lore "&7Kig i chatten for hjælp."
The skript reloads with no errors but it gives me and internal problem when i execute the command.
Then use:
code_language.skript:
set {_stick} to stick named "&9Plotmine Opsætning"
set line 1 of lore of {_stick} to "&7Kig i chatten for hjælp."
give {_stick}
 
Skriver bare lidt kode, så hvis der skulle være nogle der ville starte en server. Så har jeg nogle ting :emoji_wink:
 
Status
Not open for further replies.