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

[A1 Inferno]FallenDev's, Bossqwerty-spiced FoM zorked edition -> MP10 E-skipping

can someone explain to me how to edit the town.cs? i dunno if i did it correctly thx :)) feel free to post one already fixed
 
can someone explain to me how to edit the town.cs? i dunno if i did it correctly thx :)) feel free to post one already fixed

CUSTOM TOWNRUN explanation in my profile's topic

you dont need to edit it
its another file
 
Unfortunately this is a common issue with TrinityExploreDungeon, the tag to explore random generated maps.

There's no way to fix it.

Actually, to be more precise, it's due to the internal Demonbuddy DungeonExplorer.

... Which by the way works *much* better in the latest beta. Nesox added some magic...
 
Zork, to avoid all these problems about entering Decaying Crypts, change your FoMCrypts (and you guys having the problem, change yourselves)

Change:
Code:
<TrinityExploreDungeon questId="[B][SIZE=4]136656[/SIZE][/B]" stepId="1" boxSize="27" boxTolerance="0.18" pathPrecision="20"

For:
Code:
<TrinityExploreDungeon questId="[B][SIZE=4]1[/SIZE][/B]" stepId="1" boxSize="27" boxTolerance="0.18" pathPrecision="20"

No need to specify the real quest there. I think this will stop the endless complaints ;)
 
bombastic, Thanks for your tweak it works well in general but i have a question when i see in DB : "===== Ignoring Poison: True =====" i saw my Hero not moving at all and stay in the middle of it but sometimes it works it gets out of the poison directly and i did this : "Poison Tree: 100 (important, careful with that value to avoid flip-flop due to my new anti-poison code)" . Anything i could have done wrong? Thanks anyway :)
 
Speculoos, I changed that Poison Code exactly because of this, in my new version. I'll post it tomorrow, with a lot of new tweaks :)
 
Speculoos, I changed that Poison Code exactly because of this, in my new version. I'll post it tomorrow, with a lot of new tweaks :)

If you havent already, dont forget to add the 2H weapon fix from rrix's git. :) Your current version has the skipping 2h leg bug that doesnt pick up Skorns, etc. Great work btw.
 
I didn't know about that. I use my own soft itemrules, and it picks Skorns.

I'll look and fix it as well.
 
Speculoos, I changed that Poison Code exactly because of this, in my new version. I'll post it tomorrow, with a lot of new tweaks :)

That sounds great :) Thanks


If you havent already, dont forget to add the 2H weapon fix from rrix's git. :) Your current version has the skipping 2h leg bug that doesnt pick up Skorns, etc. Great work btw.

Could you link me the fix mate please?
 
Could you link me the fix mate please?

RefreshCachedItem.cs, change:

Code:
if (pickupItem.IsTwoHand && !Settings.Loot.Pickup.TwoHandedWeapons)

To:
Code:
if (pickupItem.IsTwoHand && !Settings.Loot.Pickup.TwoHandedWeapons && c_ItemQuality < ItemQuality.Legendary)
 
RefreshCachedItem.cs, change:

Code:
if (pickupItem.IsTwoHand && !Settings.Loot.Pickup.TwoHandedWeapons)

To:
Code:
if (pickupItem.IsTwoHand && !Settings.Loot.Pickup.TwoHandedWeapons && c_ItemQuality < ItemQuality.Legendary)

Dont have this in my RefresCachedItem.cs

Code:
using System;
using System.IO;
using Trinity.Cache;
using Trinity.Config.Loot;
using Trinity.Technicals;
using Zeta.CommonBot;
using Zeta.Internals.Actors;

