Skip to content
This repository was archived by the owner on Apr 22, 2021. It is now read-only.

SBC features - #237

Open
jhuriez wants to merge 5 commits into
Mardaneus86:developfrom
jhuriez:dce_features
Open

SBC features#237
jhuriez wants to merge 5 commits into
Mardaneus86:developfrom
jhuriez:dce_features

Conversation

@jhuriez

@jhuriez jhuriez commented Oct 9, 2020

Copy link
Copy Markdown
Contributor

Hi, i've added SBC features module on this userscript

Basic :

  • "Enable SBC Features" in the configuration page

  • On all SBC page, you have now a link to see the challenge on Futbin :
    image

FUTBIN SBC feature :

On a SBC page, just click on the button "Use Futbin SBC" and paste the link of the sbc

image

This will pre-fill the team for the challenge.
If you don't have the player in your club, it will add him as a concept player.

image

SBC Gold Upgrade Auto-fill

On the SBC Gold Upgrade page, just click on the button "Auto-fill"

This will allow you to fill your team by taking into account these conditions:

  • Exclude players from your team
  • Sort by ascending rating
  • First search for untradeable players at the precise position
  • If nothing, look for untradeable players at nearby positions (example for RB: RWB, CB, LB, LWB, RM)
  • If nothing, search for tradeable players at the precise position
  • If nothing, search for players tradeable at nearby positions

This feature needs to be improved:

  • Improvement of relevance
  • Check the futbin price of the player before adding it (futbin price max)
  • Have a maximum rating parameter of the player

@Mardaneus86

Copy link
Copy Markdown
Owner

Very nice! Add me as a reviewer once you are ready with this PR.

@jhuriez

jhuriez commented Oct 9, 2020

Copy link
Copy Markdown
Contributor Author

I invited you on my repo, I don't know if what I did is good, I don't know much about the pull request system on github. ^^

@Mardaneus86

Copy link
Copy Markdown
Owner

Inviting me isn't necessary, there should be a "request review" option at the top right of this PR.

Anyway, if this PR is ready for review I'll try to check it tomorrow and will try to add it to the next release if it looks good!

@jhuriez

jhuriez commented Oct 9, 2020

Copy link
Copy Markdown
Contributor Author

ok thanks!

I just need to make some improvements on the auto-fill on SBC Gold Upgrade feature, but otherwise everything is functional, the PR is ready.
I tried to do my best to respect the "ESLINT", being a native PHP developer it wasn't very easy. ;-)

@jhuriez

jhuriez commented Oct 9, 2020

Copy link
Copy Markdown
Contributor Author

I don't know why, but i can't add reviewer...
image

@Mardaneus86

Copy link
Copy Markdown
Owner

Need a little more time to review properly. Looks good so far!

@eimarfandino

Copy link
Copy Markdown
Contributor

i tried it and nice work @jhuriez !.

I noticed the following when compiling it in settings-entry.js:

  ✖   1:42  Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖   2:51  Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖   3:1   Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖   4:41  Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖   5:1   Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖   6:49  Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖   7:30  Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖   8:18  Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖   9:50  Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖  10:4   Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style
  ✖  11:2   Expected linebreaks to be 'CRLF' but found 'LF'  linebreak-style

✖ 11 errors (8:16:29 PM)

i think that if you rmeove the first two lines:

/* eslint-disable no-restricted-syntax */
/* eslint linebreak-style: ["error", "windows"] */

those errors will be gone

@eimarfandino

eimarfandino commented Oct 10, 2020

Copy link
Copy Markdown
Contributor

i was wondering, all those requests to the EA server when solving a SBC, does it look suspicious? can they cause a banning?

@eimarfandino

Copy link
Copy Markdown
Contributor

I also noticed the following, when you resolve vi this method, and refresh the browser, the solution does not persist

@eimarfandino

Copy link
Copy Markdown
Contributor

ah,that is the trick, after applying the solution, it is missing a call to the squad endpoint of EA, something like .... game/fifa21/sbs/challenge/52/squad. You can do manually that call by swapping players of position and put them back to the original solution

@jhuriez

jhuriez commented Oct 11, 2020

Copy link
Copy Markdown
Contributor Author

Yes, for the error "Expected linebreaks to be 'CRLF' but found 'LF'", i think it's because i'm on a Windows environment.


Oops you're right, I forgot to specify this problem with SBC that doesn't save, you just have to change the position of a player of the team for it to save.

I hadn't yet found a solution to that.


I don't think it's risky when it's requests to our club, as opposed to requests to the transfer market.
Then we can eventually increase the time between each request.

@eimarfandino

Copy link
Copy Markdown
Contributor

@jhuriez if you do a call to the /squad endpoint, will save the squad

@cnbrkc

cnbrkc commented Oct 17, 2020

Copy link
Copy Markdown

How can i add this feature?
I do not understand much about these things :(

@jhuriez

jhuriez commented Oct 19, 2020

Copy link
Copy Markdown
Contributor Author

I have added auto save challenge, thanks @eimarfandino

--

I have also removed eslint rules for windows on settings-entry.js
I'm on Windows development, i must add this line in .eslintrc (but i don't commit/push) :
"linebreak-style": ["error", "windows"]

@seifamou

Copy link
Copy Markdown

this feature seems to be nice

@eimarfandino : when do you think it will be merged to main project ?

@Mardaneus86

Copy link
Copy Markdown
Owner

When I'm sure the necessary support can be given. I can't support the current plugin on my own as it is already. So hoping to get someone to volunteer on helping out on bugfixing.

Also I don't have access to the web app anymore since I didn't buy the game (not playing it anymore because of time constraints). Donations don't even come close for buying the game.

@Bendecks

Copy link
Copy Markdown

You don't need the game to login as such, just need someone with the game to log in once 👍

@seifamou

seifamou commented Nov 20, 2020

Copy link
Copy Markdown

how can i compile the project into one single js file to test it with tempermonkey ?

i can do testing and come beck with feedbak

edit: i have generated the one file using "npm run build"
but all javascript code was inside eval() function

@totti240282

Copy link
Copy Markdown

send me your account and unlock (PS4).
How decript compile.js ?

@cnbrkc

cnbrkc commented Feb 21, 2021

Copy link
Copy Markdown

I guess you don't intend to add such nice features? Isn't there someone who will understand these works and publish them himself? I wish I could understand ... @Mardaneus86

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants