28 lines
676 B
Plaintext
28 lines
676 B
Plaintext
|
#include "x2_inc_switches"
|
||
|
void main()
|
||
|
{
|
||
|
object oGuildkey = GetModuleItemAcquired();
|
||
|
object oPC = GetModuleItemAcquiredBy();
|
||
|
object oMod = GetModule();
|
||
|
string sKey = GetPCPublicCDKey(oPC);
|
||
|
string sIP = GetPCIPAddress(oPC);
|
||
|
string sTag = GetTag(oGuildkey);
|
||
|
int nEvent =GetUserDefinedItemEventNumber();
|
||
|
|
||
|
if (!(nEvent ==X2_ITEM_EVENT_ACQUIRE)) return;
|
||
|
|
||
|
if(GetCampaignInt(sIP,sKey,oMod)== 1 && GetStringLeft(sTag,2)== "MG")
|
||
|
{
|
||
|
SendMessageToPC(oPC,"You cannot join another Guild.");
|
||
|
DestroyObject(oGuildkey,0.0);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
if(sTag== "MG_tdskey" || sTag== "MG_tmfkey")
|
||
|
{
|
||
|
SetCampaignInt(sIP,sKey,1,oMod);
|
||
|
SendMessageToPC(oPC,"You have choosen your Guild.");
|
||
|
}
|
||
|
|
||
|
}
|