Jump to content

Recommended Posts

Hello, i made a method in my custom grinder that looks like this:

    public void DoNotDisturb(bool s)
    {
        log("DoNotDisturb: "+s);
        wManagerSetting.CurrentSetting.LootMobs = !s;
        Conditions.ForceIgnoreIsAttacked = s;
        wManagerSetting.CurrentSetting.DontStartFighting = s;

        if (s)
        {
            Fight.StopFight();
            Interact.InteractGameObject(ObjectManager.Me.GetBaseAddress);
            Blacklist.AllHostileNpc(30, 10000);
        }
        //if on the way to vendor stop regen
        /*if (s && wManagerSetting.CurrentSetting.FoodPercent != 1)
        {
            //log("Save percent setting: " + wManagerSetting.CurrentSetting.FoodPercent);
            FoodPercent = wManagerSetting.CurrentSetting.FoodPercent;
            DrinkPercent = wManagerSetting.CurrentSetting.DrinkPercent;
            wManagerSetting.CurrentSetting.FoodPercent = 1;
            wManagerSetting.CurrentSetting.DrinkPercent = 1;
        }
        else if (!s)
        {
            //log("restore percent setting" + FoodPercent);
            wManagerSetting.CurrentSetting.FoodPercent = FoodPercent;
            wManagerSetting.CurrentSetting.DrinkPercent = DrinkPercent;
        }*/
    }

You can uncomment the consumable stuff if you want to use it.

 

if you wanna check the position of your destination of your path (good to use in a movement event) then this would help you:

            if (MovementManager.CurrentPath.LastOrDefault().DistanceTo(YOURPOSITION) < 5)
            {
                DoNotDisturb(true);
            }
            else
            {
                DoNotDisturb(false);
            }

otherwise this would fit better:

            if (ObjectManager.Me.Position.DistanceTo(YOURPOSITION) > 5)
            {
                DoNotDisturb(true);
            }
            else
            {
                DoNotDisturb(false);
            }

 

Edit:

I remember that you need the food percent block because the bot will try to regen in combat

Link to comment
https://wrobot.eu/forums/topic/5856-move-without-fighting/#findComment-26631
Share on other sites

  • 9 months later...
On 09.05.2017 at 6:18 PM, reapler said:

Hello, i made a method in my custom grinder that looks like this:


    public void DoNotDisturb(bool s)
    {
        log("DoNotDisturb: "+s);
        wManagerSetting.CurrentSetting.LootMobs = !s;
        Conditions.ForceIgnoreIsAttacked = s;
        wManagerSetting.CurrentSetting.DontStartFighting = s;

        if (s)
        {
            Fight.StopFight();
            Interact.InteractGameObject(ObjectManager.Me.GetBaseAddress);
            Blacklist.AllHostileNpc(30, 10000);
        }
        //if on the way to vendor stop regen
        /*if (s && wManagerSetting.CurrentSetting.FoodPercent != 1)
        {
            //log("Save percent setting: " + wManagerSetting.CurrentSetting.FoodPercent);
            FoodPercent = wManagerSetting.CurrentSetting.FoodPercent;
            DrinkPercent = wManagerSetting.CurrentSetting.DrinkPercent;
            wManagerSetting.CurrentSetting.FoodPercent = 1;
            wManagerSetting.CurrentSetting.DrinkPercent = 1;
        }
        else if (!s)
        {
            //log("restore percent setting" + FoodPercent);
            wManagerSetting.CurrentSetting.FoodPercent = FoodPercent;
            wManagerSetting.CurrentSetting.DrinkPercent = DrinkPercent;
        }*/
    }

You can uncomment the consumable stuff if you want to use it.

 

if you wanna check the position of your destination of your path (good to use in a movement event) then this would help you:


            if (MovementManager.CurrentPath.LastOrDefault().DistanceTo(YOURPOSITION) < 5)
            {
                DoNotDisturb(true);
            }
            else
            {
                DoNotDisturb(false);
            }

otherwise this would fit better:


            if (ObjectManager.Me.Position.DistanceTo(YOURPOSITION) > 5)
            {
                DoNotDisturb(true);
            }
            else
            {
                DoNotDisturb(false);
            }

 

Edit:

I remember that you need the food percent block because the bot will try to regen in combat

how can i add this to profile i want my character stay and mob come to me,

got monk; killing balsilisk and mining [Empyrium], lava do damage 

Link to comment
https://wrobot.eu/forums/topic/5856-move-without-fighting/#findComment-39468
Share on other sites

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...