#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 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(130); //iRandom=109; if (iRandom < 15) if (GetLocalInt(GetModule(),"AdventureZone") == 0) GuildQuestType1(oPC); //AdventureZone - Kill else GuildQuestType6(oPC); else if (iRandom < 25) if (GetLocalInt(GetModule(),"AdventureZone") == 0) GuildQuestType2(oPC); //AdventureZone - Retrieve else GuildQuestType8(oPC); else if (iRandom < 30) GuildQuestType3(oPC); //LandCamp - Kill else if (iRandom < 35) GuildQuestType4(oPC); //LandCamp - Kill and Retrieve else if (iRandom < 45) GuildQuestType5(oPC); //House - Kill else if (iRandom < 55) GuildQuestType6(oPC); //Sewers - Kill else if (iRandom < 65) GuildQuestType7(oPC); //Graveyard - Kill else if (iRandom < 75) GuildQuestType8(oPC); //Crypt - Kill else if (iRandom < 85) if (GetLocalInt(GetModule(),"AdventureZone") == 0) GuildQuestType9(oPC); //AdventureZone - Dungeon else GuildQuestType3(oPC); else if (iRandom < 95) GuildQuestType10(oPC); //Gladiator Pits else if (iRandom < 110) GuildQuestType12(oPC); //House - Slaver Market else if (iRandom < 120) GuildQuestType13(oPC); //Sewers - Slaver Base else if (GetLocalInt(GetModule(),"AdventureZone") == 0) GuildQuestType11(oPC); else GuildQuestType10(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 = "A problem has popped up in a distant village. They have come under attacks and have called for our aid in making thier 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); } else { if (Random(2)==0) sTokenLine = "A representative of the elves sent word of some attacks that have been plaguing them. We need you to go help out and make their lands safe once again."; else sTokenLine = "A representative of the dwarves sent word of some attacks that have been plaguing them. 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(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 = "A local merchant had " + sItem + " stolen from him on his way to the city. We want you to go get it so that we may return it to him."; SetToken(oPC,OBJECT_SELF,111,sTokenLine); sTokenLine = "If you can avoid danger in getting the item that is fine, but feel free to swing your sword at any dangers that you might face."; 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 = "I have been sent word of some " + GetToken(101) + " that are causing trouble in the lands surrounding the city. We always hope that the adventurer's attracted by the Duke's offer will clear out these problems, but sometimes they are not up to the 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(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 = "A group of " + GetToken(101) + " have been raiding the lands near the city and have stolen " + sItem + " from one of our nobles. We need you to go get it back."; 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 = "The evil in the surrounding lands have breached our city. Some " + GetToken(101) + " have been spotted roaming the city under the cover of nightfall."; sTokenLine = FixTokenLine(sTokenLine,"REPEAT"); } else { sTokenLine = "The city guard 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 is much too close to the city. They must be dealt with."; 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 guard 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 guard 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); 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) { int iLevel; int iGold; int iFights; int iTotalFights; 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; iFights = Random(3)+2; //iFights = 1; iTotalFights = iFights + GetLocalInt(oPC,"PCFights"); SetPartyInt(oPC,"QuestFights",iTotalFights); SetPartyInt(oPC,"QuestDifficulty",1); sTokenLine = "Yes indeed, I have something for you. We occassionally like to showcase the skill of our adventurers in the gladiator pits. It is a bit of free advertising."; sTokenLine = FixTokenLine(sTokenLine,"REPEAT"); SetToken(oPC,OBJECT_SELF,111,sTokenLine); sTokenLine = "We need you to defeat at least " + IntToString(iFights) + " gladiators, and be sure to mention that you are a represenative of the Adventurer's Guild."; sTokenLine = FixTokenLine(sTokenLine,"REPEAT"); SetToken(oPC,OBJECT_SELF,112,sTokenLine); RemoveJournalQuestEntry("jDelivery",oPC); RemoveJournalQuestEntry("jCamp",oPC); AddJournalQuestEntry("jSpecial",1,oPC); } void GuildQuestType11(object oPC) { int iLevel; int iAdjustedLevel; int iDifficulty; int iRandom; int iDragon; string sCD; string sTokenLine; string sItem; string sItemTag; string sTag; object oBoss; iLevel = GetHitDice(oPC); iAdjustedLevel = GetAdjustedLevel(oPC); SetPartyInt(oPC,"QuestSteps",1); SetPartyInt(oPC,"QuestAdventureZone",1); SetPartyString(oPC,"AZRespawn",GetTag(OBJECT_SELF)); sTag = ""; iDragon = TRUE; if (iLevel < 12) iDragon = FALSE; else if (iLevel < 26) sTag = "dragon"; else if (iLevel < 33) iDragon = FALSE; else sTag = "pris"; oBoss = SetupAdventureZones(iAdjustedLevel,1,sTag); SetPartyString(oPC,"QuestStep1Mob",GetTag(oBoss)); SetPartyString(oPC,"QuestTargetMob",GetTag(oBoss)); SetPartyInt(oPC,"QuestType",1); 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"); if (iDragon == TRUE) { sTokenLine = "A dragon has been spotted in the skies not too far from the city. We believe it is making its lair in a nearby dungeon."; SetToken(oPC,OBJECT_SELF,111,sTokenLine); } else { 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 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="slaver"; 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 = "Slavers have been discovered operating and illegal slave market in the city. We have uncovered one such market 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 GuildQuestType13(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,"slaver",1); GetSewerKey(oPC); sTokenLine = "Slavers have been operating illegal slave markets in the city for some time now. Each time we shut one down another pops up. We believe we have found one of their permanent bases, and it is beneath our very feet 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); }