XenoBot Forums - Powered by vBulletin

User Tag List

Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32

Thread: Check kill?

  1. #11

    Join Date
    Mar 2014
    Location
    Long Island
    Posts
    379
    Mentioned
    54 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Odemis View Post
    This is exactly the lua code I was looking for, but it doesn't seem to work when I add it into my script.


    Code:
    --    Leave after Boss --
     
    local monsterToLeave = 'demodras'  -- leave bosses name lowercase
    local labelToLeave = 'Leavehunt'
    
    
    LootMessageProxy.OnReceive('check_kill', function(proxy, message))
        if string.match(message, monsterToLeave) then
            Walker.Goto(labelToLeave)
        end
    end

    So I'm trying to make it when you receive the message after the kill saying "Your deeds have been noticed...etc..etc.." It jumps the walker waypoint to the 'leave', or 'refil' label..

    PS : I even tried placing the two 'locals' with the rest of the locals at the top of my script, and placed the "LootMessageProxy~" at the bottom of the script. Idk, confusing myself. When I try to launch the whole script, it bugs out and it give's an error.

    Any help would be awesome, thanks.
    You added in an extra parenthesis at the end of message, and didn't add one at the end of the last end

    Code:
    --    Leave after Boss --
     
    local monsterToLeave = demodras-- leave bosses name lowercase
    local labelToLeave = 'Leavehunt'
    
    
    LootMessageProxy.OnReceive('check_kill', function(proxy, message)
        if string.match(message, monsterToLeave) then
            Walker.Goto(labelToLeave)
        end
    end)

  2. #12
    Odemis's Avatar
    Join Date
    Oct 2013
    Posts
    239
    Mentioned
    42 Post(s)
    Tagged
    0 Thread(s)
    @Proteus, thanks brother man!
    Think this will work though?
    Since the new loot message for bosses just mentions the "Rewards can be found in your chest" I think... I'm not positive the boss' name appears in the channel when killed..

  3. #13
    Odemis's Avatar
    Join Date
    Oct 2013
    Posts
    239
    Mentioned
    42 Post(s)
    Tagged
    0 Thread(s)
    The script is up and running so I guess I will find out eventually ><

  4. #14

    Join Date
    Mar 2014
    Location
    Long Island
    Posts
    379
    Mentioned
    54 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Odemis View Post
    @Proteus, thanks brother man!
    Think this will work though?
    Since the new loot message for bosses just mentions the "Rewards can be found in your chest" I think... I'm not positive the boss' name appears in the channel when killed..
    Just replace bosses name with rewards and should be fine

  5. #15
    Administrator
    Join Date
    Dec 2010
    Posts
    2,565
    Mentioned
    228 Post(s)
    Tagged
    1 Thread(s)
    I'm going to guess it won't work as the type of message is probably different. Look through all the available message proxies in Xeno and try the one best suitable. If none work, you're out of luck.

  6. #16
    Odemis's Avatar
    Join Date
    Oct 2013
    Posts
    239
    Mentioned
    42 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Spectrus View Post
    I'm going to guess it won't work as the type of message is probably different. Look through all the available message proxies in Xeno and try the one best suitable. If none work, you're out of luck.
    Yea, did not work. I will edit it.

    Code:
    BattleMessageProxy.OnReceive('check_kill', function(proxy, message)    if string.match(message, monsterToLeave) then
            Walker.Goto(labelToLeave)
        end
    end)
    Because the message shows in white text on server log.
    Could you explain what the 'check_kill' part serves? Should I keep that as is?
    Last edited by Odemis; 12-31-2014 at 11:58 PM.

  7. #17
    Administrator
    Join Date
    Dec 2010
    Posts
    2,565
    Mentioned
    228 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Odemis View Post
    Yea, did not work. I will edit it.

    PHP Code:
    BattleMessageProxy.OnReceive('check_kill', function(proxymessage)    if string.match(messagemonsterToLeavethen        Walker.Goto(labelToLeave)    endend
    Because the message shows in white text on server log.
    Could you explain what the 'check_kill' part serves? Should I keep that as is?
    It's a name (or key) for the proxy. Not terribly important for your purposes.

  8. #18
    Odemis's Avatar
    Join Date
    Oct 2013
    Posts
    239
    Mentioned
    42 Post(s)
    Tagged
    0 Thread(s)
    Code:
    --    Leave after Boss --
     
    local monsterToLeave = 'deeds'  
    local labelToLeave = 'Leavehunt'
    
    
    BattleMessageProxy.OnReceive('check_kill', function(proxy, message)
        if string.match(message, monsterToLeave) then
            Walker.Goto(labelToLeave)
        end
    end)
    Another fail...

    Next try:

    Code:
    --    Leave after Boss --
     
    local monsterToLeave = 'deeds'  -- leave bosses name lowercase
    local labelToLeave = 'Leavehunt'
    
    
    ErrorMessageProxy.OnReceive('check_kill', function(proxy, message)
        if string.match(message, monsterToLeave) then
            Walker.Goto(labelToLeave)
        end)
    end)

  9. #19
    Moderator Nakuu's Avatar
    Join Date
    Feb 2013
    Location
    EU
    Posts
    5,194
    Mentioned
    642 Post(s)
    Tagged
    2 Thread(s)
    Can't you just check if such monster is on the screen? Your function even if it starts working will fail sometimes (if you get a debuff - ie. a burn) and will keep going to leave label.

  10. #20
    Odemis's Avatar
    Join Date
    Oct 2013
    Posts
    239
    Mentioned
    42 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Nakuu View Post
    Can't you just check if such monster is on the screen? Your function even if it starts working will fail sometimes (if you get a debuff - ie. a burn) and will keep going to leave label.
    Which could be the problem, because I get debuff (on fire) everytime I fight it.
    How would I write that? I can't code for shit..lol.

    example:
    GoToLabel if item ID of (the remains of the boss) is seen on screen

Posting Permissions

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