This is one of the scripts I was working with:
//Tested, NOT WORKING!!!
int StartingConditional()
{
int i = FALSE; //Always returns FALSE (Doesn't Show the Line)
//Unless told otherwise by the script below..
object oPC = GetPCSpeaker();
string sName = GetName(oPC);
int nLength = GetStringLength(sName);
int nVerified, nCount;
string sLetter;
int nBad = FALSE;
for(nCount=1;nCount<nTotal;nCount++)
{
sLetter = GetStringLeft(sName, nCount);
if(sLetter == "0") {nVerified = 2;}
else if(sLetter == "1") {nVerified = 2;}
else if(sLetter == "2") {nVerified = 2;}
else if(sLetter == "3") {nVerified = 2;}
else if(sLetter == "4") {nVerified = 2;}
else if(sLetter == "5") {nVerified = 2;}
else if(sLetter == "6") {nVerified = 2;}
else if(sLetter == "7") {nVerified = 2;}
else if(sLetter == "8") {nVerified = 2;}
else if(sLetter == "9") {nVerified = 2;}
else if(sLetter == "a") {nVerified = 2;}
else if(sLetter == "b") {nVerified = 2;}
else if(sLetter == "c") {nVerified = 2;}
else if(sLetter == "d") {nVerified = 2;}
else if(sLetter == "e") {nVerified = 2;}
else if(sLetter == "f") {nVerified = 2;}
else if(sLetter == "g") {nVerified = 2;}
else if(sLetter == "h") {nVerified = 2;}
else if(sLetter == "i") {nVerified = 2;}
else if(sLetter == "j") {nVerified = 2;}
else if(sLetter == "k") {nVerified = 2;}
else if(sLetter == "l") {nVerified = 2;}
else if(sLetter == "m") {nVerified = 2;}
else if(sLetter == "n") {nVerified = 2;}
else if(sLetter == "o") {nVerified = 2;}
else if(sLetter == "p") {nVerified = 2;}
else if(sLetter == "q") {nVerified = 2;}
else if(sLetter == "r") {nVerified = 2;}
else if(sLetter == "s") {nVerified = 2;}
else if(sLetter == "t") {nVerified = 2;}
else if(sLetter == "u") {nVerified = 2;}
else if(sLetter == "v") {nVerified = 2;}
else if(sLetter == "w") {nVerified = 2;}
else if(sLetter == "x") {nVerified = 2;}
else if(sLetter == "y") {nVerified = 2;}
else if(sLetter == "z") {nVerified = 2;}
else if(sLetter == "A") {nVerified = 2;}
else if(sLetter == "B") {nVerified = 2;}
else if(sLetter == "C") {nVerified = 2;}
else if(sLetter == "D") {nVerified = 2;}
else if(sLetter == "E") {nVerified = 2;}
else if(sLetter == "F") {nVerified = 2;}
else if(sLetter == "G") {nVerified = 2;}
else if(sLetter == "H") {nVerified = 2;}
else if(sLetter == "I") {nVerified = 2;}
else if(sLetter == "J") {nVerified = 2;}
else if(sLetter == "K") {nVerified = 2;}
else if(sLetter == "L") {nVerified = 2;}
else if(sLetter == "M") {nVerified = 2;}
else if(sLetter == "N") {nVerified = 2;}
else if(sLetter == "O") {nVerified = 2;}
else if(sLetter == "P") {nVerified = 2;}
else if(sLetter == "Q") {nVerified = 2;}
else if(sLetter == "R") {nVerified = 2;}
else if(sLetter == "S") {nVerified = 2;}
else if(sLetter == "T") {nVerified = 2;}
else if(sLetter == "U") {nVerified = 2;}
else if(sLetter == "V") {nVerified = 2;}
else if(sLetter == "W") {nVerified = 2;}
else if(sLetter == "X") {nVerified = 2;}
else if(sLetter == "Y") {nVerified = 2;}
else if(sLetter == "Z") {nVerified = 2;}
else if(sLetter == "!") {nVerified = 2;}
else if(sLetter == "@") {nVerified = 2;}
else if(sLetter == "#") {nVerified = 2;}
else if(sLetter == "$") {nVerified = 2;}
else if(sLetter == "%") {nVerified = 2;}
else if(sLetter == "^") {nVerified = 2;}
else if(sLetter == "&") {nVerified = 2;}
else if(sLetter == "*") {nVerified = 2;}
else if(sLetter == "(") {nVerified = 2;}
else if(sLetter == ")") {nVerified = 2;}
else if(sLetter == "-") {nVerified = 2;}
else if(sLetter == "_") {nVerified = 2;}
else if(sLetter == "=") {nVerified = 2;}
else if(sLetter == "+") {nVerified = 2;}
else if(sLetter == "[") {nVerified = 2;}
else if(sLetter == "{") {nVerified = 2;}
else if(sLetter == "]") {nVerified = 2;}
else if(sLetter == "}") {nVerified = 2;}
else if(sLetter == "|") {nVerified = 2;}
else if(sLetter == "\\") {nVerified = 2;}
else if(sLetter == ";") {nVerified = 2;}
else if(sLetter == ":") {nVerified = 2;}
else if(sLetter == "'") {nVerified = 2;}
else if(sLetter == ",") {nVerified = 2;}
else if(sLetter == "<") {nVerified = 2;}
else if(sLetter == ".") {nVerified = 2;}
else if(sLetter == ">") {nVerified = 2;}
else if(sLetter == "/") {nVerified = 2;}
else if(sLetter == "?") {nVerified = 2;}
//Double Check to ensure they letter IS being verified!
if(nVerified==2)
{
i = FALSE; //Not needed.
}
//If it's not verified then obviously the player has a bad character.
else
{
nBad = TRUE;
}
}
if(nBad==TRUE)
{
i = TRUE;
}
//Tell the conversation if the PC has a legal name or not.
return i;
}
Modifié par _Guile, 13 avril 2011 - 12:16 .