for our little spamer scorch, I didnt find the post on pbdo but did it here. so better let the people write where they want...
here you go, didn't test it though. but compiled without errors.
it wont change hangars, since this is not working without errors yet. but it will sell the pala once your cargo is full.
it will use pet only on 5-3 and 4-3.
it will use pet with autolooter on 4-3 and ressource collector on 5-3
it will not use the exact hours, the time of mapchange differs about 40 minutes
have fun and let me know how it works
Code:
using System.Threading;
using PBDOBot.Helper;
using PBDOBot.Api;
using PBDOBot.Api.Task;
using System.Collections.Generic;
using System;
namespace Tasks
{
public class Task : BBaseTask
{
#region General Settings
//-------------------------------creating RandomNumber Variable-----------------------------------
private int RandomNumber(int min, int max)
{
if (max > min)
{
Random random = new Random();
return random.Next(min, max);
}
else if (max < min)
{
Random random = new Random();
return random.Next(max, min);
}
else
return max;
}
//-------------------------------creating RandomNumber Variable end --------------------------------
//random cycletimes
private int CycleTime_One, CycleTime_Two, CycleTime_Three;
public override void OnReset()
{
//--------------------------------------- Updates ---------------------------------------------
Enums.ResourceType[] ProtectedCollection = new Enums.ResourceType[]
{
Enums.ResourceType.ore_promerium,
Enums.ResourceType.ore_seprom,
};
this.ProtectResourcesList.AddRange(ProtectedCollection);
#region boosting ship equipment with resources
Dictionary<string, Enums.ResourceType> boostCollection = new Dictionary<string, Enums.ResourceType>();
boostCollection.Add("Speed", Enums.ResourceType.ore_promerium);
boostCollection.Add("Shield", Enums.ResourceType.ore_seprom);
CycleTime_One = RandomNumber(1000,1100);
CycleTime_Two = RandomNumber(220, 260);
CycleTime_Three = RandomNumber(100, 140);
this.BoostDictionary = boostCollection;
#endregion
}
//---------------------------------------Updates end---------------------------------------------
public override void ChooseLogic()
{
#region Chapter 1
if (BMain.Level >=1)
{
Dictionary<TaskLoadDelegate, int> TaskLoadDictionary = new Dictionary<TaskLoadDelegate, int>();
TaskLoadDictionary.Add(
delegate()
{
if (!ActionList.Contains("map 1"))
{
Reset();
TaskMap = "x-2";
BMain.WriteLog("Map we are on " + BMain.MapName);
#region Npc handling
AttackNpcs = true;
AttackBossNpcs = true;
AttackTaggedNpcs = false;
MinFightDistance = 500;
MaxFightDistance = 600;
#endregion
#region Restock ammunition
Restock = true;
LaserAmmoType = Enums.LaserAmmoType.LCB_10;
LaserAmmoMinCount = 200;
LaserAmmoBuyMaxCount = 10000;
RocketAmmoType = Enums.RocketAmmoType.PLT_2026;
RocketAmmoMinCount = 50;
RocketAmmoBuyMaxCount = 500;
RocketLauncherAmmoType = Enums.RocketLauncherAmmoType.ECO10;
#endregion
DroneFormation = Enums.DroneFormation.Heart;
SafeBotting = false;
SellSkylabPromerium = false;
Refine = true;
Sell = true;
UpgradeSkylab = true;
CollectResources = false;
CollectBonusBoxes = true;
CollectCargoBoxes = false;
CollectSpecialBoxes = true;
CollectPirateBoxes = false;
FleeOnEnemyInRadius = true;
FleeRadius = 4000;
Repair = true;
MinDurability = 50;
IgnorePlayersOnSell = false;
StandardConfiguration = 1;
SwitchConfigWhenShieldLow = true;
SwitchConfigWhileFleeing = true;
ActionList.Add("map 1");
}
}, CycleTime_One);
TaskLoadDictionary.Add(
delegate()
{
if (!ActionList.Contains("map 2"))
{
TaskMap = "5-3";
Reset();
Restock = false;
RocketAmmoType = Enums.RocketAmmoType.PLT_2026;
RocketLauncherAmmoType = Enums.RocketLauncherAmmoType.ECO10;
UseRocketLauncher = true;
BMain.WriteLog("Map we are on " + BMain.MapName);
AttackNpcs = true;
if(BMain.MapName == "5-3")
{ UsePet = true;
BuyInvisibleAddon = false;
}
else
{ UsePet = false;
BuyInvisibleAddon = true;
MinFreeSlots = 8000;
MinPalladiumAmountToSell = 50;
}
SellPalladium = true;
CollectResources = true;
CollectBonusBoxes = false;
CollectCargoBoxes = false;
SwitchConfigWhenShieldLow = true;
FleeOnEnemyInRadius = false;
Refine = false;
Sell = true;
MinPalladiumAmountToSell = 50;
DroneFormation = Enums.DroneFormation.Diamond;
StandardConfiguration=2;
PetMode = Enums.PetMode.Auto_Resource_Collector;
PetMinDurability = 90;
RestockPetFuel = true;
RepairPetWhenDead = true;
Repair = true;
MinDurability = 90;
MaxDurability = 100;
ActionList.Add("map 2");
}
}, CycleTime_Two);
TaskLoadDictionary.Add(
delegate()
{
if (!ActionList.Contains("map 3"))
{
Reset();
TaskMap = "4-3";
BMain.WriteLog("Map we are on " + BMain.MapName);
#region Npc handling
AttackNpcs = false;
AttackBossNpcs = false;
AttackTaggedNpcs = false;
MinFightDistance = 500;
MaxFightDistance = 600;
#endregion
if(BMain.MapName == "4-3")
{ UsePet = true;
}
else
{ UsePet = false;
}
#region Restock ammunition
Restock = true;
LaserAmmoType = Enums.LaserAmmoType.LCB_10;
LaserAmmoMinCount = 200;
LaserAmmoBuyMaxCount = 10000;
RocketAmmoType = Enums.RocketAmmoType.PLT_2026;
RocketAmmoMinCount = 50;
RocketAmmoBuyMaxCount = 500;
#endregion
DroneFormation = Enums.DroneFormation.Turtle;
SafeBotting = false;
ExtremeBotting = true;
BuyInvisibleAddon = true;
Refine = true;
Sell = true;
CollectResources = false;
CollectBonusBoxes = true;
CollectCargoBoxes = false;
CollectSpecialBoxes = true;
CollectPirateBoxes = false;
FleeOnEnemyInRadius = true;
FleeRadius = 4000;
Repair = true;
MinDurability = 50;
IgnorePlayersOnSell = false;
StandardConfiguration = 2;
SwitchConfigWhenShieldLow = true;
SwitchConfigWhileFleeing = true;
UsePet = true;
RestockPetFuel= true;
PetFuelMinAmount = 500;
PetFuelMaxAmount = 10000;
DeactivatePetWhileFleeing = true;
RepairPetWhenDead = true;
PetMode = Enums.PetMode.Auto_Looter;
ActionList.Add("map 3");
}
}, CycleTime_Three);
#endregion
CycleTaskDictionary = TaskLoadDictionary;
}
#endregion
}
}
}