Drummerx04 wrote: »I don't think this is possible. I believe trying something like this would produce an access violation error (addon crash). The API is very picky about addons messing with protected functions like movement or casting skills. Even trying to access their names in the global table seems to cause problems.
What are you trying to achieve?
Abort a channeling skill if you do not need it anymore?
There is an API function CancelCast() which does this e.g.
You can try it out ingame by writing this to the chat
/script CancelCast()
Start a crystal fragment and then just paste this to chat and hit the return key. If you are fast enough it should abort the cast.
Also works for teleports e.g.
Because this is not going to give you an advantage at all I'd say.
You could even block or do other stuff to abort the cast?
How would you actually try to notice this? I doubt there is an event or skill funcgion you could check as the casts get started? Or at least none which is public.
And btw: If you press the key, how should an addon know if it should abort now or leave you as it was desired? :-)
Maybe it could check for the morph and only use it if it's costless this time (if you are able to).
Just don't slot it if you do not want to use it :-)
So better do not invent such an addon please as this wil lresult in CancelCast() being non-public anymore which would break BeamMeUp addon e.g. and others! So don't, please!!!