What I meant was that you'd need someone to write a script that would interpret the code in the note editor and substitute it for the regular damage formula. That would be a script in the Script Editor, and you'd need to find a script or script it yourself.
Provided that you have such a script, then the formula itself you could set inside the note.
All I'm saying is that it is possible to write a script which would allow the user to define the damage formula through the notebox; I do not know of any script which does so.