////////////////////////////////////////////////////////////////////////////////// // Real Time Strategy - NWN - Teleportation Interdiction Device Creator //=============================================================================== // By Deva Bryson Winblood. 03/10/2003 ////////////////////////////////////////////////////////////////////////////////// #include "rtsh_multiplay" void main() { object oPC=GetItemActivator(); int nMana=fnGetTeamMana(oPC); location lLoc=GetItemActivatedTargetLocation(); effect eVFX=EffectVisualEffect(VFX_FNF_DISPEL); object oGate; if (nMana>49) { // has mana ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eVFX,lLoc,3.0); nMana=nMana-50; fnSetTeamMana(oPC,nMana); SendMessageToPC(oPC,"You used 50 mana to create an interdiction device."); oPC=CreateObject(OBJECT_TYPE_PLACEABLE,"rts_pl_mag28",lLoc,TRUE); oGate=GetNearestObjectByTag("rts_pl_mag32a",oPC,1); if (oGate!=OBJECT_INVALID) DestroyObject(oGate); oGate=GetNearestObjectByTag("rts_pl_mag32b",oPC,1); if (oGate!=OBJECT_INVALID) DestroyObject(oGate); oGate=GetNearestObjectByTag("rts_portal_base",oPC,1); if (oGate!=OBJECT_INVALID) { DestroyObject(oGate); oGate=GetObjectByTag("rts_portal_outside"); DestroyObject(oGate); } oGate=GetNearestObjectByTag("rts_portal_outside",oPC,1); if (oGate!=OBJECT_INVALID) { DestroyObject(oGate); oGate=GetObjectByTag("rts_portal_base"); DestroyObject(oGate); } } // has mana else SendMessageToPC(oPC,"You need to have at least 50 mana to use that item."); }