Skip to content

Commit

Permalink
- Change wait time to 160
Browse files Browse the repository at this point in the history
- Remake Lobby improvements
  • Loading branch information
bdawg1989 committed Aug 1, 2024
1 parent cb443aa commit 8c5ca88
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
19 changes: 8 additions & 11 deletions SysBot.Pokemon/SV/BotRaid/RotatingRaidBotSV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1720,10 +1720,6 @@ private async Task<int> PrepareForRaid(CancellationToken token)
await Click(B, 1_500, token).ConfigureAwait(false);
Log("PartyPK switch successful.");
}

for (int i = 0; i < 4; i++)
await Click(B, 1_000, token).ConfigureAwait(false);

await Task.Delay(1_500, token).ConfigureAwait(false);

if (!await IsOnOverworld(OverworldOffset, token).ConfigureAwait(false))
Expand All @@ -1738,12 +1734,8 @@ private async Task<int> PrepareForRaid(CancellationToken token)
Log($"We had {Settings.LobbyOptions.EmptyRaidLimit} empty raids.. Opening this raid to all!");
await Click(DDOWN, 1_000, token).ConfigureAwait(false);
}
else
{
await Click(A, 3_000, token).ConfigureAwait(false);
}

await Click(A, 8_000, token).ConfigureAwait(false);
await Click(A, 4_000, token).ConfigureAwait(false);
return 1;
}

Expand Down Expand Up @@ -1890,7 +1882,7 @@ private async Task<bool> CheckIfTrainerBanned(RaidMyStatus trainer, ulong nid, i
await EnqueueEmbed(null, "", false, false, false, false, token).ConfigureAwait(false);

List<(ulong, RaidMyStatus)> lobbyTrainers = [];
var wait = TimeSpan.FromSeconds(170);
var wait = TimeSpan.FromSeconds(160);
var endTime = DateTime.Now + wait;
bool full = false;

Expand Down Expand Up @@ -2101,6 +2093,11 @@ private async Task RegroupFromBannedUser(CancellationToken token)
await Click(A, 3_000, token).ConfigureAwait(false);
await Click(A, 3_000, token).ConfigureAwait(false);
await Click(B, 1_000, token).ConfigureAwait(false);
while (!await IsOnOverworld(OverworldOffset, token))
{
for (int i = 0; i < 8; i++)
await Click(B, 1000, token);
}
}

private async Task InitializeSessionOffsets(CancellationToken token)
Expand Down Expand Up @@ -2528,7 +2525,7 @@ private async Task EnqueueEmbed(List<string>? names, string message, bool hatTri
}
if (!disband && names is null && !upnext)
{
embed.AddField(Settings.EmbedToggles.IncludeCountdown ? $"**__Raid Starting__**:\n**<t:{DateTimeOffset.Now.ToUnixTimeSeconds() + 170}:R>**" : $"**Waiting in lobby!**", $"Raid Code: **{code}**", true);
embed.AddField(Settings.EmbedToggles.IncludeCountdown ? $"**__Raid Starting__**:\n**<t:{DateTimeOffset.Now.ToUnixTimeSeconds() + 160}:R>**" : $"**Waiting in lobby!**", $"Raid Code: **{code}**", true);
}
if (!disband && names is not null && !upnext)
{
Expand Down
25 changes: 20 additions & 5 deletions SysBot.Pokemon/SV/BotRaid/RotatingRaidSettingsSV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -542,15 +542,30 @@ public class LobbyFiltersCategory

[Category(Hosting), Description("OpenLobby - Opens the Lobby after x Empty Lobbies\nSkipRaid - Moves on after x losses/empty Lobbies\nContinue - Continues hosting the raid")]
[DisplayName("Lobby Method")]
public LobbyMethodOptions LobbyMethod { get; set; } = LobbyMethodOptions.SkipRaid; // Changed the property name here
public LobbyMethodOptions LobbyMethod { get; set; } = LobbyMethodOptions.SkipRaid;

[Category(Hosting), Description("Empty raid limit per parameter before the bot hosts an uncoded raid. Default is 3 raids.")]
private int _raidLimit = 3;

[Category(Hosting), Description("Empty raid limit per parameter before the bot hosts an uncoded raid. Value must be between 1 and 3.")]
[DisplayName("Empty Raid Limit")]
public int EmptyRaidLimit { get; set; } = 3;
public int EmptyRaidLimit
{
get => _raidLimit;
set => SetRaidLimit(value);
}

[Category(Hosting), Description("Empty/Lost raid limit per parameter before the bot moves on to the next one. Default is 3 raids.")]
[Category(Hosting), Description("Empty/Lost raid limit per parameter before the bot moves on to the next one. Value must be between 1 and 3.")]
[DisplayName("Skip Raid Limit")]
public int SkipRaidLimit { get; set; } = 3;
public int SkipRaidLimit
{
get => _raidLimit;
set => SetRaidLimit(value);
}

private void SetRaidLimit(int value)
{
_raidLimit = Math.Max(1, Math.Min(3, value));
}

[Category(FeatureToggle), Description("Set the action you would want your bot to perform. 'AFK' will make the bot idle, while 'MashA' presses A every 3.5s")]
[DisplayName("A Button Action")]
Expand Down

0 comments on commit 8c5ca88

Please sign in to comment.