I've been working on a variation of the property baron script for the past several days and I've run into a snag. I am rather new to scripting. Back when I was playing X3 some years ago I went through the MSCI handbook but I didn't give scripting a real go until now with TC. I've figured out a good deal just from taking apart other peoples scripts and the scripts that came with the game but there are some things I just can't seem to figure out.
Primarily I would very much appreciate it if one of the scripting masters around here, you know who you are

What I'm trying to accomplish at the moment that has me stumped is I have laid out a script that makes it so you can contact a station manager making him an offer to buy his factory, the random price is chosen between the min and max price modified by another random fraction of that total as incentive to sell and the answer is delivered to the player screen via a message box that allows them to agree or decline. As for the station manager himself, since there are no pilots for a station I used the get random named based on the get race function and had it show in the appropriate places on the message box.
Now what I'm stumped with is how can I pass variable values from one script to another. The reply window called up via a question function needs to have both the station managers name and the credit total gathered from the first script. I've been messing around with using a global variable for the station manager's name but I think I might be misunderstanding how it works. I've use the set and get global variable functions and got it to kind of work at one point but it broke again when I attempted to set a second global variable (one to hold the total cost value). Eventually it got stuck with one value that it returned to all get global variable requests no matter what script I ran them from. I have no idea what that was about.
Finally, the last thing I'm trying to figure out is that I need to have the script hold the assigned random race name so that it doesn't change every time an inquiry is made. That part wasn't too hard as I simply checked to see if the variable that was holding the name had a value or not and made a new name only if it didn't. But much more complicated, so it seems, is to have it assign a name to each station independently. I'm ok with it not doing it forever but maybe for a set amount of time or, at the very least, keep the assigned name for the station until a new one in inquiried, then keep that one and so on and so forth.
Just to be clear-Example: player makes offer to station owner (via hotkey). a message comes back specifying that station manager "place name here" will sell for "total amount here". If the player declines and asks again, the total and name will remain the same. He then tries a different station and recieves a message from a station owner with a different name and total that remain constant until the next station is asked.
So, to summerize my questions (sorry this is so long winded), what method works best for passing variable values from one script to the next either directly or indirectly (i.e. hold the value until it's changed by another script)? What are global variables and arguments, what do they do, and how are they best used? And how can I have my script remember the names assigned to stations on a target by target basis or indefinitely?
Also do you it be a good idea for me to invest in some xml training to help me better understand X3TC scripting? The tutorials I've found thus far seem to focus very little on actual scripting.
Thanks in advance for the help.
