1352 lines
48 KiB
Plaintext
1352 lines
48 KiB
Plaintext
#include "rd_questinc"
|
|
|
|
void InitiateEvilQuest(object oPC,object oGiver);
|
|
void GetNextStepEvil(object oPC,object oGiver);
|
|
void SetupEvilQuestStep(int iStepType, int iStep, object oPC,object oGiver);
|
|
string GetGoodCamp(object oPC);
|
|
string GetEvilQuestItemTag(object oPC);
|
|
object GetEvilQuestItem(object oPC, object oBoss, object oSender, string sTag = "");
|
|
object GetGoodPartyQuestMobs(object oPC, object oSender);
|
|
object GetGoodParty(int iLevel, string sTag);
|
|
string GetGoodCreatureTag(int iLevel);
|
|
object GetGoodQuestCreatures(object oPC, object oSender);
|
|
int GetEvilQuest1(object oPC);
|
|
int GetEvilQuest2(object oPC);
|
|
int GetEvilQuest3(object oPC);
|
|
int GetEvilItemQuest1(object oPC);
|
|
int GetEvilItemQuest2(object oPC);
|
|
int GetEvilItemQuest3(object oPC);
|
|
int GetEvilItemQuest4(object oPC);
|
|
int GetEvilItemQuest5(object oPC);
|
|
int GetEvilItemQuest6(object oPC);
|
|
|
|
void InitiateEvilQuest(object oPC,object oGiver)
|
|
{
|
|
int iRandom;
|
|
int iQuest;
|
|
int iQuestStepType;
|
|
|
|
SetToken(oPC,oGiver,110,"Thank you.");
|
|
|
|
SetPartyString(oPC,"QuestStep1Token111","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","REPEAT");
|
|
|
|
|
|
iRandom = Random(100);
|
|
//iRandom = 8;
|
|
|
|
if (iRandom < 50)
|
|
{
|
|
iQuest = Random(6)+1;
|
|
//This code makes dungeon camps a little more rare for the Evil side.
|
|
if (iQuest == 6)
|
|
iQuest = Random(4) + 5;
|
|
//iQuest=1;
|
|
SetPartyInt(oPC,"QuestSteps",1);
|
|
iQuestStepType = iQuest;
|
|
}
|
|
else if (iRandom < 80)
|
|
{
|
|
if (Random(2)==0)
|
|
iQuest = Random(2)+1;
|
|
else
|
|
iQuest = Random(3)+1;
|
|
|
|
switch (iQuest)
|
|
{
|
|
case 1: iQuestStepType = GetEvilQuest1(oPC); break;
|
|
case 2: iQuestStepType = GetEvilQuest2(oPC); break;
|
|
case 3: iQuestStepType = GetEvilQuest3(oPC); break;
|
|
}
|
|
}
|
|
else if (iRandom < 100)
|
|
{
|
|
iQuest = Random(6)+1;
|
|
iQuest = GetItemQuest(oPC,iQuest,6);
|
|
//iQuest=6;
|
|
|
|
switch (iQuest)
|
|
{
|
|
case 1: iQuestStepType = GetEvilItemQuest1(oPC); break;
|
|
case 2: iQuestStepType = GetEvilItemQuest2(oPC); break;
|
|
case 3: iQuestStepType = GetEvilItemQuest3(oPC); break;
|
|
case 4: iQuestStepType = GetEvilItemQuest4(oPC); break;
|
|
case 5: iQuestStepType = GetEvilItemQuest5(oPC); break;
|
|
case 6: iQuestStepType = GetEvilItemQuest6(oPC); break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
SetPartyInt(oPC,"QuestSteps",1);
|
|
iQuestStepType = 1;
|
|
}
|
|
|
|
SetPartyInt(oPC,"Quest",iQuest);
|
|
SetPartyInt(oPC,"QuestStep",1);
|
|
SetPartyString(oPC,"QuestGiver",GetTag(oGiver));
|
|
SetPartyString(oPC,"QuestZone",GetZone(oPC));
|
|
SetLocalInt(GetModule(),GetZone(oPC),1);
|
|
SetPartyInt(oPC,"QuestDone",0);
|
|
|
|
SetupEvilQuestStep(iQuestStepType,1,oPC,oGiver);
|
|
|
|
}
|
|
|
|
void GetNextStepEvil(object oPC,object oGiver)
|
|
{
|
|
int iStep;
|
|
int iSteps;
|
|
int iStepType;
|
|
|
|
iSteps = GetLocalInt(oPC,"QuestSteps");
|
|
iStep = GetLocalInt(oPC,"QuestStep");
|
|
|
|
//SendMessageToPC(GetFirstPC(),"iStep : " + IntToString(iStep));
|
|
//SendMessageToPC(GetFirstPC(),"iSteps : " + IntToString(iSteps));
|
|
|
|
if (iStep < iSteps)
|
|
{
|
|
iStep++;
|
|
iStepType = GetLocalInt(oPC,"QuestStep" + IntToString(iStep));
|
|
SetupEvilQuestStep(iStepType,iStep,oPC,oGiver);
|
|
} else {
|
|
SetPartyInt(oPC,"QuestDone",1);
|
|
}
|
|
|
|
}
|
|
|
|
void SetupEvilQuestStep(int iStepType, int iStep, object oPC,object oGiver)
|
|
{
|
|
int iQuestType;
|
|
int iItemUnknown;
|
|
string sCampTag;
|
|
string sAmbush;
|
|
string sCampDescription;
|
|
string sCampLocation;
|
|
string sGiver;
|
|
string sTag;
|
|
string sTokenLine;
|
|
string sAttackers;
|
|
string sQuestStep;
|
|
string sItemTag;
|
|
string sOldCamp;
|
|
string sToken111;
|
|
string sToken112;
|
|
string sToken113;
|
|
string sResponse;
|
|
string sOldItem;
|
|
string sEscort;
|
|
string sOldEscort;
|
|
string sReply;
|
|
object oBoss;
|
|
object oItem;
|
|
|
|
SetPartyInt(oPC,"QuestStep",iStep);
|
|
|
|
SetCustomToken(111, "");
|
|
SetCustomToken(112, "");
|
|
SetCustomToken(113, "");
|
|
|
|
sGiver = GetName(oGiver);
|
|
SetToken(oPC,oGiver,103,sGiver);
|
|
|
|
GetRandomThankyou();
|
|
|
|
sQuestStep = "QuestStep" + IntToString(iStep);
|
|
sCampTag = GetLocalString(oPC,sQuestStep + "Mob");
|
|
sOldCamp = GetLocalString(oPC,"QuestCampType");
|
|
sOldItem = GetLocalString(oPC,"QuestItemTag");
|
|
sItemTag = GetLocalString(oPC,sQuestStep + "Item");
|
|
sOldEscort = GetLocalString(oPC,"QuestEscort");
|
|
sEscort = GetLocalString(oPC,sQuestStep + "Escort");
|
|
sToken111 = GetLocalString(oPC,sQuestStep + "Token111");
|
|
sToken112 = GetLocalString(oPC,sQuestStep + "Token112");
|
|
sToken113 = GetLocalString(oPC,sQuestStep + "Token113");
|
|
|
|
iItemUnknown = GetLocalInt(oPC,sQuestStep + "ItemUnknown");
|
|
SetPartyInt(oPC,"QuestItemUnknown",iItemUnknown);
|
|
|
|
sResponse = GetLocalString(oPC,sQuestStep + "Response");
|
|
if (sResponse == "")
|
|
sResponse = "Thank you.";
|
|
SetToken(oPC,oGiver,110,sResponse);
|
|
|
|
sReply = GetLocalString(oPC,sQuestStep + "Reply");
|
|
if (sReply == "")
|
|
sReply = "What do you need?";
|
|
SetToken(oPC,oGiver,120,sReply);
|
|
|
|
|
|
if (sCampTag == "REPEAT")
|
|
sCampTag = sOldCamp;
|
|
|
|
if (sCampTag == "")
|
|
sCampTag = GetGoodCamp(oPC);
|
|
|
|
|
|
if (sItemTag == "REPEAT")
|
|
sItemTag = sOldItem;
|
|
|
|
if (iStepType == 1)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep",iStep);
|
|
oBoss = GetQuestCamp(oPC,oGiver,sCampTag);
|
|
//GetPrisoners(oBoss);
|
|
SetPartyString(oPC,"QuestItemTag","");
|
|
sTokenLine = "The " + GetToken(101) + " have a solid presence in the area. They have become a thorn in our side, disrupting our agents from their normal business.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken111);
|
|
SetToken(oPC,oGiver,111,sTokenLine);
|
|
sTokenLine = "I need you to take care of the " + GetToken(101) + ". They are located " + GetToken(102) + ".";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken112);
|
|
SetToken(oPC,oGiver,112,sTokenLine);
|
|
//sTokenLine = "I will reward you if you can eliminate them.";
|
|
sTokenLine = "";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken113);
|
|
SetToken(oPC,oGiver,113,sTokenLine);
|
|
}
|
|
|
|
if (iStepType == 2)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep",iStep);
|
|
oBoss = GetQuestCamp(oPC,oGiver,sCampTag);
|
|
oItem = GetEvilQuestItem(oPC,oBoss,oGiver,sItemTag);
|
|
SetPartyInt(oPC,"QuestItemUnknown",1);
|
|
sTokenLine ="My agents send word that a camp of " + GetToken(101) + " have been spotted in the area. I need you to take care of the " + GetToken(101) + " and look for anything of importance they might have on them.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken111);
|
|
SetToken(oPC,oGiver,111,sTokenLine);
|
|
sTokenLine = "The " + GetToken(101) + " are located " + GetToken(102) + ".";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken112);
|
|
SetToken(oPC,oGiver,112,sTokenLine);
|
|
sTokenLine ="We need them eliminated, but we also need to find out what they are up to so remember to look around for anything important they might have.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken113);
|
|
SetToken(oPC,oGiver,113,sTokenLine);
|
|
//GetPrisoners(oBoss);
|
|
}
|
|
|
|
if (iStepType == 3)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep",iStep);
|
|
oBoss = GetRandomQuestMobs(oPC,oGiver,0,sCampTag);
|
|
SetPartyString(oPC,"QuestItemTag","");
|
|
sTokenLine = "A " + GetToken(101) + " was spotted in the nearby area. We need to deal with the " + GetToken(101) + " before more arrive.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken111);
|
|
SetToken(oPC,oGiver,111,sTokenLine);
|
|
sTokenLine = "I need you to take care of the problem, but beware, the " + GetToken(101) + " may not be alone. Go to " + GetToken(102) + " and look for the " + GetToken(101) + ".";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken112);
|
|
SetToken(oPC,oGiver,112,sTokenLine);
|
|
}
|
|
|
|
if (iStepType == 4)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep",iStep);
|
|
oBoss = GetRandomQuestMobs(oPC,oGiver,0,sCampTag);
|
|
oItem = GetEvilQuestItem(oPC,oBoss,oGiver,sItemTag);
|
|
SetPartyInt(oPC,"QuestItemUnknown",1);
|
|
sTokenLine = "A " + GetToken(101) + " was spotted traveling through the area. My agents believe the " + GetToken(101) + " might carry something important.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken111);
|
|
SetToken(oPC,oGiver,111,sTokenLine);
|
|
sTokenLine = "The " + GetToken(101) + " is not alone, so be careful. The group was spotted " + GetToken(102);
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken112);
|
|
SetToken(oPC,oGiver,112,sTokenLine);
|
|
sTokenLine = "Kill them, and search their bodies for anything interesting.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken113);
|
|
SetToken(oPC,oGiver,113,sTokenLine);
|
|
}
|
|
|
|
if (iStepType == 5)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep",iStep);
|
|
oBoss = GetGoodPartyQuestMobs(oPC,oGiver);
|
|
SetPartyString(oPC,"QuestItemTag","");
|
|
if (Random(3)>0)
|
|
sTokenLine = "A party of good adventurers has been spotted in the area. Ordinarily, I'd let our minions deal with the adventurers, but right now we have some sensitive operations going on.";
|
|
else
|
|
sTokenLine = "An operation I was conducting was recently delayed by the interference of a party of good adventurers. The adventurers must pay for their insolence.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken111);
|
|
SetToken(oPC,oGiver,111,sTokenLine);
|
|
sTokenLine = "I need you to take care of these adventurers. They were last spotted " + GetToken(102) + ".";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken112);
|
|
SetToken(oPC,oGiver,112,sTokenLine);
|
|
}
|
|
|
|
if (iStepType == 6)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep",iStep);
|
|
oBoss = GetDungeonCamp(oPC,oGiver,sCampTag);
|
|
//GetPrisoners(oBoss);
|
|
SetPartyString(oPC,"QuestItemTag","");
|
|
sTokenLine = "The " + GetToken(101) + " are becoming more of a nuisance. They have invaded one of our strongholds in the area and now work to clear it of the evil we have patiently brewed there.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken111);
|
|
SetToken(oPC,oGiver,111,sTokenLine);
|
|
sTokenLine = "The " + GetToken(101) + " can be found " + GetToken(102) + ".";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken112);
|
|
SetToken(oPC,oGiver,112,sTokenLine);
|
|
//sTokenLine = "";
|
|
//sTokenLine = FixTokenLine(sTokenLine,sToken113);
|
|
//SetToken(oPC,oGiver,113,sTokenLine);
|
|
}
|
|
|
|
if (iStepType == 7)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep",iStep);
|
|
oBoss = GetDungeonCamp(oPC,oGiver,sCampTag);
|
|
oItem = GetEvilQuestItem(oPC,oBoss,oGiver,sItemTag);
|
|
SetPartyInt(oPC,"QuestItemUnknown",1);
|
|
sTokenLine ="The " + GetToken(101) + " have invaded a stronghold of ours and work to clear it of our minions.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken111);
|
|
SetToken(oPC,oGiver,111,sTokenLine);
|
|
sTokenLine = "The " + GetToken(101) + " must be eliminated. They can be found " + GetToken(102) + ".";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken112);
|
|
SetToken(oPC,oGiver,112,sTokenLine);
|
|
sTokenLine ="Destroy them, and search their bodies for anything that might inform us of their plans.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken113);
|
|
SetToken(oPC,oGiver,113,sTokenLine);
|
|
//GetPrisoners(oBoss);
|
|
}
|
|
|
|
if (iStepType == 8)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep",iStep);
|
|
oBoss = GetGoodQuestCreatures(oPC,oGiver);
|
|
SetPartyString(oPC,"QuestItemTag","");
|
|
sTokenLine = "My agents spotted a " + GetToken(101) + " in the nearby lands. I need the " + GetToken(101) + " eliminated before any of my operations are interupted.";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken111);
|
|
SetToken(oPC,oGiver,111,sTokenLine);
|
|
sTokenLine = "The " + GetToken(101) + " might not be alone and was last spotted " + GetToken(102) + ".";
|
|
sTokenLine = FixTokenLine(sTokenLine,sToken112);
|
|
SetToken(oPC,oGiver,112,sTokenLine);
|
|
}
|
|
|
|
|
|
iQuestType = GetLocalInt(oPC,"QuestType");
|
|
|
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
|
RemoveJournalQuestEntry("jCamp",oPC);
|
|
|
|
if (iQuestType == 1)
|
|
AddJournalQuestEntry("jCamp",1,oPC);
|
|
else
|
|
AddJournalQuestEntry("jDelivery",1,oPC);
|
|
|
|
}
|
|
|
|
string GetGoodCamp(object oPC)
|
|
{
|
|
int iRandom;
|
|
int iLevel;
|
|
string sTag;
|
|
|
|
iLevel = GetHitDice(oPC);
|
|
iLevel = ZoneLevel(GetArea(oPC),iLevel);
|
|
|
|
sTag = "elf";
|
|
if (iLevel < 3)
|
|
{
|
|
iRandom = Random(3)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "halfling"; break;
|
|
case 2: sTag = "mdragon"; break;
|
|
case 3: sTag = "gnome"; break;
|
|
}
|
|
}
|
|
else if (iLevel < 5)
|
|
{
|
|
iRandom = Random(5)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "halfling"; break;
|
|
case 2: sTag = "elf"; break;
|
|
case 3: sTag = "dwarf"; break;
|
|
case 4: sTag = "militia"; break;
|
|
case 5: sTag = "gnome"; break;
|
|
}
|
|
}
|
|
else if (iLevel < 9)
|
|
{
|
|
iRandom = Random(6)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "halfling"; break;
|
|
case 2: sTag = "elf"; break;
|
|
case 3: sTag = "dwarf"; break;
|
|
case 4: sTag = "human"; break;
|
|
case 5: sTag = "dragon0"; break;
|
|
case 6: sTag = "gnome"; break;
|
|
}
|
|
}
|
|
else if (iLevel < 14)
|
|
{
|
|
iRandom = Random(4)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "angel"; break;
|
|
case 2: sTag = "elf"; break;
|
|
case 3: sTag = "dwarf"; break;
|
|
case 4: sTag = "human"; break;
|
|
case 5: sTag = "deva"; break;
|
|
case 6: sTag = "druid"; break;
|
|
}
|
|
}
|
|
else if (iLevel < 20)
|
|
{
|
|
iRandom = Random(3)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "elf"; break;
|
|
case 2: sTag = "dwarf"; break;
|
|
case 3: sTag = "human"; break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
iRandom = Random(3)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "angelic"; break;
|
|
case 2: sTag = "self"; break;
|
|
case 3: sTag = "dwarf"; break;
|
|
}
|
|
}
|
|
|
|
return sTag;
|
|
}
|
|
|
|
object GetEvilQuestItem(object oPC, object oBoss, object oSender, string sTag = "")
|
|
{
|
|
object oItem;
|
|
|
|
if (sTag == "")
|
|
sTag = GetEvilQuestItemTag(oPC);
|
|
|
|
oItem=CreateItemOnObject(sTag,oBoss);
|
|
SetPartyString(oPC,"QuestItemTag",sTag);
|
|
SetToken(oPC,oSender,104,GetName(oItem));
|
|
|
|
return oItem;
|
|
}
|
|
|
|
string GetEvilQuestItemTag(object oPC)
|
|
{
|
|
int iRandom;
|
|
int iDialogue;
|
|
string sTag;
|
|
|
|
sTag = "en4_document";
|
|
|
|
iDialogue = 1;
|
|
iRandom = Random(4)+1;
|
|
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "en4_document"; break;
|
|
case 2: sTag = "en3_letter"; break;
|
|
case 3: sTag = "en4_map"; break;
|
|
case 4: sTag = "en4_journal"; break;
|
|
}
|
|
|
|
//SetPartyInt(oPC,"QuestDialogue",iDialogue);
|
|
|
|
return sTag;
|
|
}
|
|
|
|
object GetGoodPartyQuestMobs(object oPC, object oSender)
|
|
{
|
|
object oCreature;
|
|
string sCampType;
|
|
string sCampDescription;
|
|
string sLocation;
|
|
string sTag;
|
|
string sZone;
|
|
int iDifficulty;
|
|
int iBase;
|
|
int iBaseStart;
|
|
int iBaseMax;
|
|
int iCampType;
|
|
int iLevel;
|
|
int iAdjustedLevel;
|
|
int iSpawn;
|
|
int iMaxSpots;
|
|
object oMod;
|
|
|
|
oMod = GetModule();
|
|
|
|
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","");
|
|
|
|
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);
|
|
|
|
oCreature = GetGoodParty(iAdjustedLevel,sTag);
|
|
//oCreature = GetQuestCreatures(oPC,sCampType,iBase,iBaseStart,iBaseMax,iCampType);
|
|
|
|
sCampDescription = GetName(oCreature);
|
|
SetToken(oPC,oSender,101,"good adventurers");
|
|
|
|
sLocation = GetLocalString(GetObjectByTag(sTag),"Description");
|
|
SetToken(oPC,oSender,102,sLocation);
|
|
|
|
SetToken(oPC,oSender,105,"good adventurers");
|
|
|
|
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++;
|
|
SetPartyInt(oPC,"QuestDifficulty",iDifficulty);
|
|
|
|
return oCreature;
|
|
}
|
|
|
|
object GetGoodParty(int iLevel, string sTag)
|
|
{
|
|
object oCreature;
|
|
location lLoc;
|
|
int iRandom;
|
|
int iIndex;
|
|
int iLevels;
|
|
int iNewLevel;
|
|
int iFighters;
|
|
int iClerics;
|
|
int iRogues;
|
|
int iWizards;
|
|
string sCreature;
|
|
|
|
oCreature = GetObjectByTag(sTag + "_S");
|
|
if (!(GetIsObjectValid(oCreature)))
|
|
{
|
|
lLoc = GetLocation(GetObjectByTag(sTag));
|
|
|
|
iFighters = Random(3)+1;
|
|
iWizards = Random(2);
|
|
iClerics = Random(2);
|
|
iRogues = Random(2);
|
|
if (Random(2) == 0)
|
|
iClerics++;
|
|
if (Random(4) == 0)
|
|
iRogues++;
|
|
if (Random(6) == 0)
|
|
iWizards++;
|
|
|
|
iIndex=0;
|
|
while (iIndex < iFighters)
|
|
{
|
|
sCreature = GetGoodFighter();
|
|
oCreature=CreateObject(OBJECT_TYPE_CREATURE,sCreature,lLoc,FALSE,sTag + "_S");
|
|
LevelPartyMember(oCreature,iLevel);
|
|
iIndex++;
|
|
}
|
|
|
|
iIndex=0;
|
|
while (iIndex < iClerics)
|
|
{
|
|
sCreature = GetGoodCleric();
|
|
oCreature=CreateObject(OBJECT_TYPE_CREATURE,sCreature,lLoc,FALSE,sTag + "_S");
|
|
LevelPartyMember(oCreature,iLevel);
|
|
iIndex++;
|
|
}
|
|
|
|
iIndex=0;
|
|
while (iIndex < iWizards)
|
|
{
|
|
sCreature = GetGoodWizard();
|
|
oCreature=CreateObject(OBJECT_TYPE_CREATURE,sCreature,lLoc,FALSE,sTag + "_S");
|
|
LevelPartyMember(oCreature,iLevel);
|
|
iIndex++;
|
|
}
|
|
|
|
iIndex=0;
|
|
while (iIndex < iRogues)
|
|
{
|
|
sCreature = GetGoodRogue();
|
|
oCreature=CreateObject(OBJECT_TYPE_CREATURE,sCreature,lLoc,FALSE,sTag + "_S");
|
|
LevelPartyMember(oCreature,iLevel);
|
|
iIndex++;
|
|
}
|
|
}
|
|
|
|
//Create heroic party member
|
|
if (Random(15)==0)
|
|
{
|
|
iRandom=Random(4)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sCreature = GetGoodWizard(); break;
|
|
case 2: sCreature = GetGoodRogue(); break;
|
|
case 3: sCreature = GetGoodCleric(); break;
|
|
case 4: sCreature = GetGoodFighter(); break;
|
|
}
|
|
oCreature=CreateObject(OBJECT_TYPE_CREATURE,sCreature,lLoc,FALSE,sTag + "_S");
|
|
|
|
if (Random(10)==0)
|
|
{
|
|
LevelPartyMember(oCreature,iLevel+4);
|
|
GetArtifact(oCreature);
|
|
} else {
|
|
LevelPartyMember(oCreature,iLevel+2);
|
|
GetMagicItem(oCreature);
|
|
}
|
|
}
|
|
|
|
return oCreature;
|
|
}
|
|
|
|
object GetGoodQuestCreatures(object oPC, object oSender)
|
|
{
|
|
object oCreature;
|
|
string sCampType;
|
|
string sCampDescription;
|
|
string sLocation;
|
|
string sTag;
|
|
string sZone;
|
|
string sCreature;
|
|
int iDifficulty;
|
|
int iBase;
|
|
int iBaseStart;
|
|
int iBaseMax;
|
|
int iCampType;
|
|
int iLevel;
|
|
int iAdjustedLevel;
|
|
int iSpawn;
|
|
int iMaxSpots;
|
|
int iRandom;
|
|
int iIndex;
|
|
object oMod;
|
|
|
|
oMod = GetModule();
|
|
|
|
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","");
|
|
|
|
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);
|
|
|
|
sCreature = GetGoodCreatureTag(iAdjustedLevel);
|
|
iRandom = Random(3)+2;
|
|
iIndex=0;
|
|
while (iIndex < iRandom)
|
|
{
|
|
oCreature=CreateObject(OBJECT_TYPE_CREATURE,sCreature,GetLocation(GetObjectByTag(sTag)),FALSE,sTag + "_S");
|
|
iIndex++;
|
|
}
|
|
|
|
sCampDescription = GetName(oCreature);
|
|
SetToken(oPC,oSender,101,sCampDescription);
|
|
|
|
sLocation = GetLocalString(GetObjectByTag(sTag),"Description");
|
|
SetToken(oPC,oSender,102,sLocation);
|
|
|
|
SetToken(oPC,oSender,105,sCampDescription);
|
|
|
|
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++;
|
|
SetPartyInt(oPC,"QuestDifficulty",iDifficulty);
|
|
|
|
return oCreature;
|
|
}
|
|
|
|
string GetGoodCreatureTag(int iLevel)
|
|
{
|
|
string sTag;
|
|
int iRandom;
|
|
|
|
/*
|
|
en4_gsolar1 34
|
|
en4_TArchon 14
|
|
en4_gsolar2 32
|
|
|
|
*/
|
|
|
|
sTag = "EN4_DRYAD";
|
|
if (iLevel < 4)
|
|
{
|
|
iRandom = Random(7)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "EN4_DRYAD"; break;
|
|
case 2: sTag = "en4_pixie"; break;
|
|
case 3: sTag = "EN4_PSEUDODRAGON"; break;
|
|
case 4: sTag = "en3_MYCONIDSPRO"; break;
|
|
case 5: sTag = "en3_MYCONID"; break;
|
|
case 6: sTag = "en3_BROWNIE"; break;
|
|
case 7: sTag = "EN4_DOGCOOSHEEM"; break;
|
|
}
|
|
}
|
|
else if (iLevel < 7)
|
|
{
|
|
iRandom = Random(3)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "en3_blinkdog"; break;
|
|
case 2: sTag = "en3_satyr"; break;
|
|
case 3: sTag = "EN4_NYMPH"; break;
|
|
}
|
|
}
|
|
else if (iLevel < 11)
|
|
{
|
|
iRandom = Random(3)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "EN4_GYNOSPHINX"; break;
|
|
case 2: sTag = "EN4_TREANT"; break;
|
|
case 3: sTag = "en4_movdeva"; break;
|
|
|
|
}
|
|
}
|
|
else if (iLevel < 15)
|
|
{
|
|
iRandom = Random(5)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "EN4_ANDROSPHINX"; break;
|
|
case 2: sTag = "en3_ELDERXORN"; break;
|
|
case 3: sTag = "en4_TArchon"; break;
|
|
case 4: sTag = "en4_mondeva"; break;
|
|
case 5: sTag = "en4_adeva"; break;
|
|
}
|
|
}
|
|
else if (iLevel < 20)
|
|
{
|
|
iRandom = Random(3)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "en3_PLANETAR" + IntToString(Random(2)+1); break;
|
|
case 2: sTag = "en4_ctorm"; break;
|
|
case 3: sTag = "EN4_Baelnorn"; break;
|
|
}
|
|
}
|
|
else if (iLevel < 20)
|
|
sTag = "en4_goodwmaster";
|
|
else
|
|
sTag = "en4_gsolar" + IntToString(Random(2)+1);
|
|
|
|
return sTag;
|
|
}
|
|
|
|
|
|
int GetEvilQuest1(object oPC)
|
|
{
|
|
int iQuestStepType;
|
|
|
|
SetPartyInt(oPC,"QuestSteps",3);
|
|
iQuestStepType = 3;
|
|
SetPartyString(oPC,"QuestStep1Response","Excellent, but more I have more for you to do.");
|
|
|
|
SetPartyInt(oPC,"QuestStep2",3);
|
|
SetPartyString(oPC,"QuestStep2Mob","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token111","More have been spotted in the area. I need you to deal with them while I investigate the situation further.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Response","Good. While you were taking care of the problem, I have found out something interesting.");
|
|
SetPartyString(oPC,"QuestStep2Reply","What did you find out?");
|
|
|
|
if (Random(4)>0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep3",1);
|
|
SetPartyString(oPC,"QuestStep3Mob","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Token111","I have located their camp of operations.");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep3",6);
|
|
SetPartyString(oPC,"QuestStep3Mob","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Token111","I have located their camp of operations. It seems they have invaded a stronghold of our and now must be eliminated.");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
}
|
|
|
|
return iQuestStepType;
|
|
}
|
|
|
|
int GetEvilQuest2(object oPC)
|
|
{
|
|
int iQuestStepType;
|
|
|
|
SetPartyInt(oPC,"QuestSteps",2);
|
|
iQuestStepType = 4;
|
|
SetPartyString(oPC,"QuestStep1Item","en4_letter1");
|
|
SetPartyString(oPC,"QuestStep1Response","Interesting.");
|
|
SetPartyString(oPC,"QuestStep1Reply","What does it say?.");
|
|
|
|
if (Random(4)>0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep2",1);
|
|
SetPartyString(oPC,"QuestStep2Mob","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token111","It tells me the location of our enemy.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep2",6);
|
|
SetPartyString(oPC,"QuestStep2Mob","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token111","It tells me the location of our enemy. It seems they have invaded a stronghold of our and now must be eliminated.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
}
|
|
|
|
return iQuestStepType;
|
|
}
|
|
|
|
int GetEvilQuest3(object oPC)
|
|
{
|
|
int iQuestStepType;
|
|
int iRandom;
|
|
|
|
SetPartyInt(oPC,"QuestSteps",2);
|
|
if (Random(2) == 0)
|
|
iQuestStepType = 5;
|
|
else
|
|
iQuestStepType = 8;
|
|
|
|
SetPartyString(oPC,"QuestStep1Response","Excellent. I do have a little more work for you, though.");
|
|
SetPartyString(oPC,"QuestStep1Reply","What do you need?.");
|
|
|
|
iRandom = Random(3);
|
|
|
|
if (iRandom == 0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep2",3);
|
|
SetPartyString(oPC,"QuestStep2Token111","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Response","Excellent. I do need you for a bit longer, though.");
|
|
}
|
|
else if (iRandom == 2) {
|
|
SetPartyInt(oPC,"QuestStep2",5);
|
|
SetPartyString(oPC,"QuestStep2Token111","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Response","Excellent. I do need you for a bit longer, though.");
|
|
}
|
|
else {
|
|
SetPartyInt(oPC,"QuestStep2",8);
|
|
SetPartyString(oPC,"QuestStep2Token111","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Response","Excellent. I do need you for a bit longer, though.");
|
|
}
|
|
|
|
if (Random(2) == 0)
|
|
{
|
|
SetPartyInt(oPC,"QuestSteps",3);
|
|
SetPartyInt(oPC,"QuestStep3",1);
|
|
SetPartyString(oPC,"QuestStep3Token111","It seems these minor distubances I've sent you on aren't so random. Some [101] have been spotted in the area and need to be eliminated.");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Response","Excellent. I do need you for a bit longer, though.");
|
|
}
|
|
|
|
return iQuestStepType;
|
|
}
|
|
|
|
int GetEvilItemQuest1(object oPC)
|
|
{
|
|
int iQuestStepType;
|
|
|
|
SetPartyInt(oPC,"QuestSteps",3);
|
|
iQuestStepType = 4;
|
|
|
|
SetPartyString(oPC,"QuestStep1Token111","A [101] was spotted traveling through the area. My agents believe the [101] might carry something important.");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep1Response","Ah, this is very interesting.");
|
|
SetPartyString(oPC,"QuestStep1Reply","What is it?");
|
|
SetPartyInt(oPC,"QuestStep1ItemUnknown",1);
|
|
if (Random(2) == 0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep2",4);
|
|
SetPartyString(oPC,"QuestStep2Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep2Token111","It is part of a scroll. This is just the sort of thing we need for our power to grow. I have a feeling we might find a piece of it in the hands of a [101] spotted in the area.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Response","Excellent, and I just discovered where the last piece is being kept.");
|
|
SetPartyString(oPC,"QuestStep2Reply","Where?");
|
|
if (Random(2) == 0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep3",4);
|
|
SetPartyString(oPC,"QuestStep3Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep3Token111","It is nearby, but it is guarded by a [101].");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep3",2);
|
|
SetPartyString(oPC,"QuestStep3Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep3Token111","It is nearby, but it is guarded by a camp of [101].");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
}
|
|
} else {
|
|
SetPartyInt(oPC,"QuestSteps",4);
|
|
SetPartyInt(oPC,"QuestStep2",5);
|
|
SetPartyString(oPC,"QuestStep2Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep2Token111","I am not sure, but I believe it is a spell.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Response","Interesting, very interesting indeed.");
|
|
SetPartyString(oPC,"QuestStep2Reply","What is it?");
|
|
if (Random(2) == 0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep3",4);
|
|
SetPartyString(oPC,"QuestStep3Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep3Token111","It is part of a scroll. This is just the sort of thing we need for our power to grow. I have a feeling I might know where you might find another piece of it. A [101] was spotted in the area acting very suspiciously.");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Response","Excellent, and I just discovered where the last piece is being kept.");
|
|
SetPartyString(oPC,"QuestStep3Reply","Where?");
|
|
|
|
if (Random(2) == 0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep4",4);
|
|
SetPartyString(oPC,"QuestStep4Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep4Token111","It is nearby, but it is guarded by a [101].");
|
|
SetPartyString(oPC,"QuestStep4Token112","REPEAT");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep4",2);
|
|
SetPartyString(oPC,"QuestStep4Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep4Token111","It is nearby, but it is guarded by a camp of [101].");
|
|
SetPartyString(oPC,"QuestStep4Token112","REPEAT");
|
|
}
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep3",2);
|
|
SetPartyString(oPC,"QuestStep3Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep3Token111","It is part of a scroll. This is just the sort of thing we need for our power to grow. I have a feeling I might know where you might find another piece of it. A [101] was spotted in the area acting very suspiciously.");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Response","Excellent, and I just discovered where the last piece is being kept.");
|
|
SetPartyString(oPC,"QuestStep3Reply","Where?");
|
|
if (Random(2) == 0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep4",2);
|
|
SetPartyString(oPC,"QuestStep4Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep4Token111","It is nearby, but it is guarded by a camp of [101].");
|
|
SetPartyString(oPC,"QuestStep4Token112","REPEAT");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep4",7);
|
|
SetPartyString(oPC,"QuestStep4Item","en3_scroll");
|
|
SetPartyString(oPC,"QuestStep4Token111","It is nearby, but it is guarded by a camp of [101].");
|
|
SetPartyString(oPC,"QuestStep4Token112","REPEAT");
|
|
}
|
|
}
|
|
}
|
|
|
|
//DebugQuest(oPC);
|
|
|
|
return iQuestStepType;
|
|
}
|
|
|
|
int GetEvilItemQuest2(object oPC)
|
|
{
|
|
int iQuestStepType;
|
|
|
|
SetPartyInt(oPC,"QuestSteps",2);
|
|
if (Random(2)==0)
|
|
{
|
|
iQuestStepType = 2;
|
|
SetPartyString(oPC,"QuestStep1Token111","My agents send word that a camp of [101] have been spotted in the area. I need you to take care of the [101] and look for anything of importance they might have on them.");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","When you are done with them, search the bodies for anything out of the ordinary.");
|
|
SetPartyString(oPC,"QuestStep1Item","en3_book");
|
|
SetPartyString(oPC,"QuestStep1Response","Ah, this is very interesting.");
|
|
SetPartyString(oPC,"QuestStep1Reply","What is it?");
|
|
SetPartyInt(oPC,"QuestStep1ItemUnknown",1);
|
|
if (Random(2)==0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep2",2);
|
|
SetPartyString(oPC,"QuestStep2Item","en3_papers2");
|
|
SetPartyString(oPC,"QuestStep2Token111","It is an ancient tome, but it is missing some important pages. There are some [101] in the area, perhaps they have the missing pages.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep2",4);
|
|
SetPartyString(oPC,"QuestStep2Item","en3_papers2");
|
|
SetPartyString(oPC,"QuestStep2Token111","It is an ancient tome, but it is missing some important pages. A [101] was recently spotted in the area, perhaps the [101] has the missing pages.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
}
|
|
} else {
|
|
iQuestStepType = 4;
|
|
SetPartyString(oPC,"QuestStep1Token111","A [101] was spotted traveling through the area. My agents believe the [101] might carry something important.");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","When you are done with them, search the bodies for anything out of the ordinary.");
|
|
SetPartyString(oPC,"QuestStep1Item","en3_book");
|
|
SetPartyString(oPC,"QuestStep1Response","Ah, this is very interesting.");
|
|
SetPartyString(oPC,"QuestStep1Reply","What is it?");
|
|
SetPartyInt(oPC,"QuestStep1ItemUnknown",1);
|
|
if (Random(2)==0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep2",2);
|
|
SetPartyString(oPC,"QuestStep2Item","en3_papers2");
|
|
SetPartyString(oPC,"QuestStep2Token111","It is an ancient tome, but it is missing some important pages. There are some [101] in the area, perhaps they have the missing pages.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep2",4);
|
|
SetPartyString(oPC,"QuestStep2Item","en3_papers2");
|
|
SetPartyString(oPC,"QuestStep2Token111","It is an ancient tome, but it is missing some important pages. A [101] was recently spotted in the area, perhaps the [101] has the missing pages.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
}
|
|
}
|
|
//DebugQuest(oPC);
|
|
return iQuestStepType;
|
|
}
|
|
|
|
int GetEvilItemQuest3(object oPC)
|
|
{
|
|
int iQuestStepType;
|
|
int iRandom;
|
|
string sItem;
|
|
string sToken;
|
|
|
|
iRandom = Random(3)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sItem = "en3_evilamulet";
|
|
sToken = "Yes. The letter speaks of an amulet blessed with evil powers. Some [101] were spotted in the area and one of my agents noticed peculiar behavior from them.";
|
|
break;
|
|
case 2: sItem = "en3_glowrod";
|
|
sToken = "Yes. The letter speaks of a glowing rod with strange powers. Some [101] were spotted in the area and one of my agents noticed peculiar behavior from them.";
|
|
break;
|
|
case 3: sItem = "en4_silver";
|
|
sToken = "Yes. The letter speaks of the transfer of a bar of enchanted silver. Some [101] were spotted in the area and if they have gotten their hands on the silver they could become a force for good in the land.";
|
|
break;
|
|
}
|
|
|
|
SetPartyInt(oPC,"QuestSteps",2);
|
|
|
|
if (Random(2)==0)
|
|
{
|
|
iQuestStepType = 2;
|
|
SetPartyString(oPC,"QuestStep1Token111","My agents send word that a camp of [101] have been spotted in the area. I need you to take care of the [101] and look for anything of importance they might have on them.");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","When you are done with them, search the bodies for anything out of the ordinary.");
|
|
SetPartyString(oPC,"QuestStep1Item","en4_letter2");
|
|
SetPartyString(oPC,"QuestStep1Response","Ah, this is very interesting.");
|
|
SetPartyString(oPC,"QuestStep1Reply","What is it?");
|
|
SetPartyInt(oPC,"QuestStep1ItemUnknown",1);
|
|
} else {
|
|
iQuestStepType = 4;
|
|
SetPartyString(oPC,"QuestStep1Token111","A [101] was spotted traveling through the area. My agents believe the [101] might carry something important.");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","When you are done with them, search the bodies for anything out of the ordinary.");
|
|
SetPartyString(oPC,"QuestStep1Item","en4_letter2");
|
|
SetPartyString(oPC,"QuestStep1Response","Ah, this is very interesting.");
|
|
SetPartyString(oPC,"QuestStep1Reply","What is it?");
|
|
SetPartyInt(oPC,"QuestStep1ItemUnknown",1);
|
|
}
|
|
|
|
if (Random(2)==0)
|
|
{
|
|
if (Random(2)==0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep2", 4);
|
|
SetPartyString(oPC,"QuestStep2Token111",sToken);
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Item",sItem);
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep2", 7);
|
|
SetPartyString(oPC,"QuestStep2Token111",sToken);
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Item",sItem);
|
|
}
|
|
} else {
|
|
SetPartyString(oPC,"QuestStep1Response","Hmmm...");
|
|
SetPartyInt(oPC,"QuestSteps",3);
|
|
SetPartyInt(oPC,"QuestStep2",5);
|
|
SetPartyString(oPC,"QuestStep2Item","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token111","I am not sure, it is in a script not known to me. I must consult with others on this. In the meantime, there is a pesky group of adventurers I believe are looking for this document. Deal with them and return to me.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Response","Very good.");
|
|
SetPartyString(oPC,"QuestStep2Reply","Did you decypher the script?");
|
|
if (Random(2)==0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep3", 4);
|
|
SetPartyString(oPC,"QuestStep3Token111",sToken);
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Item",sItem);
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep3", 7);
|
|
SetPartyString(oPC,"QuestStep3Token111",sToken);
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Item",sItem);
|
|
}
|
|
}
|
|
|
|
return iQuestStepType;
|
|
}
|
|
|
|
int GetEvilItemQuest4(object oPC)
|
|
{
|
|
int iQuestStepType;
|
|
|
|
SetPartyInt(oPC,"QuestSteps",3);
|
|
|
|
if (Random(2)==0)
|
|
{
|
|
iQuestStepType = 2;
|
|
SetPartyString(oPC,"QuestStep1Token111","I have just learned something that needs investigating. Some [101] were spotted in the area might have an item of interest on them.");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","When you are done with them, search the bodies for anything out of the ordinary.");
|
|
SetPartyString(oPC,"QuestStep1Item","en4_qring1");
|
|
SetPartyString(oPC,"QuestStep1Response","A ring, eh? This is very odd. I need a little time to study it, but I do have something for you to do in the meantime.");
|
|
SetPartyString(oPC,"QuestStep1Reply","What's that?");
|
|
SetPartyInt(oPC,"QuestStep1ItemUnknown",1);
|
|
} else {
|
|
iQuestStepType = 4;
|
|
SetPartyString(oPC,"QuestStep1Token111","I have just learned something that needs investigating. A [101] was spotted in the area that might have an item of interest.");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","When you are done with them, search the bodies for anything out of the ordinary.");
|
|
SetPartyString(oPC,"QuestStep1Item","en4_qring1");
|
|
SetPartyString(oPC,"QuestStep1Response","A ring, eh? This is very odd. I need a little time to study it, but I do have something for you to do in the meantime.");
|
|
SetPartyString(oPC,"QuestStep1Reply","What's that?");
|
|
SetPartyInt(oPC,"QuestStep1ItemUnknown",1);
|
|
}
|
|
|
|
if (Random(2)==0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep2",1);
|
|
SetPartyString(oPC,"QuestStep2Token111","Some [101] were spotted in the area. I don't know if they have anthing to do with the ring, but we need them eliminated.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token113","When you are done with them, return to me and perhaps I'll have learned more about this ring.");
|
|
SetPartyString(oPC,"QuestStep2Response","You've done well. I've been studying the ring in your absense and believe it to hold some power. Unfortunately, others seek the ring too. I need you to eliminate them so that I can study it further without any disturbances.");
|
|
SetPartyString(oPC,"QuestStep2Reply","What do you need?");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep2",3);
|
|
SetPartyString(oPC,"QuestStep2Token111","A [101] and some of it's companions were spotted in the area. I don't know if they have anthing to do with the ring, but we need them eliminated.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token113","When you are done with them, search the bodies for anything out of the ordinary.");
|
|
SetPartyString(oPC,"QuestStep2Response","You've done well. I've been studying the ring in your absense and believe it to hold some power. Unfortunately, others seek the ring too. I need you to eliminate them so that I can study it further without any disturbances.");
|
|
SetPartyString(oPC,"QuestStep2Reply","What do you need?");
|
|
}
|
|
|
|
SetPartyInt(oPC,"QuestStep3",5);
|
|
SetPartyString(oPC,"QuestStep3Token111","A party of adventurers have been searching for the ring.");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Token113","When you are done with them, return to me and I will reward you.");
|
|
|
|
|
|
return iQuestStepType;
|
|
}
|
|
|
|
int GetEvilItemQuest5(object oPC)
|
|
{
|
|
int iQuestStepType;
|
|
int iMinLevel;
|
|
int iSteps;
|
|
int iRandom;
|
|
string sTag;
|
|
object oArea;
|
|
|
|
oArea = GetArea(oPC);
|
|
iMinLevel = GetLocalInt(oArea,"MinimumLevel");
|
|
|
|
sTag = "drow";
|
|
if (iMinLevel<7)
|
|
{
|
|
iRandom = Random(4)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "elf"; break;
|
|
case 2: sTag = "dwarf"; break;
|
|
case 3: sTag = "halfling"; break;
|
|
case 4: sTag = "human"; break;
|
|
}
|
|
}
|
|
else if (iMinLevel<20)
|
|
{
|
|
iRandom = Random(3)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "elf"; break;
|
|
case 2: sTag = "dwarf"; break;
|
|
case 3: sTag = "halfling"; break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
iRandom = Random(4)+1;
|
|
switch (iRandom)
|
|
{
|
|
case 1: sTag = "elf"; break;
|
|
case 2: sTag = "dwarf"; break;
|
|
case 3: sTag = "halfling"; break;
|
|
case 4: sTag = "angelic"; break;
|
|
}
|
|
}
|
|
|
|
SetLocalString(oPC,"QuestAttackers",sTag);
|
|
SetLocalInt(oPC,"QuestDifficulty",2);
|
|
|
|
iSteps = Random(4)+2;
|
|
SetPartyInt(oPC,"QuestSteps",iSteps);
|
|
|
|
if (Random(2)==0)
|
|
{
|
|
iQuestStepType = 1;
|
|
SetPartyString(oPC,"QuestStep1Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep1Token111","The [101] have a solid presence in the area. They have become a thorn in our side, disrupting our agents from their normal business.");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","I will reward you if you can eliminate them.");
|
|
SetPartyString(oPC,"QuestStep1Response","You've done a good job. Unfortunately, the problem is more serious than I first thought.");
|
|
SetPartyString(oPC,"QuestStep1Reply","How serious?");
|
|
} else {
|
|
iQuestStepType = 3;
|
|
SetPartyString(oPC,"QuestStep1Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep1Token111","A [101] was seen spying on our operations. We cannot allow this to continue else word of our plans might leak back to the city.");
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","");
|
|
SetPartyString(oPC,"QuestStep1Response","You've done a good job. Unfortunately, the problem is more serious than I first thought.");
|
|
SetPartyString(oPC,"QuestStep1Reply","How serious?");
|
|
}
|
|
|
|
if (Random(2)==0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep2",1);
|
|
SetPartyString(oPC,"QuestStep2Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep2Token111","More of the [101] have been spotted in the area. We cannot allow them to gather in strong numbers else our grip on this land might be lost.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token113","We need you to eliminate them.");
|
|
SetPartyString(oPC,"QuestStep2Response","You've done a good job. But there is more work to be done.");
|
|
SetPartyString(oPC,"QuestStep2Reply","What do you need?");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep2",3);
|
|
SetPartyString(oPC,"QuestStep2Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep2Token111","There are more of them. A [101] and some companions have been spotted in the area. We cannot allow them to gather in strong numbers else our grip on this land might be lost.");
|
|
SetPartyString(oPC,"QuestStep2Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep2Token113","");
|
|
SetPartyString(oPC,"QuestStep2Response","You've done a good job. But there is more work to be done.");
|
|
SetPartyString(oPC,"QuestStep2Reply","What do you need?");
|
|
}
|
|
|
|
if (Random(2)==0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep3",1);
|
|
SetPartyString(oPC,"QuestStep3Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep3Token111","Their forces grow strong. More of the [101] have been spotted in the area.");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Token113","We need you to eliminate them.");
|
|
SetPartyString(oPC,"QuestStep3Response","You've done a good job. But there is more work to be done.");
|
|
SetPartyString(oPC,"QuestStep3Reply","What do you need?");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep3",3);
|
|
SetPartyString(oPC,"QuestStep3Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep3Token111","Their forces grow strong. A [101] and some companions have been spotted in the area.");
|
|
SetPartyString(oPC,"QuestStep3Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep3Token113","");
|
|
SetPartyString(oPC,"QuestStep3Response","You've done a good job. But there is more work to be done.");
|
|
SetPartyString(oPC,"QuestStep3Reply","What do you need?");
|
|
}
|
|
|
|
if (Random(2)==0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep4",1);
|
|
SetPartyString(oPC,"QuestStep4Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep4Token111","Their forces are growing even stronger. More of the [101] have been spotted in the area.");
|
|
SetPartyString(oPC,"QuestStep4Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep4Token113","We need you to eliminate them.");
|
|
SetPartyString(oPC,"QuestStep4Response","You've done a good job. But there is more work to be done.");
|
|
SetPartyString(oPC,"QuestStep4Reply","What do you need?");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep4",3);
|
|
SetPartyString(oPC,"QuestStep4Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep4Token111","Their forces are growing even stronger. A [101] and some companions have been spotted in the area.");
|
|
SetPartyString(oPC,"QuestStep4Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep4Token113","");
|
|
SetPartyString(oPC,"QuestStep4Response","You've done a good job. But there is more work to be done.");
|
|
SetPartyString(oPC,"QuestStep4Reply","What do you need?");
|
|
}
|
|
|
|
if (Random(2)==0)
|
|
{
|
|
SetPartyInt(oPC,"QuestStep5",1);
|
|
SetPartyString(oPC,"QuestStep5Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep5Token111","They seem unending. More of the [101] have been spotted in the area.");
|
|
SetPartyString(oPC,"QuestStep5Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep5Token113","We need you to eliminate them.");
|
|
SetPartyString(oPC,"QuestStep5Response","You've done a good job. But there is more work to be done.");
|
|
SetPartyString(oPC,"QuestStep5Reply","What do you need?");
|
|
} else {
|
|
SetPartyInt(oPC,"QuestStep5",3);
|
|
SetPartyString(oPC,"QuestStep5Mob",sTag);
|
|
SetPartyString(oPC,"QuestStep5Token111","They seem unending. A [101] and some companions have been spotted in the area.");
|
|
SetPartyString(oPC,"QuestStep5Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep5Token113","");
|
|
SetPartyString(oPC,"QuestStep5Response","You've done a good job. But there is more work to be done.");
|
|
SetPartyString(oPC,"QuestStep5Reply","What do you need?");
|
|
}
|
|
|
|
return iQuestStepType;
|
|
}
|
|
|
|
|
|
int GetEvilItemQuest6(object oPC)
|
|
{
|
|
int iQuestStepType;
|
|
int iMinLevel;
|
|
int iSteps;
|
|
int iLevel;
|
|
string sCamp;
|
|
object oArea;
|
|
|
|
oArea = GetArea(oPC);
|
|
iLevel = GetHitDice(oPC);
|
|
iLevel = ZoneLevel(GetArea(oPC),iLevel);
|
|
|
|
if (iLevel<4)
|
|
sCamp = "mdragon";
|
|
else if (iLevel<7)
|
|
sCamp = "dragon0";
|
|
else if (iLevel<13)
|
|
sCamp = "angel";
|
|
else if (iLevel<17)
|
|
sCamp = "dragon1";
|
|
else if (iLevel<22)
|
|
sCamp = "dragon2";
|
|
else if (iLevel<29)
|
|
sCamp = "dragon3";
|
|
else
|
|
sCamp = "dragon4";
|
|
|
|
|
|
iQuestStepType = 1;
|
|
SetPartyString(oPC,"QuestStep1Mob",sCamp);
|
|
SetPartyInt(oPC,"QuestSteps",1);
|
|
if (sCamp == "angel")
|
|
SetPartyString(oPC,"QuestStep1Token111","Our operations are in peril. Angels have descended upon the land and are whiping out all of our work. I need you to eliminate them.");
|
|
else if (sCamp == "dragon0" || sCamp == "mdragon")
|
|
SetPartyString(oPC,"QuestStep1Token111","We have an infestation of minatures dragons that needs to be wiped out.");
|
|
else
|
|
SetPartyString(oPC,"QuestStep1Token111","A dragon has been spotted in the area. Ordinarily, I'd be thrilled, but in this case it is a good dragon. We can't have it disturbing our operations.");
|
|
|
|
SetPartyString(oPC,"QuestStep1Token112","REPEAT");
|
|
SetPartyString(oPC,"QuestStep1Token113","I will reward you if you can eliminate them.");
|
|
|
|
return iQuestStepType;
|
|
}
|
|
|