I edited the file and "If" it gets Hit or dies it turns on killing AND Looting for 20 sec.. hate to see loot left on the ground. if it kills it should loot. Good work icools
The Loot rules i am using are Salvage59-60KeepRares&GFMFSellEverythingElse edited to keep a few items, it loots all blues and above Keeps and stores all pages and tomes, designs and plans, All gems, Mythic Health Potion, ALL Legendary and rares level 55+. Keeps all items with gold find and magic find over 20%, Any item with Dexterity 100+,Any item with ResistAll 45+ , Any 900 dps+ twoHanded weapon and any 800+ oneHanded. It will Sell any thing left Under level 59 and salvage all 59-60+ and stash all mats
[/QUOTE]
<?xml version="1.0" encoding="utf-8" ?>
<!--
Set your bot settings and allow at least one page to deposit looted items.
Otherwise bot will just stand front of stash and do nothing.
-->
<ItemRules name="Default Item Rules" useRoundedValues="false">
<Priority priority1="Keep" priority2="Salvage" priority3="Sell" />
<Categories>
<Category ruleType="PickUp">
<!-- Pick up all magic+ items -->
<ItemRule>
<StatRules>
<Rule quality="Magic1" />
</StatRules>
</ItemRule>
<!-- Pick up gold, at least in stacks of 50 -->
<ItemRule itemName="Gold" stack="50" />
<!-- Pick up all pages and tomes, blacksmithing/jewelcrafting -->
<ItemRule itemName="Page of*" stack="1" />
<ItemRule itemName="Tome of*" stack="1" />
<!-- Pick up designs and plans, blacksmithing/jewelcrafting -->
<ItemRule itemName="Plan:*" stack="1" />
<ItemRule itemName="Design:*" stack="1" />
<!-- Gems -->
<ItemRule itemName="*Ruby*" stack="1" />
<ItemRule itemName="*Emerald*" stack="1" />
<ItemRule itemName="*Topaz*" stack="1" />
<ItemRule itemName="*Amethyst*" stack="1" />
<!-- Mythic Health potions -->
<ItemRule itemName="Mythic Health Potion" stack="1" />
</Category>
<Category ruleType="Keep">
<!-- Keep designs and plans, blacksmithing/jewelcrafting -->
<ItemRule itemName="Plan:*" />
<ItemRule itemName="Design:*" />
<!-- Just in case keeps pages, tomes and salvage materials-->
<ItemRule itemName="Page of*" />
<ItemRule itemName="Tome of*" />
<ItemRule itemName="*Essence" />
<ItemRule itemName="*Tear" />
<ItemRule itemName="*Hoof" />
<ItemRule itemName="*Brimstone" />
<!-- Keep rare items level 55 or more regardless of stats. -->
<ItemRule description="Rare Items">
<StatRules>
<Rule quality="Rare4" stat="level" minValue="50" />
</StatRules>
</ItemRule>
<!-- Keep legendaries, regardless of stats. -->
<ItemRule ruleType="Keep" description="Legendary">
<StatRules>
<Rule quality="Legendary" />
</StatRules>
</ItemRule>
<!-- Keep magic items with gold find. -->
<ItemRule description="Gold Find Items">
<StatRules>
<Rule quality="Magic1" stat="GoldFind" minValue="20" />
</StatRules>
</ItemRule>
<!-- Keep magic items with magic find. -->
<ItemRule description="Magic Find Items">
<StatRules>
<Rule quality="Magic1" stat="MagicFind" minValue="20" />
</StatRules>
</ItemRule>
<!-- Keep magic items with Dexterity. -->
<ItemRule description="Dexterity">
<StatRules>
<Rule quality="Magic1" stat="Dexterity" minValue="100" />
</StatRules>
</ItemRule>
<!-- Keep magic items with ResistAll. -->
<ItemRule description="ResistAll">
<StatRules>
<Rule quality="Magic1" stat="ResistAll" minValue="45" />
</StatRules>
</ItemRule>
<ItemRule itemBaseType="Weapon" twoHanded="true" description="High DPS 2H Weapons">
<StatRules>
<!-- Magic Weapons should have at least 900 DPS -->
<Rule stat="DPS" minValue="900" quality="Magic2" />
<!-- Rare weapons should have at least 900 considering they provide extra stats most of the time. -->
<Rule stat="DPS" minValue="9000" quality="Rare4" />
</StatRules>
</ItemRule>
<ItemRule itemBaseType="Weapon" twoHanded="false" description="High DPS 1H Weapons">
<StatRules>
<!-- Magic Weapons should have at least 900 DPS -->
<Rule stat="DPS" minValue="900" quality="Magic2" />
<!-- Rare weapons should have at least 800 considering they provide extra stats most of the time. -->
<Rule stat="DPS" minValue="800" quality="Rare4" />
</StatRules>
</ItemRule>
<!-- Keep legendaries, regardless of stats. -->
<ItemRule ruleType="Keep" description="Legendary">
<StatRules>
<Rule quality="Legendary" />
</StatRules>
</ItemRule>
</Category>
<!-- Salvages everything between level 59 and 60. -->
<Category ruleType="Salvage">
<!-- Salvages jewelry level 59 -->
<ItemRule itemBaseType="Jewelry" description="Salvage Jewelry">
<StatRules>
<Rule quality="Magic1" stat="level" minValue="59" />
</StatRules>
</ItemRule>
<!-- Salvages everything else level 60 -->
<ItemRule description="Salvage Everything">
<StatRules>
<Rule quality="Magic1" stat="level" minValue="60" />
</StatRules>
</ItemRule>
</Category>
<!--Sells everything else -->
<Category ruleType="Sell">
<ItemRule description="Sell Everything">
<StatRules>
<Rule quality="Magic1" />
</StatRules>
</ItemRule>
</Category>
</Categories>
</ItemRules>
[/QUOTE]
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;
//Edited and continued by Icool
//Created by: w3eZle
//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 "Icool"; } }
public string Description { get { return "Provides helpful methods while farming Sarkoth."; } }
public string Name { get { return "Icool's Sarkoth farm helper v" + Version; } }
public bool hasDied { get; set; }
public int diedTickCount { get; set; }
public int cellarsFoundInGames { get; set; }
public int games { get; set; }
public int startingMoney { get; set; }
public int startingMoneyThisRound { get; set; }
public bool initialized { get; set; }
public bool foundCellar { get; set; }
public long averageFail { get; set; }
public long averageClear { get; set; }
public long thisRunStart { get; set; }
public int lastSSTick { get; set; }
public Window DisplayWindow
{
get
{
return null;
}
}
private void Log(string message)
{
Logging.Write(string.Format("[{0}] {1}", Name, message));
}
public void OnInitialize()
{
games = 0;
cellarsFoundInGames = 0;
averageFail = 0;
averageClear = 0;
IsRestarting = false;
lastSSTick = 0;
initialized = false;
}
public void RemoveAllBehavior()
{
ProfileManager.CurrentProfileBehavior.ResetCachedDone();
}
public void OnPulse()
{
//Checks if 20 seconds has passed since you died
if (hasDied)
{
if (System.Environment.TickCount - diedTickCount > 20000)
{
Log("20seconds has passed since you died, turning of the attack");
hasDied = false;
return;
}
}
// 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;
ProfileManager.CurrentProfile.PickupLoot = true;
diedTickCount = System.Environment.TickCount;
return;
}
//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;
ProfileManager.CurrentProfile.PickupLoot = true;
return;
}
//Outside of DankC ellar, Diable Kill Monsters
if (ZetaDia.Actors.Me.HitpointsCurrentPct > 0.80 && ProfileManager.CurrentProfile.KillMonsters == true && ZetaDia.CurrentWorldDynamicId == 1999503360 && !hasDied)
{
Log("Disabeling KillMonsters & PickupLoot");
ProfileManager.CurrentProfile.KillMonsters = false;
ProfileManager.CurrentProfile.PickupLoot = false;
return;
}
//Inside of Dank Cellar, Enable Kill Monsters
if (ProfileManager.CurrentProfile.KillMonsters == false && ZetaDia.CurrentWorldDynamicId == 1999568897)
{
Log("Enabeling KillMonsters");
ProfileManager.CurrentProfile.KillMonsters = true;
return;
}
//Enabling loot if loot is off while entering the cellar
if (ProfileManager.CurrentProfile.PickupLoot == false && ZetaDia.CurrentWorldDynamicId == 1999568897)
{
Log("Enabling Loot");
ProfileManager.CurrentProfile.PickupLoot = true;
return;
}
}
public void OnShutdown()
{
}
public void OnEnabled()
{
GameEvents.OnGameJoined += new EventHandler<EventArgs>(OnGameJoined);
GameEvents.OnGameLeft += new EventHandler<EventArgs>(OnGameLeft);
GameEvents.OnWorldChanged += new EventHandler<EventArgs>(OnWorldChanged);
GameEvents.OnItemLooted += new EventHandler<ItemLootedEventArgs>(OnItemLooted);
Log("Enabled.");
}
public void OnGameJoined(object sender, EventArgs e)
{
Log("Joined Game");
thisRunStart = System.Environment.TickCount;
startingMoneyThisRound = ZetaDia.Me.Inventory.Coinage;
foundCellar = false;
if (!initialized)
{
Log("First time logging in, init gold...");
startingMoney = ZetaDia.Me.Inventory.Coinage;
Log("Current gold: " + startingMoney);
initialized = true;
}
}
public void OnGameLeft(object sender, EventArgs e)
{
Log("Left Game");
games++;
Log("Cellars found in " + cellarsFoundInGames + "/" + games + " games!");
long thisTime = System.Environment.TickCount - thisRunStart;
if (foundCellar)
{
averageClear = ((averageClear * (cellarsFoundInGames - 1)) + thisTime) / cellarsFoundInGames;
Log("This Run took: " + (thisTime / 1000) + "s");
Log("The average cellar run is: " + (averageClear / 1000) + "s");
}
else
{
averageFail = ((averageFail * ((games - cellarsFoundInGames) - 1)) + thisTime) / (games - cellarsFoundInGames);
Log("This Run took: " + (thisTime/1000) + "s");
Log("The average fail run is: " + (averageFail / 1000) + "s");
}
Log("Money made this run: " + (ZetaDia.Me.Inventory.Coinage - startingMoneyThisRound));
Log("Money made in total: " + (ZetaDia.Me.Inventory.Coinage - startingMoney));
}
public void OnWorldChanged(object sender, EventArgs e)
{
Log("Changed world to " + ZetaDia.CurrentWorldDynamicId);
if (ZetaDia.CurrentWorldDynamicId == 1999568897 && !foundCellar)
{
Log("Found a cellar!");
cellarsFoundInGames++;
foundCellar = true;
}
}
public void OnItemLooted(object sender, ItemLootedEventArgs e)
{
}
public void OnDisabled()
{
Log("Disabled.");
}
public bool Equals(IPlugin other)
{
return (other.Name == Name) && (other.Version == Version);
}
}
}
The Loot rules i am using are Salvage59-60KeepRares&GFMFSellEverythingElse edited to keep a few items, it loots all blues and above Keeps and stores all pages and tomes, designs and plans, All gems, Mythic Health Potion, ALL Legendary and rares level 55+. Keeps all items with gold find and magic find over 20%, Any item with Dexterity 100+,Any item with ResistAll 45+ , Any 900 dps+ twoHanded weapon and any 800+ oneHanded. It will Sell any thing left Under level 59 and salvage all 59-60+ and stash all mats
[/QUOTE]
<?xml version="1.0" encoding="utf-8" ?>
<!--
Set your bot settings and allow at least one page to deposit looted items.
Otherwise bot will just stand front of stash and do nothing.
-->
<ItemRules name="Default Item Rules" useRoundedValues="false">
<Priority priority1="Keep" priority2="Salvage" priority3="Sell" />
<Categories>
<Category ruleType="PickUp">
<!-- Pick up all magic+ items -->
<ItemRule>
<StatRules>
<Rule quality="Magic1" />
</StatRules>
</ItemRule>
<!-- Pick up gold, at least in stacks of 50 -->
<ItemRule itemName="Gold" stack="50" />
<!-- Pick up all pages and tomes, blacksmithing/jewelcrafting -->
<ItemRule itemName="Page of*" stack="1" />
<ItemRule itemName="Tome of*" stack="1" />
<!-- Pick up designs and plans, blacksmithing/jewelcrafting -->
<ItemRule itemName="Plan:*" stack="1" />
<ItemRule itemName="Design:*" stack="1" />
<!-- Gems -->
<ItemRule itemName="*Ruby*" stack="1" />
<ItemRule itemName="*Emerald*" stack="1" />
<ItemRule itemName="*Topaz*" stack="1" />
<ItemRule itemName="*Amethyst*" stack="1" />
<!-- Mythic Health potions -->
<ItemRule itemName="Mythic Health Potion" stack="1" />
</Category>
<Category ruleType="Keep">
<!-- Keep designs and plans, blacksmithing/jewelcrafting -->
<ItemRule itemName="Plan:*" />
<ItemRule itemName="Design:*" />
<!-- Just in case keeps pages, tomes and salvage materials-->
<ItemRule itemName="Page of*" />
<ItemRule itemName="Tome of*" />
<ItemRule itemName="*Essence" />
<ItemRule itemName="*Tear" />
<ItemRule itemName="*Hoof" />
<ItemRule itemName="*Brimstone" />
<!-- Keep rare items level 55 or more regardless of stats. -->
<ItemRule description="Rare Items">
<StatRules>
<Rule quality="Rare4" stat="level" minValue="50" />
</StatRules>
</ItemRule>
<!-- Keep legendaries, regardless of stats. -->
<ItemRule ruleType="Keep" description="Legendary">
<StatRules>
<Rule quality="Legendary" />
</StatRules>
</ItemRule>
<!-- Keep magic items with gold find. -->
<ItemRule description="Gold Find Items">
<StatRules>
<Rule quality="Magic1" stat="GoldFind" minValue="20" />
</StatRules>
</ItemRule>
<!-- Keep magic items with magic find. -->
<ItemRule description="Magic Find Items">
<StatRules>
<Rule quality="Magic1" stat="MagicFind" minValue="20" />
</StatRules>
</ItemRule>
<!-- Keep magic items with Dexterity. -->
<ItemRule description="Dexterity">
<StatRules>
<Rule quality="Magic1" stat="Dexterity" minValue="100" />
</StatRules>
</ItemRule>
<!-- Keep magic items with ResistAll. -->
<ItemRule description="ResistAll">
<StatRules>
<Rule quality="Magic1" stat="ResistAll" minValue="45" />
</StatRules>
</ItemRule>
<ItemRule itemBaseType="Weapon" twoHanded="true" description="High DPS 2H Weapons">
<StatRules>
<!-- Magic Weapons should have at least 900 DPS -->
<Rule stat="DPS" minValue="900" quality="Magic2" />
<!-- Rare weapons should have at least 900 considering they provide extra stats most of the time. -->
<Rule stat="DPS" minValue="9000" quality="Rare4" />
</StatRules>
</ItemRule>
<ItemRule itemBaseType="Weapon" twoHanded="false" description="High DPS 1H Weapons">
<StatRules>
<!-- Magic Weapons should have at least 900 DPS -->
<Rule stat="DPS" minValue="900" quality="Magic2" />
<!-- Rare weapons should have at least 800 considering they provide extra stats most of the time. -->
<Rule stat="DPS" minValue="800" quality="Rare4" />
</StatRules>
</ItemRule>
<!-- Keep legendaries, regardless of stats. -->
<ItemRule ruleType="Keep" description="Legendary">
<StatRules>
<Rule quality="Legendary" />
</StatRules>
</ItemRule>
</Category>
<!-- Salvages everything between level 59 and 60. -->
<Category ruleType="Salvage">
<!-- Salvages jewelry level 59 -->
<ItemRule itemBaseType="Jewelry" description="Salvage Jewelry">
<StatRules>
<Rule quality="Magic1" stat="level" minValue="59" />
</StatRules>
</ItemRule>
<!-- Salvages everything else level 60 -->
<ItemRule description="Salvage Everything">
<StatRules>
<Rule quality="Magic1" stat="level" minValue="60" />
</StatRules>
</ItemRule>
</Category>
<!--Sells everything else -->
<Category ruleType="Sell">
<ItemRule description="Sell Everything">
<StatRules>
<Rule quality="Magic1" />
</StatRules>
</ItemRule>
</Category>
</Categories>
</ItemRules>
[/QUOTE]