HoS_PRC8/_mod/_module/nss/ofo_lairup.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

25 lines
776 B
Plaintext

// ofo_lairup - On Fail to Open Lair Upgrage door
void main()
{
object oPC=GetClickingObject();
object oMe=OBJECT_SELF;
string sID;
string sDID=GetLocalString(oMe,"sTeamID");
object oMod=GetModule();
object oLead;
if (GetLocalInt(oMe,"bWZHoldPortal")!=TRUE)
{ // not hold portal
if (GetIsPC(oPC)==FALSE) oPC=GetLastUsedBy();
if (oPC!=OBJECT_INVALID&&GetIsPC(oPC)==TRUE)
{ // PC
sID=GetLocalString(oPC,"sTeamID");
oLead=GetLocalObject(oMod,"oTeamLead"+sID);
if (sID==sDID&&oLead==oPC)
{ // upgrade possible
AssignCommand(oPC,ClearAllActions(TRUE));
AssignCommand(oPC,ActionStartConversation(oPC,"lair_upgrade",TRUE,FALSE));
} // upgrade possible
} // PC
} // not hold portal
}