37 lines
1022 B
Plaintext
37 lines
1022 B
Plaintext
const string DB_ACT = "LOD_CDKEYS";
|
|
|
|
void Main()
|
|
{
|
|
object oPC = OBJECT_SELF;
|
|
string sKey = GetPCPublicCDKey(oPC);
|
|
string sActName = GetPCPlayerName(oPC);
|
|
|
|
string sKey1 = sKey + "_1";
|
|
string sKey2 = sKey + "_2";
|
|
string sKey3 = sKey + "_3";
|
|
|
|
if(GetIsDM(oPC)) return;
|
|
|
|
if (GetCampaignString(DB_ACT, sKey1) == sActName) return;
|
|
else if (GetCampaignString(DB_ACT, sKey2) == sActName) return;
|
|
else if (GetCampaignString(DB_ACT, sKey3) == sActName) return;
|
|
|
|
if (GetCampaignString(DB_ACT, sKey1) == "")
|
|
{
|
|
SetCampaignString(DB_ACT, sKey1, sActName);
|
|
}
|
|
else if (GetCampaignString(DB_ACT, sKey2) == "")
|
|
{
|
|
SetCampaignString(DB_ACT, sKey2, sActName);
|
|
}
|
|
else if (GetCampaignString(DB_ACT, sKey3) == "")
|
|
{
|
|
SetCampaignString(DB_ACT, sKey3, sActName);
|
|
}
|
|
else
|
|
{
|
|
SendMessageToPC(oPC, "Your CD Key has too many accounts on this server, please use a previously registered account to play.");
|
|
DelayCommand(40.0, BootPC(oPC));
|
|
}
|
|
}
|