Custom Scripting

Hello everyone, I would like to create a mod that allows me to write logs to disk of my private home server. There are already gaming logs but are not detailed, in practice they show up only when one kills or is killed or when tamato an animal. they do not see as what a person takes, do not see fish fishing. This mods might be useful for admins who want to organize events. Type a fishing competition etc …

Can anyone help me figure out how to do or whether there is some driving somewhere to do it and especially if is possible?

I would also like to create a script that inserts a simple dice roll / roll 50, for example, directly on the global chat. But I think it’s impossible if you do not know how to make scripts.

Thank you.