- igor doesn't give boxes if you choose to explore a bit, but he takes the contract anyway [quest-breaking] *Fixed. Moved some dialog around so you couldn't skip out on taking the quest after you gave up the letter. - key 'Pilgrims Cave Key' it_pilgrimscavek to plot-locked door isn't provided anywhere [quest-breaking] *Not a bug. Key drops from the Elder Goblin Shaman in Pilgrim's Cave Full compile. Updated release archive. - can't get farmer bouillon's quest if already offered to buy an ox [quest-breaking] *Couldn't replicate. Nothing in the dialog is locked regarding this. - jerusalem watch captain doesn't recognise letter to ogre mage [quest-breaking] *Fixed. Quest item tag was mispelled. - plot key 'amulet of thievery' [amuletofthievery] to plot-locked door never given anywhere *Not fixed. This may be for an incomplete area or quest. No NPC named "Fremmy South" exists in the module, nor is the name mentioned in dialogs. - key 'Lomendel's Front Door Key' [it_LomFrontKey] to plot-locked door never given anywhere. *Not fixed. This appears to be a DM or system area. No NPC named Lomendel exists & the only mention of them in the dialogs is by the Efreeti merchant in the area. - key it_RachelsRoomKey [rachelskey] to plot-locked door never given anywhere *Not fixed. This may be for an incomplete area or quest. No NPC named "Rachel" exists in the module, nor is the name mentioned in dialogs. There is nothing of note in the room. - east tower key given but no doors on any east towers anywhere *Not fixed. There is no "East Tower Key" in the item palette at all. Balkan East Tower doesn't require a key. - transitions within areas don't jump henchmen with pc *Fixed. Changed the triggers to use scripted transitions that bring all associates with the PC. - rd to bethlehem - broken trans [gate to nowhere] *Not fixed. Not an actual transition, There is no "Convent" in the area list. Gate description now tells you it's barred. - faction bugs with guards at pilgrims' rest *Maybe fixed. I added a "faction zoo" and set the merchant faction to neutral to all of the other factions. - faction bugs with watchmen in jerusalem *See above - dwarf captives in svirfneblin lair - invalid exit waypoint *Fixed. Added missing waypoint. - elvish grove quest journal doesn't close *Couldn't replicate. Journal entry cleared normally upon completion of the quest. - dwarven mine quest journal doesn't close *Fixed. Final journal entry wasn't set to close the quest. - idun's apple quest journal doesn't close *Fixed. Final journal entry wasn't set to close the quest. - implementation of climbing rope, while well-intentioned, doesn't work correctly *Couldn't replicate. Worked fine for me. https://i.imgur.com/45UC3xS.jpeg - doors close automatically without anyone to close them *Not a bug, desired behaivior. - henchmen don't level up *Fixed - when henchmen are dismissed, they don't just go back to where they were; they're destroyed and respawned *Fixed
148 lines
4.0 KiB
Plaintext
148 lines
4.0 KiB
Plaintext
// The delay for 2DA reads, change as needed.
|
|
const float DELAY_2DA = 0.3;
|
|
|
|
// The delay between switching factions, change as needed.
|
|
const float DELAY_FACTION = 0.3;
|
|
|
|
// Row is how self feels about column
|
|
int wow_GetCurrentWorkingFaction();
|
|
void wow_SetCurrentWorkingFaction(int nFaction);
|
|
int wow_GetIsBusy();
|
|
void wow_SetIsBusy(int nBusy = TRUE);
|
|
void wow_ResetFactions(int nRun = 1);
|
|
int wow_GetMaxFactions();
|
|
void wow_SetUpFaction(int nFaction = 1, int nRun = 0);
|
|
int wow_GetIsFactionSetUp(int nFaction);
|
|
void wow_ChangeFactionFeelings(int nFaction, int nWorking = 1);
|
|
|
|
void main()
|
|
{
|
|
if(wow_GetIsBusy()) SendMessageToPC(GetLastUsedBy(), "Factions are currently being reset already.");
|
|
else
|
|
{
|
|
SendMessageToAllDMs("Resetting factions now. This will take a few moments");
|
|
wow_SetIsBusy();
|
|
wow_ResetFactions();
|
|
}
|
|
}
|
|
|
|
void MessagePC(string sMessage)
|
|
{
|
|
SendMessageToPC(GetFirstPC(), sMessage);
|
|
}
|
|
|
|
void wow_ChangeFactionFeelings(int nFaction, int nWorking = 1)
|
|
{
|
|
int nMax = wow_GetMaxFactions();
|
|
if(nWorking <= nMax)
|
|
{
|
|
string sSourceTag = GetLocalString(OBJECT_SELF, "FACTION"+IntToString(nFaction));
|
|
string sTargetTag = GetLocalString(OBJECT_SELF, "FACTION"+IntToString(nWorking));
|
|
object oSource = GetObjectByTag(sSourceTag);
|
|
object oTarget = GetObjectByTag(sTargetTag);
|
|
object oTemp = GetFirstFactionMember(oSource, FALSE);
|
|
string sTrue = sSourceTag+"_"+IntToString(nWorking);
|
|
int nTrueFeelings = GetLocalInt(OBJECT_SELF, sTrue);
|
|
int nCurrentFeelings;
|
|
while(GetIsObjectValid(oTemp))
|
|
{
|
|
nCurrentFeelings = GetReputation(oTemp, oTarget);
|
|
|
|
if(nCurrentFeelings != nTrueFeelings) AdjustReputation(oTemp, oTarget, (nTrueFeelings - nCurrentFeelings));
|
|
oTemp = GetNextFactionMember(oSource, FALSE);
|
|
}
|
|
nWorking++;
|
|
DelayCommand(DELAY_FACTION, wow_ChangeFactionFeelings(nFaction, nWorking));
|
|
}
|
|
else
|
|
{
|
|
nFaction++;
|
|
DelayCommand(DELAY_FACTION, wow_ResetFactions(nFaction));
|
|
}
|
|
}
|
|
|
|
void wow_ResetFactions(int nRun = 1)
|
|
{
|
|
int nMax = wow_GetMaxFactions();
|
|
if(nRun <= nMax)
|
|
{
|
|
if(!wow_GetIsFactionSetUp(nRun))
|
|
{
|
|
wow_SetUpFaction();
|
|
}
|
|
else wow_ChangeFactionFeelings(nRun);
|
|
}
|
|
else
|
|
{
|
|
SendMessageToAllDMs("Factions are now reset.");
|
|
wow_SetIsBusy(FALSE);
|
|
}
|
|
}
|
|
|
|
void wow_SetUpFaction(int nFaction = 1, int nRun = 0)
|
|
{
|
|
string sFaction = GetLocalString(OBJECT_SELF, "FACTION"+IntToString(nFaction));
|
|
int nMax = wow_GetMaxFactions();
|
|
|
|
if(nRun > 0)
|
|
{
|
|
string sTemp = Get2DAString("ht_factions", "Faction"+IntToString(nRun), nFaction);
|
|
SetLocalInt(OBJECT_SELF, sFaction+"_"+IntToString(nRun), StringToInt(sTemp));
|
|
}
|
|
else
|
|
{
|
|
sFaction = Get2DAString("ht_factions", "FactionTag", nFaction);
|
|
SetLocalString(OBJECT_SELF, "FACTION"+IntToString(nFaction), sFaction);
|
|
}
|
|
nRun++;
|
|
if(nRun <= nMax)
|
|
{
|
|
DelayCommand(DELAY_2DA, wow_SetUpFaction(nFaction, nRun));
|
|
}
|
|
else
|
|
{
|
|
nFaction++;
|
|
if(nFaction <= nMax) DelayCommand(DELAY_FACTION, wow_SetUpFaction(nFaction, 0));
|
|
else DelayCommand(DELAY_2DA, wow_ResetFactions(1));
|
|
}
|
|
}
|
|
|
|
int wow_GetIsFactionSetUp(int nFaction)
|
|
{
|
|
if(GetLocalString(OBJECT_SELF, "FACTION"+IntToString(nFaction)) != "") return TRUE;
|
|
else return FALSE;
|
|
}
|
|
|
|
int wow_GetMaxFactions()
|
|
{
|
|
int nReturn = GetLocalInt(OBJECT_SELF, "MAX_FACTIONS");
|
|
if(!nReturn)
|
|
{
|
|
nReturn = StringToInt(Get2DAString("ht_factions", "NumberOfFactions", 0));
|
|
SetLocalInt(OBJECT_SELF, "MAX_FACTIONS", nReturn);
|
|
}
|
|
return nReturn;
|
|
}
|
|
|
|
void wow_SetIsBusy(int nBusy = TRUE)
|
|
{
|
|
SetLocalInt(OBJECT_SELF, "BUSY", nBusy);
|
|
}
|
|
|
|
int wow_GetIsBusy()
|
|
{
|
|
return GetLocalInt(OBJECT_SELF, "BUSY");
|
|
}
|
|
|
|
int wow_GetCurrentWorkingFaction()
|
|
{
|
|
return GetLocalInt(OBJECT_SELF, "CURRENT_FACTION");
|
|
}
|
|
|
|
void wow_SetCurrentWorkingFaction(int nFaction)
|
|
{
|
|
SetLocalInt(OBJECT_SELF, "CURRENT_FACTION", nFaction);
|
|
}
|
|
|
|
|