Generic script: Focus improving damage stats using remaining sink

    Publicités

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

Association

Partenaire
Jul 30, 2020
51
161
164
26
Greetings!

I am sharing with you a generic script that can be used on any item and will focus any remaining sink to first improve Air damage and Water damage - you should customize which damages you want to improve.

It can be customized for other stats of course.​

C#:
using System;
using System;
using System.Diagnostics;
using Inkybot.Dofus;
using Inkybot.Dofus.Contracts;
using Inkybot.Dofus.Domain;

namespace Script
{
    public class ImproveDamagesFirstMagingAI : CustomDofusMagingAI
    {
        // Should the bot use the sink using it's default behavior?
        protected override bool ShouldPerfectStats =>
            !ShouldImproveAirDamageWithSink &&
            !ShouldImproveWaterDamageWithSink;

        private bool ShouldImproveAirDamageWithSink => Sink >= 6 && IsAirDamageNotAtMaximum;
        private bool ShouldImproveWaterDamageWithSink => Sink >= 6 && IsWaterDamageNotAtMaximum;

        private bool IsAirDamageNotAtMaximum =>
            Item.Stats[Stat.AirDamage]?.Value < Item.Stats[Stat.AirDamage]?.Max;
        private bool IsWaterDamageNotAtMaximum =>
            Item.Stats[Stat.WaterDamage]?.Value < Item.Stats[Stat.WaterDamage]?.Max;

        protected override IAction Resolve() =>
            ResolveDefault();

        protected override ItemMage? BeforeExoRune(ItemMage proposedMage) {
            if (ShouldImproveAirDamageWithSink) {
                return ItemMage(new Rune(Stat.AirDamage, Rune.RuneType.Sm));
            }
            if (ShouldImproveWaterDamageWithSink) {
                return ItemMage(new Rune(Stat.WaterDamage, Rune.RuneType.Sm));
            }

            return null;
        }
    }
}
 
  • Like
Reactions: turnbased14, vinexami and invisikek

vinexami

Membre
Apr 9, 2021
6
0
21
30
Discord
Vinex
hello
thanks for the script
i would like to know How to make the bot prioritize water resist not water damage
if you could help me on this
thanks
 

vinexami

Membre
Apr 9, 2021
6
0
21
30
Discord
Vinex
i tryed that but the issue am having is that am not trying to improve the stats with sink
am trying to make the bot maximazing the water resistance then go to water damage
am trying to make rhineetle ring exo mp, the bot go to maximum in water damage then try to go max with water resistance this causes the water damage to go down to, i just want it to make the 10% resistance then try to make it to target damage value
thank you for all th work you doing and still replying to my comments very kind of u