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

Sunwuko logic, if someone could help me code it.

yildaot

New Member
Joined
Apr 2, 2014
Messages
44
Reaction score
0
I was looking at monkcombat file trying to figure out a workaround, but it still references Mantra of Evasion which is now defunct as opposed to Mantra of Salvation that most SWK users use. So if anyone's suave enough to write this for SWK users, that'd be much appreciated =)

In combat:
SW is not up, use it.
SW is up & Spirit => 50, use Mantra. Mantra has added benefits of Mantra activation over SW spam.
SW is up & Spirit => 175, use SW. Uses SW to expend excess spirit that Mantra spam can't dump since it is limited by .5 gcd.
 
I was looking at monkcombat file trying to figure out a workaround, but it still references Mantra of Evasion which is now defunct as opposed to Mantra of Salvation that most SWK users use. So if anyone's suave enough to write this for SWK users, that'd be much appreciated =)

In combat:
SW is not up, use it.
SW is up & Spirit => 50, use Mantra. Mantra has added benefits of Mantra activation over SW spam.
SW is up & Spirit => 175, use SW. Uses SW to expend excess spirit that Mantra spam can't dump since it is limited by .5 gcd.

Do you mean 75?

SW is not up, use it.
SW is up & Spirit => 75, use Mantra. Mantra has added benefits of Mantra activation over SW spam.
SW is up & Spirit => 175 use SW. Uses SW to expend excess spirit that Mantra spam can't dump since it is limited by .5 gcd.


Sunwuko's Balance - Game Guide - Diablo III


  • (4) Set:
  • Spending 75 Spirit causes a decoy to spawn that taunts nearby enemies and then explodes for 3500% weapon damage as Holy.
 
No, Mantra costs 50, so if you've got 50, use Mantra. Casting 3 Mantras will spawn 2 clones, the game keeps track of total spirit spent.

For example:

1st Mantra cast: 50 spirit spent - no clone - 50 spirit spent leftover
2nd Mantra cast: 50 + 50 =100 spirit spirit spent - clone spawns - 25 spirit spent leftover
3rd Mantra cast: 25 + 50 75 spirit spent - clone spawns - 0 spirit spent leftover


Edit: On second though, maybe >=75 or 100 might be better, then you have spirit leftover to refresh SW between packs.
 
Last edited:
Could you test this? It spams the mantra if SWK build is detected. That's what you're asking, right?
 
is this the changes you did?

Code:
            bool isSWK = Sets.MonkeyKingsGar.IsSecondBonusActive;
            if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2) &&
                (!isSWK && Player.CurrentHealthPct <= V.F("Monk.MantraOfHealing.UseHealthPct") || isSWK) &&
                !Player.IsIncapacitated && !GetHasBuff(SNOPower.X1_Monk_MantraOfHealing_v2))
            {
                return new TrinityPower(SNOPower.X1_Monk_MantraOfHealing_v2);
            }

            if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfEvasion_v2) &&
                (!isSWK && Player.CurrentHealthPct <= V.F("Monk.MantraOfHealing.UseHealthPct") || isSWK) &&
                !GetHasBuff(SNOPower.X1_Monk_MantraOfEvasion_v2) && CurrentTarget != null)
            {
                return new TrinityPower(SNOPower.X1_Monk_MantraOfEvasion_v2);
            }

Testing it now, but just from a glance it still has Mantra of Evasion as opposed to the new Mantra of Salvation which replaced it.



e: nope, doesn't work, character explores, sees an enemy, stands still and spams this error at me

Code:
Exception during bot tick.System.Exception: Injection resulted in a process exception with error code 0xc0000005
   at GreyMagic.Executor.WaitForInjection(Int32 timeout)
   at GreyMagic.Executor.Execute(Int32 timeout)
   at GreyMagic.Executor.Execute()
   at €..(Executor , String )
   at Zeta.Game.Internals.Actors.DiaActivePlayer.UsePower(SNOPower power, Vector3 clickPos, Int32 worldDynamicId, Int32 targetACDGuid)
   at Zeta.Bot.CombatRoutine.DestroyObject(DiaObject actor)
   at Zeta.Bot.Logic.BrainBehavior.(Object )
   at Zeta.TreeSharp.Action.RunAction(Object context)
   at Zeta.TreeSharp.Action..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.TreeSharp.Sequence..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.TreeSharp.Decorator..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.TreeSharp.PrioritySelector..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.TreeSharp.PrioritySelector..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.Bot.BotMain.()
 
