Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to core #1

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions Application/RSBot/Views/SplashScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,28 +186,6 @@ private void InitializeBot()
MessageBoxButtons.OK, MessageBoxIcon.Error);

CommandManager.Initialize();

InitializeMap();
}

/// <summary>
/// Initializes the map.
/// </summary>
private void InitializeMap()
{
//---- Load Map ----
var mapFile = Path.Combine(Kernel.BasePath, "Data", "Game", "map.rsc");

if (!CollisionManager.Enabled) Log.Warn("[Collision] Collision detection has been deactivated by the user!");

if (!File.Exists(mapFile))
{
Log.Error($"[Collisions] Directory {mapFile} not found!");

return;
}

CollisionManager.Initialize();
}

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions Botbases/RSBot.Default/Bot/Botbase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public void Reload()
/// </summary>
public void Tick()
{
if (!Kernel.Bot.Running)
return;

if (Game.Player.HasActiveVehicle)
{
Game.Player.Vehicle.Dismount();
Expand Down
17 changes: 9 additions & 8 deletions Botbases/RSBot.Default/Bundle/Target/TargetBundle.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Diagnostics.SymbolStore;
using System.Linq;
using RSBot.Core;
using RSBot.Core.Components;
Expand Down Expand Up @@ -144,14 +145,14 @@ private SpawnedMonster GetNearestEnemy()
var ignorePillar = PlayerConfig.Get<bool>("RSBot.Training.checkBoxDimensionPillar");

if (!SpawnManager.TryGetEntities<SpawnedMonster>(m =>
m.State.LifeState == LifeState.Alive &&
!(warlockModeEnabled && m.State.HasTwoDots()) &&
m.IsBehindObstacle == false &&
_blacklist?.ContainsKey(m.UniqueId) == false &&
Container.Bot.Area.IsInSight(m) &&
!m.Record.IsPandora &&
//m.DistanceToPlayer <= 40 &&
!(m.Record.IsDimensionPillar && ignorePillar) &&
m.State.LifeState == LifeState.Alive && //Only alive
!(warlockModeEnabled && m.State.HasTwoDots()) && //Has two Dots?
m.IsBehindObstacle == false && //Is not behind obstacle
(_blacklist == null || !_blacklist.ContainsKey(m.UniqueId)) && //Is not blacklisted
(m.AttackingPlayer || !Bundles.Avoidance.AvoidMonster(m.Rarity)) && //Is attacking player or shouldn't be avoided
Container.Bot.Area.IsInSight(m) && //Is in training area
!m.Record.IsPandora && //Isn't pandora box
!(m.Record.IsDimensionPillar && ignorePillar) && //Isn't dimension pillar
!m.Record.IsSummonFlower, out var entities))
return default;

Expand Down

This file was deleted.

This file was deleted.

42 changes: 0 additions & 42 deletions Library/RSBot.Core/Components/Collision/CollisionCalculator.cs

This file was deleted.

30 changes: 0 additions & 30 deletions Library/RSBot.Core/Components/Collision/CollisionResult.cs

This file was deleted.

108 changes: 0 additions & 108 deletions Library/RSBot.Core/Components/Collision/Intersection.cs

This file was deleted.

28 changes: 0 additions & 28 deletions Library/RSBot.Core/Components/Collision/RSCollisionLine.cs

This file was deleted.

49 changes: 0 additions & 49 deletions Library/RSBot.Core/Components/Collision/RSCollisionMesh.cs

This file was deleted.

Loading