#Making an enchant limiter, using function

1 messages · Page 1 of 1 (latest)

sterile panther
#

Im making a function that with a value i can set the maximum amont of level that an enchant can have, I had something
function EnchantLimiter( limit: number, enchant: text): set {_maximum} to {_limit} add 1 to {_maximum} loop all players: loop all items in loop-player's inventory: if loop-item is enchanted with {_enchant} > {_maximum}: enchant loop-item with {_enchant} {_limit}
and this in my loop
EnchantLimiter({MaxAqua_Affinity}, aqua affinity)

could someone reformat or directly have a new way of achieving this function

sterile panther
#

Making an enchant limiter, using function

placid narwhal
#

the enchant arg should be enchantment or enchantment type, not text

#

and you could check if level of {_enchant} of loop item > number

sterile panther
#

would it work ?