Casting spell on actionbar button click when CD is ready menu

User Tag List

Results 1 to 1 of 1
  1. #1
    intruder22's Avatar Private
    Reputation
    1
    Join Date
    Jan 2012
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Casting spell on actionbar button click when CD is ready

    Ok I have a problem. My script that I run on my WoWLua is not working. I've tried to work with SecureActionTemplate to run the cast with one click. The script is:

    ---------------------------------------------------------------------------------------------------------------

    local button = CreateFrame("Button", "MyCastButton", handler, "SecureActionButtonTemplate")

    local start, duration, enabled = GetSpellCooldown("Shield block");

    if enabled == 0 then DEFAULTCHATFRAME:AddMessage("Shield block is currently active, use it and wait " .. duration .. " seconds for the next one."); elseif ( start > 0 and duration > 0) then DEFAULTCHATFRAME:AddMessage("Shield block is cooling down, wait " .. (start + duration - GetTime()) .. " seconds for the next one."); else DEFAULTCHATFRAME:AddMessage("Shield block is ready."); button:SetAttribute("type", "spell"); button:SetAttribute("spell", "Shield block"); end

    ----------------------------------------------------------------------------------------------------------------

    Busically what it have to do is Casting spell when cooldown is ready and writing messages when the cooldown will be ready everytime click the macroed button with "/click MyCastRandButton" on my action bar.

    What's wrong and how can I do it correctly? Thank you!

    Casting spell on actionbar button click when CD is ready

Similar Threads

  1. PQR: cast spell when target is near. [question]
    By Fantersam123 in forum WoW Bot Maps And Profiles
    Replies: 10
    Last Post: 06-12-2013, 11:05 AM
  2. Cast spells on button release instead
    By Maisteri in forum League of Legends
    Replies: 1
    Last Post: 01-14-2013, 12:05 AM
  3. VCN server, cast spells when in animal form
    By danielsha in forum WoW EMU Exploits & Bugs
    Replies: 3
    Last Post: 04-17-2009, 03:49 PM
  4. [Question] hmm, how do i make a mob rapidly cast spells?
    By Creepfold in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 12-27-2007, 10:38 AM
  5. [GUIDE] - Scripting for Antrix, Making Mobs Talk, Cast Spells, etc
    By Greed in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 12-10-2007, 07:51 PM
All times are GMT -5. The time now is 03:05 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search