2025/09/05 Update
Fixed random hang at log on for single player. Fixed class title function in Markshire Nomenclature script. Fixed faction melee that ensued if player was killed by defender faction in town. Updated most humanoids to use new class title function. Full compile.
This commit is contained in:
@@ -53,31 +53,31 @@ void main()
|
||||
{
|
||||
//SQLocalsUUID_SetInt(oPC,"OverallQuest",132);
|
||||
|
||||
SQLocals_SetInt(GetModule(),"ClientEnter",1);
|
||||
SetLocalInt(GetModule(),"ClientEnter",1);
|
||||
|
||||
DelayCommand(1.0f,SQLocals_SetInt(GetModule(),"ClientEnter",0));
|
||||
DelayCommand(1.0f,SetLocalInt(GetModule(),"ClientEnter",0));
|
||||
|
||||
if (SQLocals_GetInt(GetModule(),"ModuleStart") == 0)
|
||||
if (GetLocalInt(GetModule(),"ModuleStart") == 0)
|
||||
SetupModule();
|
||||
|
||||
if (SQLocals_GetInt(GetModule(),"DynamicMerchant") == 0)
|
||||
if (GetLocalInt(GetModule(),"DynamicMerchant") == 0)
|
||||
{
|
||||
SetupDynamicMerchant();
|
||||
SQLocals_SetInt(GetModule(),"DynamicMerchant",1);
|
||||
SetLocalInt(GetModule(),"DynamicMerchant",1);
|
||||
SQLocalsUUID_SetInt(oPC,"DynamicMerchant",1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SQLocalsUUID_GetInt(oPC,"DynamicMerchant") == 0)
|
||||
if (GetLocalInt(oPC,"DynamicMerchant") == 0)
|
||||
{
|
||||
AddToDynamicMerchant();
|
||||
SQLocalsUUID_SetInt(oPC,"DynamicMerchant",1);
|
||||
}
|
||||
}
|
||||
if (SQLocalsUUID_GetInt(oPC,"ModStart") == 0)
|
||||
if (GetLocalInt(oPC,"ModStart") == 0)
|
||||
{
|
||||
SQLocalsUUID_SetInt(oPC,"ModStart",1);
|
||||
SQLocalsUUID_SetInt(oPC,"Entering",1);
|
||||
SetLocalInt(oPC,"ModStart",1);
|
||||
SetLocalInt(oPC,"Entering",1);
|
||||
|
||||
if (iAnimal >= 1)
|
||||
{
|
||||
@@ -103,6 +103,7 @@ void main()
|
||||
SendMessageToPC(oPC,"Starting New Campaign...");
|
||||
|
||||
SetLocalString(oPC,"Respawn","EN4_Respawn");
|
||||
SendMessageToPC(oPC,"EN4_Respawn is set on the 'Respawn' string var.");
|
||||
|
||||
if (GetXP(oPC) == 0)
|
||||
{
|
||||
@@ -144,10 +145,10 @@ void main()
|
||||
}
|
||||
}
|
||||
|
||||
if (SQLocalsUUID_GetInt(GetModule(),"ModStarted") == 0)
|
||||
if (GetLocalInt(GetModule(),"ModStarted") == 0)
|
||||
{
|
||||
SetupRandomNPCs();
|
||||
SQLocalsUUID_SetInt(GetModule(),"ModStarted",1);
|
||||
SetLocalInt(GetModule(),"ModStarted",1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +188,7 @@ void SetupCharacter(object oPC)
|
||||
|
||||
oItem = CreateItemOnObject("Tunic",oPC);
|
||||
|
||||
AssignCommand(oPC, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
|
||||
DelayCommand(0.0f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
|
||||
|
||||
CheckSpecialRace(oPC);
|
||||
|
||||
@@ -789,14 +790,14 @@ if (iMod>0)
|
||||
|
||||
string GetRace(object oPC)
|
||||
{
|
||||
string sRace = GetSubRace(oPC);
|
||||
|
||||
if (sRace == "")
|
||||
{
|
||||
sRace = GetStringByStrRef(StringToInt(Get2DAString("racialtypes", "Name", GetRacialType(oPC))));
|
||||
}
|
||||
|
||||
return sRace;
|
||||
string sRace = GetSubRace(oPC);
|
||||
|
||||
if (sRace == "")
|
||||
{
|
||||
sRace = GetStringByStrRef(StringToInt(Get2DAString("racialtypes", "Name", GetRacialType(oPC))));
|
||||
}
|
||||
|
||||
return sRace;
|
||||
}
|
||||
|
||||
void SetupDynamicMerchant()
|
||||
@@ -861,43 +862,43 @@ GetNegativeItem(oStore);
|
||||
|
||||
void AddToDynamicMerchant()
|
||||
{
|
||||
object oStore;
|
||||
object oStore;
|
||||
|
||||
oStore = GetObjectByTag("NH1_Dynamic");
|
||||
oStore = GetObjectByTag("NH1_Dynamic");
|
||||
|
||||
GetMagicItem(oStore,TRUE,TRUE,5);
|
||||
GetMagicItem(oStore,TRUE,TRUE,5);
|
||||
GetMagicItem(oStore,TRUE,TRUE,5);
|
||||
GetMagicItem(oStore,TRUE,TRUE,5);
|
||||
GetMagicItem(oStore,TRUE,TRUE,5);
|
||||
GetMagicItem(oStore,TRUE,TRUE,5);
|
||||
GetMagicItem(oStore,TRUE,TRUE,5);
|
||||
GetMagicItem(oStore,TRUE,TRUE,5);
|
||||
}
|
||||
|
||||
void SetupModule()
|
||||
{
|
||||
object oChest;
|
||||
int iRandom;
|
||||
int iAI;
|
||||
object oChest;
|
||||
int iRandom;
|
||||
int iAI;
|
||||
|
||||
SQLocals_SetInt(GetModule(),"ModuleStart",1);
|
||||
SQLocals_SetInt(GetModule(),MODULE_SWITCH_ENABLE_BEBILITH_RUIN_ARMOR,FALSE);
|
||||
SetMaxHenchmen(4);
|
||||
SetLocalInt(GetModule(),"ModuleStart",1);
|
||||
SetLocalInt(GetModule(),MODULE_SWITCH_ENABLE_BEBILITH_RUIN_ARMOR,FALSE);
|
||||
SetMaxHenchmen(4);
|
||||
|
||||
string sCampaign = "Endless Nights IV";
|
||||
if (GetCampaignInt(sCampaign,"MP") == 1)
|
||||
sCampaign = "MP_Endless Nights IV";
|
||||
iAI = GetCampaignInt(sCampaign,"MP");
|
||||
SQLocals_SetInt(GetModule(),"NoAI",iAI);
|
||||
string sCampaign = "Endless Nights IV";
|
||||
if (GetCampaignInt(sCampaign,"MP") == 1) sCampaign = "MP_Endless Nights IV";
|
||||
|
||||
oChest = GetObjectByTag("EN4_SpecChest" + IntToString(Random(2)+1));
|
||||
SQLocals_SetInt(oChest,"Weapon",1);
|
||||
iAI = GetCampaignInt(sCampaign,"MP");
|
||||
SetLocalInt(GetModule(),"NoAI",iAI);
|
||||
|
||||
iRandom = Random(4);
|
||||
if (iRandom==0)
|
||||
{
|
||||
iRandom = Random(4)+1;
|
||||
SQLocals_SetInt(GetModule(),"HTC_SpecialMerchant",iRandom);
|
||||
}
|
||||
oChest = GetObjectByTag("EN4_SpecChest" + IntToString(Random(2)+1));
|
||||
SetLocalInt(oChest,"Weapon",1);
|
||||
|
||||
WriteTimestampedLogEntry("*** Endless Night IV Loaded ***");
|
||||
iRandom = Random(4);
|
||||
if (iRandom==0)
|
||||
{
|
||||
iRandom = Random(4)+1;
|
||||
SetLocalInt(GetModule(),"HTC_SpecialMerchant",iRandom);
|
||||
}
|
||||
|
||||
WriteTimestampedLogEntry("*** Endless Night IV Loaded ***");
|
||||
}
|
||||
|
||||
void CheckSpecialRace(object oPC)
|
||||
@@ -1056,120 +1057,6 @@ void CheckSpecialRace(object oPC)
|
||||
else if (iRace == RACIAL_TYPE_ZAKYA_RAKSHASA) {iDeaths = 3; iMonstrous = 0;}
|
||||
|
||||
|
||||
// if (iRace == RACIAL_TYPE_SHADOWSWYFT) {iDeaths = 2;}
|
||||
|
||||
// else if (iRace == RACIAL_TYPE_NERAPHIM) {iDeaths = 1; iMonstrous = 1;}
|
||||
|
||||
// else if (iRace == RACIAL_TYPE_TROLL)
|
||||
// {
|
||||
// iDeaths = 3;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_HALFOGRE)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_AZER)
|
||||
// {
|
||||
// iDeaths = 3;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_PIXIE)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_ILLITHID)
|
||||
// {
|
||||
// iDeaths = 3;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_RAKSHASA)
|
||||
// {
|
||||
// iDeaths = 3;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_GITHZERAI)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_GITHYANKI)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_PURE_YUAN)
|
||||
// {
|
||||
// iDeaths = 3;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_LIZARDFOLK)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_MINOTAUR)
|
||||
// {
|
||||
// iDeaths = 3;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_BUGBEAR)
|
||||
// {
|
||||
// iDeaths = 1;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_OGRE)
|
||||
// {
|
||||
// iDeaths = 3;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_TIEFLING)
|
||||
// {
|
||||
// iDeaths = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_TANARUKK)
|
||||
// {
|
||||
// iDeaths = 3;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_FEYRI)
|
||||
// {
|
||||
// iDeaths = 3;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_AASIMAR)
|
||||
// {
|
||||
// iDeaths = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_OROG)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// iMonstrous = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_DEEP_GNOME)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_DROW_FEMALE)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_WILD_DWARF)
|
||||
// {
|
||||
// iDeaths = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_URDINNIR)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_DUERGAR)
|
||||
// {
|
||||
// iDeaths = 1;
|
||||
// }
|
||||
// else if (iRace == RACIAL_TYPE_ARC_DWARF)
|
||||
// {
|
||||
// iDeaths = 2;
|
||||
// }
|
||||
|
||||
if (iMonstrous == 1)
|
||||
{
|
||||
object oGood;
|
||||
|
Reference in New Issue
Block a user