January 27, 201610 yr 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
January 27, 201610 yr 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"
April 7, 201610 yr Author 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
April 8, 201610 yr Author 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
April 9, 201610 yr 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 )
April 9, 201610 yr Try to use this lua code: RunMacroText('/stopcasting') RunMacroText('/stopcasting')
April 9, 201610 yr 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
April 9, 201610 yr Author Now we're cookin with gasoline! SpellStopCasting(); SpellStopCasting(); CastSpellByName("Kill Shot"); Did the trick! Thanks
April 12, 201610 yr Author 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