namespace Trinity
{
    public partial class Trinity
    {
        private static bool RefreshItem()
        {
            bool logNewItem = false;
            bool AddToCache = false;

            if (c_BalanceID == -1)
            {
                AddToCache = false;
                c_IgnoreSubStep = "InvalidBalanceID";
            }

            var item = c_diaObject as DiaItem;
            c_ItemQuality = item.CommonData.ItemQualityLevel;

            float fExtraRange = 0f;

            if (c_ItemQuality >= ItemQuality.Legendary)
            {
                // always pickup
                AddToCache = true;
            }
            else
            {
                if (c_ItemQuality >= ItemQuality.Rare4)
                    fExtraRange = CurrentBotLootRange;

                if (iKeepLootRadiusExtendedFor > 0)
                    fExtraRange += 90f;

                if (c_CentreDistance > (CurrentBotLootRange + fExtraRange))
                {
                    c_IgnoreSubStep = "OutOfRange";
                    AddToCache = false;
                    // return here to save CPU on reading unncessary attributes for out of range items;
                    if (!AddToCache)
                        return AddToCache;
                }
            }

            c_ItemDisplayName = item.CommonData.Name;
            c_GameBalanceID = item.CommonData.GameBalanceId;
            c_ItemLevel = item.CommonData.Level;
            c_DBItemBaseType = item.CommonData.ItemBaseType;
            c_DBItemType = item.CommonData.ItemType;
            c_IsOneHandedItem = item.CommonData.IsOneHand;
            c_IsTwoHandedItem = item.CommonData.IsTwoHand;
            c_item_tFollowerType = item.CommonData.FollowerSpecialType;

            var pickupItem = new PickupItem
            {
                Name = c_ItemDisplayName,
                InternalName = c_InternalName,
                Level = c_ItemLevel,
                Quality = c_ItemQuality,
                BalanceID = c_BalanceID,
                DBBaseType = c_DBItemBaseType,
                DBItemType = c_DBItemType,
                IsOneHand = c_IsOneHandedItem,
                IsTwoHand = c_IsTwoHandedItem,
                ItemFollowerType = c_item_tFollowerType,
                DynamicID = c_GameDynamicID,
                Position = c_Position,
                ActorSNO = c_ActorSNO
            };

            // Calculate item type
            c_item_GItemType = DetermineItemType(c_InternalName, c_DBItemType, c_item_tFollowerType);

            // And temporarily store the base type
            GItemBaseType itemBaseType = DetermineBaseType(c_item_GItemType);

            // Treat all globes as a yes
            if (c_item_GItemType == GItemType.HealthGlobe)
            {
                c_ObjectType = GObjectType.Globe;
                // Create or alter this cached object type
                objectTypeCache[c_RActorGuid] = c_ObjectType;
                AddToCache = true;
            }

            // Item stats
            logNewItem = RefreshItemStats(itemBaseType);

            // Get whether or not we want this item, cached if possible
            if (!pickupItemCache.TryGetValue(c_RActorGuid, out AddToCache))
            {
                if (Settings.Loot.ItemFilterMode == ItemFilterMode.DemonBuddy)
                {
                    AddToCache = ItemManager.Current.ShouldPickUpItem((ACDItem) c_CommonData);
                }
                else if (Settings.Loot.ItemFilterMode == ItemFilterMode.TrinityWithItemRules)
                {
                    AddToCache = ItemRulesPickupValidation(pickupItem);
                }
                else
                {
                    AddToCache = PickupItemValidation(pickupItem);
                }

                // Pickup low level enabled, and we're a low level
                if (!AddToCache && Settings.Loot.Pickup.PickupLowLevel && Player.Level <= 10)
                {
                    AddToCache = PickupItemValidation(pickupItem);
                }

                pickupItemCache.Add(c_RActorGuid, AddToCache);
            }

            // Using DB built-in item rules
            if (AddToCache && ForceVendorRunASAP)
                c_IgnoreSubStep = "ForcedVendoring";

            // Didn't pass pickup rules, so ignore it
            if (!AddToCache && c_IgnoreSubStep == String.Empty)
                c_IgnoreSubStep = "NoMatchingRule";

            if (Settings.Advanced.LogDroppedItems && logNewItem && c_DBItemType != ItemType.Unknown)
                LogDroppedItem();

            return AddToCache;
        }

        private static void LogDroppedItem()
        {
            string droppedItemLogPath = Path.Combine(FileManager.TrinityLogsPath, String.Format("ItemsDropped.csv"));

            bool pickupItem = false;
            pickupItemCache.TryGetValue(c_RActorGuid, out pickupItem);

            bool writeHeader = !File.Exists(droppedItemLogPath);
            using (var LogWriter = new StreamWriter(droppedItemLogPath, true))
            {
                if (writeHeader)
                {
                    LogWriter.WriteLine("Timestamp,ActorSNO,RActorGUID,DyanmicID,GameBalanceID,ACDGuid,Name,InternalName,DBBaseType,TBaseType,DBItemType,TItemType,Quality,Level,IgnoreItemSubStep,Distance,Pickup,SHA1Hash");
                }
                LogWriter.Write(FormatCSVField(DateTime.Now));
                LogWriter.Write(FormatCSVField(c_ActorSNO));
                LogWriter.Write(FormatCSVField(c_RActorGuid));
                LogWriter.Write(FormatCSVField(c_GameDynamicID));
                // GameBalanceID
                LogWriter.Write(FormatCSVField(c_GameBalanceID));
                LogWriter.Write(FormatCSVField(c_ACDGUID));
                LogWriter.Write(FormatCSVField(c_ItemDisplayName));
                LogWriter.Write(FormatCSVField(c_InternalName));
                LogWriter.Write(FormatCSVField(c_DBItemBaseType.ToString()));
                LogWriter.Write(FormatCSVField(DetermineBaseType(c_item_GItemType).ToString()));
                LogWriter.Write(FormatCSVField(c_DBItemType.ToString()));
                LogWriter.Write(FormatCSVField(c_item_GItemType.ToString()));
                LogWriter.Write(FormatCSVField(c_ItemQuality.ToString()));
                LogWriter.Write(FormatCSVField(c_ItemLevel));
                LogWriter.Write(FormatCSVField(c_IgnoreSubStep));
                LogWriter.Write(FormatCSVField(c_CentreDistance));
                LogWriter.Write(FormatCSVField(pickupItem));
                LogWriter.Write(FormatCSVField(c_ItemMd5Hash));
                LogWriter.Write("\n");
            }
        }

