///////////////////////////////////////////////////////////////////////////// // Real Time Strategy - NWN - Outer plane Persuasion Device //=========================================================================== // By Deva Bryson Winblood. 03/11/2003 ///////////////////////////////////////////////////////////////////////////// #include "rtsh_multiplay" void fnAttractor() { // the attractor routine object oMe=OBJECT_SELF; object oCr=GetLocalObject(oMe,"oCreature"); if (oCr==OBJECT_INVALID||GetIsDead(oCr)) {// !OI if (GetResRef(oMe)=="rts_pl_mag30b") { // penumbral lord oCr=CreateObject(OBJECT_TYPE_CREATURE,"penlord",GetLocation(oMe),TRUE); } // penumbral lord else { // planar worm oCr=CreateObject(OBJECT_TYPE_CREATURE,"planworm",GetLocation(oMe),TRUE); } // planar worm SetLocalObject(oMe,"oCreature",oCr); }// !OI DelayCommand(30.0,fnAttractor()); } // fnAttractor() void main() { object oPC=GetItemActivator(); int nMana=fnGetTeamMana(oPC); object oAttractor; location lLoc=GetItemActivatedTargetLocation(); string sTag=GetTag(GetArea(oPC)); if (nMana>9) { // have enough mana if (sTag=="TheRealmofShadows") { // shadow plane nMana=nMana-10; fnSetTeamMana(oPC,nMana); SendMessageToPC(oPC,"You used 10 mana to create an attractor."); oAttractor=CreateObject(OBJECT_TYPE_PLACEABLE,"rts_pl_mag30b",lLoc,TRUE); DelayCommand(5.0,RecomputeStaticLighting(GetArea(oPC))); DelayCommand(30.0,AssignCommand(oAttractor,fnAttractor())); } // shadow plane else if (sTag=="ThePlaneofInBetween") { // outer area nMana=nMana-10; fnSetTeamMana(oPC,nMana); SendMessageToPC(oPC,"You used 10 mana to create an attractor."); oAttractor=CreateObject(OBJECT_TYPE_PLACEABLE,"rts_pl_mag30a",lLoc,TRUE); DelayCommand(30.0,AssignCommand(oAttractor,fnAttractor())); } // outer area else SendMessageToPC(oPC,"This item can only be used in the outer planes."); } // have enough mana else SendMessageToPC(oPC,"This device requires 10 mana to use."); }