futwebapp-tampermonkey
futwebapp-tampermonkey copied to clipboard
SBC features
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 :
FUTBIN SBC feature :
On a SBC page, just click on the button "Use Futbin SBC" and paste the link of the sbc
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.
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
Very nice! Add me as a reviewer once you are ready with this PR.
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. ^^
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!
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. ;-)
I don't know why, but i can't add reviewer...
Need a little more time to review properly. Looks good so far!
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
i was wondering, all those requests to the EA server when solving a SBC, does it look suspicious? can they cause a banning?
I also noticed the following, when you resolve vi this method, and refresh the browser, the solution does not persist
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
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.
@jhuriez if you do a call to the /squad endpoint, will save the squad
How can i add this feature? I do not understand much about these things :(
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"]
this feature seems to be nice
@eimarfandino : when do you think it will be merged to main project ?
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.
You don't need the game to login as such, just need someone with the game to log in once 👍
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
send me your account and unlock (PS4). How decript compile.js ?
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