How Do I Input Scripts? + Buffs & Debuff's To User

I'm apprehensive to mess around with the script as my many other attempts to do so have turned out... unfortunate to say the least. First question, how do I input scripts? Specifically I'm trying to input one of Yanfly's message scripts, if that's worth mentioning. My second question is when a skill is used, how can I make it so it hits & deals damage to an enemy and also debuff's or buff's the user.

Yes I'm a noob, shut up.
1) you open the script editor, insert a new script slot below materials and above main, and copy/paste the script there. Don't forget to name the new script slot, that name is used in error messages and you will never get your game bugfree without being able to identify scripts


2) you can place the commands into the skills' damage formula.


Target the skill on the enemy for damage, but before the damage number of the formula place a a.add_state(id);damage...


(I haven't checked for exact syntax, search the forum for "damage formula" to find the topic where a lot of those commands are described.


3) If you're new, I suggest you follow the link in my signature
I think I understand, I'll give it a try, thanks. Not that I am actually new, but I'll still check the link out to refresh my memory. A lot of planning and no executing for a year doesn't keep the brain fresh.
Also, best to ask unrelated questions in separate threads. We have a forum JUST for script help, and another for help with non-script stuff. Each of your questions belongs in a different forum. Just helps us keep things organized, and ensures threads don't get closed when only half of your questions have been answered 🙂
My bad Shaz, I was having trouble figuring out how to even create a new topic. I'll make sure to do it in the future, thanks for the heads up.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-input-scripts-buffs-debuffs-to-user.24265/