Results 1 to 4 of 4

Thread: What's wrong with my hotkey?

  1. #1
    Normal User Sahar's Avatar
    Join Date
    Sep 2012
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    21
    Rep Power
    7

    What's wrong with my hotkey?

    I tried to make an hotkey that shoots better exori ico / hur, but somewhy I can't find it working.

    I changed the dragon to the specific monster's name, nothing works.


    PHP Code:
    local SPELL1 "exori ico"
    local SPELL2 "exori hur"
    local CREATURES = {"monster1""monster2"}

    local MESSAGES getnewmessages("Server Log")
    local MESSAGES_QUANTITY MESSAGES.count 1
    if (target.id 0) and (target.dist <= 1) and (table.find(CREATURES,target.name)) then
        
    for INDEX 0MESSAGES_QUANTITY do
            if (
    MESSAGES[MESSAGES_QUANTITY INDEX].text:find("A dragon loses (.+) hitpoints due to your attack.")) then
                
    if cancast(SPELL1then
                    cast
    (SPELL1wait(cooldown(SPELL1))
                if 
    cancast(SPELL2then
                    cast
    (SPELL2wait(cooldown(SPELL2))
                    break
                
    end
            end
        end
    end 

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Test
    PHP Code:
    local SPELL1 "exori ico" 
    local SPELL2 "exori hur" 
    local CREATURES = {"monster1""monster2"

    local MESSAGES getnewmessages("Server Log"
    local MESSAGES_QUANTITY MESSAGES.count 
    if (target.id 0) and (target.dist <= 1) and (table.find(CREATURES,target.name)) then 
        
    for INDEX 0MESSAGES_QUANTITY do 
            if (
    MESSAGES[MESSAGES_QUANTITY INDEX].text:find("(.+) loses (.+) hitpoints due to your attack.")) then 
                
    if cancast(SPELL1then 
                    cast
    (SPELL1wait(cooldown(SPELL1)) 
                if 
    cancast(SPELL2then 
                    cast
    (SPELL2wait(cooldown(SPELL2)) 
                    break 
                
    end 
            end 
        end 
    end 

  3. #3
    Normal User
    Join Date
    Oct 2012
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    @ Soder

    You're missing an "end":

    PHP Code:
                if cancast(SPELL1then 
                    cast
    (SPELL1wait(cooldown(SPELL1)) 
                if 
    cancast(SPELL2then 
                    cast
    (SPELL2wait(cooldown(SPELL2)) 
                    break  
                
    end 
    should be:

    PHP Code:
                if cancast(SPELL1then 
                    cast
    (SPELL1wait(cooldown(SPELL1)) 
                
    end
                
    if cancast(SPELL2then 
                    cast
    (SPELL2wait(cooldown(SPELL2)) 
                    break  
                
    end 
    or:
    PHP Code:
                if cancast(SPELL1then 
                    cast
    (SPELL1wait(cooldown(SPELL1)) 
                elseif 
    cancast(SPELL2then 
                    cast
    (SPELL2wait(cooldown(SPELL2)) 
                    break
                
    end 

  4. #4
    Normal User Sahar's Avatar
    Join Date
    Sep 2012
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    21
    Rep Power
    7
    Not working :S

Posting Permissions

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