Jump to content

Recommended Posts

I have been creating a hunter profile for awhile now. I am pretty happy with the fight class editor, nice work! 

One thing I have not been able to figure out is how to cancel my Cobra shot (or any other shot that takes awhile to cast) if my kill shot is castable (target health under 20%). At the moment if I am casting, and Kill shot becomes available to use, I have to wait for the current cast to finish.

Thanks all, 

Rickster

 

Link to comment
https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/
Share on other sites

Hello, like this: test Cobrashot.xml

- Add spell "Cobra Shot" and put "False" at spell settings "Wait during casting".

- Add spell "SpellStopCasting();" and put "True" at spell settings "Not spell, is lua script". Add condition "Me In Cast": "True" and "Is Spell Usabe" : "Kill Shot" , "True".

- Add spell "Kill Shot"

  • 2 months later...

I thought this was working, but now I have noticed several times now that while in the midst casting Cobra Shot, kill shot becomes available and Cobra Shot doesn't stop casting?

I have attached my fight class for inspection...

Thanks!

 

ricks_BM2.xml

I did some experimenting and I think the problem is that the LUA call is protected?

I removed the spell is usable kill shot check in the conditions for testing so that it would simply cancel Cobra Shot each time it was cast. This had no effect and CS continued casting.

If I replace  SpellStopCasting(); with message("text");

The screen shows a message box with "text" each time Cobra shot starts to cast...

The documentation shows that it is protected.

http://wowprogramming.com/docs/api/SpellStopCasting

Any way around this?

Thanks,

Rick

20 hours ago, Rickster said:

I did some experimenting and I think the problem is that the LUA call is protected?

I removed the spell is usable kill shot check in the conditions for testing so that it would simply cancel Cobra Shot each time it was cast. This had no effect and CS continued casting.

If I replace  SpellStopCasting(); with message("text");

The screen shows a message box with "text" each time Cobra shot starts to cast...

The documentation shows that it is protected.

http://wowprogramming.com/docs/api/SpellStopCasting

Any way around this?

Thanks,

Rick

WRobot can run protected lua command, you can try to move your character if SpellStopCasting() don't works ( http://wowprogramming.com/docs/api/MoveForwardStart and http://wowprogramming.com/docs/api/MoveForwardStop )

Using "is Spell Useable" was not always triggering as it should, the ultimate solution is to use "is Spell Overlayed" in conjunction with "casting Spell Name" in the conditionals.

========= Conditionals =========

is spell overlayed: Kill Shot, True

casting spell name: Cobra Shot, true

=============================

That in addition to the LUA spell entries above:

SpellStopCasting();
SpellStopCasting();
CastSpellByName("Kill Shot");

It is working great!

Thanks again,

Rick

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...