Signup Now
Results 1 to 8 of 8
  1. #1
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25

    Fast Hotkeys Wind Client Addons

    Hello,

    When I mark Fast Hotkeys my character get stuck in some places using npctalk() function...

    e.g:
     npctalk("hi", "deposit all", "yes", "withdraw "..Total, "yes", "balance")


    Windbot Talk SO FAST, that don't deposit money either withdraw...

    the same to get more boss points with this action...
     npctalk("hi", "task", "task", "serpent spawn", "yes", "task", "hydra", "yes", "task", "medusa", "yes")


    I'm using a @BUgWT script....

    So I can't use fast hotkeys because scripts don't work with funcion npctalk()

    Regards
    Helped you? REP+

  2. #2
    Moderator Leonardo's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    758
    Reputation
    77
    Rep Power
    22
    @borges

    It's a problem with @Raphael library, I also have this problem and he's aware of it, just hang it on. The library patcher will automatically update and fix this when he release a new version.

  3. #3
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    thanks for the reply, waiting the update.
    Helped you? REP+

  4. #4
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    @borges, would you be kind enough to test this solution?
    Just run this code on console and see if it's fixed after that.

    function npctalk(...)
    local args = {...}

    -- Checks for NPCs around
    -- Blatantly (almost) copied from [MENTION=1569]Colandus[/MENTION]' lib
    local npcFound = false
    foreach creature c 'nfs' do
    if c.dist <= 3 then
    npcFound = true
    break
    end
    end

    if not npcFound then
    return false
    end


    -- Checks for aditional parameters
    local normalWait = false
    if type(table.last(args)) == 'boolean' then
    normalWait = table.remove(args)
    end

    -- Use specified waiting method
    local waitFunction = waitmessage
    if normalWait then
    waitFunction = function()
    waitping()
    return true
    end
    end

    -- We gotta convert all args to strings because there may be some numbers
    -- in between and those wouldn't be correctly said by the bot.
    table.map(args, tostring)

    local msgSuccess = false

    -- Open NPCs channel if needed
    if not ischannel('NPCs') then
    while not msgSuccess do
    say(args[1])
    msgSuccess = waitFunction($name, args[1], 3000, true, MSG_DEFAULT)
    end

    table.remove(args, 1)
    wait(400, 600)
    end

    for k, v in ipairs(args) do
    msgSuccess = false
    while not msgSuccess do

    -- When we have fast hotkeys enabled, the bot sends the messages way
    -- too fast and this ends up causing a huge problem because the
    -- server can't properly read them. So we simulate the time it would
    -- take to actually type the text.
    if $fasthotkeys then
    local minWait, maxWait = get('Settings/TypeWaitTime'):match(REGEX_RANGE)
    minWait, maxWait = tonumber(minWait), tonumber(maxWait)

    -- While values may go as low as 10 x 10, there's actually a
    -- physical cap at about 30 x 30.
    minWait, maxWait = math.max(minWait, 30), math.max(maxWait, 30)

    local waitTime = 0

    -- We start at 0 because we're considering the enter key press
    for i = 0, #v do
    waitTime = waitTime + math.random(minWait, maxWait)
    end

    wait(waitTime)
    end

    say('NPCs', v)
    msgSuccess = waitFunction($name, v, 3000, true, MSG_SENT)
    if not msgSuccess then
    if not ischannel('NPCs') then
    return npctalk(select(k, ...))
    end
    end
    end
    end

    return true
    end

  5. #5
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    @Raphael right now working amazing... I already replace this code in my lib...

    You can update your lib...

    Thanks.
    Helped you? REP+

  6. #6
    Free User albino's Avatar
    Join Date
    Apr 2014
    Location
    Brazil
    Posts
    183
    Reputation
    27
    Rep Power
    21
    I reported that here too

  7. #7
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by albino View Post
    I reported that here too
    Yes, we thought we had it fixed on 24/07 though.
    Is this still happening to you? If so, could you also try the solution I pasted above?

  8. #8
    Free User albino's Avatar
    Join Date
    Apr 2014
    Location
    Brazil
    Posts
    183
    Reputation
    27
    Rep Power
    21
    Quote Originally Posted by Raphael View Post
    Yes, we thought we had it fixed on 24/07 though.
    Is this still happening to you? If so, could you also try the solution I pasted above?
    My report was on 23/07, day before you said it got fixed.

    I tried it now, and it seems to work. I didn't need to try that other solution.


 

 

Tags for this Thread

Posting Permissions

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