What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Plugin] Sarkoth - KillWait - Only kills monsters in cellar

I found this is plugin is more effective when I lower the kill and loot radius outside the cellar. Because pathing is so slow, the bot gets killed a lot standing there either TP'ing or pathing. You can do this easily by editing the if statements in the OnPulse() function using the following properties:
Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius
Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius

I hard code the radius values in the plugin itself. I tried reading and storing the values that were set in the main UI but I ran into some weird bugs.. I'll try and fix that later.

My bots are performing much faster at between 290-300 gph where as they were previously at 200. I have about 250% GF with both a WD and a DH. DPS: 19k, MS: 18%

edit: Thanks to all the prior plugin coders. Got a good understanding of the eventing structure.
I removed the useless IsRestarting variable from all 3 of these, as well as a new description in this first one, and then made a .cs file for those who would like to use your way :)
Here it is: View attachment SarkothKillRadiusWait.zip

I don't like my character dying, but to keep him from looting things far away (I have my loot distance set to 60-80 usually) I just modified it to only turn off Looting.
If you'd like to use it, here it is: View attachment SarkothLootWait.zip

For those who want the original, I've added in the Loot fix found here: http://www.thebuddyforum.com/demonb...-only-kills-monsters-cellar-4.html#post560298
Here is the zip file for v4: View attachment SarkothKillWait.zip
@ OP, I cleaned up the code a little, but take/modify/use/attach this version as you wish :)

For anyone using them, unzip them into /demonbuddy/plugins/ as they are already in their own folder.
 
Last edited:
I found this is plugin is more effective when I lower the kill and loot radius outside the cellar. Because pathing is so slow, the bot gets killed a lot standing there either TP'ing or pathing. You can do this easily by editing the if statements in the OnPulse() function using the following properties:
Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius
Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius

I hard code the radius values in the plugin itself. I tried reading and storing the values that were set in the main UI but I ran into some weird bugs.. I'll try and fix that later.

My bots are performing much faster at between 290-300 gph where as they were previously at 200. I have about 250% GF with both a WD and a DH. DPS: 19k, MS: 18%

edit: Thanks to all the prior plugin coders. Got a good understanding of the eventing structure.

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading;
using System.Windows;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using Zeta;
using Zeta.Common;
using Zeta.CommonBot;
using Zeta.Common.Plugins;
using Zeta.Internals;
using Zeta.Internals.Actors;
using Zeta.Internals.Service;


//Created by: adx 
//Credit to: w3eZle (http://www.thebuddyforum.com/members/144563-w3ezle.html)
//           eax (http://www.thebuddyforum.com/members/144149-eax.html) 
//           No1KnowsY (http://www.thebuddyforum.com/members/11607-no1knowsy.html)
//Script based on their original work
//Created Date: 14June2012

namespace Sarkoth
{
    public class Sarkoth : IPlugin
    {
        private bool IsRestarting { get; set; }
        public Version Version { get { return new Version(0, 1); } }
        public string Author { get { return "adx"; } }
        public string Description { get { return "reduce monster kill radius."; } }
        public string Name { get { return "Sarkoth Kill Reduce" + Version; } }

        //hard coding for now...
        private float originalKillRadius = 40; //store original kill radius
        private float reducedKillRadius = 10; //reduced radius

        private float originalLootRadius = 30; //store original kill radius
        private float reducedLootRadius = 10; //reduced radius

        public Window DisplayWindow
        {
            get
            {
                return null;
            }
        }

        private void Log(string message)
        {
            Logging.Write(string.Format("[{0}] {1}", Name, message));
        }


        public void OnInitialize()
        {
            IsRestarting = false;
        }


        public void OnPulse()
        {
            // if we're not in game and not in the process of restarting, do nothing
            if (!ZetaDia.IsInGame || !ZetaDia.Me.IsValid || IsRestarting)
            {
                return;
            }

            //Outside of Dank Cellar, reduce kill radius
            if (Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius != reducedKillRadius 
                && ZetaDia.CurrentWorldDynamicId == 1999503360)
            {
                Log("Reducing kill and loot radius");
                Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius = reducedKillRadius;
                Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius = reducedLootRadius;

                return;
            }

            //Inside of Dank Cellar, Enable Kill Monsters
            if (Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius != originalKillRadius 
                && ZetaDia.CurrentWorldDynamicId == 1999568897)
            {
                Log("Restoring kill and loot radius to " + originalKillRadius);
                Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius = originalKillRadius;
                Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius = originalLootRadius;

                return;
            }

        }

        public void OnShutdown()
        {
        }

        public void OnEnabled()
        {
            Log("Enabled.");
            //originalKillRadius = Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius;
            
        }

        public void OnDisabled()
        {
            Log("Disabled.");
        }

        public bool Equals(IPlugin other)
        {
            return (other.Name == Name) && (other.Version == Version);
        }
    }

}

just tried this, works nice so far, but i noticed soemthing strange ... sometimes after a kill, he just uses "leave game" instead of tp to town and leave ... why could that be? :O
 
1. monsters would attack me because my life is below 80%. after i kill the monsters, my life regains back to 100% (because of life regen + life per hit). because of this, this plugin disables again, and it doesn't pick up the loot.

