Results 1 to 5 of 5

Thread: About stop an Engine (Targeting)

  1. #1
    Normal User
    Join Date
    Nov 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    About stop an Engine (Targeting)

    Hello again xD i was thinking if posible to stop targeting when character has "X" or less royal spears or "X" or less number of potions then go to refill and when it finish refilling enable mod again? maybe it can be very helpful for pallys and druids because i died because my character still attack creatures even without spears. I mean, in the script it checks if i have supply but it do it at the end of every floor, It can be solve checking every time I arrive to a certain waypoint but it is going to become code bigger so i was thinking develop an action that check the status of our supply always xD

  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
    Set spam rate to like 10000, 15000
    PHP Code:
    local CONFIG = {
        
    HUNTING_FLOOR 5, -- Position Z
        SPEAR_LEAVE 
    3,
        
    MANA_NAME "mana potion",
        
    MANA_LEAVE 5,
        
    GOTOLABEL "Leaving",
    }

    if (
    weaponamount <= CONFIG.SPEAR_LEAVE) or (itemcount(CONFIG.POTION_NAME) <= CONFIG.POTION_LEAVE) and (posz == CONFIG.HUNTING_FLOORthen
        stopattack
    ()
        
    settargeting("no")
        
    gotolabel(GOTOLABEL)
    end 
    Last edited by soder; 11-20-2012 at 12:06 PM.

  3. #3
    Normal User
    Join Date
    Nov 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    I was thinking something like
    PHP Code:
    if itemcount("Royal Spear") < 3 then
        stopattack
    ()    
        
    settargeting("no")
        
    gotolabel(buysupply
    else
        
    settargeting("yes"
    end 
    Do you think it can work as well?

  4. #4
    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
    That will spam "gotolabel()" which will cause the char to get stuck on that label.

  5. #5
    Normal User
    Join Date
    Nov 2012
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    PHP Code:
    local CONFIG = {
        
    HUNTING_FLOOR 5, -- Position Z
        SPEAR_LEAVE 
    3,
        
    MANA_NAME "mana potion",
        
    MANA_LEAVE 5,
        
    GOTOLABEL "Leaving",
    }

    if (
    weaponamount <= CONFIG.SPEAR_LEAVE) or (itemcount(CONFIG.POTION_NAME) <= CONFIG.POTION_LEAVE) and (posz == CONFIG.HUNTING_FLOORthen
        stopattack
    ()
        
    settargeting("no")
        
    gotolabel(GOTOLABEL)
    end 
    But i have another question, when you put in your code "HUNTING_FLOOR = 5, -- Position Z" it means that character will be only there? so i can stay in other locations? like 6,7,8? because the script walk over the all cave.

Posting Permissions

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