Hello all, this is the first version of Auto Health Potion, currently it will use a Mythic Health Potion at 50% life.
Most people are using Belphegor combat routine, and it does not provide a potion function.
Change the number in red to whatever % you want, (0.40 for 40% etc...)
I realize it does not have a wait timer built into the on pulse, it is because UseItem has one itself, or at least I think since it does not spam.
Anyways please post any bugs if you encounter any.
Also, check out my Item Rules Builder GUI http://www.thebuddyforum.com/demonbuddy-forum/plugins/57304-exe-itemrules-gui.html
Most people are using Belphegor combat routine, and it does not provide a potion function.
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.Common.Helpers;
using Zeta.CommonBot;
using Zeta.Common.Plugins;
using Zeta.Internals;
using Zeta.Internals.Actors;
using Zeta.Internals.Service;
//Created by: jmac
//Credit to w3eZle for his Sarkoth wait plugin
//Credit to eax (http://www.thebuddyforum.com/members/144149-eax.html) No1KnowsY (http://www.thebuddyforum.com/members/11607-no1knowsy.html)
//Based script on these guys work
//Created Date: 24June2012
namespace HealthPotion
{
public class HealthPotion : IPlugin
{
private bool IsRestarting { get; set; }
public Version Version { get { return new Version(0, 4); } }
public string Author { get { return "jmac"; } }
public string Description { get { return "Uses health potion if under 50% HP"; } }
public string Name { get { return "Health Potion v" + Version; } }
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 (ZetaDia.Actors.Me.HitpointsCurrentPct < [COLOR=#FF0000]0.50[/COLOR])
{
Log("Using Healh Potion");
var i = ZetaDia.Actors.Me.Inventory.Backpack.Where(item => item.Name == "Mythic Health Potion");
ZetaDia.Me.Inventory.UseItem(((ACDItem)i).DynamicId);
return;
}
}
public void OnShutdown()
{
}
public void OnEnabled()
{
Log("Enabled.");
}
public void OnDisabled()
{
Log("Disabled.");
}
public bool Equals(IPlugin other)
{
return (other.Name == Name) && (other.Version == Version);
}
}
}
Change the number in red to whatever % you want, (0.40 for 40% etc...)
I realize it does not have a wait timer built into the on pulse, it is because UseItem has one itself, or at least I think since it does not spam.
Anyways please post any bugs if you encounter any.
Also, check out my Item Rules Builder GUI http://www.thebuddyforum.com/demonbuddy-forum/plugins/57304-exe-itemrules-gui.html
Attachments
Last edited:






