Results 1 to 8 of 8

Thread: 2 actions request

  1. #1
    Normal User
    Join Date
    Feb 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    236
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5

    2 actions request

    1st action: Throw fire fields, on 4 different SQMs each 5 minutes if no player on screen

    2nd action: I need an action to play alarm, when I get hitted by a ghastly dragon, I'll use this action and it will probably have someone hunting at the cave, so the bot must ring just if I get hitted not someone else.

  2. #2
    Normal User
    Join Date
    Feb 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    236
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    bump

    <<>>

  3. #3
    Normal User
    Join Date
    Feb 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    236
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    anyone can help me?

  4. #4
    iBot User
    Join Date
    Oct 2012
    Posts
    255
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    31
    Rep Power
    5
    PHP Code:
    local maxdamage 1

      local msgs 
    getnewmessages("Server Log")
      
    local qtd msgs.count-1
      local msgsgot 
    msgs[qtd].text
      local numeros 
    = {}
    for 
    w in string.gfind(msgsgot"%d+") do
    if 
    msgsgot:find("You lose (.+) hitpoints due to an attack by a ghastly dragon."then
    table
    .insert(numerosw)
    end
    end

    local damage 
    tonumber(numeros[#numeros])

    if #numeros > 0 then
             
    if damage maxdamage then
             System
    .PlaySound("alert.wav")
        
    System.Wait(400)
             
    end
          end
       end
    end 
    try it
    Last edited by fedele; 03-07-2013 at 08:41 PM.

  5. #5
    iBot User
    Join Date
    Oct 2012
    Posts
    255
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    31
    Rep Power
    5
    you mean throwing randomly?

  6. #6
    Normal User
    Join Date
    Feb 2013
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Quote Originally Posted by fedele View Post
    PHP Code:
    local maxdamage 1

      local msgs 
    getnewmessages("Server Log")
      
    local qtd msgs.count-1
      local msgsgot 
    msgs[qtd].text
      local numeros 
    = {}
    for 
    w in string.gfind(msgsgot"%d+") do
    if 
    msgsgot:find("You lose (.+) hitpoints due to an attack by a ghastly dragon."then
    table
    .insert(numerosw)
    end
    end

    local damage 
    tonumber(numeros[#numeros])

    if #numeros > 0 then
             
    if damage maxdamage then
             System
    .PlaySound("alert.wav")
        
    System.Wait(400)
             
    end
          end
       end
    end 
    try it
    Have you tested this? Oo. Just had a quick look at it but it seems as though you're only ever analyzing the last message in the server log? (getnewmessages can return more than one message).

  7. #7
    Normal User
    Join Date
    Feb 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    236
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    no, throw it on certain sqm (X Y Z), got it?
    it could be 4 different sqm's using fire field or 2 sqms throwing fire bombs, cuz I need this yo pick up loot without being attacked by monster so I'll trap the way with fire

  8. #8
    Normal User
    Join Date
    Feb 2012
    Location
    Rio de Janeiro, Brazil
    Posts
    236
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    Quote Originally Posted by fedele View Post
    PHP Code:
    local maxdamage 1

      local msgs 
    getnewmessages("Server Log")
      
    local qtd msgs.count-1
      local msgsgot 
    msgs[qtd].text
      local numeros 
    = {}
    for 
    w in string.gfind(msgsgot"%d+") do
    if 
    msgsgot:find("You lose (.+) hitpoints due to an attack by a ghastly dragon."then
    table
    .insert(numerosw)
    end
    end

    local damage 
    tonumber(numeros[#numeros])

    if #numeros > 0 then
             
    if damage maxdamage then
             System
    .PlaySound("alert.wav")
        
    System.Wait(400)
             
    end
          end
       end
    end 
    try it
    not working :/

Posting Permissions

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