#include "rd_spawnzones" //#include "rd_questinc" //#include "rd_treasure" void SpawnSpecialCamp(int iCamp, string sCType); void main() { int iCamp; string sCType; object oPC; oPC = GetEnteringObject(); if (GetIsPC(oPC)) { if (GetLocalInt(OBJECT_SELF,"EN4_DoOnce") == 0) { SetLocalInt(OBJECT_SELF,"EN4_DoOnce",1); SetLocalInt(GetModule(),"Astral",1); DelayCommand(1.0f,SpawnSpecialCamp(1,"angelic")); DelayCommand(1.0f,SpawnSpecialCamp(2,"fiend")); DelayCommand(1.0f,SpawnSpecialCamp(3,"astral")); DelayCommand(1.0f,SpawnSpecialCamp(4,"maelore")); DelayCommand(1.0f,SpawnSpecialCamp(5,"astral")); } } } void SpawnSpecialCamp(int iCamp, string sCType) { int iFlag; int iIndex; int iType; int iBaseLevel; int iBase; int iBaseStart; int iBaseMax; int iCampType; int iArea; string sEncounter; string sBossTest; string sCampType; string sCD; object oEncounter; object oCreature; object oBoss; object oMod; object oArea; location lEncounter; string sZone = "AP1"; int iLevel=40; int iLeader=0; oMod = GetModule(); sEncounter = sZone + "_Q" + IntToString(iCamp) + "_Boss"; oEncounter = GetObjectByTag(sEncounter); oArea = GetArea(oEncounter); iArea=GetIsAreaInterior(oArea); iBaseLevel=AdjustLevel(iLevel); if (iArea == FALSE) SetupCampTypes(iBaseLevel,1,0,0); else SetupCampTypes(iBaseLevel,1,1,0); if (sCType == "") { iBaseLevel=AdjustLevel(iLevel); sCampType = GetCampType(); } else { iBaseLevel=AdjustLevel(iLevel); sCampType = GetSpecificCampType(sCType); } iBase = GetLocalInt(oMod,"iBase"); iBaseStart = GetLocalInt(oMod,"iBaseStart"); iBaseMax = GetLocalInt(oMod,"iBaseMax"); iCampType = GetLocalInt(oMod,"iCampType"); sCD = GetLocalString(oMod,"sCD"); //debug line //SendMessageToPC(GetFirstPC(),"Spawn Specific camptype " + sCampType + " at type " + IntToString(iCampType)); SetLocalInt(oMod,"iBase",0); SetLocalInt(oMod,"iBaseStart",0); SetLocalInt(oMod,"iBaseMax",0); SetLocalInt(oMod,"iCampType",0); SetLocalString(oMod,"sCD",""); sEncounter = sZone + "_Q" + IntToString(iCamp) + "_Boss"; oBoss = GetCampMob(99,sEncounter,sCampType,iBaseLevel,iBaseStart,iBase,iBaseMax,iCampType); SetLocalString(oBoss,"CampType",sCampType); SetLocalInt(oBoss,"BaseLevel",iBaseLevel); SetLocalInt(oBoss,"iBase",iBase); SetLocalInt(oBoss,"iBaseStart",iBaseStart); SetLocalInt(oBoss,"iBaseMax",iBaseMax); SetLocalInt(oBoss,"iCampType",iCampType); SetLocalString(oBoss,"Description",sCD); iType = 1; while (iType <4) { iFlag = 1; iIndex = 1; while (iFlag == 1) { sEncounter = sZone + "_Q" + IntToString(iCamp) + "_T" + IntToString(iType) + "_" + IntToString(iIndex); oEncounter = GetObjectByTag(sEncounter); if (GetIsObjectValid(oEncounter)) { GetCampMob(iType,sEncounter,sCampType,iBaseLevel,iBaseStart,iBase,iBaseMax,iCampType); } else iFlag =0; iIndex++; if (iIndex > 1000) { iFlag = 0; } } iType++; } }