https://github.com/rathena/rathena/blob/master/doc/script_commands.txt
Search variables
Best thing to do is read up on that, then do some testing with things, I k ow your using a very old .txt based server (for whatever reason) so there are a few more limits to variables for you; max array size of 128, permanent account and character variables cannot be arrays.
If you have questions about a certain script your making just ask here via post or pm, or post on the rAthena discord chat for more instant advice.
Also https://rathena.org/wiki/Basic_Scriptingcheck this out as well under Conditions and Variables