How to import a script that's a text file?

Hello, so I've been working through the beginner tutorials on the rpgmaker website and I'm at a section regarding scripts. The script is suppose to allow me to damage a target during combat while it applies a buff/debuff to the user of the skill. I downloaded the script but it's in a text file format. I looked in the plugins folder and everything is in a .js format. How do I properly import this custom script into my game? Do I just change the file extension from .txt to .js and move it into the folder? Thank you.
From where did you get the script? Most of the time if the page you got the script from doesn't have a download link then it sometimes tells you to use right click and save as and it saves the script/plugin as a .js file.
What beginner tutorials are you talking about?  The only one I'm aware of that requires you to download a script is for Ace, and I think the script IS one related to battle skills, and was written by Jet.  If that's the one you mean, it won't work in MV anyway, because it's an RGSS3 script for Ace, not a javascript plugin for MV.


Are you actually using MV or Ace?  You posted in the MV forum, but you don't state in your profile what engine you're using, and you didn't state it in your post either.
Dont know shaz rgss 3 and js differ 


From each other so the user has to state what he or she uses in their  profile of course I can Be Of Assistance Since i Create Web pages tata
@carpg123 All scripts and plugins are text files, they just have a different ending to indicated that they are text files of program code.


But exactly because they're program code you need the ending to be the correct one for the code used - js for example stands for javascript, rb for Ruby.


If you downloaded a plugin in textform, then yes you only rename it with js and move it to the plugin folder. But that won't work if you downloaded an RGSS Script.


Can you give us a link to the script you're talking about? then we could help you better.
My apologies for the ambiguity in my original post. I shall clarify:


I am following these set of tutorials:


https://www.rpgmakerweb.com/support/products/tutorials


I am using MV and I am aware they are for VX Ace, but so far everything has been going well, just making small adjustments and such. I am on tutorial 3.5 and it requires me to download a script by Jet - called SelfEffects which allows me to apply effects to the user of a skill while damaging the enemy target.


I downloaded the script and it's a text file. From the previous responses I am getting the sense it is not compatible with MV because it is written in a different language. Is there any way to convert it? I'm guessing no and that I have to find a script that does the same thing but written in javascript instead...
no, you can't convert it - and you don't have to, because the community developed a better way to handle that. So that tutorial is outdated even for Ace.


Search for topics about the damage formula - you can add commands there to have almost any effect you want as long as you can write it as either RGSS3 (RMVXA) or javascript (RMMV), and those topics list the commands for the most commonly needed special effects in the damage formula.


EDIT: I've now included the links to both topics for damage formulae in the starting point, and warned about the script in tutorial 3.5
Okay cool, I looked through those links and I am using this: https://rpgmakermv.co/threads/damage-formulas-101-mv-edition.2172/ to figure out how to write damage formulas that apply buffs/debuffs to the user.


Let's say I have a skill that does damage and then buffs the user's Attack for 3 turns, would this work:


a.addBuff(2, 3); 100 + a.atk - b.def


or would this be correct since I want the buff to occur after the skill deals damage:


100 + a.atk - b.def; a.addBuff(2, 3)


Thanks.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-import-a-script-thats-a-text-file.59298/