Last edited:
Replace

Code:
            bool isSWK = Sets.MonkeyKingsGar.IsSecondBonusActive;
            if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2) &&
                (!isSWK && Player.CurrentHealthPct <= V.F("Monk.MantraOfHealing.UseHealthPct") || isSWK) &&
                !Player.IsIncapacitated && !GetHasBuff(SNOPower.X1_Monk_MantraOfHealing_v2))
            {
                return new TrinityPower(SNOPower.X1_Monk_MantraOfHealing_v2);
            }

with

Code:
// SWK Spam Mantra and SW
bool isSWK = Sets.MonkeyKingsGarb.IsSecondBonusActive;
if (isSWK && !Player.IsIncapacitated && CurrentTarget != null && TargetUtil.EliteOrTrashInRange(15f))
{
	// SW Spam
	if (Hotbar.Contains(SNOPower.Monk_SweepingWind) && Player.PrimaryResource > 125)
	{
		return new TrinityPower(SNOPower.Monk_SweepingWind);
	}
				
	// SNOPower.X1_Monk_MantraOfHealing_v2
	if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2) && Player.PrimaryResource > 50)
	{
        return new TrinityPower(SNOPower.X1_Monk_MantraOfHealing_v2);
	}
	// SNOPower.X1_Monk_MantraOfRetribution_v2
	if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfRetribution_v2) && Player.PrimaryResource > 50)
	{
        return new TrinityPower(SNOPower.X1_Monk_MantraOfRetribution_v2);
	}
	// SNOPower.X1_Monk_MantraOfConviction_v2
	if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfConviction_v2) && Player.PrimaryResource > 50)
	{
        return new TrinityPower(SNOPower.X1_Monk_MantraOfConviction_v2);
	}
	// SNOPower.X1_Monk_MantraOfEvasion_v2
	if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfEvasion_v2) && Player.PrimaryResource > 50)
	{
        return new TrinityPower(SNOPower.X1_Monk_MantraOfEvasion_v2);
	}
}
 
is this the changes you did?

Code:
            bool isSWK = Sets.MonkeyKingsGar.IsSecondBonusActive;
            if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2) &&
                (!isSWK && Player.CurrentHealthPct <= V.F("Monk.MantraOfHealing.UseHealthPct") || isSWK) &&
                !Player.IsIncapacitated && !GetHasBuff(SNOPower.X1_Monk_MantraOfHealing_v2))
            {
                return new TrinityPower(SNOPower.X1_Monk_MantraOfHealing_v2);
            }

            if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfEvasion_v2) &&
                (!isSWK && Player.CurrentHealthPct <= V.F("Monk.MantraOfHealing.UseHealthPct") || isSWK) &&
                !GetHasBuff(SNOPower.X1_Monk_MantraOfEvasion_v2) && CurrentTarget != null)
            {
                return new TrinityPower(SNOPower.X1_Monk_MantraOfEvasion_v2);
            }

Testing it now, but just from a glance it still has Mantra of Evasion as opposed to the new Mantra of Salvation which replaced it.



e: nope, doesn't work, character explores, sees an enemy, stands still and spams this error at me

Code:
Exception during bot tick.System.Exception: Injection resulted in a process exception with error code 0xc0000005
   at GreyMagic.Executor.WaitForInjection(Int32 timeout)
   at GreyMagic.Executor.Execute(Int32 timeout)
   at GreyMagic.Executor.Execute()
   at €..(Executor , String )
   at Zeta.Game.Internals.Actors.DiaActivePlayer.UsePower(SNOPower power, Vector3 clickPos, Int32 worldDynamicId, Int32 targetACDGuid)
   at Zeta.Bot.CombatRoutine.DestroyObject(DiaObject actor)
   at Zeta.Bot.Logic.BrainBehavior.(Object )
   at Zeta.TreeSharp.Action.RunAction(Object context)
   at Zeta.TreeSharp.Action..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.TreeSharp.Sequence..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.TreeSharp.Decorator..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.TreeSharp.PrioritySelector..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.TreeSharp.PrioritySelector..()
   at Zeta.TreeSharp.Composite.Tick(Object context)
   at Zeta.Bot.BotMain.()
