Instead of jumping into commands that you don't have any idea about,
I suggest that you download a script from "Scripts Showroom" and try and modify it.
Scripts take much time and effort to create and not many people are willing to give them away.
Plus, RPG scripts are rare.