        private static bool RefreshGold(bool AddToCache)
        {
            //int rangedMinimumStackSize = 0;
            AddToCache = true;

            if (Player.ActorClass == ActorClass.Barbarian && Settings.Combat.Barbarian.IgnoreGoldInWOTB && Hotbar.Contains(SNOPower.Barbarian_WrathOfTheBerserker) &&
                GetHasBuff(SNOPower.Barbarian_WrathOfTheBerserker))
            {
                AddToCache = false;
                c_IgnoreSubStep = "IgnoreGoldInWOTB";
                return AddToCache;
            }

            // Get the gold amount of this pile, cached if possible
            if (!goldAmountCache.TryGetValue(c_RActorGuid, out c_GoldStackSize))
            {
                try
                {
                    c_GoldStackSize = ((ACDItem) c_CommonData).Gold;
                }
                catch
                {
                    Logger.Log(TrinityLogLevel.Debug, LogCategory.CacheManagement, "Safely handled exception getting gold pile amount for item {0} [{1}]", c_InternalName, c_ActorSNO);
                    AddToCache = false;
                    c_IgnoreSubStep = "GetAttributeException";
                }
                goldAmountCache.Add(c_RActorGuid, c_GoldStackSize);
            }

            if (c_GoldStackSize < Settings.Loot.Pickup.MinimumGoldStack)
            {
                AddToCache = false;
                c_IgnoreSubStep = "NotEnoughGold";
                return AddToCache;
            }

            if (c_CentreDistance <= Player.GoldPickupRadius)
            {
                AddToCache = false;
                c_IgnoreSubStep = "WithinPickupRadius";
                return AddToCache;
            }

            //if (!AddToCache)
            //    LogSkippedGold();

            //DbHelper.Log(TrinityLogLevel.Debug, LogCategory.CacheManagement, "Gold Stack {0} has iPercentage {1} with rangeMinimumStackSize: {2} Distance: {3} MininumGoldStack: {4} PickupRadius: {5} AddToCache: {6}",
            //    c_GoldStackSize, iPercentage, rangedMinimumStackSize, c_CentreDistance, Settings.Loot.Pickup.MinimumGoldStack, ZetaDia.Me.GoldPickUpRadius, AddToCache);

            return AddToCache;
        }

        private static void LogSkippedGold()
        {
            string skippedItemsPath = Path.Combine(FileManager.LoggingPath, String.Format("SkippedGoldStacks_{0}_{1}.csv", Player.ActorClass, DateTime.Now.ToString("yyyy-MM-dd")));

            bool writeHeader = !File.Exists(skippedItemsPath);
            using (var LogWriter = new StreamWriter(skippedItemsPath, true))
            {
                if (writeHeader)
                {
                    LogWriter.WriteLine("ActorSNO,RActorGUID,DyanmicID,ACDGuid,Name,GoldStackSize,IgnoreItemSubStep,Distance");
                }
                LogWriter.Write(FormatCSVField(c_ActorSNO));
                LogWriter.Write(FormatCSVField(c_RActorGuid));
                LogWriter.Write(FormatCSVField(c_GameDynamicID));
                LogWriter.Write(FormatCSVField(c_ACDGUID));
                LogWriter.Write(FormatCSVField(c_InternalName));
                LogWriter.Write(FormatCSVField(c_GoldStackSize));
                LogWriter.Write(FormatCSVField(c_IgnoreSubStep));
                LogWriter.Write(FormatCSVField(c_CentreDistance));
                LogWriter.Write("\n");
            }
        }

        private static string FormatCSVField(DateTime time)
        {
            return String.Format("\"{0:yyyy-MM-ddTHH:mm:ss.ffffzzz}\",", time);
        }

        private static string FormatCSVField(string text)
        {
            return String.Format("\"{0}\",", text);
        }

        private static string FormatCSVField(int number)
        {
            return String.Format("\"{0}\",", number);
        }

        private static string FormatCSVField(double number)
        {
            return String.Format("\"{0:0}\",", number);
        }

        private static string FormatCSVField(bool value)
        {
            return String.Format("\"{0}\",", value);
        }
    }
}
 
My v2 is based in Trinity 1.7.3.8.

That option was created later, in 1.7.3.9.
 
Zork, to avoid all these problems about entering Decaying Crypts, change your FoMCrypts (and you guys having the problem, change yourselves)

Change:
Code:
<TrinityExploreDungeon questId="[B][SIZE=4]136656[/SIZE][/B]" stepId="1" boxSize="27" boxTolerance="0.18" pathPrecision="20"

For:
Code:
<TrinityExploreDungeon questId="[B][SIZE=4]1[/SIZE][/B]" stepId="1" boxSize="27" boxTolerance="0.18" pathPrecision="20"

No need to specify the real quest there. I think this will stop the endless complaints ;)
Hah, you're a genious. The simple things are always the ones I seem to overlook :P

Friday I'll be able to move into my new appartment. Then I'll set up my computers again and will have time to do some fixes. At least I hope I'll have some time for that...
 
Back
Top