My bad, there should be a 'b' in Kingsgarb
Also, the name that's in there doesn't matter. It'll still use the right skill :)
 
Replace

Code:
            bool isSWK = Sets.MonkeyKingsGar.IsSecondBonusActive;
            if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2) &&
                (!isSWK && Player.CurrentHealthPct <= V.F("Monk.MantraOfHealing.UseHealthPct") || isSWK) &&
                !Player.IsIncapacitated && !GetHasBuff(SNOPower.X1_Monk_MantraOfHealing_v2))
            {
                return new TrinityPower(SNOPower.X1_Monk_MantraOfHealing_v2);
            }

with

Code:
// SWK Spam Mantra and SW
bool isSWK = Sets.MonkeyKingsGarb.IsSecondBonusActive;
if (isSWK && !Player.IsIncapacitated && CurrentTarget != null && TargetUtil.EliteOrTrashInRange(15f))
{
    // SW Spam
    if (Hotbar.Contains(SNOPower.Monk_SweepingWind) && Player.PrimaryResource > 125)
    {
        return new TrinityPower(SNOPower.Monk_SweepingWind);
    }
                
    // SNOPower.X1_Monk_MantraOfHealing_v2
    if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2) && Player.PrimaryResource > 50)
    {
        return new TrinityPower(SNOPower.X1_Monk_MantraOfHealing_v2);
    }
    // SNOPower.X1_Monk_MantraOfRetribution_v2
    if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfRetribution_v2) && Player.PrimaryResource > 50)
    {
        return new TrinityPower(SNOPower.X1_Monk_MantraOfRetribution_v2);
    }
    // SNOPower.X1_Monk_MantraOfConviction_v2
    if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfConviction_v2) && Player.PrimaryResource > 50)
    {
        return new TrinityPower(SNOPower.X1_Monk_MantraOfConviction_v2);
    }
    // SNOPower.X1_Monk_MantraOfEvasion_v2
    if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfEvasion_v2) && Player.PrimaryResource > 50)
    {
        return new TrinityPower(SNOPower.X1_Monk_MantraOfEvasion_v2);
    }
}

First post win :)
 
With Mobilex's changes, it'll use Mantra, but waits for the activation buff to wear off before casting another one.

No changes to SW usage at all either. So those just casts it if it's down, it doesn't "spam" them.
 
Try the attached file (Updated it so you should not have to mess with the variables)


If that does not work do the following:
1.) Go to Trinity Config/Options
2.) Click Variables Tab
3.) Open Trinity Variable Configuration
4.) Scroll down to SpellDelay.Monk_SweepingWind change to 400
5.) Then change the MantraOf ones bellow it to 400
 
Last edited:
This guide for good explain this build:
G37+ The Strongest 2.1 Monk Build (Quin69) - Monk - Diablo III Builds - Diablo Fans

Without Dragon fly (weapon): just spam Mantra
With Dragon fly but no proc: spam mantra only
With Dragon fly AND proc dragon fly: spam mantra+sw



In waiting that you support this build, i have do this:
Enable spam mantra when low hp
Change spam mantra when low hp at 1
Change delay mantra at 200
But with my version, he uses mantra outfight too, it's bad but it's in waiting better :p
 
Try the attached file (Updated it so you should not have to mess with the variables)
View attachment 140958

If that does not work do the following:
1.) Go to Trinity Config/Options
2.) Click Variables Tab
3.) Open Trinity Variable Configuration
4.) Scroll down to SpellDelay.Monk_SweepingWind change to 400
5.) Then change the MantraOf ones bellow it to 400

The mantra/sw spam worked perfectly! Although DB now lets SW fall off inbetween combat, before it'd refresh SW, but that's not a big concern.

Thanks man =D

