#Has Item problem

1 messages · Page 1 of 1 (latest)

pine girder
#

Okay, so I know i already have another ticket open but that's already solved here's another one and this has been my problem for about a month now. Haven't reported it, okay, let me explain...

If i get a normal pickaxe and put it in my other inventory slot then click the button, it works however that's not supposed to happen, i'm supposed to be holding it in my slot, then click the button, then get my pickaxe enchanted and what happens, it enchants nothing and takes my money.

#
  'wooden_pickaxe_enchanted':
    material: wooden_pickaxe
    slot: 11
    priority: 1
    update: true
    update_interval: 10
    display_name: '&e&lGOLD ENCHANTMENT'
    lore:
      - "&fTo obtain this enchantment there are"
      - "&ctwo requirements &fyou need."
      - "&f"
      - "&8➊ 100 coins"
      - "&8➋ Hold your Wooden Pickaxe"
      - "&f"
      - "&e(&l!&e) &f&nClick&r &7to obtain the enchantment"
    hide_enchantments: true 
    hide_attributes: true 
    hide_effects: true 
    hide_unbreakable: true 
    view_requirement:
      requirements:
        enchant:
          type: has item 
          material: wooden_pickaxe
          lore:
            - "Gold Digger"
          lore_contains: true 
    click_commands:
      - "[close]"
      - "[sound] ENTITY_VILLAGER_NO"
      - "[message] &e&lLORD OF GOLD &e⊵ &fYou &cdid not &fmeet the requirements for &cWooden Pickaxe&f."  ```
#
  'wooden_pickaxe':
    material: wooden_pickaxe
    slot: 11
    priority: 2
    update: true
    update_interval: 10
    display_name: '&e&lGOLD ENCHANTMENT'
    lore:
      - "&fTo obtain this enchantment there are"
      - "&ctwo requirements &fyou need."
      - "&f"
      - "&8➊ 100 coins"
      - "&8➋ Hold your Wooden Pickaxe"
      - "&f"
      - "&e(&l!&e) &f&nClick&r &7to obtain the enchantment"
    hide_enchantments: true 
    hide_attributes: true 
    hide_effects: true 
    hide_unbreakable: true 
    click_requirement:
      minimum_requirements: 2
      stop_at_success: true 
      deny_commands:
        - "[close]"
        - "[sound] ENTITY_VILLAGER_NO"
        - "[message] &e&lLORD OF GOLD &e⊵ &fYou &cdid not &fmeet the requirements for &cWooden Pickaxe&f."
      requirements:
        coins:
          type: has money 
          amount: 100
        wooden_pickaxe:
          type: has item 
          material: wooden_pickaxe
    click_commands:
      - "[close]"
      - "[console] cmi money take %player_name% 1000" 
      - "[sound] ENTITY_FIREWORK_ROCKET_TWINKLE" 
      - "[message] &e&lLORD OF GOLD &e⊵ &aThank you for your purchase&f, well then start mining, see what happens."
      - "[console] gold enchant %player_name% TokenMiner"```
idle sonnet
#

it checks if you have it in your inventory

pine girder
#

Oh how do I solve that?

#

Also for some reason i can enchant my pickaxe 2x when it already has this

          lore:
            - "Gold Digger"
          lore_contains: true ```
idle sonnet
pine girder
#

Do i do it for both?

idle sonnet
pine girder
#

Uh now its saying I dont meet the requirements

#
  'wooden_pickaxe_enchanted':
    material: wooden_pickaxe
    slot: 11
    priority: 1
    update: true
    update_interval: 10
    display_name: '&e&lGOLD ENCHANTMENT'
    lore:
      - "&fTo obtain this enchantment there are"
      - "&ctwo requirements &fyou need."
      - "&f"
      - "&8➊ 100 coins"
      - "&8➋ Hold your Wooden Pickaxe"
      - "&f"
      - "&e(&l!&e) &f&nClick&r &7to obtain the enchantment"
    hide_enchantments: true 
    hide_attributes: true 
    hide_effects: true 
    hide_unbreakable: true 
    view_requirement:
      requirements:
        enchant:
          type: 'string equals ignorecase' 
          input: '%player_item_in_hand%'
          output: 'wooden_pickaxe'
          lore:
            - "Gold Digger"
          lore_contains: true 
    click_commands:
      - "[close]"
      - "[sound] ENTITY_VILLAGER_NO"
      - "[message] &e&lLORD OF GOLD &e⊵ &fYou &cdid not &fmeet the requirements for &cWooden Pickaxe&f."```
