Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: $tradeopen bug

  1. #1
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31

    $tradeopen bug

    Hi, I'm having this bug since 1.2.3 beta and just noticed why it's happening now.

    I make it say "potions" to the NPC so it won't have any kind of errors trying to buy wrong stuff like HMM, but what happens is that when it says potions to a few NPCs, it considers $tradeopen as false even though trade is open for more than 10 seconds.

    Code I'm using below:

    --buy potions
    if islocation(1) then
    waitping(2,3)
    sellflasks()
    waitping(3,4)
    if not $tradeopen then
    npctalk('hi', 'trade')
    waitping(2,3)
    end
    waitping(2,3)
    if itemcount(MP) < HuntMp then
    npctalk('potions')
    waitping(4,5)
    while $tradeopen and itemcount(MP) < AmountMp and windowcount(SupplyBP) > 0 do
    buyitemsupto(MP, AmountMp)
    waitping()
    end
    end
    if itemcount(HP) < HuntHp then
    npctalk('potions')
    waitping()
    while $tradeopen and itemcount(HP) < AmountHp and windowcount(SupplyBP) > 0 do
    buyitemsupto(HP, AmountHp)
    waitping()
    end
    end
    npctalk('bye')
    else
    waitping()
    gotolabel("Nelly")
    end



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  2. #2
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31
    Oh yeah, to not create a new thread, bot isn't skipping nodes as well.



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  3. #3
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by RoxZin xD View Post
    Oh yeah, to not create a new thread, bot isn't skipping nodes as well.
    Please, do create another thread.

  4. #4
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31
    Quote Originally Posted by Raphael View Post
    Please, do create another thread.
    Your wish is an order, sir.



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  5. #5
    Administrator Lucas Terra's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    2,202
    Reputation
    141
    Rep Power
    10
    Checking it.

  6. #6
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31
    Using the action like this it will say hi, trade, potions, bye. If I remove $tradeopen from the while loop, it will say hi, trade twice.



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  7. #7
    Wind Powered Voltzin's Avatar
    Join Date
    Dec 2013
    Posts
    212
    Reputation
    31
    Rep Power
    21
    Happened with me too, at Robert in Svargrond. Bot just says "hi trade distance bye' without buying anything. When I removed $tradeopen happened as Rox said: "hi trade" 2 times, but buys the itens.


    edit: the code is almost the same.

  8. #8
    Administrator Lucas Terra's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    2,202
    Reputation
    141
    Rep Power
    10
    Actually the problem could be on windowcount(...), and not $tradeopen.

    Turn ActiveHotkeys.lua on, and then enable this as a persistent script. Tell me what it shows when you talk to those NPCs:
    auto(200)
    local bpName = 'brocade backpack' -- edit this to the backpack you want to watch
    listas($tradeopen, windowcount(bpName))

  9. #9
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31
    Quote Originally Posted by Lucas Terra View Post
    Actually the problem could be on windowcount(...), and not $tradeopen.

    Turn ActiveHotkeys.lua on, and then enable this as a persistent script. Tell me what it shows when you talk to those NPCs:
    auto(200)
    local bpName = 'brocade backpack' -- edit this to the backpack you want to watch
    listas($tradeopen, windowcount(bpName))
    Will keep the script running and report how it goes.



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  10. #10
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31
    Bump! When it fails, values are false and 1, so it's really $tradeopen as I've thought.



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

 

 

Posting Permissions

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