e: actually, letting sw fall between packs might actually be better. i edited the values to 100 and 200 for spirit threshold and it seems to work better especially between packs
 
Last edited:
Try the attached file (Updated it so you should not have to mess with the variables)
View attachment 140958

If that does not work do the following:
1.) Go to Trinity Config/Options
2.) Click Variables Tab
3.) Open Trinity Variable Configuration
4.) Scroll down to SpellDelay.Monk_SweepingWind change to 400
5.) Then change the MantraOf ones bellow it to 400
Looks like we have a winner!
 
To not wait just pass the flags :

Like this: CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2, CanCastFlags.NoTimer)


Is still missing the code for use Breath of Heaven out of CD right?
 
Last edited:
To not wait just pass the flags :

Like this: CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2, CanCastFlags.NoTimer)
Thanks, I was wondering how to pass with no delay.
Is still missing the code for use Breath of Heaven out of CD right?

What we really need is a Player.CDR to get the players cool down reduction then have it change the TVars based on the players CDR. This would make the code that is already in their use Breath of Heaven on CD without needlessly spamming it every 1/10th of a second. For right now you should just have to update the variable SpellDelay.Monk_BreathOfHeaven to whatever the time it takes plus 1/2 a second to 1 second. I did that and my bot uses it on CD since their is already code in their for Infused with Light.
 
Something i would change too is:

if (Hotbar.Contains(SNOPower.Monk_SweepingWind) && Player.PrimaryResource > 125)

to:

if (Hotbar.Contains(SNOPower.Monk_SweepingWind) && Player.PrimaryResource > 125 && GetHasBuff(SNOPower.X1_Monk_MantraOfHealing_v2)

or other aura buff , since only one aura from the user is necessary best is check the hotbar aura and save it when start maybe .
 
Could you guys wrap up your ideal combat logic and attach the file here so that I can take a look at it? If it's good it'll be pushed into Trinity:)
 
This doesn't spam on rift guarding. blue or yellow is ok. also not on goblins.
Code:
			// SWK Spam Mantra and SW
			bool isSWK = Sets.MonkeyKingsGarb.IsSecondBonusActive;
			if (isSWK && !Player.IsIncapacitated && CurrentTarget != null && TargetUtil.EliteOrTrashInRange(10f))
			{
				// SW Spam
				if (Hotbar.Contains(SNOPower.Monk_SweepingWind) && Player.PrimaryResource > 125)
				{
					return new TrinityPower(SNOPower.Monk_SweepingWind);
				}
							
				// SNOPower.X1_Monk_MantraOfHealing_v2
				if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfHealing_v2, CombatBase.CanCastFlags.NoTimer) && Player.PrimaryResource > 50)
				{
					return new TrinityPower(SNOPower.X1_Monk_MantraOfHealing_v2);
				}
				// SNOPower.X1_Monk_MantraOfRetribution_v2
				if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfRetribution_v2, CombatBase.CanCastFlags.NoTimer) && Player.PrimaryResource > 50)
				{
					return new TrinityPower(SNOPower.X1_Monk_MantraOfRetribution_v2);
				}
				// SNOPower.X1_Monk_MantraOfConviction_v2
				if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfConviction_v2, CombatBase.CanCastFlags.NoTimer) && Player.PrimaryResource > 50)
				{
					return new TrinityPower(SNOPower.X1_Monk_MantraOfConviction_v2);
				}
				// SNOPower.X1_Monk_MantraOfEvasion_v2
				if (CombatBase.CanCast(SNOPower.X1_Monk_MantraOfEvasion_v2, CombatBase.CanCastFlags.NoTimer) && Player.PrimaryResource > 50)
				{
					return new TrinityPower(SNOPower.X1_Monk_MantraOfEvasion_v2);
				}
			}
 
Last edited:
With Mobilex's changes, it'll use Mantra, but waits for the activation buff to wear off before casting another one.

No changes to SW usage at all either. So those just casts it if it's down, it doesn't "spam" them.
I don't know exactly where to place all those text files, im not too smart with this kinda stuff, I need a retards guide
 
TargetUtil.EliteOrTrashInRange(10f)

Remove this.
 
Back
Top