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.

PantherBoy

Active Member
Jul 20, 2017
74
0
6
24
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
 
Then try switching it to
code_language.skript:
if player has 11 lapis lazuli
. If it still doesn't work you may need to try "11 of lapis lazuli" or check your aliases to make sure you're using the right item name.
 
Then try switching it to
code_language.skript:
if player has 11 lapis lazuli
. If it still doesn't work you may need to try "11 of lapis lazuli" or check your aliases to make sure you're using the right item name.
'if player' is not an entity type

i used lapis lazuli:
"give a lapis lazuli named "&1Mana" to the player"
and it's works
 
code_language.skript:
on join:
    while player is online:
        loop integers between 0 and 41:
            if slot loop-integer of player's inventory is lapis lazuli named "&1Mana":
                set {_pocet} to item amount of slot loop-integer of player's inventory
                add {_pocet} to {_fpocet}
        if {_fpocet} > 10:
            stop
        else:
            give lapis lazuli named "&1Mana" to player
        wait 1 second
 
code_language.skript:
on join:
    while player is online:
        loop integers between 0 and 41:
            if slot loop-integer of player's inventory is lapis lazuli named "&1Mana":
                set {_pocet} to item amount of slot loop-integer of player's inventory
                add {_pocet} to {_fpocet}
        if {_fpocet} > 10:
            stop
        else:
            give lapis lazuli named "&1Mana" to player
        wait 1 second
'player' is not an item stack (Wizardsk.sk, line 19: if slot loop-integer of player's inventory is lapis lazuli named "&1Mana":')
 
ah so its another addon
[doublepost=1500674770,1500674426][/doublepost]i think it can be one from this list: WildSkript/TuSke/SkQuery/ or Umbaska
 
Status
Not open for further replies.