1133 lines
35 KiB
Plaintext
1133 lines
35 KiB
Plaintext
|
#include "rd_questinc"
|
||
|
#include "rd_advzones"
|
||
|
|
||
|
void GetSewerKey(object oPC);
|
||
|
void GuildQuestType1(object oPC);
|
||
|
void GuildQuestType2(object oPC);
|
||
|
void GuildQuestType3(object oPC);
|
||
|
void GuildQuestType4(object oPC);
|
||
|
void GuildQuestType5(object oPC);
|
||
|
void GuildQuestType6(object oPC);
|
||
|
void GuildQuestType7(object oPC);
|
||
|
void GuildQuestType8(object oPC);
|
||
|
void GuildQuestType9(object oPC);
|
||
|
void GuildQuestType10(object oPC);
|
||
|
void GuildQuestType11(object oPC);
|
||
|
void GuildQuestType12(object oPC);
|
||
|
void GuildQuestType13(object oPC);
|
||
|
void GuildQuestType14(object oPC);
|
||
|
void GuildQuestType15(object oPC);
|
||
|
void GuildQuestType16(object oPC);
|
||
|
|
||
|
string GetMGCamp(int iLevel,int iType=0);
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object oPC;
|
||
|
object oBoss;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iQuestType;
|
||
|
int iZones;
|
||
|
int iDifficulty;
|
||
|
int iRandom;
|
||
|
int iRandom2;
|
||
|
string sTokenLine;
|
||
|
string sCD;
|
||
|
|
||
|
oPC = GetPCSpeaker();
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
SetPartyInt(oPC,"QuestStep",1);
|
||
|
SetPartyString(oPC,"QuestGiver",GetTag(OBJECT_SELF));
|
||
|
SetPartyInt(oPC,"Quest",1);
|
||
|
|
||
|
SetCustomToken(99, "Well, then, you did alright.");
|
||
|
|
||
|
SetCustomToken(111, "");
|
||
|
SetCustomToken(112, "");
|
||
|
SetCustomToken(113, "");
|
||
|
|
||
|
SetToken(oPC,OBJECT_SELF,103,GetName(OBJECT_SELF));
|
||
|
|
||
|
iRandom = Random(120);
|
||
|
//iRandom=99;
|
||
|
|
||
|
if (iRandom < 5)
|
||
|
if (GetLocalInt(GetModule(),"AdventureZone") == 0)
|
||
|
GuildQuestType1(oPC); //AdventureZone - Kill
|
||
|
else
|
||
|
GuildQuestType6(oPC);
|
||
|
else if (iRandom < 10)
|
||
|
if (GetLocalInt(GetModule(),"AdventureZone") == 0)
|
||
|
GuildQuestType2(oPC); //AdventureZone - Retrieve
|
||
|
else
|
||
|
GuildQuestType8(oPC);
|
||
|
else if (iRandom < 20)
|
||
|
if (GetLocalInt(GetModule(),"AdventureZone") == 0)
|
||
|
GuildQuestType14(oPC); //AdventureZone - Dungeon Retrieve
|
||
|
else
|
||
|
GuildQuestType4(oPC);
|
||
|
else if (iRandom < 25)
|
||
|
GuildQuestType3(oPC); //LandCamp - Kill
|
||
|
else if (iRandom < 35)
|
||
|
GuildQuestType4(oPC); //LandCamp - Kill and Retrieve
|
||
|
else if (iRandom < 40)
|
||
|
GuildQuestType5(oPC); //House - Kill
|
||
|
else if (iRandom < 45)
|
||
|
GuildQuestType6(oPC); //Sewers - Kill
|
||
|
else if (iRandom < 50)
|
||
|
GuildQuestType7(oPC); //Graveyard - Kill
|
||
|
else if (iRandom < 55)
|
||
|
GuildQuestType8(oPC); //Crypt - Kill
|
||
|
else if (iRandom < 60)
|
||
|
if (GetLocalInt(GetModule(),"AdventureZone") == 0)
|
||
|
GuildQuestType9(oPC); //AdventureZone - Dungeon
|
||
|
else
|
||
|
GuildQuestType4(oPC);
|
||
|
else if (iRandom < 70)
|
||
|
GuildQuestType10(oPC); //House - Elementals/Demons/Undead
|
||
|
else if (iRandom < 80)
|
||
|
GuildQuestType11(oPC); //Sewers - Elementals/Demons/Undead
|
||
|
else if (iRandom < 90)
|
||
|
GuildQuestType12(oPC); //Graveyard - Elementals/Demons/Undead
|
||
|
else if (iRandom < 100)
|
||
|
GuildQuestType15(oPC); //House - Red Wizards
|
||
|
else if (iRandom < 110)
|
||
|
GuildQuestType16(oPC); //Sewers- Red Wizards
|
||
|
else
|
||
|
GuildQuestType13(oPC); //Crypt- Undead
|
||
|
|
||
|
}
|
||
|
|
||
|
void GetSewerKey(object oPC)
|
||
|
{
|
||
|
object oPartyMember = GetFirstFactionMember(oPC, TRUE);
|
||
|
while (GetIsObjectValid(oPartyMember) == TRUE)
|
||
|
{
|
||
|
if (!HasItem(oPartyMember,"hts2_key"))
|
||
|
CreateItemOnObject("hts2_key",oPartyMember);
|
||
|
oPartyMember = GetNextFactionMember(oPC, TRUE);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void GuildQuestType1(object oPC)
|
||
|
{
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iDifficulty;
|
||
|
int iRandom;
|
||
|
string sCD;
|
||
|
string sTokenLine;
|
||
|
object oBoss;
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestAdventureZone",1);
|
||
|
SetPartyString(oPC,"AZRespawn",GetTag(OBJECT_SELF));
|
||
|
oBoss = SetupAdventureZones(iAdjustedLevel);
|
||
|
SetPartyString(oPC,"QuestStep1Mob",GetTag(oBoss));
|
||
|
SetPartyString(oPC,"QuestTargetMob",GetTag(oBoss));
|
||
|
SetPartyInt(oPC,"QuestType",1);
|
||
|
iDifficulty = AZDifficulty();
|
||
|
SetPartyInt(oPC,"QuestDifficulty",iDifficulty);
|
||
|
sCD = GetLocalString(oBoss,"sCD");
|
||
|
|
||
|
iRandom = Random(3)+1;
|
||
|
if (iRandom == 1)
|
||
|
{
|
||
|
sTokenLine = "The city council has asked us to investigate problems surrounding a distant village. We have pinpointed the source of the problems and need you to deal with it.";
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "We believe that a " + GetName(oBoss) + " is behind the problems. Eliminate the " + GetName(oBoss) + " and return to me.";
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
sTokenLine = "Gather what supplies you need and then talk to me and I send a guide with you to show you the location.";
|
||
|
SetToken(oPC,OBJECT_SELF,113,sTokenLine);
|
||
|
} else {
|
||
|
if (Random(2)==0)
|
||
|
sTokenLine = "The elves send word of attacks that have been happening with growing frequency in the past few weeks. We need you to go help out and make their lands safe once again.";
|
||
|
else
|
||
|
sTokenLine = "The dwarves send word of attacks that have been happening with growing frequency in the past few weeks. We need you to go help out and make their lands safe once again.";
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "We believe that a " + GetName(oBoss) + " is behind the attacks. Eliminate the " + GetName(oBoss) + " and return to me.";
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
sTokenLine = "Gather what supplies you need and then talk to me and I send a guide with you to show you the location.";
|
||
|
SetToken(oPC,OBJECT_SELF,113,sTokenLine);
|
||
|
}
|
||
|
|
||
|
SetToken(oPC,OBJECT_SELF,101,sCD);
|
||
|
SetToken(oPC,OBJECT_SELF,105,GetName(oBoss));
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
//AddJournalQuestEntry("jSpecial",1,oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
|
||
|
}
|
||
|
|
||
|
void GuildQuestType2(object oPC)
|
||
|
{
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iDifficulty;
|
||
|
int iRandom;
|
||
|
string sCD;
|
||
|
string sTokenLine;
|
||
|
string sItem;
|
||
|
string sItemTag;
|
||
|
object oBoss;
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestAdventureZone",1);
|
||
|
SetPartyString(oPC,"AZRespawn",GetTag(OBJECT_SELF));
|
||
|
//oBoss = SetupAdventureZones(iAdjustedLevel);
|
||
|
|
||
|
iRandom = Random(4)+1;
|
||
|
switch(iRandom)
|
||
|
{
|
||
|
case 1: sItemTag = "mg_item1"; sItem = "an ancient scroll"; break;
|
||
|
case 2: sItemTag = "mg_item2"; sItem = "an old tome"; break;
|
||
|
case 3: sItemTag = "tg_item6"; sItem = "an ancient relic"; break;
|
||
|
case 4: sItemTag = "mg_item3"; sItem = "an old spellbook"; break;
|
||
|
}
|
||
|
|
||
|
oBoss = SetupAdventureZones(iAdjustedLevel,0,"",sItemTag);
|
||
|
SetPartyString(oPC,"QuestItemTag",sItemTag);
|
||
|
SetPartyInt(oPC,"QuestType",3);
|
||
|
iDifficulty = AZDifficulty();
|
||
|
SetPartyInt(oPC,"QuestDifficulty",iDifficulty);
|
||
|
sCD = GetLocalString(oBoss,"sCD");
|
||
|
|
||
|
object oItem = GetObjectByTag(sItemTag);
|
||
|
if (GetIsObjectValid(oItem))
|
||
|
SetToken(oPC,OBJECT_SELF,104,GetName(oItem));
|
||
|
else
|
||
|
SetToken(oPC,OBJECT_SELF,104,"item you requested");
|
||
|
|
||
|
sTokenLine = "We have uncovered information of " + sItem + " that has been found, but alas, it has falled into the hands of those that would use whatever information it contains against the city.";
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "We need you to recover the item by whatever means neccisary. You don't have to kill its guardians, but we will not mourn their loss.";
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
sTokenLine = "Gather what supplies you need and then talk to me and I send a guide with you to show you the location.";
|
||
|
SetToken(oPC,OBJECT_SELF,113,sTokenLine);
|
||
|
|
||
|
SetToken(oPC,OBJECT_SELF,101,sCD);
|
||
|
SetToken(oPC,OBJECT_SELF,105,GetName(oBoss));
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jSpecial",1,oPC);
|
||
|
//AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType3(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
if (Random(5) == 0)
|
||
|
oBoss = GetDungeonCamp(oPC,OBJECT_SELF);
|
||
|
else
|
||
|
oBoss = GetQuestCamp(oPC,OBJECT_SELF);
|
||
|
|
||
|
sTokenLine = "The council informs me that some " + GetToken(101) + " are causing trouble in the lands surrounding the city. It is sometimes our task to ensure the safety of the lands, and in this our task becomes your task.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "The " + GetToken(101) + " are located " + GetToken(102) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType4(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iRandom;
|
||
|
string sItemTag;
|
||
|
string sItem;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
if (Random(5) == 0)
|
||
|
oBoss = GetDungeonCamp(oPC,OBJECT_SELF);
|
||
|
else
|
||
|
oBoss = GetQuestCamp(oPC,OBJECT_SELF);
|
||
|
|
||
|
|
||
|
iRandom = Random(4)+1;
|
||
|
switch(iRandom)
|
||
|
{
|
||
|
case 1: sItemTag = "mg_item1"; sItem = "an ancient scroll"; break;
|
||
|
case 2: sItemTag = "mg_item2"; sItem = "an old tome"; break;
|
||
|
case 3: sItemTag = "tg_item6"; sItem = "an ancient relic"; break;
|
||
|
case 4: sItemTag = "mg_item3"; sItem = "an old spellbook"; break;
|
||
|
}
|
||
|
|
||
|
SetPartyString(oPC,"QuestItemTag",sItemTag);
|
||
|
object oItem = CreateItemOnObject(sItemTag,oBoss);
|
||
|
SetToken(oPC,OBJECT_SELF,104,GetName(oItem));
|
||
|
|
||
|
sTokenLine = "One of our agents discoverd that some " + GetToken(101) + " have gotten their hands on " + sItem + ". Depending on what information can be uncovered from it, this item could be used against the city. It is too great a danger to be left in the hands of the " + GetToken(101) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "The " + GetToken(101) + " are located " + GetToken(102) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType5(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
object oHouse;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iCamp;
|
||
|
int iHCAdjust;
|
||
|
int iHouse;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
string sZone;
|
||
|
string sQuestCampType;
|
||
|
string sCampDescription;
|
||
|
string sLocation;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
iHCAdjust = 0;
|
||
|
if (CheckHardcore())
|
||
|
iHCAdjust = 5;
|
||
|
|
||
|
if (iLevel - iHCAdjust < 5)
|
||
|
iCamp = 1;
|
||
|
else if (iLevel - iHCAdjust < 10)
|
||
|
iCamp = Random(2)+1;
|
||
|
else if (iLevel - iHCAdjust < 15)
|
||
|
iCamp = Random(3)+1;
|
||
|
else
|
||
|
iCamp = Random(2)+2;
|
||
|
|
||
|
iHouse = Random(2)+1;
|
||
|
|
||
|
if (iHouse == 1 && GetLocalInt(GetModule(),"HTCAbandonedHouse1") == 1)
|
||
|
iHouse = 2;
|
||
|
if (iHouse == 2 && GetLocalInt(GetModule(),"HTCAbandonedHouse2") == 1)
|
||
|
iHouse = 1;
|
||
|
|
||
|
if (iHouse==1)
|
||
|
{
|
||
|
sZone = "H1";
|
||
|
sLocation = "in an abandoned building across from the arena in Hightop City";
|
||
|
SetLocalInt(GetModule(),"HTCAbandonedHouse1",1);
|
||
|
SetPartyInt(oPC,"HTCAbandonedHouse1",1);
|
||
|
} else {
|
||
|
sZone = "H2";
|
||
|
sLocation = "in an abandoned building in Upper Hightop City";
|
||
|
SetLocalInt(GetModule(),"HTCAbandonedHouse2",1);
|
||
|
SetPartyInt(oPC,"HTCAbandonedHouse2",1);
|
||
|
}
|
||
|
|
||
|
sQuestCampType="";
|
||
|
|
||
|
oHouse = GetObjectByTag(sZone + "_Q1_Boss");
|
||
|
if (GetIsObjectValid(oHouse))
|
||
|
{
|
||
|
ClearZoneMobs(GetArea(oHouse));
|
||
|
//SendMessageToPC(GetFirstPC(),GetTag(GetArea(oHouse)));
|
||
|
}
|
||
|
oBoss = SpawnQuestCamp(sZone,iCamp,iAdjustedLevel,1,sQuestCampType);
|
||
|
|
||
|
sQuestCampType = GetLocalString(oBoss,"CampType");
|
||
|
|
||
|
sCampDescription = GetLocalString(oBoss,"Description");
|
||
|
SetToken(oPC,OBJECT_SELF,101,sCampDescription);
|
||
|
SetToken(oPC,OBJECT_SELF,102,sLocation);
|
||
|
SetToken(oPC,OBJECT_SELF,105,GetName(oBoss));
|
||
|
|
||
|
SetPartyInt(oPC,"QuestType",1);
|
||
|
SetPartyInt(oPC,"QuestCamp",iCamp);
|
||
|
SetPartyString(oPC,"QuestCampzone",sZone);
|
||
|
SetPartyString(oPC,"QuestTargetNPC",GetTag(OBJECT_SELF));
|
||
|
SetPartyString(oPC,"QuestTargetMob",GetTag(oBoss));
|
||
|
SetPartyInt(oPC,"QuestTargetMobDead",0);
|
||
|
SetPartyString(oPC,"QuestCampType",sQuestCampType);
|
||
|
|
||
|
if (iCamp == 1)
|
||
|
SetPartyInt(oPC,"QuestDifficulty",1);
|
||
|
else
|
||
|
SetPartyInt(oPC,"QuestDifficulty",2);
|
||
|
|
||
|
if (Random(2) == 0)
|
||
|
{
|
||
|
sTokenLine = "I have looked into the seeing pool and detected evil within our city. Some " + GetToken(101) + " are within the city and must be eliminated before any citizens come to harm.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
} else {
|
||
|
sTokenLine = "One of our apprentices was on an errand last night and spotted some " + GetToken(101) + " near a building in the city. I know not how they came to be in the city, but they must be vanquished.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
}
|
||
|
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "The " + GetToken(101) + " are located " + GetToken(102) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType6(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
oBoss = GetDungeonCamp(oPC,OBJECT_SELF,"",1);
|
||
|
|
||
|
GetSewerKey(oPC);
|
||
|
|
||
|
sTokenLine = "I have seen in the seeing pool some " + GetToken(101) + " roaming about in the abandoned sewers. They must be dealt with before they break free of the sewers and present a danger to the city.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "I need you to go into the abandoned sewers and destroy these " + GetToken(101) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType7(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
oBoss = GetQuestCamp(oPC,OBJECT_SELF,"",2);
|
||
|
|
||
|
sTokenLine = "The council sends word of disturbances in the graveyard. They believe some " + GetToken(101) + " are behind the problems.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "We need you to go up to Upper Hightop City, enter the graveyard, and put to rest these " + GetToken(101) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType8(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
oBoss = GetDungeonCamp(oPC,OBJECT_SELF,"",3);
|
||
|
|
||
|
sTokenLine = "The council sends word of of a menace in the graveyard's crypt. I sent an apprentice to check into it and under the cover of a spell of invisibility he spotted some " + GetToken(101) + ", but there were far too many for him to handle.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "We need you to clear these " + GetToken(101) + " out of the crypt. Go to Upper Hightop City, into the graveyard, enter the crypt, and get rid of these " + GetToken(101) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType9(object oPC)
|
||
|
{
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iDifficulty;
|
||
|
int iRandom;
|
||
|
string sCD;
|
||
|
string sTokenLine;
|
||
|
string sItem;
|
||
|
string sItemTag;
|
||
|
object oBoss;
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestAdventureZone",1);
|
||
|
SetPartyString(oPC,"AZRespawn",GetTag(OBJECT_SELF));
|
||
|
//oBoss = SetupAdventureZones(iAdjustedLevel);
|
||
|
|
||
|
oBoss = SetupAdventureZones(iAdjustedLevel,1);
|
||
|
SetPartyString(oPC,"QuestStep1Mob",GetTag(oBoss));
|
||
|
SetPartyString(oPC,"QuestTargetMob",GetTag(oBoss));
|
||
|
SetPartyInt(oPC,"QuestType",1);
|
||
|
iDifficulty = AZDifficulty();
|
||
|
SetPartyInt(oPC,"QuestDifficulty",iDifficulty);
|
||
|
sCD = GetLocalString(oBoss,"sCD");
|
||
|
|
||
|
sTokenLine = "We have uncovered a dungeon not too far from the city. This is clearly a base of operations for whatever is causing the bubbling chaos within the lands.";
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "We need you to go explore this dungeon and put an end to the evil within.";
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
sTokenLine = "Gather what supplies you need and then talk to me and I send a guide with you to show you the location.";
|
||
|
SetToken(oPC,OBJECT_SELF,113,sTokenLine);
|
||
|
|
||
|
SetToken(oPC,OBJECT_SELF,101,sCD);
|
||
|
SetToken(oPC,OBJECT_SELF,105,GetName(oBoss));
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
//AddJournalQuestEntry("jSpecial",1,oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType10(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
object oHouse;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iCamp;
|
||
|
int iHCAdjust;
|
||
|
int iHouse;
|
||
|
int iRandom;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
string sZone;
|
||
|
string sQuestCampType;
|
||
|
string sCampDescription;
|
||
|
string sLocation;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
iHCAdjust = 0;
|
||
|
if (CheckHardcore())
|
||
|
iHCAdjust = 5;
|
||
|
|
||
|
if (iLevel - iHCAdjust < 5)
|
||
|
iCamp = 1;
|
||
|
else if (iLevel - iHCAdjust < 10)
|
||
|
iCamp = Random(2)+1;
|
||
|
else if (iLevel - iHCAdjust < 15)
|
||
|
iCamp = Random(3)+1;
|
||
|
else
|
||
|
iCamp = Random(2)+2;
|
||
|
|
||
|
iHouse = Random(2)+1;
|
||
|
|
||
|
if (iHouse == 1 && GetLocalInt(GetModule(),"HTCAbandonedHouse1") == 1)
|
||
|
iHouse = 2;
|
||
|
if (iHouse == 2 && GetLocalInt(GetModule(),"HTCAbandonedHouse2") == 1)
|
||
|
iHouse = 1;
|
||
|
|
||
|
if (iHouse==1)
|
||
|
{
|
||
|
sZone = "H1";
|
||
|
sLocation = "in an abandoned building across from the arena in Hightop City";
|
||
|
SetLocalInt(GetModule(),"HTCAbandonedHouse1",1);
|
||
|
SetPartyInt(oPC,"HTCAbandonedHouse1",1);
|
||
|
} else {
|
||
|
sZone = "H2";
|
||
|
sLocation = "in an abandoned building in Upper Hightop City";
|
||
|
SetLocalInt(GetModule(),"HTCAbandonedHouse2",1);
|
||
|
SetPartyInt(oPC,"HTCAbandonedHouse2",1);
|
||
|
}
|
||
|
|
||
|
sQuestCampType = GetMGCamp(iLevel);
|
||
|
iRandom = GetLocalInt(GetModule(),"iRandom");
|
||
|
|
||
|
oHouse = GetObjectByTag(sZone + "_Q1_Boss");
|
||
|
if (GetIsObjectValid(oHouse))
|
||
|
{
|
||
|
ClearZoneMobs(GetArea(oHouse));
|
||
|
//SendMessageToPC(GetFirstPC(),GetTag(GetArea(oHouse)));
|
||
|
}
|
||
|
oBoss = SpawnQuestCamp(sZone,iCamp,iAdjustedLevel,1,sQuestCampType);
|
||
|
|
||
|
//sQuestCampType = GetLocalString(oBoss,"CampType");
|
||
|
|
||
|
sCampDescription = GetLocalString(oBoss,"Description");
|
||
|
SetToken(oPC,OBJECT_SELF,101,sCampDescription);
|
||
|
SetToken(oPC,OBJECT_SELF,102,sLocation);
|
||
|
SetToken(oPC,OBJECT_SELF,105,GetName(oBoss));
|
||
|
|
||
|
SetPartyInt(oPC,"QuestType",1);
|
||
|
SetPartyInt(oPC,"QuestCamp",iCamp);
|
||
|
SetPartyString(oPC,"QuestCampzone",sZone);
|
||
|
SetPartyString(oPC,"QuestTargetNPC",GetTag(OBJECT_SELF));
|
||
|
SetPartyString(oPC,"QuestTargetMob",GetTag(oBoss));
|
||
|
SetPartyInt(oPC,"QuestTargetMobDead",0);
|
||
|
SetPartyString(oPC,"QuestCampType",sQuestCampType);
|
||
|
|
||
|
if (iCamp == 1)
|
||
|
SetPartyInt(oPC,"QuestDifficulty",1);
|
||
|
else
|
||
|
SetPartyInt(oPC,"QuestDifficulty",2);
|
||
|
|
||
|
if (iRandom==1)
|
||
|
sTokenLine = "The ripples of magic are alive in the city. I have sent agents to investigate the strange activity and received word that an errant conjurer is plying his trade in they city. This cannot be allowed to happen, for if he loses control of the elementals great destruction must surely follow. You must put an end to the conjurer and the beings he has summoned.";
|
||
|
else if (iRandom==2)
|
||
|
sTokenLine = "I have looked into the seeing pool and seen the foulest of magics being practiced in the city. A summoner of dreadful intent has called forth beings from the netherplanes. We do not know his intent, but he must be stopped.";
|
||
|
else
|
||
|
sTokenLine = "The city stinks with necromancy. It is a vile magic that clashes with all others. I have used the seeing pool to find out where this foul art is being practiced and need you to put an end to the undead.";
|
||
|
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "The " + GetToken(101) + " are located " + GetToken(102) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType11(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iRandom;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
string sQuestCampType;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
sQuestCampType = GetMGCamp(iLevel,1);
|
||
|
iRandom = GetLocalInt(GetModule(),"iRandom");
|
||
|
|
||
|
oBoss = GetDungeonCamp(oPC,OBJECT_SELF,sQuestCampType,1);
|
||
|
|
||
|
GetSewerKey(oPC);
|
||
|
|
||
|
if (iRandom==1)
|
||
|
sTokenLine = "The city council reports that a beings of fire and water and ice have been spotted in the abandoned sewers. This can only be the work of an errant conjurer. This cannot be allowed, for if the elementals break free of the sewers the people of this city would be in great danger.";
|
||
|
else if (iRandom==2)
|
||
|
sTokenLine = "I have detected a dark magic in use within the city. The magic originates beneath our feet in the abandoned sewers. It has the stink of the abyss to it, and I fear if the beings win through to the city the citizens will be in grave danger.";
|
||
|
else
|
||
|
sTokenLine = "I have seen in the seeing pool a legion of flesh and bone beneath the city. There is foul necromancy at work in the abandoned sewers.";
|
||
|
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "I need you to go into the abandoned sewers and destroy these " + GetToken(101) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType12(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iRandom;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
string sQuestCampType;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
sQuestCampType = GetMGCamp(iLevel);
|
||
|
iRandom = GetLocalInt(GetModule(),"iRandom");
|
||
|
|
||
|
oBoss = GetQuestCamp(oPC,OBJECT_SELF,sQuestCampType,2);
|
||
|
|
||
|
if (iRandom==1)
|
||
|
sTokenLine = "There are times when the magic of summoning can drive the mage to the brink of insanity and beyond. This appears to be the case with a conjurer of the city, for he has gone to the graveyard and begun summoning forth beings from the elemental plane. He cannot be reasoned with, and therefore must be dealt with.";
|
||
|
else if (iRandom==2)
|
||
|
sTokenLine = "The council sends urgent word that a pack of demons from the foul abyss have invaded the very city. They are in the graveyard causing death and destruction and they must be sent back to the depths before they can do further harm.";
|
||
|
else
|
||
|
sTokenLine = "I must ask you to act quickly, " + GetName(oPC) + ". Our city's graveyard has been invaded by the foul art of necromancy and our citizens of old are rising up as foul undead.";
|
||
|
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "We need you to go up to Upper Hightop City, enter the graveyard, and destroy these " + GetToken(101) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType13(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
object oItem;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iRandom;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
string sQuestCampType;
|
||
|
string sItemTag;
|
||
|
string sItem;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
iRandom = Random(3)+1;
|
||
|
switch(iRandom)
|
||
|
{
|
||
|
case 1: sItemTag = "mg_item1"; sItem = "an ancient scroll"; break;
|
||
|
case 2: sItemTag = "mg_item2"; sItem = "an old tome"; break;
|
||
|
case 3: sItemTag = "mg_item3"; sItem = "an old spellbook"; break;
|
||
|
}
|
||
|
|
||
|
sQuestCampType = GetMGCamp(iLevel,2);
|
||
|
iRandom = GetLocalInt(GetModule(),"iRandom");
|
||
|
SetLocalInt(GetModule(),"iRandom",0);
|
||
|
|
||
|
oBoss = GetDungeonCamp(oPC,OBJECT_SELF,sQuestCampType,3);
|
||
|
oItem=CreateItemOnObject(sItemTag,oBoss);
|
||
|
SetPartyString(oPC,"QuestItemTag",sItemTag);
|
||
|
SetToken(oPC,OBJECT_SELF,104,GetName(oItem));
|
||
|
|
||
|
sTokenLine = "We have uncovered information that leads us to believe that " + sItem + " of great value can be found within the crypt in the city's graveyard. It is very important for us to retrieve this before the ravages of time take it from us.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "Be careful, " + GetName(oPC) + ", for the crypt is not always a safe place to be.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType14(object oPC)
|
||
|
{
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iDifficulty;
|
||
|
int iRandom;
|
||
|
string sCD;
|
||
|
string sTokenLine;
|
||
|
string sItem;
|
||
|
string sItemTag;
|
||
|
object oBoss;
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestAdventureZone",1);
|
||
|
SetPartyString(oPC,"AZRespawn",GetTag(OBJECT_SELF));
|
||
|
//oBoss = SetupAdventureZones(iAdjustedLevel);
|
||
|
|
||
|
iRandom = Random(3)+1;
|
||
|
switch(iRandom)
|
||
|
{
|
||
|
case 1: sItemTag = "mg_item1"; sItem = "an ancient scroll"; break;
|
||
|
case 2: sItemTag = "mg_item2"; sItem = "an old tome"; break;
|
||
|
case 3: sItemTag = "mg_item3"; sItem = "an old spellbook"; break;
|
||
|
}
|
||
|
|
||
|
oBoss = SetupAdventureZones(iAdjustedLevel,1,"",sItemTag);
|
||
|
SetPartyString(oPC,"QuestItemTag",sItemTag);
|
||
|
SetPartyInt(oPC,"QuestType",3);
|
||
|
iDifficulty = AZDifficulty();
|
||
|
SetPartyInt(oPC,"QuestDifficulty",iDifficulty);
|
||
|
sCD = GetLocalString(oBoss,"sCD");
|
||
|
|
||
|
object oItem = GetObjectByTag(sItemTag);
|
||
|
if (GetIsObjectValid(oItem))
|
||
|
SetToken(oPC,OBJECT_SELF,104,GetName(oItem));
|
||
|
else
|
||
|
SetToken(oPC,OBJECT_SELF,104,"item you requested");
|
||
|
|
||
|
sTokenLine = "We have uncovered information that " + sItem + " is located in a dungeon not too far from the city.";
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "We need you to retrieve this item so that we may study it. Remember, you are a magician, not a fighter. You need not leave behind a horde of corpses if you do not wish.";
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
sTokenLine = "Gather what supplies you need and then talk to me and I send a guide with you to show you the location.";
|
||
|
SetToken(oPC,OBJECT_SELF,113,sTokenLine);
|
||
|
|
||
|
SetToken(oPC,OBJECT_SELF,101,sCD);
|
||
|
SetToken(oPC,OBJECT_SELF,105,GetName(oBoss));
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jSpecial",1,oPC);
|
||
|
//AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
string GetMGCamp(int iLevel,int iType=0)
|
||
|
{
|
||
|
string sQuestCampType;
|
||
|
int iRandom;
|
||
|
|
||
|
sQuestCampType="";
|
||
|
if (iType = 0)
|
||
|
iRandom = Random(3)+1;
|
||
|
else if (iType = 1)
|
||
|
iRandom = Random(2)+1;
|
||
|
else if (iType = 2)
|
||
|
iRandom = 3;
|
||
|
else
|
||
|
iRandom = Random(2)+1;
|
||
|
|
||
|
if (iLevel < 4)
|
||
|
iRandom = 3;
|
||
|
if (iLevel>23 && iRandom==1)
|
||
|
iRandom = Random(2)+2;
|
||
|
|
||
|
if (iRandom==1)
|
||
|
{
|
||
|
if (iLevel < 8)
|
||
|
sQuestCampType = "summon1";
|
||
|
else if (iLevel < 11)
|
||
|
{
|
||
|
sQuestCampType = "undead3";
|
||
|
iRandom = 3;
|
||
|
}
|
||
|
else if (iLevel < 16)
|
||
|
sQuestCampType = "summon3";
|
||
|
else
|
||
|
sQuestCampType = "summon4";
|
||
|
}
|
||
|
else if (iRandom==2)
|
||
|
{
|
||
|
if (iLevel < 8)
|
||
|
sQuestCampType = "summon2";
|
||
|
else if (iLevel < 11)
|
||
|
{
|
||
|
sQuestCampType = "slaad1";
|
||
|
iRandom = 3;
|
||
|
}
|
||
|
else if (iLevel < 16)
|
||
|
{
|
||
|
if (Random(3)>0)
|
||
|
sQuestCampType = "summon5";
|
||
|
else
|
||
|
sQuestCampType = "slaad2";
|
||
|
}
|
||
|
else if (iLevel < 23)
|
||
|
sQuestCampType = "summon6";
|
||
|
else if (iLevel < 33)
|
||
|
sQuestCampType = "fiend";
|
||
|
else
|
||
|
sQuestCampType = "demon";
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
if (iLevel < 4)
|
||
|
sQuestCampType = "undead2";
|
||
|
else if (iLevel < 6)
|
||
|
sQuestCampType = "undead1";
|
||
|
else if (iLevel < 10)
|
||
|
sQuestCampType = "undead3";
|
||
|
else if (iLevel < 15)
|
||
|
sQuestCampType = "undead4";
|
||
|
else if (iLevel < 21)
|
||
|
sQuestCampType = "undead5";
|
||
|
else if (iLevel < 31)
|
||
|
sQuestCampType = "undead6";
|
||
|
else
|
||
|
sQuestCampType = "vampire";
|
||
|
}
|
||
|
|
||
|
SetLocalInt(GetModule(),"iRandom",iRandom);
|
||
|
return sQuestCampType;
|
||
|
}
|
||
|
|
||
|
void GuildQuestType15(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
object oHouse;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iCamp;
|
||
|
int iHCAdjust;
|
||
|
int iHouse;
|
||
|
int iRandom;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
string sZone;
|
||
|
string sQuestCampType;
|
||
|
string sCampDescription;
|
||
|
string sLocation;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
iHCAdjust = 0;
|
||
|
if (CheckHardcore())
|
||
|
iHCAdjust = 5;
|
||
|
|
||
|
if (iLevel - iHCAdjust < 5)
|
||
|
iCamp = 1;
|
||
|
else if (iLevel - iHCAdjust < 10)
|
||
|
iCamp = Random(2)+1;
|
||
|
else if (iLevel - iHCAdjust < 15)
|
||
|
iCamp = Random(3)+1;
|
||
|
else
|
||
|
iCamp = Random(2)+2;
|
||
|
|
||
|
iHouse = Random(2)+1;
|
||
|
|
||
|
if (iHouse == 1 && GetLocalInt(GetModule(),"HTCAbandonedHouse1") == 1)
|
||
|
iHouse = 2;
|
||
|
if (iHouse == 2 && GetLocalInt(GetModule(),"HTCAbandonedHouse2") == 1)
|
||
|
iHouse = 1;
|
||
|
|
||
|
if (iHouse==1)
|
||
|
{
|
||
|
sZone = "H1";
|
||
|
sLocation = "in an abandoned building across from the arena in Hightop City";
|
||
|
SetLocalInt(GetModule(),"HTCAbandonedHouse1",1);
|
||
|
SetPartyInt(oPC,"HTCAbandonedHouse1",1);
|
||
|
} else {
|
||
|
sZone = "H2";
|
||
|
sLocation = "in an abandoned building in Upper Hightop City";
|
||
|
SetLocalInt(GetModule(),"HTCAbandonedHouse2",1);
|
||
|
SetPartyInt(oPC,"HTCAbandonedHouse2",1);
|
||
|
}
|
||
|
|
||
|
sQuestCampType = "rwiz";
|
||
|
|
||
|
oHouse = GetObjectByTag(sZone + "_Q1_Boss");
|
||
|
if (GetIsObjectValid(oHouse))
|
||
|
{
|
||
|
ClearZoneMobs(GetArea(oHouse));
|
||
|
//SendMessageToPC(GetFirstPC(),GetTag(GetArea(oHouse)));
|
||
|
}
|
||
|
oBoss = SpawnQuestCamp(sZone,iCamp,iAdjustedLevel,1,sQuestCampType);
|
||
|
|
||
|
//sQuestCampType = GetLocalString(oBoss,"CampType");
|
||
|
|
||
|
sCampDescription = GetLocalString(oBoss,"Description");
|
||
|
SetToken(oPC,OBJECT_SELF,101,sCampDescription);
|
||
|
SetToken(oPC,OBJECT_SELF,102,sLocation);
|
||
|
SetToken(oPC,OBJECT_SELF,105,GetName(oBoss));
|
||
|
|
||
|
SetPartyInt(oPC,"QuestType",1);
|
||
|
SetPartyInt(oPC,"QuestCamp",iCamp);
|
||
|
SetPartyString(oPC,"QuestCampzone",sZone);
|
||
|
SetPartyString(oPC,"QuestTargetNPC",GetTag(OBJECT_SELF));
|
||
|
SetPartyString(oPC,"QuestTargetMob",GetTag(oBoss));
|
||
|
SetPartyInt(oPC,"QuestTargetMobDead",0);
|
||
|
SetPartyString(oPC,"QuestCampType",sQuestCampType);
|
||
|
|
||
|
if (iCamp == 1)
|
||
|
SetPartyInt(oPC,"QuestDifficulty",1);
|
||
|
else
|
||
|
SetPartyInt(oPC,"QuestDifficulty",2);
|
||
|
|
||
|
sTokenLine = "The Red Wizards have long been our enemy. They are practitioners who focus on chaos to bring out their power. They have been spotted in the city and you must root them out before they do harm.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "The " + GetToken(101) + " are located " + GetToken(102) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|
||
|
|
||
|
void GuildQuestType16(object oPC)
|
||
|
{
|
||
|
object oBoss;
|
||
|
int iVariance;
|
||
|
int iLevel;
|
||
|
int iAdjustedLevel;
|
||
|
int iRandom;
|
||
|
string sTokenLine;
|
||
|
string sTag;
|
||
|
string sQuestCampType;
|
||
|
|
||
|
SetPartyInt(oPC,"QuestSteps",1);
|
||
|
SetPartyInt(oPC,"QuestStep",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));
|
||
|
|
||
|
iLevel = GetHitDice(oPC);
|
||
|
iAdjustedLevel = GetAdjustedLevel(oPC);
|
||
|
|
||
|
sQuestCampType = "rwiz";
|
||
|
|
||
|
oBoss = GetDungeonCamp(oPC,OBJECT_SELF,sQuestCampType,1);
|
||
|
|
||
|
GetSewerKey(oPC);
|
||
|
|
||
|
sTokenLine = "I have sensed the workings of a chaotic magic which can only be the work of the Red Wizards. We have learned of their presense in the abandoned sewers beneath our feet.";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
||
|
sTokenLine = "I need you to go into the abandoned sewers and destroy these " + GetToken(101) + ".";
|
||
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
||
|
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
|
||
|
|
||
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
||
|
RemoveJournalQuestEntry("jCamp",oPC);
|
||
|
AddJournalQuestEntry("jCamp",1,oPC);
|
||
|
}
|