XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 10 of 13

Thread: Get message error

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Moderator shadowart's Avatar
    Join Date
    Dec 2014
    Location
    Sweden
    Posts
    1,985
    Mentioned
    225 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by brindeds View Post
    I tested here and realized the callback only occurs when I manually. The problem that the fishing of module is active when this error happens, and when the module is active it does not activate the callback at all. It would be a bug or something I unaware?
    Sounds like you might have to redesign your fishing module to get it to work. I'd have the fishing module only attempt to fish one square each try, and also store that square in a variable. Then if the proxy detects the error message it blacklists the last attempted square. In pseudo-code:

    lua code:

    -- The implementations for getFishableSquare, isBlacklisted and blacklist are missing.
    -- You'll have to implement them yourself.

    local pos
    Module("Fisher", function(self)
    pos = getFishableSquare()
    if not isBlacklisted(pos) then
    Self.UseItemWithGround("Fishing Rod", pos.x, pos.y, pos.z)
    self:Delay(1000)
    end
    end)

    ErrorMessageProxy.OnReceive("My Proxys Name", function(proxy, message)
    if message == "You cannot throw there." then
    blacklist(pos)
    end
    end)



    The module and the proxy cannot execute at the exact same time, but the proxy can execute during the way between module calls.
    Last edited by shadowart; 12-28-2015 at 06:55 PM.

Posting Permissions

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