I havent tried this yet but if this is like the killwait then I'm assuming that it'll attack only if under 70% life. The problem is I still die even when I used the killwait plugin. I think what has to happen is if the cellar isn't there it has to kill all enemies in a certain radius and then use a town portal to get out. Is it possible to get something like this?
I fixed this for my wiz mashing up two scripts.. hope it helps some1 else
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: w3eZle //mashed artemis with sarkoth kill wait (should defend himself properly outside cellar) //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: 12June2012 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 "Phelon"; } } public string Description { get { return "Good for Short Profiles."; } } public string Name { get { return "Artemis - The Profile Helper" + Version; } } //hard coding for now... private float originalKillRadius = 40; //store original kill radius private float reducedKillRadius = 15; //reduced radius private float originalLootRadius = 40; //store original kill radius private float reducedLootRadius = 15; //reduced radius public bool hasDied { get; set; } public int diedTickCount { get; set; } public int lastSSTick { get; set; } public Window DisplayWindow { get { return null; } } 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); } private void Log(string message) { Logging.Write(string.Format("[{0}] {1}", Name, message)); } public void OnInitialize() { IsRestarting = false; lastSSTick = 0; } public void OnPulse() { if (hasDied) { if (System.Environment.TickCount - diedTickCount > 20000) { Log("20seconds has passed since you died, turning of the attack"); hasDied = false; } } // if we're not in game and not in the process of restarting, do nothing if (!ZetaDia.IsInGame || !ZetaDia.Me.IsValid || IsRestarting) { return; } //Turns on the attack for 20s after you get killed to prevent graveyard ganking if (ZetaDia.Actors.Me.HitpointsCurrentPct == 0.00) { Log("Wooooa, seems like i just died, lets turn on the attack for 20s"); hasDied = true; ProfileManager.CurrentProfile.KillMonsters = true; diedTickCount = System.Environment.TickCount; } //Turning on the attack if you get attacked outside the cellar w3eZle's method if (ZetaDia.Actors.Me.HitpointsCurrentPct < 0.80 && ProfileManager.CurrentProfile.KillMonsters == false) { Log("Turning on KillMonsters -Health to low"); ProfileManager.CurrentProfile.KillMonsters = true; return; } //Inside of Dank Cellar, Enable Kill Monsters if (ProfileManager.CurrentProfile.KillMonsters == false && ZetaDia.CurrentWorldDynamicId == 1999568897) { Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius = originalKillRadius; Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius = originalLootRadius; ProfileManager.CurrentProfile.KillMonsters = true; ProfileManager.CurrentProfile.PickupLoot = true; Log("Enabling KillMonsters"); } if (ZetaDia.CurrentWorldDynamicId == 1999503360) { //Cellar Entrance x="2065.197" y="2481.297" z="27.36784" //Location where stop x="2016.163" y="2573.744" z="27.1" //Zone in x="1991.747" y="2653.501" z="39.43713" var units = ZetaDia.Actors.GetActorsOfType<DiaUnit>(true, false).Where(x => GetDistanceFromMe(x.Position.X, x.Position.Y) <= 20).FirstOrDefault(); var cellar = ZetaDia.Actors.GetActorsOfType<DiaObject>(true, false).Where(unit => unit.Name.Contains("CellarDoor_Open")).FirstOrDefault(); if (units != null && units.Distance < 18 && cellar != null && GetDistance(2056.504f, 2540.974f, ZetaDia.Me.Position.X, ZetaDia.Me.Position.Y) < 15f && ProfileManager.CurrentProfile.KillMonsters == false) { Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius = originalKillRadius; Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius = originalLootRadius; ProfileManager.CurrentProfile.KillMonsters = true; ProfileManager.CurrentProfile.PickupLoot = true; } else { Zeta.CommonBot.Settings.CharacterSettings.Instance.KillRadius = reducedKillRadius; Zeta.CommonBot.Settings.CharacterSettings.Instance.LootRadius = reducedLootRadius; ProfileManager.CurrentProfile.KillMonsters = false; ProfileManager.CurrentProfile.PickupLoot = false; } } if (GetDistance(1991.747f, 2653.501f, ZetaDia.Me.Position.X, ZetaDia.Me.Position.Y) < 10) { PortToEntrance(); } } public static void PortToEntrance() { TeleportTo(1995f, 2603f, ZetaDia.Me.Position.Z); Thread.Sleep(450); TeleportTo(2025f, 2563f, ZetaDia.Me.Position.Z); Thread.Sleep(450); TeleportTo(2057f, 2528f, ZetaDia.Me.Position.Z); Thread.Sleep(450); TeleportTo(2056.504f, 2540.974f, ZetaDia.Me.Position.Z); //TeleportTo(2081f, 2487f, ZetaDia.Me.Position.Z); } private static void TeleportTo(float x, float y, float z) { var v = new Vector3(x, y, z); if (ZetaDia.Me.ActorClass == ActorClass.Wizard) { ZetaDia.Me.UsePower(SNOPower.Wizard_Teleport, v, ZetaDia.Me.WorldDynamicId, 2, -1); } if (ZetaDia.Me.ActorClass == ActorClass.DemonHunter) { ZetaDia.Me.UsePower(SNOPower.DemonHunter_Vault, v, ZetaDia.Me.WorldDynamicId, 2, -1); } } public static float GetDistanceFromMe(float x, float y) { return (float)Math.Sqrt((ZetaDia.Me.Position.X - x) * (ZetaDia.Me.Position.X - x) + (ZetaDia.Me.Position.Y - y) * (ZetaDia.Me.Position.Y - y)); } public static float GetDistance(float x, float y, float x2, float y2) { return (float)Math.Sqrt((x - x2) * (x - x2) + (y - y2) * (y - y2)); } } }