///////////////////////////////////////////////////////////////////////////////// // Real Time Strategy - NWN - Plague of Spiders //============================================================================== // By Deva Bryson Winblood. 3/11/2003 ///////////////////////////////////////////////////////////////////////////////// #include "rtsh_multiplay" void fnCreateSpider(location lLoc) { // create a spider object oS=CreateObject(OBJECT_TYPE_CREATURE,"spidm",lLoc,TRUE); DelayCommand(1.5,SetLocalInt(oS,"nMState",6)); DelayCommand(5.0,SetLocalString(oS,"sTeamID","SPID")); } // fnCreateSpider() void main() { object oPC=GetItemActivator(); string sID=GetLocalString(oPC,"sTeamID"); int nMana=fnGetTeamMana(oPC); if (sID=="SPID") { // spider cult if (nMana>4) { // enough mana nMana=nMana-5; fnSetTeamMana(oPC,nMana); SendMessageToPC(oPC,"You used 5 mana to unleash a spider plague."); fnCreateSpider(GetLocation(oPC)); DelayCommand(2.0,fnCreateSpider(GetLocation(oPC))); DelayCommand(4.0,fnCreateSpider(GetLocation(oPC))); DelayCommand(6.0,fnCreateSpider(GetLocation(oPC))); } // enough mana else SendMessageToPC(oPC,"You need 5 mana to use this device."); } // spider cult else SendMessageToPC(oPC,"You must be a member of the spider cult to use this item."); }