Generic script: Focus improving damage stats using remaining sink

  • Le Discord de CG3 est maintenant de retour : Discord ! Cependant ce dernier aura des nouvelles règles, nous vous invitons à lire ceci : Nouveau discord CG3

Association

Partenaire
30 Juil. 2020
51
147
104
23
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;
        }
    }
}
 
  • Réagir
Réactions: vinexami et invisikek

vinexami

Membre
9 Avr. 2021
6
0
21
28
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
9 Avr. 2021
6
0
21
28
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