waxnet / NetWare

1v1.LOL Cheat (Steam Client)
https://www.youtube.com/@waxnet
Apache License 2.0
55 stars 44 forks source link

[+] Trigger Bot Feature #8

Closed yuxwtf closed 11 months ago

yuxwtf commented 11 months ago
if (Config.GetBool("combat.triggerbot.triggerbot"))
{
    PlayerController playerController;

    if (Config.GetBool("combat.softaim.checkfov"))
    {
        if (Config.GetBool("combat.softaim.dynamicfov"))
        {
            playerController = GetBestPlayerInFOV(Camera.main.fieldOfView + 80);
        }
        else
        {
            playerController = GetBestPlayerInFOV(Config.GetFloat("combat.softaim.fovsize"));
        }
    }
    else
    {
        playerController = GetBestPlayerInFOV(Screen.width);
    }

    if (playerController != null)
    {
        Vector3 playerScreenPosition = Position.ToScreen(Players.GetHeadPosition(playerController));
        WeaponModel weaponModel = LocalPlayer.GetWeaponModel();
        WeaponsController weaponsController = LocalPlayer.GetWeaponsController();

        if (Position.IsOnScreen(playerScreenPosition))
        {
            Mouse.MoveTo(playerScreenPosition, (int)Math.Round(Config.GetFloat("combat.softaim.smoothing"), 0));

            int enemyPlayerID = playerController.GetInstanceID();

            // Check if the enemyPlayerID is valid and not null or empty
            if (enemyPlayerID != 0)
            {
                // Use the RPC call to fire the weapon remotely specifically on the targeted enemy
                weaponsController?.TryFireWeapon();
            }
        }
    }
}
waxnet commented 11 months ago

There's probably better ways to do this but I'll still take a look at it

yuxwtf commented 11 months ago

sure i made it in like 5m