Make item bad after many uses [SOLVED]

Started by TZO_Ghoul on

Topic category: Help with MCreator software

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make item bad after many uses [SOLVED]
Fri, 08/16/2024 - 09:06 (edited)

I want to make an item that wont break but if used (right clicked) too much in a certain amount of time, like if used more then 4 times in a minute will give a debuff instead of buff. or maybe only gives me 1 use per minute and the debuff comes after the buff runs out, but i still want the item to be unbreakable, if anyone knows how to do this please help me out

Edited by TZO_Ghoul on Fri, 08/16/2024 - 09:06
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could create these…
Fri, 12/13/2019 - 22:09

You could create these procedures:

(A and B are random variable names, you could use different ones)

 

On item right-clicked

 

If (get itemstack variable A) <4

 - Add effect to provided entity: [buff]

- Set itemstack variable a to (get itemstack variable A) + 1

else: Add effect to provided entity: [debuff]

 

 

On item in inventory tick

 

If (get itemstack variable A) > 0

 - Set itemstack variable B to (get itemstack variable B) + 1

 - If (get itemstack variable B) > 1200

 - - Set itemstack variable A to 0

 - - Set itemstack variable B to 0

 

 

I'm not sure if does it work. It might also cause a lot of lag

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you for this
Fri, 03/20/2020 - 23:07

thank you for this