Oh man. How does that work? I was thinking about giving variables to every room and assigning values to them, and those variables would be items or people or bits of string that contain the story. For example, the "inspect" button would echo out "The surrounds are dim and gloomy." And the "take items" button would be "You take $string and $paper." And the attack button would check if the value of the npc in the area was 1 or 0, 1 for alive and 0 for dead, and would be like if $life = 1 then echo "You attack the dogs, and they run away." If 0, then "You don't see anyone to attack!". And if $life was still 1, then it would echo "You can't move in any direction, you are trapped here!".
Also, do you guys have any idea on how you can have the player variable or something contain variables within itself? Like items, etc. Like, maybe contain $string, and the value of $string would be either "working" or "broken". Wow ok, this went really detailed, but its pretty specific, could you respond to these things? Thanks!