How do i fix this itemcap?

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

Yushaa

Active Member
Oct 19, 2023
64
2
8
options:
pearl: 5
gaps: 64
exp: 192
delay: 20 #in ticks

on join:
while player is online:
amount of ender pearls in player's inventory > {@pearl}:
while amount of ender pearls in player's inventory > {@pearl}:
remove 1 ender pearl from player
chance of 25:
wait 1 tick
amount of golden apple in player's inventory > {@gaps}:
while amount of golden apple in player's inventory > {@gaps}:
remove 1 golden apple from player
chance of 25:
wait 1 tick
wait {@delay} ticks
amount of experience bottle in player's inventory > {@exp}:
while amount of experience bottle in player's inventory > {@exp}:
remove 1 experience bottle from player
chance of 25:
wait 1 tick
wait {@delay} ticks



The Golden apple part works but the exp and pearls dont :/
 
...I made part of this. It should work fine. That being said, you did some strange stuff with the delay and the organizing, so this should work.

AppleScript:
options:
pearl: 5
gaps: 64
exp: 192
delay: 20 #in ticks

on join:
    while player is online:
        amount of ender pearl in player's inventory > {@pearl}:
            while amount of ender pearl in player's inventory > {@pearl}:
                remove 1 ender pearl from player
                chance of 25:
                    wait 1 tick
        amount of golden apple in player's inventory > {@gaps}:
            while amount of golden apple in player's inventory > {@gaps}:
                remove 1 golden apple from player
                chance of 25:
                    wait 1 tick
        amount of experience bottle in player's inventory > {@exp}:
            while amount of experience bottle in player's inventory > {@exp}:
                remove 1 experience bottle from player
                chance of 25:
                    wait 1 tick
        wait {@delay} ticks

That being said, you can check the item you're holding using this command, just to make sure you have the name of the items right in the script.
AppleScript:
command checkitem:
    permission: *
    trigger:
        send player's tool