#include "rd_questinc" void main() { object oPC; string sZone; string sTag; int iMaxSpots; int iSpawn; int iCreatureLevel; int iCreatures; int iIndex; int iLevel; object oCreature; int iDeathAllowed; int iDeathAjust; int iAdjustedLevel; int iPCCount; int iDifficulty; int iRandom; string sBoss; string sFollowers; string sLocation; string sTokenLine; location lLoc; oPC=GetPCSpeaker(); SetPartyInt(oPC,"QuestStep",3); sZone = GetZone(oPC); iMaxSpots = GetMaxQuestSpots(sZone); iSpawn = Random(iMaxSpots)+1; sTag = sZone + "_Q_" + IntToString(iSpawn); iLevel = GetHitDice(oPC); iAdjustedLevel = GetAdjustedLevel(oPC); iAdjustedLevel = ZoneLevel(GetArea(oPC),iAdjustedLevel); if (iAdjustedLevel<8) { iRandom = Random(2)+1; switch (iRandom) { case 1: sBoss = "en3_boss1_1"; sFollowers = "en3_follower1"; break; case 2: sBoss = "en3_boss1_2"; sFollowers = "en3_follower1_2"; break; } } else if (iAdjustedLevel<16) { iRandom = Random(2)+1; switch (iRandom) { case 1: sBoss = "en3_boss2_1"; sFollowers = "en3_follower2"; break; case 2: sBoss = "en3_boss2_2"; sFollowers = "en3_follower2_2"; break; } } else if (iAdjustedLevel<26) { iRandom = Random(2)+1; switch (iRandom) { case 1: sBoss = "en3_boss3_1"; sFollowers = "en3_follower3"; break; case 2: sBoss = "en3_boss3_2"; sFollowers = "en3_follower3_2"; break; } } else { iRandom = Random(2)+1; switch (iRandom) { case 1: sBoss = "en3_boss4_1"; sFollowers = "en3_follower4"; break; case 2: sBoss = "en3_boss4_2"; sFollowers = "en3_follower4_2"; break; } } lLoc = GetLocation(GetObjectByTag(sTag)); oCreature = CreateObject(OBJECT_TYPE_CREATURE,sBoss,lLoc); sLocation = GetLocalString(GetObjectByTag(sTag),"Description"); SetToken(oPC,OBJECT_SELF,102,sLocation); SetToken(oPC,OBJECT_SELF,101,GetName(oCreature)); SetToken(oPC,OBJECT_SELF,105,GetName(oCreature)); if (Random(3)==0) GetArtifact(oCreature); else GetMagicItem(oCreature); iCreatures = Random(4)+1; iIndex = 1; while (iIndex <= iCreatures) { CreateObject(OBJECT_TYPE_CREATURE,sFollowers,lLoc); iIndex++; } SetPartyString(oPC,"QuestCreatureTag",sBoss); SetPartyInt(oPC,"QuestType",1); SetPartyString(oPC,"QuestTargetNPC",GetTag(OBJECT_SELF)); SetPartyString(oPC,"QuestTargetMob",GetTag(oCreature)); SetPartyInt(oPC,"QuestTargetMobDead",0); iDifficulty = GetLocalInt(oPC,"QuestDifficulty"); iDifficulty = iDifficulty + 2; SetPartyInt(oPC,"QuestDifficulty",iDifficulty); sTokenLine = "I need to eliminate a " + GetToken(101) + " located " + GetToken(102) + "."; sTokenLine = FixTokenLine(sTokenLine,"REPEAT"); SetToken(oPC,OBJECT_SELF,111,sTokenLine); RemoveJournalQuestEntry("jDelivery",oPC); RemoveJournalQuestEntry("jCamp",oPC); AddJournalQuestEntry("jCamp",1,oPC); }