Unlike video games, TTRPGs need prompts. A generic script should list "Intended Actions" for the GM to reward.
When it comes to writing a generic roleplay game script, you'll need to choose a scripting language and toolset. Popular options include: generic roleplay gaem script
Before starting, have all players agree on: Unlike video games, TTRPGs need prompts
Using scripts to bypass the economy or combat mechanics often leads to a "Fail Roleplay" ( FRP ) environment, which can ruin the experience for other players. Legitimate Alternatives Unlike video games