Post by lanessar on Apr 25, 2006 23:41:33 GMT
Here's the Config file:
const int USING_NWNX_DB = TRUE;//Set this to TRUE if you are using NWNX/APS persistence ints. Leave
//it set to FALSE otherwise, or if you are unsure what this means. The persistence ints in these scripts
//use the default APS database and columns, so if you did not customize your MySQL/MySQLite database they are
//ready to use. Please note that the aps_include file in this scriptset is the Windows version,
//and therefore includes support for SCO/RCO. Linux systems can use the include but will be unable to
//use persistent object commands (they will also need the Linux so to replace the dll, of course).
const int TEXT_LOGGING_ENABLED = FALSE;//Set to TRUE to send all messages to the text log.
const int SPAMBLOCK_ENABLED = TRUE;//Set this to FALSE to turn off spam blocker. It is intended to
//stop advertising of other servers on yours.
const string EMOTE_SYMBOL = "^";//Set this to whatever single character you want players to access the emotes
//with. It is recommended that you select only a normally unused symbol, because any line beginning with this
//symbol will be seen by the system as an attempted emote, and suppressed accordingly (with an 'invalid emote'
//warning if they aren't among the listed emotes). ONLY A SINGLE CHARACTER MAY BE USED. Do not choose the
//forward slash (/), or metachannels and languages will not work. You may simply choose to use the default
//asterisk symbol, if you prefer. If you select a symbol other than the asterisk, the list commands and list
//emotes functions will display the correct symbol automatically, but you will have to change the descriptions
//of the 2 items to reflect the change, if you plan to use them and want them to be accurate.
const string COMMAND_SYMBOL = "%";//Set this to whatever single character you want players to access the
//commands with. It is recommended that you select only a normally unused symbol, because any line beginning
//with this symbol will be seen by the system as an attempted emote, and suppressed accordingly (with an
//'invalid emote' warning if they aren't among the listed emotes). ONLY A SINGLE CHARACTER MAY BE USED. YOU
//MUST PICK A DIFFERENT SYMBOL THAN THE ONE YOU CHOOSE FOR EMOTES, OR THE COMMANDS WILL NOT WORK. Do not
//choose the forward slash (/), or metachannels will not work. You may simply choose to use the default
//exclamation mark symbol, if you prefer. If you select a symbol other than the asterisk, the list commands
//and list emotes functions will display the correct symbol automatically, but you will have to change the
//descriptions of the 2 item to reflect the change, if you plan to use them and want them to be accurate.
const int ENABLE_WEAPON_VISUALS = FALSE;//Set this to TRUE to allow players to change the vfx on their weapons
//via the !wp commands.
const int ENABLE_METALANGUAGE_CONVERSION = TRUE;//Set this to FALSE to stop common metagame chat like 'lol'
//from being converted to emotes like *Laughs out loud* when spoken in the talk channel. Currently only 'lol'
//is converted, more will be added.
///////////////////////////////Listening Options////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
//DM Listening//////////////////////////////////////////////////////////////////
const int DMS_HEAR_TELLS = FALSE;//Set this to TRUE if you want people listed in the VerifyDMKey function
//who are logged in as DMs to receive all player tell messages.
//
const int DM_PLAYERS_HEAR_TELLS = FALSE;//Set this to TRUE if you want people listed in the VerifyDMKey
//function who are logged in as players to receive all player tell messages in their combat logs. It will
//NOT route tells to people logged in as DMs, so you should use both this and the above command if you
//want both. Neither of the above commands will route tells from DMs.
//
const int DM_PLAYERS_HEAR_DM = TRUE;//Set this to TRUE if you want people listed in the VerifyDMKey
//function who are logged in as players to receive all DM messages in their combat logs. This will route
//DM messages to anyone with a cdkey you list below, if they are logged as a player. It will route DM
//messages from both players and DMs. People listed in the VerifyDMKey function who are logged as players
//will have the option to ignore these messages if this option is enabled, via the dm_ignoredm command.
//
//Admin Listening///////////////////////////////////////////////////////////////
const int ADMIN_DMS_HEAR_TELLS = TRUE;//Set this to TRUE if you want people listed in the VerifyAdminKey
//function who are logged in as DMs to receive all player tell messages.
//
const int ADMIN_PLAYERS_HEAR_TELLS = TRUE;//Set this to TRUE if you want people listed in the VerifyAdminKey
//function who are logged in as players to receive all tell messages in their combat logs. It will NOT route
//tells to people logged in as DMs, so you should use both this and the above command if you want both.
//Neither of the above commands will route tells from DMs.
//
const int ADMIN_PLAYERS_HEAR_DM = TRUE;//Set this to TRUE if you want administrators logged in as players
//to receive all DM messages in their combat logs. This will route DM messages to anyone with a cdkey you
//list below in the VerifyAdminKey function, if they are logged as a player. It will route DM messages from
//both players and DMs. DMs logged as players will have the option to ignore these messages if this option
//is enabled, via the dm_ignoredm command.
//
//General Listening/////////////////////////////////////////////////////////////
const int ENABLE_DM_TELL_ROUTING = TRUE;//Set this to TRUE if you want tells from the DM tell channel
//routed as well as tells from the player channel. This is dependant on what channel is used, and not on
//player/dm/admin status.
//
const int DM_TELLS_ROUTED_ONLY_TO_ADMINS = TRUE;//Set this to TRUE if you want DM tells routed to
//administrators (people with cd keys listed in the VerifyAdminKey function) but not to DMs (people with
//cd keys listed in the VerifyAdminKey function. You should leave the above function set to FALSE if you
//enable this.
//////////////////////////////////Metachannels//////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//Metachannels are added chat channels. They are very similar to the party channel, in that players
//control who is in their metachannel via invites. They may invite whomever they like, however, and
//are not limited to the members of their party. There is no set number of metachannels; rather, a
//metachannel is created whenever a player wants. The first invite sent out determines who the 'leader'
//of the metachannel is. When that invite is accepted, the inviter becomes the leader of a new metachannel.
//From that point on, any messages that any member types that begin with '/m' will be sent to every member
//of the metachannel, via the combat log. Metachannels will be logged with other text if you enable
//text logging. If you are uncertain what use these channels could be put to, the whole reason that I
//implemented them at all was for guild use on my PW, but I'm certain they will find other uses.
////////////////////////////////////////////////////////////////////////////////
//
const int ENABLE_METACHANNELS = TRUE;//Set this to FALSE if you do not want players to have access
//to metachannels.
//
const int DMS_HEAR_META = TRUE;//Set this to TRUE if you want DMs to receive all player metamessages. DMs
//will have the option to ignore these messages with the command dm_ignoremeta. If a DM is also in a
//metachannel, it will not duplicate the messages (like NWN does with party channel when a DM joins a party).
//
const int DM_PLAYERS_HEAR_META = FALSE;///Set this to TRUE if you want DMs logged in as players
//to receive all DM messages in their combat logs. This will route DM messages to anyone with a cdkey you
//list below in the VerifyDMKey function, if they are logged as a player. It will NOT route metamessages
//to people logged in as DMs, so you should use both this and the above command if you want both. DMs
//logged in as players will have the option to ignore these messages with the command dm_ignoremeta.
//If a DM is also in a metachannel, it will not duplicate the messages (like NWN does with party channel
//when a DM joins a party).
//
const int ADMIN_DMS_HEAR_META = TRUE;//Set this to TRUE if you want administrators logged in as DMs to receive
//all player metamessages. Administrators will have the option to ignore these messages with the command
//dm_ignoremeta. If a administrator is also in a metachannel, it will not duplicate the messages
//(like NWN does with party channel when a DM joins a party).
//
const int ADMIN_PLAYERS_HEAR_META = TRUE;///Set this to TRUE if you want administrators logged in as players
//to receive all DM messages in their combat logs. This will route DM messages to anyone with a cdkey you
//list below in the VerifyAdminKey function,if they are logged as a player. It will NOT route metamessages
//to people logged in as DMs, so you should use both this and the above command if you want both.
//Administrators logged in as players will have the option to ignore these messages with the command
//dm_ignoremeta. If an administrator is also in a metachannel, it will not duplicate the messages
//(like NWN does with party channel when a DM joins a party).
/////////////////////////Conditional Channel Disabling//////////////////////////
////////////////////////////////////////////////////////////////////////////////
const int DISALLOW_SPEECH_WHILE_DEAD = TRUE;//Set to TRUE to disable speech by dead players on one,
//several, or all chat channels. Then set the constants for the channels you want to disable to TRUE.
//These channels will only block player speakers, not DM speakers, and not DMs logged in as players. Emotes
//and Commands are automatically blocked on all channels when the player using them is dead.
const int DISABLE_DEAD_TALK = TRUE;
const int DISABLE_DEAD_SHOUT = TRUE;
const int DISABLE_DEAD_WHISPER = TRUE;
const int DISABLE_DEAD_TELL = TRUE;
const int DISABLE_DEAD_PARTY = TRUE;
const int DISABLE_DEAD_DM = FALSE;
const int DISALLOW_METASPEECH_WHILE_DEAD = FALSE;//Set to TRUE to disable speech by dead players on
//metachannels. This setting is seperate from the above commands, and can be enabled even if
//DISALLOW_SPEECH_WHILE_DEAD is left equal to FALSE.
//////////////////////////Permanent Channel Disabling///////////////////////////
////////////////////////////////////////////////////////////////////////////////
const int ENABLE_PERMANENT_CHANNEL_MUTING = FALSE;//Set this to TRUE if you want to permanently disable
//one, several, or all chat channels. Then set the constants for the channels you want to disable to TRUE.
//These channels will only block player speakers, not DM speakers, and not DMs logged in as players.
//Disabling a channel will ONLY prevent text from displaying on that channel. Emotes and commands can still
//be entered on it.
const int DISABLE_TALK_CHANNEL = FALSE;
const int DISABLE_SHOUT_CHANNEL = FALSE;
const int DISABLE_WHISPER_CHANNEL = FALSE;
const int DISABLE_TELL_CHANNEL = FALSE;
const int DISABLE_PARTY_CHANNEL = FALSE;
const int DISABLE_DM_CHANNEL = FALSE;
//////////////////////////////DM_PORT DESTINATIONS//////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//If you want the DM commands dm_porthell, dm_portjail, and dm_porttown to work, you must specify the tags
//of their waypoints here.
//dm_porthell
const string LOCATION_HELL = "FKY_WAY_HELL"; //Replace FKY_WAY_HELL with the tag of your 'hell' waypoint.
//dm_portjail
const string LOCATION_JAIL = "FKY_WAY_JAIL"; //Replace FKY_WAY_JAIL with the tag of your 'jail' waypoint.
//dm_porttown
const string LOCATION_TOWN = "FKY_WAY_TOWN"; //Replace FKY_WAY_TOWN with the tag of your 'town' waypoint.
////////////////////////////////////DM List/////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//This function returns TRUE if the player is a dm. For it to function correctly you must enter all
//the cd keys of your DMs. Dummy cdkeys are provided below as examples. If you are not comfortable with
//shortening the functions, simply overwrite the dummy keys with the keys of your dms, and leave the
//remaining keys as is. You may, of course, add more than twelve keys, as well.
int VerifyDMKey(object oPlayer);
int VerifyDMKey(object oPlayer)
{
string sCDKey = GetPCPublicCDKey(oPlayer);
if (sCDKey == "FT6MA6CY" || //DM Majere
sCDKey == "FTRKQ7GM" || //DM Starry Ice
sCDKey == "QV6XELG4" || //DM Fenrir
sCDKey == "QCR97XTD" || //DM Aenarion
sCDKey == "FT6WPHK3" || //DM Altair
sCDKey == "QCRQYCKQ" || //DM Princess
sCDKey == "QV4RTL66" || //DM Varash
sCDKey == "QG6MTEXW" || //DM Linnatha
sCDKey == "FTMF3LKM" || //DM Pangea
sCDKey == "QVR9PGCK" || //DM Steppenwolf
sCDKey == "QVRL7UFF" || //DM Minerva
sCDKey == "QC7GLGHQ" || //DM Karvinus
sCDKey == "VDK6ME9A" || //DM Masquerade
sCDKey == "QVRQTLXF" || //DM 'Matches
sCDKey == "VDKHPNV9" || //DM Pirre
sCDKey == "FFNNUDGL") //DM Kurai
{
return TRUE;
}
else return FALSE;
}
//////////////////////////////////Admin List////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//This function returns TRUE if the player is an administrator. Administrators in SIMTools do not
//necessarily have more power than DMs, and in fact could be configured to have less. It is merely
//a separate designation from DM, with separate settings, and potentially more power. For it to
//function correctly you must enter all the cd keys of your administrators. DO NOT LIST SOMEONE IN BOTH
//DM AND ADMIN LISTS! The system is configured to treat them as two seperate groups. Dummy cdkeys are
//provided below as examples. If you are not comfortable with shortening the functions, simply overwrite
//the dummy keys with the keys of your dms, and leave the remaining keys as is. You may, of course, add
//more than twelve keys, as well.
int VerifyAdminKey(object oPlayer);
int VerifyAdminKey(object oPlayer)
{
string sCDKey = GetPCPublicCDKey(oPlayer);
if (sCDKey == "FT6WPHK3" || //Admin Lanessar
sCDKey == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
///////////////////////////////////Languages////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
const int ENABLE_LANGUAGES = TRUE;//Set this to FALSE if you do not want players to be able to speak
//different languages.
//
//Language Storage Object Tag and Resref////////////////////////////////////////
//This object is used ONLY if you left USING_NWNX_DB set to FALSE above. The slow speed of the Bioware
//database makes it impractical for the number of database reads that the languages system requires
//the first oncliententer of every character each reset, so local ints stored on an item are used instead.
//These ints will be saved across server resets if the character file is saved via ExportSingleCharacter(), AND
//if the character is a PC. DM characters cannot store ints on inventory items across resets. If you want
//to use another object to store language information, you may enter the tag and resref of that object
//below. The system will autmatically create that Item on the PC oncliententer if they do not have one,
//mark it with whatever languages the character can speak based on class, race, and subrace, and then make
//it undroppable via the SetItemCursedFlag function.
const string TAG_OF_LANGUAGE_STORAGE_OBJECT = "languagestone";
const string RESREF_OF_LANGUAGE_STORAGE_OBJECT = "languagestone";
//Lore to Recognize/Understand Languages////////////////////////////////////////
const int LORE_NEEDED_TO_RECOGNIZE_LANGUAGE = 20;//Set this number equal to the lore check difficulty
//you want for chatacters to recognize what language is being spoken. Language recognition is automatic if
//they speak the language.
const int LORE_ALLOWS_LANGUAGE_COMPREHENSION = TRUE;//Set this to FALSE if you do not want high lore skills
//to enable characters to not only recognize but to understand languages they cannot speak.
//This function defines what lore skill difficulty check must be passed in order to not just recognize a
//foreign language but to comprehend it. If you disable LORE_ALLOWS_LANGUAGE_COMPREHENSION by setting it to
//FALSE then this function does nothing. You can set the lore values to whatever suits your module.
int GetLoreNeededToComprehendLanguage(int nLanguage);
int GetLoreNeededToComprehendLanguage(int nLanguage)
{
int nReturn = 0;
switch(nLanguage)
{
case 1: nReturn = 60; break;//Dwarven
case 9: nReturn = 65; break;//Elven
case 15: nReturn = 60; break;//Gnomish
case 23: nReturn = 55; break;//Halfling
case 32: nReturn = 85; break;//Drow
case 37: nReturn = 105; break;//Animal
case 44: nReturn = 95; break;//Cant
case 49: nReturn = 70; break;//Goblin
case 56: nReturn = 75; break;//Orc
case 63: nReturn = 80; break;//Draconic
case 72: nReturn = 120; break;//Infernal
case 81: nReturn = 125; break;//Abyssal
case 89: nReturn = 115; break;//Celestial
case 99: nReturn = 20; break;//Leetspeak
}
return nReturn;
}
//Subrace Languages/////////////////////////////////////////////////////////////
//
//Some languages are attained only by learning or being of a certain subrace. These functions tell what
//subraces get what languages. I have filled in the ones I use on my PW as an example. Because subrace
//names vary from PW to PW, you will probably have to change mine to match yours. If the player's race
//has already guaranteed him the language because it is required for the subrace, you need not list the
//subrace here (though doing so won't cause any problems). Of course, the player can get one language
//from his race and a second from his subrace. Leetspeak is included only for purposes of completeness. If
//you modify subrace names after creation you will have to 'teach' the character the appropriate language
//when you do, because these are only checked the first time a character enters the server. An example
//language teacher conversation is included in the demo module. If you have disabled languages you may
//ignore these settings completely.
int SubraceSpeaksDrow(string sSubrace)//List the subraces you want to be able to speak drow here.
{
if (sSubrace == "Elf - Drow" ||
sSubrace == "Drider" ||
sSubrace == "Drey" ||
sSubrace == "Drow" ||
sSubrace == "Dark Elf" ||
sSubrace == "Drow Elf" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
int SubraceSpeaksAnimal(string sSubrace)//List the subraces you want to be able to speak animal here.
{
if (sSubrace == "Half-Elf - Dryadkin" ||
sSubrace == "Half-Elf - Nymphkin" ||
sSubrace == "Half-Elf - Nereidkin" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
int SubraceSpeaksGoblin(string sSubrace)
{
if (sSubrace == "Humanoid - Goblin" ||
sSubrace == "Humanoid - Hobgoblin" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
int SubraceSpeaksOrcish(string sSubrace)
{
if (sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
int SubraceSpeaksDraconic(string sSubrace)
{
if (sSubrace == "Half-Dragon - Black" ||
sSubrace == "Half-Dragon - Blue" ||
sSubrace == "Half-Dragon - Green" ||
sSubrace == "Prismatic" ||
sSubrace == "Half-Dragon - Red" ||
sSubrace == "Half-Dragon - White" ||
sSubrace == "Humanoid - Kobold" ||
sSubrace == "Lizardfolk" ||
sSubrace == "Humanoid - Yuan-Ti" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
int SubraceSpeaksInfernal(string sSubrace)
{
if (((sSubrace == "Tiefling") && (d8() > 4)) || //There's a 50% chance Tieflings will speak Infernal.
sSubrace == "XXXXYYYY" || //If not, then they will speak Abyssal.
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
int SubraceSpeaksAbyssal(string sSubrace)
{
if (sSubrace == "Tiefling" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
int SubraceSpeaksCelestial(string sSubrace)
{
if (sSubrace == "Aasimar" ||
sSubrace == "Half Celestial" ||
sSubrace == "Half-Celestial" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
int SubraceSpeaksLeetspeak(string sSubrace)
{
if (sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY" ||
sSubrace == "XXXXYYYY")
{
return TRUE;
}
else return FALSE;
}
//void main(){}