There would be two steps to accomplishing this. Firstly, you'd want to have a script that sets a flag when the player looks at the goblin. For example, goblin.lookedAt = true or something like that.
Next, you'd want to change the room description from text to script, and have a script something similar to the following:
if (goblin.lookedAt = true) {
msg("There is a large anvil. Murray is hard at work.")
}
else {
msg("There is a large anvil with a goblin hard at work.")
}
Obviously you would need to change it to reflect the names of the objects in your game, but that should give you a good jumping off point. If you need more help with it, let us know.