This will answer both of your questions once you figure out how they work. This requires some kind of conditional script, the easiest way is by using booleans. Note that there are all kinds of conditions such as what journal entry or quest is active, if the PC has an item, is there a companion, and so on. Booleans are true or false statements that are fired throughout the game, they are automatically set to false when you create them.
To make a boolean requires generally two scripts and an entry into the globalcat.2da file for either K1 or TSL. All you have to do is write down the row number (the next consecutive number), the name of the boolean (what ever you want), and either Boolean or Number (you want boolean)for the third row in the 2da file. Make sure it is saved in the override folder. Here is an image of what you should have:
http://i.imagehost.org/0887/pic_10.png)
At that point you're ready for the scripts. The first one is to set a Boolean to true, if you want it false, just change the "TRUE" to "FALSE". The second script is to check to see what the statement equals, either true or false; like wise this can be changed as well.
For the conditional script you need to enter it in the dialog file in the field that says "Script that determinds if this node is available", the one that changes the boolean to True or False needs to go in the one above it.
void main() {
SetGlobalBoolean("statement name", TRUE);
}
int StartingConditional() {
int i = GetGlobalBoolean("statement name");
if (i == TRUE){
return TRUE;
}
return FALSE;
}