Jump to content

Recommended Posts

How can I tell the relogger to stop the profile when the bags are full? When I use gathering profiles, I set the time to 10-12 hours, but the bags may fill up earlier. How can I configure the relogger to stop the profile when the bags are full?

Hello, try this WRobot plugin :

using System;
using robotManager.Helpful;
using wManager.Plugin;
using wManager.Wow.Helpers;

public class Main : IPlugin
{
    private bool _isLaunched;
    
    public void Initialize()
    {
        _isLaunched = true;
        while (_isLaunched)
        {
            CheckBags();
        }
    }

    private void CheckBags()
    {
        if (Conditions.InGameAndConnectedAndProductStartedNotInPause &&
            !Conditions.IsAttackedAndCannotIgnore &&
            Bag.GetContainerNumFreeSlots == 0)
        {
            Logging.Write("Bags are full, stopping profile.");
            wManager.Wow.Memory.WowMemory.CloseHookedProcess(); // Close game
            Environment.Exit(-20); // Exit code -20 stops relogger profile
        }
    }

    public void Dispose()
    {
        _isLaunched = false;
    }

    public void Settings()
    {
        Logging.Write("No settings available.");
    }
}

 

Main.cs

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...