I can't think of a good way to handle having like 80,000 branches because of the different choices you can make. Just after choosing the starter, I already have three separate branches which would then branch out as more choices are presented. Is there any more reasonable way to do this? I'll do it this way if I have to, but an easier way that is just as effective would be nice.
Games don't have their game logic written in the same language as the program. Instead, the program executes a script in a higher level language that implements things like what happens when the player steps on a tile of a certain type, or defines battle mechanics. There may even be a third language on top that handles more specific stuff, like game events.
In the case of text adventures, there's usually only the program itself and a script that could look something like this:
start:
<print>
You're in a dark room.
do you know how to use function pointers? (there are also OOP alternatives)
a data-driven approach using functional dispatch can make for low-maintenance code
essentially, your program could be abstracted into a bunch of states (maybe depending on location or health) with transitions between the states (choices)
if you break it up like this, then you only need to write the engine once
I would just say that if you were to repeat a similar 'event' or 'branch' over and over, use a function or a class system to have the same affect but will repeat little.
Lua is mainly distributed as a library that you can link to your program. You can load scripts and run them or their functions and also pass parameters to them.
Python comes with a library that will make the program link with a dynamic library (the Python interpreter) at run time.
The process of including a second language in a program is called "embedding".
It's also possible for both Python and Lua to call C functions. This is called "extending".