Jump to content

Recommended Posts

Hello! As the title says, i noticed the character after the resurrection on Battlegrounds istant mounts and runs, instead of buffing himself. I put the buffs on top priority and "require combat=false" and "me is combat=false" so I don't know what I'm missing. Why the bot does so much priority to the mount after the resurrection?

Any suggestion? =)

Link to comment
https://wrobot.eu/forums/topic/3751-battleground-it-mounts-before-buffing/
Share on other sites

  • 1 month later...

Sometimes it does only 1 buff, other times it does 2 buffs, and then mounts. Seems like random. If I manually dismount, it buffs everything correctly and then it mounts again.

But I don't understsand why that hurry to mount without even buffing xD Rotation is correct I checked it multiple times..

?

  • 1 year later...

Apparently I don't see any difference, I tried with 25 and 60 fps on the fight classes.

The exact moment it resurrects, it forces the mount, and only after that it reads the fight class. Is there a way to delay the mount? It happens on every class, I noticed... so when it comes to buff 3-4, even more buffs it's a huge pain to see, not to mention the bottish behaviour...any hope to have some "fix" in the future?

for me this code helps

static Main(){
  robotManager.Events.FiniteStateMachineEvents.OnAfterRunState += (engine,state) => {
    if (state == null) return;
    if (state is ResurrectBG) {
      Usefuls.WaitIsCasting();
      Usefuls.WaitIsCasting();
      Usefuls.WaitIsCasting();
    }
  };
}

just need some pause to cast 2-3 buffs

My previous solution dont work 100% and i found better (simply dont let to use ground mount for 1st second):

		if (state is ResurrectBG) {
			String mountName = wManager.wManagerSetting.CurrentSetting.GroundMountName;
			if (mountName == null) return;
			wManager.Wow.Class.Spell mount = new wManager.Wow.Class.Spell(mountName);
			for (int i=0; i<10; i++) {
				System.Threading.Thread.Sleep(100);
				if (ObjectManager.Me.CastingSpellId == mount.Id)
					Lua.LuaDoString("SpellStopCasting()");
			}
		}

I added it to my Battleground helper plugin, so you can simply install it and select option ResurrectBG pause

Tested, doesn't work 100%. Still it does the mount>buff>mount>buff. Maybe the 1 sec pause isnt' enough (considering Priest has innerfire, vampiric embrace, and 3 other class buffs = 5 globals, Paladin has rigtheous fury, seal, aura, sacred shield and 1 class buff = 5 globals again before the mount)

for me this works:

robotManager.Events.FiniteStateMachineEvents.OnRunState += StateWatcher;
...
	private void StateWatcher(Engine engine, State state, CancelEventArgs cancelable) {
		if (state == null) return;
		if (state is ResurrectBG && AutoBGSettings.CurrentSetting.ressBGpause) {
			string mountName = wManager.wManagerSetting.CurrentSetting.GroundMountName;
			if (mountName == null) return;
			wManager.Wow.Class.Spell mount = new wManager.Wow.Class.Spell(mountName);
			new System.Threading.Thread(() => {
				System.Threading.Thread.Sleep(1000);
				Timer mountTimer = new Timer(1000);
				while (!mountTimer.IsReady && ObjectManager.Me.IsAlive) {
					if (ObjectManager.Me.CastingSpellId == mount.Id) {
						Lua.LuaDoString("SpellStopCasting()");
						Logging.Write("stop mount");
					}
					System.Threading.Thread.Sleep(50);
				}
			}).Start();
		}
	}

Solution is more complex, because ResurrectBG fires many times when player dead. Need to play with timers, but in general it works. I'll test it and will publish new version of plugin

Even better, no need to interrupt, simply remove ground mount for N milliseconds :)

	private void mountDelay(int delay) {
		if (delay == 0) return;
		string mountName = wManager.wManagerSetting.CurrentSetting.GroundMountName;
		if (mountName == null) return;
		new Thread(() => {
			wManager.wManagerSetting.CurrentSetting.GroundMountName = null;
			try {
				Thread.Sleep(delay);
			} catch (Exception arg) {
				Logging.WriteError("Exception during nomount: "+arg, true);
			} finally {
				wManager.wManagerSetting.CurrentSetting.GroundMountName = mountName;
			}
		}).Start();
	}

Will publish in next plugin version

Wow that is killer :)

You know what else you can add in the plugin? (if you want, if you have time, if it's possible)

1) A fix to https://wrobot.eu/bugtracker/trying-to-attack-spirit-of-redemptiondivine-intervention-targets-r695

2) Additional switch on-off, or some default option to force the target change when target has "Divine Shield"/"Ice block". Unless you are a Priest with Mass Dispel, there is absolutely no reason to keep focusing the immune target, so better switch imho. Also another switch for "Hand of Protection", if you are melee, change target, otherwise ignore since the spells are magic and go throught the hand of protection. So in few words, a general immune buff that everyone should switch target (bubble and mage block), and another one for melee classes, in this way we don't have to add the condition "buff:hand of protection false" in every single spell in the rotation.Right now I added the condition in every spell, the result is the character attacking by white melee if target is immune, and doing special moves (for example: kidney shot, hemorrhage, crusader strike, judgement...) only when target is not immune to physical attacks anymore..

TLDR: Adding some options like "Switch target if Divine Shield or Ice Block" + "Don't do special attacks melee, if target is immune (Hand of Protection, Deterrence)"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...