Upload from upload_mods.ps1
This commit is contained in:
161
Scripts/MinEvents/MinEventActionInitiateClassesRebirth.cs
Normal file
161
Scripts/MinEvents/MinEventActionInitiateClassesRebirth.cs
Normal file
@@ -0,0 +1,161 @@
|
||||
public class MinEventActionInitiateClassesRebirth : MinEventActionRemoveBuff
|
||||
{
|
||||
private int numItems = 1;
|
||||
private int numLocation = 0;
|
||||
private int numQuality = 0;
|
||||
private string itemName = "";
|
||||
|
||||
public override void Execute(MinEventParams _params)
|
||||
{
|
||||
if (GameManager.IsDedicatedServer)
|
||||
{
|
||||
//Log.Out("MinEventActionInitiateClassesRebirth-Execute IS SERVER");
|
||||
return;
|
||||
}
|
||||
|
||||
//Log.Out("MinEventActionInitiateClassesRebirth-Execute IS CLIENT");
|
||||
|
||||
EntityPlayerLocal player = _params.Self as EntityPlayerLocal;
|
||||
|
||||
if (player == null)
|
||||
{
|
||||
//Log.Out("MinEventActionInitiateClassesRebirth-Execute NO Player");
|
||||
return;
|
||||
}
|
||||
|
||||
//Log.Out("MinEventActionInitiateClassesRebirth-Execute SCENARIO: " + RebirthVariables.customScenario);
|
||||
|
||||
if (RebirthUtilities.ScenarioSkip())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(RebirthVariables.customBiomeSpawn == "random") && RebirthVariables.customScenario == "none")
|
||||
{
|
||||
//Log.Out("MinEventActionInitiateClassesRebirth-Execute NOT RANDOM AND NO SCENARIO");
|
||||
|
||||
/*Log.Out("MinEventActionInitiateClassesRebirth-Execute NOT RANDOM");
|
||||
Quest starterQuest = QuestClass.CreateQuest("quest_BasicSurvival1");
|
||||
|
||||
if (starterQuest != null)
|
||||
{
|
||||
player.QuestJournal.AddQuest(starterQuest);
|
||||
|
||||
starterQuest.Tracked = true;
|
||||
player.QuestJournal.TrackedQuest = starterQuest;
|
||||
player.QuestJournal.RefreshTracked();
|
||||
}*/
|
||||
}
|
||||
else
|
||||
{
|
||||
//player.Buffs.AddBuff("spawn_GameStart");
|
||||
//player.Buffs.AddBuff("spawn_GameStart_companion");
|
||||
int entityID = player.entityId;
|
||||
int entityPlayerID = player.entityId;
|
||||
string strEntity = "";
|
||||
string strDistance = "";
|
||||
string strHeight = "";
|
||||
string strSpawner = "static";
|
||||
string strDirection = "";
|
||||
string strSound = "";
|
||||
float numStartScale = 1;
|
||||
int minion = -1;
|
||||
int numEntities = 1;
|
||||
bool attackPlayer = true;
|
||||
int checkMaxEntities = 0;
|
||||
int minMax = 40;
|
||||
int maxEntities = 20;
|
||||
int repeat = 1;
|
||||
int allNames = 1;
|
||||
bool atPlayerLevel = false;
|
||||
bool randomRotation = true;
|
||||
int numRotation = -1;
|
||||
int isBoss = -1;
|
||||
int handParticle = -1;
|
||||
string lootListName = "";
|
||||
string lootDropClass = "";
|
||||
int lootDropChance = 1;
|
||||
string navIcon = "";
|
||||
string buffList = "";
|
||||
|
||||
strDistance = "1";
|
||||
minion = 1;
|
||||
attackPlayer = false;
|
||||
|
||||
string restrictiveHire = RebirthVariables.customRestrictHires;
|
||||
|
||||
string scenario = RebirthVariables.customScenario;
|
||||
|
||||
//Log.Out("MinEventActionInitiateClassesRebirth-Execute RANDOM OR SCENARIO: " + scenario);
|
||||
|
||||
if (scenario == "none" && !GameUtils.IsPlaytesting())
|
||||
{
|
||||
if (restrictiveHire != "nofollowers")
|
||||
{
|
||||
allNames = 0;
|
||||
strEntity = "FuriousRamsayNPCShepherd001_FR,FuriousRamsayNPCPitbull001_FR,FuriousRamsayNPCLabrador001_FR,FuriousRamsayNPCHusky001_FR,FuriousRamsayNPCGoldenRetriever001_FR,FuriousRamsayNPCDoberman001_FR,FuriousRamsayNPCDalmatian001_FR,FuriousRamsayNPCBullTerrier001_FR";
|
||||
//strSound = "FuriousRamsayDogSense";
|
||||
strSound = "";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
}
|
||||
|
||||
attackPlayer = true;
|
||||
strSound = "";
|
||||
strDistance = "1";
|
||||
minion = 0;
|
||||
allNames = 1;
|
||||
|
||||
strDistance = "30";
|
||||
strEntity = "zombieBoe";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
|
||||
strEntity = "zombieBoe";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strEntity = "zombieJoe";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strEntity = "zombieArlene";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strEntity = "zombieDarlene";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strEntity = "zombieMarlene";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strEntity = "zombieYo";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strEntity = "zombieSteve";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strEntity = "zombieBusinessMan";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
|
||||
strDistance = "25";
|
||||
strEntity = "FuriousRamsayWindTornado";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strDistance = "30";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strDistance = "35";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
strDistance = "40";
|
||||
RebirthUtilities.SpawnEntity(entityID, strEntity, numEntities, "", "", strDistance, strSpawner, strHeight, strDirection, numStartScale, numRotation, randomRotation, atPlayerLevel, attackPlayer, entityPlayerID, minion, strSound, maxEntities, checkMaxEntities, minMax, repeat, allNames, isBoss, handParticle, lootListName, lootDropClass, lootDropChance, navIcon, buffList);
|
||||
}
|
||||
}
|
||||
|
||||
ProgressionValue progressionValue;
|
||||
|
||||
foreach (var classKey in RebirthVariables.localClasses.Keys)
|
||||
{
|
||||
RebirthVariables.localVariables["$varFuriousRamsay" + classKey + "PercUnit"] = 1f;
|
||||
player.Buffs.SetCustomVar("$varFuriousRamsay" + classKey + "PercUnit", 1f);
|
||||
|
||||
//Log.Out("MinEventActionInitiateClassesRebirth-Execute $varFuriousRamsay" + classKey + "PercUnit: " + RebirthVariables.localVariables["$varFuriousRamsay" + classKey + "PercUnit"]);
|
||||
|
||||
progressionValue = player.Progression.GetProgressionValue("furiousramsayatt" + classKey.ToLower());
|
||||
progressionValue.Level = 1;
|
||||
|
||||
RebirthUtilities.ProcessAttribute(player, "$varFuriousRamsay" + classKey + "PercUnit", true);
|
||||
}
|
||||
|
||||
progressionValue = player.Progression.GetProgressionValue("FuriousRamsayPerkChoiceIsMine");
|
||||
progressionValue.Level = 1;
|
||||
progressionValue = player.Progression.GetProgressionValue("furiousramsayattachievements");
|
||||
progressionValue.Level = 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user