47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Mail Include
|
|
//:: mail_include.nss
|
|
//:: Copyright (c) 2003 Jake E. Fitch
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
This is the include file for Mandragon's Mail system.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
|
//:: Created On: Jan. 6, 2004
|
|
//:://////////////////////////////////////////////
|
|
|
|
// This string sets the name of the database for the mail to be saved to.
|
|
string DBName = "MailDB";
|
|
|
|
// Should the system use the CD Key in addition to the Character's Name to setup unique Mailboxes.
|
|
int CDKeyCheck = TRUE;
|
|
|
|
// Return a formatted string of the message.
|
|
string FormatMessage(int iID) {
|
|
string sOut;
|
|
|
|
int iFrom = GetCampaignInt(DBName, "F" + IntToString(iID));
|
|
|
|
sOut += "From: " + GetCampaignString(DBName, "MBOwner" + IntToString(iFrom)) + "\n";
|
|
sOut += "Subject: " + GetCampaignString(DBName, "S" + IntToString(iID)) + "\n";
|
|
sOut += "Message:\n" + GetCampaignString(DBName, "M" + IntToString(iID)) + "\n";
|
|
|
|
SetCampaignInt(DBName, "R" + IntToString(iID), TRUE);
|
|
|
|
return sOut;
|
|
}
|
|
|
|
// Remove the message from the database.
|
|
void DeleteMessage(int iID) {
|
|
DeleteCampaignVariable(DBName, "T" + IntToString(iID));
|
|
DeleteCampaignVariable(DBName, "F" + IntToString(iID));
|
|
DeleteCampaignVariable(DBName, "S" + IntToString(iID));
|
|
DeleteCampaignVariable(DBName, "M" + IntToString(iID));
|
|
DeleteCampaignVariable(DBName, "R" + IntToString(iID));
|
|
}
|
|
|
|
void Debug (string sOutput) {
|
|
SpeakString(sOutput);
|
|
}
|