111 lines
2.5 KiB
Plaintext
111 lines
2.5 KiB
Plaintext
#include "rd_questinc"
|
|
|
|
object GetNHUndead(object oPC, object oSender, int iRaceOnly=0, string sTag = "");
|
|
object GetNHCreatures(object oPC,string sCampType, int iBase, int iBaseStart, int iBaseMax, int iCampType);
|
|
|
|
void main()
|
|
{
|
|
object oPC;
|
|
object oBoss;
|
|
int iAdjustedLevel;
|
|
string sTag;
|
|
|
|
oPC = GetPCSpeaker();
|
|
iAdjustedLevel = GetHitDice(oPC);
|
|
|
|
if (iAdjustedLevel<5)
|
|
sTag = "undead1";
|
|
else if (iAdjustedLevel<9)
|
|
sTag = "undead3";
|
|
else if (iAdjustedLevel<15)
|
|
sTag = "undead4";
|
|
else if (iAdjustedLevel<20)
|
|
sTag = "undead5";
|
|
else
|
|
sTag = "undead6";
|
|
|
|
oBoss = GetNHUndead(oPC,OBJECT_SELF,0,sTag);
|
|
SetPartyInt(GetPCSpeaker(),"QuestType",2);
|
|
|
|
SetLocalString(OBJECT_SELF,"QuestCreatures",GetTag(oBoss));
|
|
SetPartyInt(GetPCSpeaker(),"NHQuest",1);
|
|
}
|
|
|
|
object GetNHUndead(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 = GetNHCreatures(oPC,sCampType,iBase,iBaseStart,iBaseMax,iCampType);
|
|
|
|
iDifficulty = GetLocalInt(oPC,"QuestDifficulty");
|
|
iDifficulty++;
|
|
SetPartyInt(oPC,"QuestDifficulty",iDifficulty);
|
|
|
|
return oCreature;
|
|
}
|
|
|
|
object GetNHCreatures(object oPC,string sCampType, int iBase, int iBaseStart, int iBaseMax, int iCampType)
|
|
{
|
|
string sZone;
|
|
string sTag;
|
|
int iMaxSpots;
|
|
int iSpawn;
|
|
int iCreatureLevel;
|
|
int iCreatures;
|
|
int iIndex;
|
|
int iLevel;
|
|
object oCreature;
|
|
object oWP;
|
|
int iAdjustedLevel;
|
|
int iPCCount;
|
|
|
|
sZone = "NH";
|
|
iMaxSpots = GetMaxQuestSpots(sZone);
|
|
iSpawn = Random(iMaxSpots)+1;
|
|
sTag = sZone + "_Q_" + IntToString(iSpawn);
|
|
|
|
iLevel = GetHitDice(oPC);
|
|
iAdjustedLevel = GetLocalInt(oPC,"QuestLevel");
|
|
|
|
iCreatureLevel = Random(3)+1;
|
|
iCreatures = Random(3)+2;
|
|
iIndex = 1;
|
|
|
|
while (iIndex <= iCreatures)
|
|
{
|
|
oCreature = GetCampMob(iCreatureLevel,sTag,sCampType,iAdjustedLevel,iBaseStart,iBase,iBaseMax,iCampType, 0);
|
|
iIndex++;
|
|
}
|
|
|
|
//oWP = GetObjectByTag(sTag);
|
|
//SetLocalString(oCreature,"Location",GetLocalString(oWP,"Description"));
|
|
|
|
return oCreature;
|
|
}
|