2. right when about to tp out, monster would attack me. the program thinks im in town, so it triggers the leave game routine. so that's when my character stands there for 10 seconds, while monsters beat me to death. 50% of the time, i die before the 10 seconds end.

sometimes it would respawn me, and i get beaten to death again before the 10 sec leaves game finally works.
 
sometimes i lose my checkpoint. i either end up in town or right outside adrian's hut.
i never watched this happen. does anyone have this problem too?
 
how difficult would it be to convert this to the maghda farming? to ignore all monsters until u get to maghda :D

I would love it, it would let me farm her in inferno.
 
sometimes i lose my checkpoint. i either end up in town or right outside adrian's hut.
i never watched this happen. does anyone have this problem too?
Because of this the extension is not usable for afk atm.
 
i would like to know too...Wasted whole night running into wall or dieing then loosing gold for repares :D
 
I keep getting hit below 80%, then my bot teleports and ends run, instead of keep going to cellar. Loss of gph is very high because of this
 
I think the char runs to adria's hut to kill monsters to get hp back, but that could be a wrong observation as well
 
I found this is plugin is more effective when I lower the kill and loot radius outside the cellar. Because pathing is so slow, the bot gets killed a lot standing there either TP'ing or pathing. You can do this easily by editing the if statements in the OnPulse() function using the following properties:
Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius
Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius

I hard code the radius values in the plugin itself. I tried reading and storing the values that were set in the main UI but I ran into some weird bugs.. I'll try and fix that later.

My bots are performing much faster at between 290-300 gph where as they were previously at 200. I have about 250% GF with both a WD and a DH. DPS: 19k, MS: 18%

edit: Thanks to all the prior plugin coders. Got a good understanding of the eventing structure.

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading;
using System.Windows;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using Zeta;
using Zeta.Common;
using Zeta.CommonBot;
using Zeta.Common.Plugins;
using Zeta.Internals;
using Zeta.Internals.Actors;
using Zeta.Internals.Service;


//Created by: adx 
//Credit to: w3eZle (http://www.thebuddyforum.com/members/144563-w3ezle.html)
//           eax (http://www.thebuddyforum.com/members/144149-eax.html) 
//           No1KnowsY (http://www.thebuddyforum.com/members/11607-no1knowsy.html)
//Script based on their original work
//Created Date: 14June2012

namespace Sarkoth
{
    public class Sarkoth : IPlugin
    {
        private bool IsRestarting { get; set; }
        public Version Version { get { return new Version(0, 1); } }
        public string Author { get { return "adx"; } }
        public string Description { get { return "reduce monster kill radius."; } }
        public string Name { get { return "Sarkoth Kill Reduce" + Version; } }

        //hard coding for now...
        private float originalKillRadius = 40; //store original kill radius
        private float reducedKillRadius = 10; //reduced radius

        private float originalLootRadius = 30; //store original kill radius
        private float reducedLootRadius = 10; //reduced radius

        public Window DisplayWindow
        {
            get
            {
                return null;
            }
        }

        private void Log(string message)
        {
            Logging.Write(string.Format("[{0}] {1}", Name, message));
        }


        public void OnInitialize()
        {
            IsRestarting = false;
        }


        public void OnPulse()
        {
            // if we're not in game and not in the process of restarting, do nothing
            if (!ZetaDia.IsInGame || !ZetaDia.Me.IsValid || IsRestarting)
            {
                return;
            }

            //Outside of Dank Cellar, reduce kill radius
            if (Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius != reducedKillRadius 
                && ZetaDia.CurrentWorldDynamicId == 1999503360)
            {
                Log("Reducing kill and loot radius");
                Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius = reducedKillRadius;
                Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius = reducedLootRadius;

                return;
            }

            //Inside of Dank Cellar, Enable Kill Monsters
            if (Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius != originalKillRadius 
                && ZetaDia.CurrentWorldDynamicId == 1999568897)
            {
                Log("Restoring kill and loot radius to " + originalKillRadius);
                Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius = originalKillRadius;
                Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius = originalLootRadius;

                return;
            }

        }

        public void OnShutdown()
        {
        }

        public void OnEnabled()
        {
            Log("Enabled.");
            //originalKillRadius = Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius;
            
        }

        public void OnDisabled()
        {
            Log("Disabled.");
        }

        public bool Equals(IPlugin other)
        {
            return (other.Name == Name) && (other.Version == Version);
        }
    }

}

Whenever I save this as a text file and use it as plugin I get error when loading bot. I copy paste it EXACTLY correct. When I compare to other sarkoth looks very similiair.. Whats going on?
 
edit: just realized i posted in wrong thread, sorry
 
Last edited:
Anyone know why sometimes the bot would kill things along the way to the cellar and look bodies/tree trunks and other times it would just run by as it should right to the cellar?
 
Anyone know why sometimes the bot would kill things along the way to the cellar and look bodies/tree trunks and other times it would just run by as it should right to the cellar?

i would also like it to skip monsters even if he gets damaged... but only fight back if the dark celler isnt there...

my guy fghting monsters outside then not even looting wastes a lot of itme :(:
 
Whenever I save this as a text file and use it as plugin I get error when loading bot. I copy paste it EXACTLY correct. When I compare to other sarkoth looks very similiair.. Whats going on?


It should be saved as a .cs, not a .txt file.
 
Back
Top