25 lines
954 B
Plaintext
25 lines
954 B
Plaintext
void main()
|
|
{
|
|
object oPC=GetClickingObject();
|
|
object oMe=OBJECT_SELF;
|
|
string sTitle=GetLocalString(oMe,"sTitle");
|
|
int nCost=GetLocalInt(oMe,"nCost");
|
|
string sTID=GetLocalString(oPC,"sTeamID");
|
|
string sAID=GetLocalString(GetArea(oMe),"sTeamID");
|
|
int nGold=GetGold(oPC);
|
|
if (sTID==sAID&&nGold>=nCost)
|
|
{ // okay to do extend
|
|
SetLocalObject(oPC,"oLairExtend",oMe);
|
|
AssignCommand(oPC,ClearAllActions());
|
|
AssignCommand(oPC,ActionStartConversation(oPC,"lair_extend",TRUE,FALSE));
|
|
} // okay to do extend
|
|
else if (sTID==sAID)
|
|
{ // not enough gold
|
|
FloatingTextStringOnCreature("You do not have enough gold to activate the "+GetLocalString(oMe,"sTitle")+" it costs "+IntToString(nCost)+" gold.",oPC,FALSE);
|
|
} // not enough gold
|
|
else
|
|
{ // not your lair
|
|
SendMessageToPC(oPC,"You cannot extend the lair of other teams.");
|
|
} // not your lair
|
|
}
|