27 lines
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
////////////////////////////////////////////////////////////////////////////////
|
|
// Real Time Strategy - NWN - Creation Tool
|
|
//==============================================================================
|
|
// By Deva Bryson Winblood. 02/28/2003
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
void main()
|
|
{
|
|
object oPC=GetItemActivator();
|
|
location lTarg=GetItemActivatedTargetLocation();
|
|
object oHolder;
|
|
string sID=GetLocalString(oPC,"sTeamID");
|
|
object oLead=GetLocalObject(GetModule(),"oTeamLead"+sID);
|
|
if (oLead==oPC||GetLocalInt(oPC,"nBuilder")==TRUE)
|
|
{ // okay to use this tool
|
|
oHolder=CreateObject(OBJECT_TYPE_PLACEABLE,"rts_marker",lTarg,FALSE);
|
|
SetLocalObject(oPC,"oCreateTarg",oHolder);
|
|
AssignCommand(oPC,ActionStartConversation(oPC,"rts_markers",TRUE,FALSE));
|
|
} // okay to use this tool
|
|
else
|
|
{
|
|
SendMessageToPC(oPC,"You are not the leader and are not allowed to use this!");
|
|
DestroyObject(GetItemActivated());
|
|
}
|
|
}
|