EN4_PRC8/_module/nss/en4_tg_getquest.nss

1015 lines
31 KiB
Plaintext
Raw Permalink Normal View History

#include "rd_questinc"
#include "rd_advzones"
#include "prc_class_const"
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 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(100);
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
GuildQuestType11(oPC);
else if (iRandom < 13)
GuildQuestType3(oPC); //LandCamp - Kill
else if (iRandom < 15)
GuildQuestType4(oPC); //LandCamp - Kill and Retrieve
else if (iRandom < 20)
GuildQuestType5(oPC); //House - Kill
else if (iRandom < 25)
GuildQuestType6(oPC); //Sewers - Kill
else if (iRandom < 30)
GuildQuestType7(oPC); //Graveyard - Kill
else if (iRandom < 35)
GuildQuestType8(oPC); //Crypt - Kill
else if (iRandom < 40)
if (GetLocalInt(GetModule(),"AdventureZone") == 0)
GuildQuestType9(oPC); //AdventureZone - Dungeon - Retrieve
else
GuildQuestType14(oPC);
else if (iRandom < 55)
{
if (GetLocalInt(GetModule(),"Breakins") < 41 &&
GetLevelByClass(CLASS_TYPE_ROGUE, oPC)
+GetLevelByClass(CLASS_TYPE_NINJA, oPC)
+GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
+GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC)
+GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oPC) > 0)
GuildQuestType10(oPC); //Burgle
else
GuildQuestType2(oPC);
}
else if (iRandom < 65)
GuildQuestType11(oPC); //House - Bandits
else if (iRandom < 70)
GuildQuestType12(oPC); //House - Assassins
else if (iRandom < 80)
GuildQuestType13(oPC); //Sewers - Bandits
else if (iRandom < 90)
GuildQuestType14(oPC); //Graveyard - Bandits
else if (iRandom < 95)
GuildQuestType15(oPC); //Sewers - Assassins
else
{
if (GetLocalInt(GetModule(),"Breakins") < 41)
GuildQuestType10(oPC); //Burgle
else
GuildQuestType9(oPC);
}
}
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 = "We have operations that extend far from the city, and some of these operations are being interupted by the strange chaos effecting the lands.";
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
sTokenLine = "We need you to eliminate one of the sources of this chaos. You are to eliminate the " + GetName(oBoss) + " that is interfering with our operations.";
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 {
sTokenLine = "We often run afoul of the city guard, but in these chaotic times they tend to look away so long as we do our part to help out.";
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
sTokenLine = "Our help to help out is now your part. You are to eliminate the " + GetName(oBoss) + " that is causing some problems.";
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(8)+1;
switch(iRandom)
{
case 1: sItemTag = "tg_item1"; sItem = "a special diamond"; break;
case 2: sItemTag = "tg_item2"; sItem = "a special ruby"; break;
case 3: sItemTag = "tg_item3"; sItem = "a special emerald"; break;
case 4: sItemTag = "tg_item4"; sItem = "a special ring"; break;
case 5: sItemTag = "tg_item5"; sItem = "a special necklace"; break;
case 6: sItemTag = "tg_item6"; sItem = "an ancient relic"; break;
case 7: sItemTag = "tg_item7"; sItem = "an ancient amulet"; break;
case 8: sItemTag = "tg_item8"; sItem = "an ancient ring"; 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 word that " + sItem + " is located not too far from the city. We want you to go get it for us.";
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
sTokenLine = "Look, you are a thief, or at least trying to be one. This should be right up your alley. Go sneak around, pound on a few guards, make a distraction, whatever, just get what we need and get back here.";
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 = "Some " + GetToken(101) + " have been disrupting our operations in the surrounding lands. The " + GetToken(101) + " need to be dealt with before they interfere with our profits.";
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(8)+1;
switch(iRandom)
{
case 1: sItemTag = "tg_item1"; sItem = "a special diamond"; break;
case 2: sItemTag = "tg_item2"; sItem = "a special ruby"; break;
case 3: sItemTag = "tg_item3"; sItem = "a special emerald"; break;
case 4: sItemTag = "tg_item4"; sItem = "a special ring"; break;
case 5: sItemTag = "tg_item5"; sItem = "a special necklace"; break;
case 6: sItemTag = "tg_item6"; sItem = "an ancient relic"; break;
case 7: sItemTag = "tg_item7"; sItem = "an ancient amulet"; break;
case 8: sItemTag = "tg_item8"; sItem = "an ancient ring"; break;
}
SetPartyString(oPC,"QuestItemTag",sItemTag);
object oItem = CreateItemOnObject(sItemTag,oBoss);
SetToken(oPC,OBJECT_SELF,104,GetName(oItem));
sTokenLine = "Some " + GetToken(101) + " have aquired an item of interest, " + sItem + " that proves to be more valuable than the " + GetToken(101) + "' lives are worth.";
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 = "Some " + GetToken(101) + " have been disrupting our operations in the city. The " + GetToken(101) + " need to be dealt with before they interfere with our profits.";
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
} else {
sTokenLine = "The city council has asked us to find some " + GetToken(101) + " that are holed up in the city. We have uncovered their base and now need you to deal with them.";
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 received word that some " + GetToken(101) + " have been spotted in the abandoned sewers. This area is of vital importance to us and must be clear for our use.";
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. Our agents believe the disturbances to be caused by some " + GetToken(101) + ".";
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 agent to check into it and he spotted some " + GetToken(101) + ", but there were 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);
iRandom = Random(8)+1;
switch(iRandom)
{
case 1: sItemTag = "tg_item1"; sItem = "a special diamond"; break;
case 2: sItemTag = "tg_item2"; sItem = "a special ruby"; break;
case 3: sItemTag = "tg_item3"; sItem = "a special emerald"; break;
case 4: sItemTag = "tg_item4"; sItem = "a special ring"; break;
case 5: sItemTag = "tg_item5"; sItem = "a special necklace"; break;
case 6: sItemTag = "tg_item6"; sItem = "an ancient relic"; break;
case 7: sItemTag = "tg_item7"; sItem = "an ancient amulet"; break;
case 8: sItemTag = "tg_item8"; sItem = "an ancient ring"; 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 word that " + sItem + " is located in a dungeon not too far from the city. We want you to go get it for us.";
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
sTokenLine = "Look, you are a thief, or at least trying to be one. This should be right up your alley. Go sneak around, pound on a few guards, make a distraction, whatever, just get what we need and get back here.";
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)
{
int iLevel;
int iGold;
int iHouses;
int iTotalHouses;
string sTokenLine;
SetPartyInt(oPC,"QuestSteps",1);
SetPartyInt(oPC,"QuestStep",1);
SetLocalString(oPC,"QuestGiver",GetTag(OBJECT_SELF));
SetLocalInt(oPC,"Quest",3);
SetCustomToken(111, "");
SetCustomToken(112, "");
SetCustomToken(113, "");
iLevel = GetHitDice(oPC);
iGold = iLevel * 25;
iHouses = Random(3)+2;
iTotalHouses = iHouses + GetLocalInt(oPC,"PCHouses");
SetPartyInt(oPC,"QuestGold",iGold);
SetPartyInt(oPC,"QuestHouses",iTotalHouses);
SetPartyInt(oPC,"QuestDifficulty",1);
sTokenLine = "Yes indeed, I have something for you. We need to fill our coffers a little bit, and to do that we need you plying your trade in the city.";
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
sTokenLine = "You need to break into at least " + IntToString(iHouses) + " houses and bring back at least " + IntToString(iGold) + " gold. Look, I don't care if you can't make a copper from your breakins, that's your fault for picking bad houses. Just bring us back the loot.";
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
RemoveJournalQuestEntry("jDelivery",oPC);
RemoveJournalQuestEntry("jCamp",oPC);
AddJournalQuestEntry("jSpecial",1,oPC);
}
void GuildQuestType11(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="";
if (iLevel < 12)
sQuestCampType="bandit";
else if (iLevel < 21)
sQuestCampType="merc";
else
sQuestCampType="drow";
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 = "A group of " + GetToken(101) + " have been been operating in the city without guild permission. We have located their base and need you to go teach them a lesson. ";
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 GuildQuestType12(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="";
if (Random(2) == 0)
sQuestCampType="drow";
else
sQuestCampType="duergar";
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 = "We have received reports of unsanctioned assassinations happening in the city. We believe some " + GetToken(101) + " are behind the assassinations. We cannot let the " + GetToken(101) + " get a firm foothold in the city, so we need you to deal with them. ";
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 GuildQuestType13(object oPC)
{
object oBoss;
int iVariance;
int iLevel;
int iAdjustedLevel;
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);
if (iLevel < 12)
sQuestCampType="bandit";
else if (iLevel < 21)
sQuestCampType="merc";
else
sQuestCampType="drow";
oBoss = GetDungeonCamp(oPC,OBJECT_SELF,sQuestCampType,1);
GetSewerKey(oPC);
sTokenLine = "There has been a recent rise in unsanctioned guild activity. It seems a rival gang is trying to take over some of our territory. This agent reports that a group of strange " + GetToken(101) + " have been spotted 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 GuildQuestType14(object oPC)
{
object oBoss;
int iVariance;
int iLevel;
int iAdjustedLevel;
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);
if (iLevel < 12)
sQuestCampType="bandit";
else if (iLevel < 21)
sQuestCampType="merc";
else
sQuestCampType="drow";
oBoss = GetQuestCamp(oPC,OBJECT_SELF,sQuestCampType,2);
sTokenLine = "An upstart gang has been operating in the area. At first, it was only a minor annoyance, but they have been growing more bold. We have word that they are having a meeting in the graveyard and we want you to give them a lesson in crossing the Thieves Guild.";
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 give these " + GetToken(101) + " their lesson.";
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
RemoveJournalQuestEntry("jDelivery",oPC);
RemoveJournalQuestEntry("jCamp",oPC);
AddJournalQuestEntry("jCamp",1,oPC);
}
void GuildQuestType15(object oPC)
{
object oBoss;
int iVariance;
int iLevel;
int iAdjustedLevel;
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);
if (iLevel < 12)
sQuestCampType="bandit";
else if (iLevel < 21)
sQuestCampType="merc";
else
sQuestCampType="drow";
oBoss = GetDungeonCamp(oPC,OBJECT_SELF,sQuestCampType,1);
GetSewerKey(oPC);
sTokenLine = "In recent weeks an assassin's guild has been operating in the city. My agents report that a group of " + GetToken(101) + " are behind the assassinations. Look, this is bad for business. A few robbed citizens and merchants can be overlooked, but when they keep turning up dead the council starts eyeing our activities.";
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
sTokenLine = "The assassins are using the abandoned sewers as their base of operations. We need you to go down there and deal with them.";
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
SetToken(oPC,OBJECT_SELF,112,sTokenLine);
RemoveJournalQuestEntry("jDelivery",oPC);
RemoveJournalQuestEntry("jCamp",oPC);
AddJournalQuestEntry("jCamp",1,oPC);
}