Jump to content
AC Tool Forums
  • Sign Up
Perilous

Game crashes when SetActiveWindow attempted

Recommended Posts

2 hours ago, The WABBIT said:

I have a question, in the original script. there was a pause of 3 seconds and then a second pause of 1.5 seconds after the groupmember is healed. I combined them into one pause of 4.5 seconds. Is that how long it takes for the spell to be casted and take effect? Or is that to long of a pause. Also, for the healing of the healer it has a 2 second pause. Is that too long or about right?

How long does it normally take for a heal spell to be casted before the healer can move again? Or does it matter how long of a pause after the healing, because the healer is following the groupmember?

There are various heal spells available with varying casting times that a player may want to use, so they'll need to update that manually to optimize their healing. In this case, I use a 3 second cast and my guess on the additional 1.5 seconds is that it is to cover the "cooldown" before the spell can be cast again.

Share this post


Link to post
Share on other sites

One last question, is the cooldown a per individual spell?

Is it that any time the spell caster/healer casts a spell the individual spell has a cooldown period before it can be cast again. But, the spell caster/healer can cast another spell. Or is it that spell caster/healer has to wait the cooldown period before they can cast any spell?

 

Also, is the command in the In Game macro commands that can be entered manually without being in a macro. As in through chat?

Share this post


Link to post
Share on other sites

There are two kinds of cooldowns in World of Warcraft. Some spells have a set amount of time before they can be cast again. That is not the case with this particular healing spell. Then, there is what is called the Global Cooldown. This is a brief amount of time (usually 1.5 sec) and is there to prevent the spamming of abilities or spells. The GCD does impact the casting of this healing spell.

The GCD prevents the casting or use of all spells or abilities until its duration is up.

Spells and Abilities can be activated via command line usage. For instance, the healing spell I use can be activated with /cast Heal

It may be necessary to preface the slash command with a prompter like /say

I am not sure about that as I have never tried to cast a spell with a third-party app before.

Share this post


Link to post
Share on other sites

I have updated the script again. I have updated the script to allow the user to make adjustments for the Spell cast time and Cooldown time. I have also allowed for the user to use two heal spells if they wish. That is if it is possible in the game to do so. One being for the groupmember and another for the healer. I have also changed how the script functions after a spell has been cast. Instead of having the script pause for the time the spell to be cast and then pause again for the spell cooldown period. I have made the script keep track of the time of when the spell can be recast. And then only cast the spell when you can recast the spell.

 

Basically it will heal the groupmembe and then when it checks again to see if the groupmember needs to be healed. I won't cast the spell until such time as the spells cooldown period has lapsed. But in the mean time, if the healer needs to be healed. And the user is using a separate heal spell for the healer. It will heal the healer right away. But, then it will also not attempt to heal the healer until the cooldown period for the heal spell used has lapsed.

I have left in the code to switch between windows on the same system. Since as I don't know how it is working yet.

So, when you get a chance please give the new version a test. And let me know how the timing portion is working. And whether or not the switching windows is of any use for multiple of windows on a single system.

 

EDIT: Removed file

 

Share this post


Link to post
Share on other sites

Well, I have updated v2.6 of the script to fix a syntax error. And while I was at it, I adjusted the script to remove individual spell(s) cooldown and replaced it/them with a global cooldown. But, I can easily add the individual spell cooldown if the needed.

So, give it a try and lets see how it all works. I'm just wondering how the switching from one game window (player) to the second window (healer) and then back works for the individual player playing with two game windows at a time on the same system. I am wondering if this may cause too much problems for the user when playing.

 

EDIT: File removed

 

 

Share this post


Link to post
Share on other sites

The error is gone, but it continually shifts between the two clients making it near impossible to play the groupmember's client. Also, the healer is healing non-stop again.

Share this post


Link to post
Share on other sites

the shifting from one game window to the other is only supposed to happen if the groupmember or the healer needs to be healed.

And if the healer is constantly being healed then that is why for the constant switching.

 

  1. It first checks to see if the person needs to be healed.
  2. It then checks to see if the healer can cast the heal spell
  3. Then it changes the windows, if needed.
  4. Heals the person
  5. And finally it changes the windows back, if needed.

And with the exception of adding the switching windows, and changing the pausing of the script to checking when last time cast was done. Nothing for the healer portion of the script has changed.

I have commented out the window switching portion of the code. Lets see what happens with the healing of the healer. and try to get it to work with the new timing.

Let's see how it works.

 

 

EDIT: File removed

 

 

Share this post


Link to post
Share on other sites

Ok, sorry for the delay I was out doing the Halloween thing with my family.

I added Casttime as a declared variable and added DateUtils back into the Uses to accommodate MilliSecondsBetween.

The healer will now heal the the groupmember, but not itself. Also, when the groupmember's client is active then the script is activating what is in his quickbar slots 3 and 4.

Share this post


Link to post
Share on other sites

Ok, the healer is in fact healing itself just at a lower health level than I was expecting. That does not need to be altered.

Attached is the TestLog results for this round of testing.

TestLog v2.6.1.txt

Edited by Perilous

Share this post


Link to post
Share on other sites

okay, the log confirms that it is working as it should. Healing both the groupmember and the healer. And only doing so when the healer can cast a spell. And the using of the timing is working as it should. Okay, i had made a minor change to the script. Instead of having two checks to see if the healer can cast yet. Each time the groupmember and healer needs to be checked. I changed it to a single global check. That is done before checking to see if the groupmember/healer needs to be healed.

As such this version should not have any issues. So give it a quick test. And it should be fine.

I did leave the code for the switching of the windows in, but they are commented out. If you would like to give them a try just remove the comments at lines: 217, 232, 250, 256, 268, 283, 311 and 317. The way the switching is supposed to happen. Is that once the script has determined that someone needs to be healed. It will switch to the healer window, perform the heal and then switch back.

So, the process is:

  1. Check to see if the healer can cast a spell, If not Step goto 16
  2. Check to see if the groupmember needs to be healed, if not Step goto 9
  3. Check to see if the active window is the is the healers, if yes Step goto 6
  4. Save current window's Title/Name
  5. Change to Healer's window
  6. Heal the groupmember
  7. Setup how long the healer has to wait to cast another spell.
  8. If we had to change the windows. Change back to the previous window.
  9. Check to see if the healer needs to be healed. if not goto Step 16
  10. Check to see if the active window is the healer's, if yes goto Step 13
  11. Save the current window's Title/Name
  12. Change to Healer's window
  13. Heal the healer
  14. Setup how long the healer has to wait to cast another spell.
  15. If we had to change the windows. Change back to the previous windows.
  16. Pause the script for half a second.
  17. Goto Step 1 and repeat

 

If the script is doing other then as shown. Then there is a problem, and I'll just completely remove the switching code. No use trying to solve this problem.

 

EDIT: FIle removed

 

Share this post


Link to post
Share on other sites

Okay, what should be the last update for the current script. I removed the need for, and reliance on, a "in game" macro to target and follow the groupmember to be healed.

Now, only thing needed to setup for the script. Is the heal spell(s) being placed on the hotbar. And the setting up of the variables with the required proper values.

If this works, I'll consider this script complete and then post it in the Downloads section.

So, give it a try.

 

P.S. I am assuming that the use of the Slash commands require that the chat window/bar is activated by pressing the RETURN key first. Then the entering of the slash command. And then the RETURN key again. As such, that is how I had coded that portion of the script.

 

EDIT: File released in the Download section. All support for the script will take place in the following thread: WoW Auto Heal! v2.7

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.