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

32 lines
1.1 KiB
Plaintext

// rts_it_op17 - Simulacrum Vat placer
void main()
{
object oItem=GetItemActivated();
object oPC=GetItemActivator();
string sID=GetLocalString(oPC,"sTeamID");
object oArea=GetArea(oPC);
location lLoc=GetItemActivatedTargetLocation();
effect eVFX;
object oWP=GetWaypointByTag(sID+"_START");
if (GetIsObjectValid(oWP)&&oArea==GetArea(oWP))
{ // in lair
oArea=CreateObject(OBJECT_TYPE_PLACEABLE,"rts_it_op17pl",lLoc);
if (GetIsObjectValid(oArea))
{ // created simulacrum vault
SetLocalString(oArea,"sTeamID",sID);
eVFX=EffectVisualEffect(VFX_DUR_GLOW_GREEN);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVFX,oArea);
DestroyObject(oItem);
} // created simulacrum vault
else
{ // cannot place there
SendMessageToPC(oPC,"You cannot place it there... try again.");
} // cannot place there
} // in lair
else
{ // not in lair
SendMessageToPC(oPC,"This item can only be used in your own lair.");
} // not in lair
}