Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Auto-betting / -return / -accept functionality #27

Closed
ncla opened this issue Sep 25, 2014 · 31 comments
Closed

Auto-betting / -return / -accept functionality #27

ncla opened this issue Sep 25, 2014 · 31 comments

Comments

@ncla
Copy link
Owner

ncla commented Sep 25, 2014

No description provided.

@ncla
Copy link
Owner Author

ncla commented Sep 25, 2014

@birjolaxew any progress?

@birjj
Copy link
Contributor

birjj commented Sep 26, 2014

Working on it, rather slowly. Got a bunch of work at school at the moment, but will likely get some work done this weekend.

@ncla ncla mentioned this issue Sep 28, 2014
@birjj
Copy link
Contributor

birjj commented Sep 28, 2014

To-do's:

  • Save auto delay across bets (right now it only saves pr. bet for some reason, should be easy fix)
  • Stop if response indicates that the match has started
  • Create auto-accept logic

Possibly enhancements:

  • Move betting logic to background script, so multiple instances don't run when having multiple tabs open
  • Use chrome.webRequest instead of jQuery.ajaxPrefilter, to avoid injecting into page context

@birjj
Copy link
Contributor

birjj commented Sep 29, 2014

Kind of interested: would people rather see the return of the "Fucking place bet" button instead of the current solution? Would be a whole lot easier to write and understand, and would probably be more intuitive than what I've made.

@Outpox
Copy link
Contributor

Outpox commented Sep 29, 2014

Maybe not with the same sentence, but yes I'd like to have it already displayed

@ncla
Copy link
Owner Author

ncla commented Sep 29, 2014

Well, the previous LD users might be confused as to where the button has gone and might even think the feature is gone (which it is at the moment, anyway, on Chrome App store).

@birjj
Copy link
Contributor

birjj commented Sep 29, 2014

Working on a rewrite, I much prefer the "Fucking place bet" button personally - not sure why I didn't think of it when originally writing it.

@ncla
Copy link
Owner Author

ncla commented Sep 30, 2014

FYI I added Inventory.bettingInventoryType for you as you asked on Steam.

@birjj
Copy link
Contributor

birjj commented Sep 30, 2014

Awesome, thanks

@ncla
Copy link
Owner Author

ncla commented Sep 30, 2014

Auto-betting was reworked by @birjolaxew, now it works as a background task. Those who are reading this are advised to try it out.

@ncla
Copy link
Owner Author

ncla commented Oct 10, 2014

@birjolaxew someone on 7.2.0 Reddit thread said that this doesn't work on Dota2Lounge. did you have a chance to look into it?

@ncla
Copy link
Owner Author

ncla commented Oct 10, 2014

#44 to reproduce the issue.

@birjj
Copy link
Contributor

birjj commented Oct 10, 2014

Got simultaneous Dota2/CSGO betting working, sans messaging. Unfortunately haven't had time to work on it all week.

@ncla
Copy link
Owner Author

ncla commented Oct 12, 2014

Would be nice if you could move the betting logic from background.js to bet.js

@ncla
Copy link
Owner Author

ncla commented Oct 14, 2014

Should we perhaps remove limitation for delaying requests?

@birjj
Copy link
Contributor

birjj commented Oct 14, 2014

The only limit is currently the min attribute on the input element. Feel free to change to whatever.

The reason I set a lower limit was so we avoided overloading their servers.

@ncla
Copy link
Owner Author

ncla commented Oct 18, 2014

So, predict pages have been introduced and a lot of stuff is broken because there is a lot of hardcoded crap.

@ncla
Copy link
Owner Author

ncla commented Oct 18, 2014

The way it should be coded:

  • Hardcode the least amount of stuff possible
  • Instead of having two buttons (FUCKING PLACE BET and Place Bet), have only one button by overriding the default one, if user doesn't want to it to be overridden, provide an option in settings. If the button changes, we can leave it to be default button. Or just add a fucking tick box.
  • We observe postbet AJAX requests now with webRequest onBeforeRequest listener since it provides post data (which.. we somehow didn't know about? ¯_(ツ)_/¯ )
  • Check post bet requests by post data
  • Get rid of LD auto-bet elements being in the DOM 24/7
  • Perhaps ditch the renew hash thing

What do we gain (or more like.. lose)? Half of the code will be deleted.

@ncla
Copy link
Owner Author

ncla commented Oct 19, 2014

Auto-bet popup doesn't close or change when stopping auto-bet.

@birjj
Copy link
Contributor

birjj commented Oct 20, 2014

Rewriting with webRequest not possible - can't read response body.

@ncla
Copy link
Owner Author

ncla commented Oct 23, 2014

Backup of predict page HTML http://pastebin.com/Bx8Bv01p

@ncla
Copy link
Owner Author

ncla commented Oct 25, 2014

@birjolaxew something weird happened when I requested items back with first try, the page didn't refresh automatically. and when I refresh the page the auto-betting was there but I was in the queue anyway.

@ncla ncla changed the title 'Place bet' functionality Auto-betting / -return / -accept functionality Oct 30, 2014
@ncla
Copy link
Owner Author

ncla commented Oct 30, 2014

@birjolaxew I requested returns back and nothing happens with trade offer. It did open the tab however.

@ncla
Copy link
Owner Author

ncla commented Nov 2, 2014

@birjolaxew Dota2Lounge trade offer was not accepted automatically... Trade offer was opened, but auto-accept did not start.

@ncla
Copy link
Owner Author

ncla commented Nov 2, 2014

@birjolaxew

cough cough

Guess what element is that. Dota2Lounge Dark theme.

@birjj birjj mentioned this issue Nov 2, 2014
@ncla
Copy link
Owner Author

ncla commented Nov 16, 2014

'Add items to bet' text should not be replaced for the button.

@ncla
Copy link
Owner Author

ncla commented Jan 9, 2015

Captchas on trade offers, woooo, yay!

@ncla
Copy link
Owner Author

ncla commented Jan 11, 2015

They changed their shitty captcha to reCAPTCHA, now we could just easily click on 'I am not a robot' circle and accept offer.

@birjj
Copy link
Contributor

birjj commented Jan 11, 2015

Fucks sake, I had just broken their captcha too... I'm afraid Google's might be unbreakable.

@ncla
Copy link
Owner Author

ncla commented Jan 11, 2015

Yeah, it looked so easy to break with open libraries on GitHub.

@ncla
Copy link
Owner Author

ncla commented Jan 11, 2015

I am just gonna close this issue and create a separate issue for captcha issue.

@ncla ncla closed this as completed Jan 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants