1. Hello, i am new in this, and i have a question, how i can cast a spell when the user click in a button or frame? as in the healbot, i do click in a character and i heal them, because we can't use castspelbyname or similars


    You need to inherit your button from the SecureActionButtonTemplate. there is a lot of information about how to do exactly this in the Second Edition of 'World of Warcraft Programming'. I greatly recommend finding a copy and buying it if you intend to write addons for WoW. If you can't afford a new copy you can always check Amazon for used copies.

    You can get a basic Example of a Button done this way by going to the 'Chapters' Tab of this website, then go to 'Chapter 15 Taking Action with Secure Templates' then on that page download '15-InTheWay.zip' the example addon in that zip shows how to create a basic button using the SecureActionButtonTemplate.