Generic script: Focus improving damage stats using remaining sink

  • Initiateur de la discussion Association
  • Date de début
  • Partenaires

Utilisateurs qui regardent le poste (Total: 0, Members: 0, Invité: 0)

Association

Association

Partenaire
Level 3
Level 2
Level 1
30 Juil. 2020
53
162
344
27
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: turnbased14, vinexami et invisikek
V

vinexami

Level 1
9 Avr. 2021
6
0
21
32
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
 
Association

Association

Partenaire
Level 3
Level 2
Level 1
30 Juil. 2020
53
162
344
27
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
Hello! Yeah, just change from Stat.AirDamage to Stat.WaterResistance. Something like that.
 
V

vinexami

Level 1
9 Avr. 2021
6
0
21
32
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
 
T

turnbased14

Nouveau membre
19 Nov. 2022
1
0
1
33
Discord
georgy311#1090
so would i copy paste into a notepad to use this script or an ahk ?