Jump to content


Photo

Usage of 'receivedOfferChanged' against waiting for callback

node.js node-steam-tradeoffer-manager

  • Please log in to reply
3 replies to this topic

#1 Baterka

Baterka

    Member

  • Member
  • PipPip
  • 12 posts
  • LocationCzech Republic

Posted 11 March 2018 - 12:23 PM

I have small dilema on my new bot what I am making.

I have this communication between jackpot server and bot by REST API:

 

Steam new incoming offer -> bot -> resend to jackpot server for validation -> jackpot server answers accept/decline -> if accept bot send to jackpot accepted offer object -> jackpot server do his work

 

"if accept bot send to jackpot accepted offer object" - Here I have dilema.. Wait for accept callback, or use receivedOfferChanged event to get callback? I know waiting for callback is littlebit faster but is it 100% correct? Will it catch always? Same question for receivedOfferChanged.

 

Thanks for help or suggestion how you guys (or Meredith McKey xD) do this kind of bot.



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,686 posts

Posted 11 March 2018 - 06:20 PM

Use both. If the callback returns success then send success immediately. If it returns error 16 (timeout) then wait for receivedOfferChanged.



#3 Baterka

Baterka

    Member

  • Member
  • PipPip
  • 12 posts
  • LocationCzech Republic

Posted 12 March 2018 - 04:18 AM

The accept function trying to confirm until success? Or if I get 16 I need to try again?

#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,686 posts

Posted 13 March 2018 - 11:15 AM

It doesn't retry, ever.







Also tagged with one or more of these keywords: node.js, node-steam-tradeoffer-manager

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users