If player have less than x 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 comminuty!

    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.
Skript Version: 2.1.2
Minecraft Version: 1.8.8

---
Full Code:
variables:
{fire.%player%} = 0
{water.%player%} = 0
{dirt.%player%} = 0
{air.%player%} = 0
on first join:
give a blaze rod named "&5Varázspálca" to the player
give a redstone named "&4Tűz esszencia" to the player
give a clay named "&9Víz esszencia" to the player
give a cocoa beans named "&8Föld esszencia" to the player
give a nether quartz named "&7Levegő esszencia" to the player
give a lapis lazuli named "&1Mana" to the player
on player drop:
cancel event
every second:
if player has less than 11 lapis lazuli:
give a lapis lazuli named "&1Mana" to the player

Bad part of the code:
if player has less than 11 lapis lazuli:

Console Errors:

'less than 11 lapis lazuli' is not an item type (Wizardsk.sk, line 16: if player has less than 11 lapis lazuli:')

I tried these too:
if player's inventory does not contain 11 lapis lazuli:
if amount of lapis lazuli in player's inventory is less than 11:

Console error:
'lapis lazuli in player' is not an item stack
'player's inventory does not' is not an entity type
You cant use player in a periodical event (every second)
try a loop
code_language.skript:
loop 10000 times:
    wait 1 second
    and the code
 
You cant use player in a periodical event (every second)
try a loop
code_language.skript:
loop 10000 times:
    wait 1 second
    and the code
don't works, the same error
[doublepost=1500748170,1500748122][/doublepost]
Server version? These are for 1.12
i found one for 1.8, it don't want to work
[doublepost=1500748608][/doublepost]I'll try to make it another way, thanks for the help
 
Status
Not open for further replies.