Scripted macros are divided into two types - macros bundled with the plugin, and custom macros which you write yourself.

See either:

For how-to questions please ask on Atlassian Answers where there is a very active community. Adaptavist staff are also likely to respond there.

Ask a question about ScriptRunner for JIRA, for for Bitbucket Server, or for Confluence.