42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
|
//::///////////////////////////////////////////////
|
||
|
//:: Mail - Conversation, Mailbox list
|
||
|
//:: mail_conv_mblist.nss
|
||
|
//:: Copyright (c) 2003 Jake E. Fitch
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
Build the mailbox list.
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By: Jake E. Fitch (Milambus Mandragon)
|
||
|
//:: Created On: Jan. 6, 2004
|
||
|
//:://////////////////////////////////////////////
|
||
|
|
||
|
#include "mail_include"
|
||
|
|
||
|
int StartingConditional()
|
||
|
{
|
||
|
object oPC = GetPCSpeaker();
|
||
|
object oMailman = GetNearestObjectByTag("Mailman", oPC);
|
||
|
|
||
|
int iTotalMB = GetCampaignInt(DBName, "LastMailbox");
|
||
|
int iMB = GetLocalInt(oMailman, "mail_LastMB") + 1;
|
||
|
int iOption = GetLocalInt(oMailman, "mail_LastOption") + 1;
|
||
|
|
||
|
if (iMB <= iTotalMB) {
|
||
|
string sMBOwner = GetCampaignString(DBName, "MBOwner" + IntToString(iMB));
|
||
|
|
||
|
if (sMBOwner != "") {
|
||
|
SetCustomToken(8000 + iOption, sMBOwner);
|
||
|
SetLocalInt(oMailman, "mail_Option" + IntToString(iOption), iMB);
|
||
|
|
||
|
SetLocalInt(oMailman, "mail_LastMB", iMB);
|
||
|
SetLocalInt(oMailman, "mail_LastOption", iOption);
|
||
|
return TRUE;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
SetLocalInt(oMailman, "mail_LastMB", iMB);
|
||
|
SetLocalInt(oMailman, "mail_LastOption", iOption);
|
||
|
return FALSE;
|
||
|
}
|