Results 1 to 8 of 8

Thread: Check if a spell is casted?

  1. #1
    iBot User J.Dre's Avatar
    Join Date
    Aug 2012
    Posts
    108
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    13 Post(s)
    Reputation
    12
    Rep Power
    5

    Check if a spell is casted?

    How do you check if a spell is casted for actions?

    Code:
    if casted("spell name") then
    Not sure what function does this. Thanks for the help.
    Last edited by J.Dre; 06-03-2014 at 11:00 AM.

  2. #2
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    cancast('spell name') checks if you can cast it, so, if not cancast('spell name') should check if you cant cast it, Im tired and sick so might be wrong cant think stratight tonight
    Last edited by Drakke; 06-02-2014 at 09:38 PM.

  3. #3
    iBot User J.Dre's Avatar
    Join Date
    Aug 2012
    Posts
    108
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    13 Post(s)
    Reputation
    12
    Rep Power
    5
    I'm trying to make an action detect if a spell is currently casted.

  4. #4
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Quote Originally Posted by J.Dre View Post
    I'm trying to make an action detect if a spell is currently casted.
    Why?

    What are you trying to do?

  5. #5
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    if cooldown('spell name') > 0 then blablalb
    if you have cooldown aka its been casted then do something?

  6. #6
    iBot User J.Dre's Avatar
    Join Date
    Aug 2012
    Posts
    108
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    13 Post(s)
    Reputation
    12
    Rep Power
    5
    Quote Originally Posted by Drakke View Post
    if cooldown('spell name') > 0 then blablalb
    if you have cooldown aka its been casted then do something?
    I will try this and edit this post. Thank you.

    EDIT: It works, but for EVERY support spell. Not just the one I'm trying to use.

    Code:
    if(cooldown("sharpshooter") > 0) then
    Last edited by J.Dre; 06-03-2014 at 10:52 AM.

  7. #7
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    Quote Originally Posted by J.Dre View Post
    I will try this and edit this post. Thank you.

    EDIT: It works, but for EVERY support spell. Not just the one I'm trying to use.

    Code:
    if(cooldown("sharpshooter") > 0) then
    so maybe:
    Lua Code:
    if strengthened then
    -- do something --
    else
    -- do something else --
    end


    strengthened [boolean]: Return true if character have indication of strength, else return false.

  8. #8
    iBot User J.Dre's Avatar
    Join Date
    Aug 2012
    Posts
    108
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    13 Post(s)
    Reputation
    12
    Rep Power
    5
    Ah, good idea! I'll try it.

    EDIT: That works.
    Last edited by J.Dre; 06-03-2014 at 10:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •