MZ Having troubles understand event priority script I found.

I have troubles with setting one "above characters" event above another similar one, and so I found
$gameMap.event(this._eventId)._priorityType = x
This script from this thread, while searching for the solution. Problem is that I don't really understand how to assign it to the event so it actually works, so help would be appreciated. What I tried to do was placing
$gameMap.event(this._eventId === 011)._priorityType = 4
This version of the script in the autorun event, but nothing happened, so I assume that's not how it works.
$gameMap.event(this._eventId)._priorityType = 4
$gameMap.event(11)._priorityType = 4

Pick one from above. They are both valid.
"This._eventId" refers to the event the script call is used in. You can not put an argument in it. If you want to call this script from a different event, try utunnel's second script.
Also, 011 is an octal number with a decimal value of 9. Don't put zeroes in front of your integers.

Original thread: https://forums.rpgmakerweb.com/threads/having-troubles-understand-event-priority-script-i-found.175358/