Rickster 6 Posted January 27, 2016 Share Posted January 27, 2016 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 More sharing options...
Droidz 2738 Posted January 27, 2016 Share Posted January 27, 2016 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" Dashia 1 Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-12074 Share on other sites More sharing options...
Rickster 6 Posted January 28, 2016 Author Share Posted January 28, 2016 Works beautifully! Thank you! Rickster Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-12087 Share on other sites More sharing options...
Rickster 6 Posted April 7, 2016 Author Share Posted April 7, 2016 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 Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-13274 Share on other sites More sharing options...
Rickster 6 Posted April 8, 2016 Author Share Posted April 8, 2016 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 Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-13282 Share on other sites More sharing options...
Droidz 2738 Posted April 9, 2016 Share Posted April 9, 2016 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 ) Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-13290 Share on other sites More sharing options...
Rickster 6 Posted April 9, 2016 Author Share Posted April 9, 2016 Except that hunters can now move and cast... Rick Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-13293 Share on other sites More sharing options...
Droidz 2738 Posted April 9, 2016 Share Posted April 9, 2016 Try to use this lua code: RunMacroText('/stopcasting') RunMacroText('/stopcasting') Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-13294 Share on other sites More sharing options...
Droidz 2738 Posted April 9, 2016 Share Posted April 9, 2016 Use two time SpellStopCasting() seem works also: SpellStopCasting() SpellStopCasting() ps: https://www.reddit.com/r/wow/comments/3q9dff/how_do_i_cancel_aim_shotsteady_shot_with_kill_shot/cwd7534 Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-13295 Share on other sites More sharing options...
Rickster 6 Posted April 9, 2016 Author Share Posted April 9, 2016 Now we're cookin with gasoline! SpellStopCasting(); SpellStopCasting(); CastSpellByName("Kill Shot"); Did the trick! Thanks Droidz 1 Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-13296 Share on other sites More sharing options...
Rickster 6 Posted April 12, 2016 Author Share Posted April 12, 2016 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 Droidz 1 Link to comment https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/#findComment-13336 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now