Ho do I dynamically lvl comparison

First, if there is a thread that covers this already, I am apologize.

I'm trying to institute a level restriction on an item that can be used by different actors. So I need to write a line of code that dynamically compares the actor's level with a number, without hard coding the actor id.
What plugins are you using / at what point, and how, are you doing the check?
I'm using Yanfly's item restriction plugin. I was trying to put an Eval line in the item note box following the format for the plugin.

<Enable Restrictions>
Eval: $gameActors.actor.level >= 3
</Enable Restrictions>

I know programming, still new to javascript though. But I'm finding the available documentation for RMMV's javascript to be somewhat unclear. I am not against using another method to apply the restriction code.
This plugin? http://yanfly.moe/2017/05/12/yep-136-item-requirements-rpg-maker-mv/

If so, there's an example near the bottom of that page that should be able to be modified without much difficulty; try this:
Code:
<Custom Enable Requirement>
condition = battler.level >= 3;
</Custom Enable Requirement>
I think the individual Eval conditions are executed in the same context as the "custom" tags, so this alternative may also work:
Code:
<Enable Requirements>
Eval: battler.level >= 3
</Enable Requirements>
Ahhhhh....

Thanks so much!

So "battler" is not limited to combat.

Also I tried both and in this case it won't work with Eval. You have to do custom.

Again thanks for the help.
That's good to know. =)

Happy RPG Making! ^_^

Original thread: https://forums.rpgmakerweb.com/threads/ho-do-i-dynamically-lvl-comparison.95858/