#
  'wooden_pickaxe':
    material: wooden_pickaxe
    slot: 11
    priority: 2
    update: true
    update_interval: 10
    display_name: '&e&lGOLD ENCHANTMENT'
    lore:
      - "&fTo obtain this enchantment there are"
      - "&ctwo requirements &fyou need."
      - "&f"
      - "&8➊ 100 coins"
      - "&8➋ Hold your Wooden Pickaxe"
      - "&f"
      - "&e(&l!&e) &f&nClick&r &7to obtain the enchantment"
    hide_enchantments: true 
    hide_attributes: true 
    hide_effects: true 
    hide_unbreakable: true 
    click_requirement:
      minimum_requirements: 2
      stop_at_success: true 
      deny_commands:
        - "[close]"
        - "[sound] ENTITY_VILLAGER_NO"
        - "[message] &e&lLORD OF GOLD &e⊵ &fYou &cdid not &fmeet the requirements for &cWooden Pickaxe&f."
      requirements:
        coins:
          type: has money 
          amount: 100
        wooden_pickaxe:
          type: 'string equals ignorecase' 
          input: '%player_item_in_hand%'
          output: 'wooden_pickaxe'
    click_commands:
      - "[close]"
      - "[console] cmi money take %player_name% 1000" 
      - "[sound] ENTITY_FIREWORK_ROCKET_TWINKLE" 
      - "[message] &e&lLORD OF GOLD &e⊵ &aThank you for your purchase&f, well then start mining, see what happens."
      - "[console] gold enchant %player_name% TokenMiner"```
brave nebula
idle sonnet
brave nebula
#

Exactly

pine girder
#

Im using a normal wooden pickaxe not enchanted

idle sonnet
pine girder
#

it says wooden_pickaxe in all caps the bots not letting me type it lol

#

ig im changing it to caps

brave nebula
#

You dont need minimum requirements and stop at success though

#

You have only 2 mandatory requirements

idle sonnet
#

yeah. those are useless in this siutation

#

and you shouldn't have to use upper case in the requirement as the requirement type is string equals ignorecase

#

so it should ignore the case

pine girder
brave nebula
#

use uppercase

pine girder
#
  'wooden_pickaxe_enchanted':
    material: wooden_pickaxe
    slot: 11
    priority: 1
    update: true
    update_interval: 10
    display_name: '&e&lGOLD ENCHANTMENT'
    lore:
      - "&fTo obtain this enchantment there are"
      - "&ctwo requirements &fyou need."
      - "&f"
      - "&8➊ 100 coins"
      - "&8➋ Hold your Wooden Pickaxe"
      - "&f"
      - "&e(&l!&e) &f&nClick&r &7to obtain the enchantment"
    hide_enchantments: true 
    hide_attributes: true 
    hide_effects: true 
    hide_unbreakable: true 
    view_requirement:
      requirements:
        enchant:
          type: 'string equals ignorecase' 
          input: '%player_item_in_hand%'
          output: 'WOODEN_PICKAXE'
          lore:
            - "Gold Digger"
          lore_contains: true 
    click_commands:
      - "[close]"
      - "[sound] ENTITY_VILLAGER_NO"
      - "[message] &e&lLORD OF GOLD &e⊵ &fYou &cdid not &fmeet the requirements for &cWooden Pickaxe&f."  ```
#
  'wooden_pickaxe':
    material: wooden_pickaxe
    slot: 11
    priority: 2
    update: true
    update_interval: 10
    display_name: '&e&lGOLD ENCHANTMENT'
    lore:
      - "&fTo obtain this enchantment there are"
      - "&ctwo requirements &fyou need."
      - "&f"
      - "&8➊ 100 coins"
      - "&8➋ Hold your Wooden Pickaxe"
      - "&f"
      - "&e(&l!&e) &f&nClick&r &7to obtain the enchantment"
    hide_enchantments: true 
    hide_attributes: true 
    hide_effects: true 
    hide_unbreakable: true 
    click_requirement: 
      deny_commands:
        - "[close]"
        - "[sound] ENTITY_VILLAGER_NO"
        - "[message] &e&lLORD OF GOLD &e⊵ &fYou &cdid not &fmeet the requirements for &cWooden Pickaxe&f."
      requirements:
        coins:
          type: has money 
          amount: 100
        wooden_pickaxe:
          type: 'string equals ignorecase' 
          input: '%player_item_in_hand%'
          output: 'WOODEN_PICKAXE'
    click_commands:
      - "[close]"
      - "[console] cmi money take %player_name% 1000" 
      - "[sound] ENTITY_FIREWORK_ROCKET_TWINKLE" 
      - "[message] &e&lLORD OF GOLD &e⊵ &aThank you for your purchase&f, well then start mining, see what happens."
      - "[console] gold enchant %player_name% TokenMiner"```
#

These are the new changes and it says I dont meet the requirements

idle sonnet
#
    view_requirement:
      requirements:
        enchant:
          type: '!string equals ignorecase' ```
#

put the exclamation mark there

#

not for the click requirement tho

pine girder
#

now the problem is the lore it doesnt seem to verify the enchant because i can still click the button again and it waste my money

#

Whenever it gets enchanted my pickaxe gets a Gold Digger lore with the &7 should I add that?

#

when it gets enchanted twice my enchanter plugin (TokenEnchant) makes the lore Gold Digger II even though it says in chat that I already maxed the enchantment

idle sonnet
pine girder
#

Should I put another requirement for that?

#

Do I add the minimum requirements to it?

idle sonnet
#

yes and no

#

tokenenchant has placeholders

pine girder
#

How do I do it? Since the lore thing needs has item and has item needs item to it if i make another requirement?

idle sonnet
pine girder
#

%tokenenchant_XXX_level% this?

idle sonnet
#

so you add an extra click requirement

pine girder
#

Is that another JavaScript requirement? My stupid brain cant reproduce what you're saying

#

idk how to do it lol

idle sonnet
# pine girder idk how to do it lol
      requirements:
        coins:
          type: has money 
          amount: 100
        wooden_pickaxe:
          type: 'string equals ignorecase' 
          input: '%player_item_in_hand%'
          output: 'WOODEN_PICKAXE'
        not_enchanted:
          type: '<'
          input: '%tokenenchant_<enchantment>_level%'
          output: '1'
#

you change <enchantment> with the enchantment name

pine girder
#

Ah so I remove these lines now?

          lore:
            - "Gold Digger"
          lore_contains: true ```
#

omg

#

everything is working now

#

you solved my 1 month problem in just a few minutes

#

okay time to kill myself