// Rise of evil #include "header_sounds" void fnAlertWizards(string sMsg,int nDC) { // message and sound if the Wizard senses it - special ability // of wizards in this game object oPC=GetFirstPC(); int nSC; while(oPC!=OBJECT_INVALID) { // alert PCs if (GetLevelByClass(CLASS_TYPE_WIZARD,oPC)>0) { // is a wizard nSC=GetLevelByClass(CLASS_TYPE_WIZARD,oPC)+d20(); if (nSC>=nDC) { // give Message SendMessageToPC(oPC,sMsg); AssignCommand(oPC,fnSoundAlert("as_pl_zombiem3")); } // give Message } // is a wizard oPC=GetNextPC(); } // alert PCs } // fnAlertWizards() void main() { object oMod=GetModule(); int nPow=GetLocalInt(oMod,"nEvilPower"); int nStage=GetLocalInt(oMod,"nEvilStage"); object oH; object oCreate; int nC; if (nPow>99) { // advance stage nPow=nPow-100; SetLocalInt(oMod,"nEvilPower",nPow); nStage++; if (nStage==1) { // clouds fnAlertWizards("An evil presence is awakening in the land.",12); nC=0; oH=GetObjectByTag("EVIL_CLOUD",nC); while(oH!=OBJECT_INVALID) { // evil clouds nC++; oCreate=CreateObject(OBJECT_TYPE_PLACEABLE,"plc_dustplume",GetLocation(oH)); oH=GetObjectByTag("EVIL_CLOUD",nC); } // evil clouds } // clouds else if (nStage==2) { // blood nC=0; fnAlertWizards("Evil is walking the land, you can sense it.",12); oH=GetObjectByTag("EVIL_BLOOD",nC); while(oH!=OBJECT_INVALID) { // evil blood nC++; oCreate=CreateObject(OBJECT_TYPE_PLACEABLE,"plc_bloodstain",GetLocation(oH)); oH=GetObjectByTag("EVIL_BLOOD",nC); } // evil blood } // blood else if (nStage==3) { // altar fnAlertWizards("A great evil is at work in the center of the land. You can taste the blotch of darkness in that direction. It is on the wind.",12); oH=GetObjectByTag("EVIL_ALTAR"); oCreate=CreateObject(OBJECT_TYPE_PLACEABLE,"plc_flrdesigns1",GetLocation(oH)); oCreate=CreateObject(OBJECT_TYPE_PLACEABLE,"plc_altrevil",GetLocation(oH)); oH=GetObjectByTag("EVIL_PILLAR"); oCreate=CreateObject(OBJECT_TYPE_PLACEABLE,"x0_obelisk",GetLocation(oH)); oH=GetObjectByTag("EVIL_PILLAR",1); oCreate=CreateObject(OBJECT_TYPE_PLACEABLE,"x0_obelisk",GetLocation(oH)); } // altar else { // plague nC=Random(50); oH=GetObjectByTag("EVIL_CLOUD",nC); while(oH==OBJECT_INVALID) { nC=Random(50); oH=GetObjectByTag("EVIL_CLOUD",nC); } oCreate=CreateObject(OBJECT_TYPE_PLACEABLE,"plc_fplaguecrpse",GetLocation(oH)); } // plague SetLocalInt(oMod,"nEvilStage",nStage); } // advance stage else { // evil rising fnAlertWizards("Something evil has been done in the land.",19); } // evil rising }