Make item bad after many uses

Started by TZO_Ghoul on

Topic category: Help with MCreator software

Last seen on 22:41, 17. Apr 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make item bad after many uses
Fri, 10/02/2020 - 09:27 (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, 10/02/2020 - 09:27
Last seen on 17:49, 25. Mar 2021
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

Last seen on 22:41, 17. Apr 2024
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