219 lines
5.9 KiB
Plaintext
219 lines
5.9 KiB
Plaintext
#include "rd_questinc"
|
|
|
|
object GetRandomQuest15Mobs(object oPC, object oSender, int iRaceOnly=0, string sTag = "");
|
|
object GetQuest15Creatures(object oPC,string sCampType, int iBase, int iBaseStart, int iBaseMax, int iCampType);
|
|
|
|
void main()
|
|
{
|
|
object oPC;
|
|
object oBoss;
|
|
int iVariance;
|
|
string sTokenLine;
|
|
|
|
oPC = GetPCSpeaker();
|
|
|
|
SetPartyInt(oPC,"QuestStep",1);
|
|
SetPartyInt(oPC,"QuestSteps",1);
|
|
SetLocalString(oPC,"QuestGiver",GetTag(OBJECT_SELF));
|
|
SetLocalInt(oPC,"Quest",1);
|
|
SetCustomToken(111, "");
|
|
SetCustomToken(112, "");
|
|
SetCustomToken(113, "");
|
|
|
|
SetToken(oPC,OBJECT_SELF,103,GetName(OBJECT_SELF));
|
|
|
|
oBoss = GetRandomQuest15Mobs(oPC,OBJECT_SELF);
|
|
|
|
if (Random(100)<50)
|
|
GetMagicItem(oBoss);
|
|
|
|
|
|
iVariance = GetLocalInt(OBJECT_SELF,"QuestVariance");
|
|
if (iVariance == 0)
|
|
SetLocalInt(OBJECT_SELF,"QuestVariance",Random(2)+1);
|
|
|
|
sTokenLine = "I need to eliminate a " + GetName(oBoss) + " located " + GetToken(102) + ".";
|
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
|
|
|
|
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
|
RemoveJournalQuestEntry("jCamp",oPC);
|
|
AddJournalQuestEntry("jCamp",1,oPC);
|
|
|
|
}
|
|
|
|
object GetRandomQuest15Mobs(object oPC, object oSender, int iRaceOnly=0, string sTag = "")
|
|
{
|
|
object oCreature;
|
|
string sCampType;
|
|
string sCampDescription;
|
|
string sLocation;
|
|
int iDifficulty;
|
|
int iBase;
|
|
int iBaseStart;
|
|
int iBaseMax;
|
|
int iCampType;
|
|
object oMod;
|
|
|
|
oMod = GetModule();
|
|
|
|
if (sTag == "")
|
|
sCampType = GetQuestMob(oPC,iRaceOnly);
|
|
else
|
|
sCampType = GetSpecificCampType(sTag);
|
|
|
|
iBase = GetLocalInt(oMod,"iBase");
|
|
iBaseStart = GetLocalInt(oMod,"iBaseStart");
|
|
iBaseMax = GetLocalInt(oMod,"iBaseMax");
|
|
iCampType = GetLocalInt(oMod,"iCampType");
|
|
SetLocalInt(oMod,"iBase",0);
|
|
SetLocalInt(oMod,"iBaseStart",0);
|
|
SetLocalInt(oMod,"iBaseMax",0);
|
|
SetLocalInt(oMod,"iCampType",0);
|
|
SetLocalString(oMod,"sCD","");
|
|
|
|
oCreature = GetQuest15Creatures(oPC,sCampType,iBase,iBaseStart,iBaseMax,iCampType);
|
|
|
|
sCampDescription = GetName(oCreature);
|
|
SetToken(oPC,oSender,101,sCampDescription);
|
|
|
|
sLocation = GetLocalString(oCreature,"Location");
|
|
SetToken(oPC,oSender,102,sLocation);
|
|
|
|
SetToken(oPC,oSender,105,GetName(oCreature));
|
|
|
|
SetLocalInt(oCreature,"iCampType",iCampType);
|
|
SetLocalString(oCreature,"sCampType",sCampType);
|
|
|
|
SetPartyInt(oPC,"QuestType",1);
|
|
SetPartyString(oPC,"QuestTargetNPC",GetTag(oSender));
|
|
//SetPartyString(oPC,"QuestCreatureTag",GetTag(oCreature));
|
|
SetPartyString(oPC,"QuestTargetMob",GetTag(oCreature));
|
|
SetPartyString(oPC,"QuestCampType",sCampType);
|
|
SetPartyInt(oPC,"QuestTargetMobDead",0);
|
|
|
|
iDifficulty = GetLocalInt(oPC,"QuestDifficulty");
|
|
iDifficulty=iDifficulty + 2;
|
|
SetPartyInt(oPC,"QuestDifficulty",iDifficulty);
|
|
|
|
return oCreature;
|
|
}
|
|
|
|
object GetQuest15Creatures(object oPC,string sCampType, int iBase, int iBaseStart, int iBaseMax, int iCampType)
|
|
{
|
|
string sZone;
|
|
string sTag;
|
|
string sCreature;
|
|
int iMaxSpots;
|
|
int iSpawn;
|
|
int iCreatureLevel;
|
|
int iCreatures;
|
|
int iIndex;
|
|
int iLevel;
|
|
int iRandom;
|
|
object oCreature;
|
|
object oWP;
|
|
int iAdjustedLevel;
|
|
int iPCCount;
|
|
|
|
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);
|
|
|
|
iCreatureLevel = Random(3)+1;
|
|
iCreatures = Random(3)+2;
|
|
iIndex = 1;
|
|
|
|
if (iAdjustedLevel < 4)
|
|
{
|
|
iRandom = Random(8)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sCreature = "x2_drider001"; break;
|
|
case 2: sCreature = "en3_troll_2_2"; break;
|
|
case 3: sCreature = "en3_cockatrice"; break;
|
|
case 4: sCreature = "EN4_MANTICORE"; break;
|
|
case 5: sCreature = "en3_RUSTMONSTER"; break;
|
|
case 6: sCreature = "en3_SPIDREDBACK"; break;
|
|
case 7: sCreature = "en3_BELKER"; break;
|
|
case 8: sCreature = "en4_greenhag"; break;
|
|
}
|
|
}
|
|
else if (iAdjustedLevel < 7)
|
|
{
|
|
iRandom = Random(8)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sCreature = "EN4_BARGHESTG"; break;
|
|
case 2: sCreature = "en3_SALANOB"; break;
|
|
case 3: sCreature = "en3_CYCLOPSA"; break;
|
|
case 4: sCreature = "en3_gorgon"; break;
|
|
case 5: sCreature = "en3_were3_1_1"; break;
|
|
case 6: sCreature = "en3_mummy"; break;
|
|
case 7: sCreature = "en3_giant_3_1"; break;
|
|
case 8: sCreature = "en4_umberhulk"; break;
|
|
}
|
|
}
|
|
else if (iAdjustedLevel < 11)
|
|
{
|
|
iRandom = Random(6)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sCreature = "x2_beholder001"; break;
|
|
case 2: sCreature = "en3_beholdermage"; break;
|
|
case 3: sCreature = "EN4_ANDROSPHINX"; break;
|
|
case 4: sCreature = "en3_alu_demon"; break;
|
|
case 5: sCreature = "en3_wraith"; break;
|
|
case 6: sCreature = "en3_were3_3_1"; break;
|
|
}
|
|
}
|
|
else if (iAdjustedLevel < 16)
|
|
{
|
|
iRandom = Random(5)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sCreature = "en4_tieflingsm"; break;
|
|
case 2: sCreature = "en3_werelord"; break;
|
|
case 3: sCreature = "en3_shadowdancer"; break;
|
|
case 4: sCreature = "en4_mindfvenerat"; break;
|
|
case 5: sCreature = "en3_lich"; break;
|
|
}
|
|
}
|
|
else if (iAdjustedLevel < 21)
|
|
{
|
|
iRandom = Random(4)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sCreature = "en3_nosferatu"; break;
|
|
case 2: sCreature = "en3_palemaster"; break;
|
|
case 3: sCreature = "en3_darkagent"; break;
|
|
case 4: sCreature = "en4_fallenplanet"; break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
iRandom = Random(4)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sCreature = "en4_FallenSolar"; break;
|
|
case 2: sCreature = "en3_msservent"; break;
|
|
case 3: sCreature = "en3_wmaster"; break;
|
|
case 4: sCreature = "en3_demilich"; break;
|
|
}
|
|
}
|
|
|
|
location lLoc = GetLocation(GetObjectByTag(sTag));
|
|
oCreature = CreateObject(OBJECT_TYPE_CREATURE,sCreature,lLoc);
|
|
|
|
oWP = GetObjectByTag(sTag);
|
|
SetLocalString(oCreature,"Location",GetLocalString(oWP,"Description"));
|
|
|
|
return oCreature;
|
|
}
|