├── .github └── FUNDING.yml ├── Demo.gif ├── README.md └── filter.js /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with a single Open Collective username 4 | patreon: ckalgos 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ["paypal.me/ckalgos"] 13 | -------------------------------------------------------------------------------- /Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ckalgos/Fifa21-RatingFilter/f848af78181be8d6f78e6cc5cd590aa5ffa4785c/Demo.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fifa21-RatingFilter [Deprecated] 2 | 3 | This script is Deprecated pls use [Fut-trade-enhancer](https://github.com/ckalgos/fut-trade-enhancer) instead 4 | 5 | [![Contributors][contributors-shield]][contributors-url] 6 | [![Forks][forks-shield]][forks-url] 7 | [![Stargazers][stars-shield]][stars-url] 8 | [![Issues][issues-shield]][issues-url] 9 | [![Total Downloads](https://img.shields.io/github/downloads/ckalgos/Fifa21-RatingFilter/total.svg)]() 10 | 11 |

12 |

Fifa21 RatingFilter

13 | 14 |

15 | Fifa21 RatingFilter! 16 |
17 |
18 | Report Bug 19 | · 20 | Request Feature 21 | . 22 | Subscribe 23 | 24 | # Must Read :no_entry_sign: 25 | 26 | These tool is developed to demonstrate how someone can develop script to break our web application by automating stuffs and only for learning purpose. 27 | 28 | EA might (soft) ban from using transfer market in web app for using this tool. Continuously soft ban might lead to permanent ban as well. Also use of tools like this to gain advantage over other players is not ethically right. 29 | 30 | Use this tool at your own risk, any developers contributing to this repo won’t held responsibility if your account gets banned. 31 |

32 |

33 | 34 | 35 | 36 | ## Table of Contents 37 | 38 | - [Installation](#installation) 39 | - [Prerequisites](#prerequisites) 40 | - [Usage](#Usage) 41 | - [Demo](#Demo) 42 | - [Contact](#contact) 43 | 44 | 45 | 46 | ## Installation 47 | 48 | - Download the latest release from - [Latest Release](https://github.com/ckalgos/Fifa21-RatingFilter/releases/). 49 | - Add Tamper Monkey Extenstion to your Browser. 50 | - Navigate to Create Script -> Then to Utilities. 51 | - Under Utilities -> File (Import the filter.js script and Install it). 52 | 53 | Now in Ultimate Team Web App, under Settings Menu , you will have Rating Filter. 54 | 55 | 56 | 57 | ## Prerequisites 58 | 59 | - To use this tool, the user should have access to the transfer market. 60 | - Hence play the required number of games to get access to the transfer market before trying this tool. 61 | 62 | 63 | 64 | ## Usage 65 | 66 | - Update chrome to the latest version. 67 | - Use this link to access web app, https://www.ea.com/fifa/ultimate-team/web-app/ 68 | - For special cards, rating should be same as basic card rating of the player and then select the card type in rarity. 69 | - For example to search Ansu Fati TOTW, the rating as to be given as 76 and then in rarity select Team of the Week. 70 | 71 | 72 | 73 | ## Demo 74 | 75 | ![](Demo.gif) 76 | 77 | 78 | 79 | ## Contact 80 | 81 | Instagram - [@Instagram](https://www.instagram.com/ckalgos/) - ckalgos@gmail.com 82 | 83 | Project Link: [https://github.com/ckalgos/Fifa21-RatingFilter](https://github.com/ckalgos/Fifa21-RatingFilter) 84 | 85 | 86 | 87 | [contributors-shield]: https://img.shields.io/github/contributors/ckalgos/Fifa21-RatingFilter.svg?style=flat-square 88 | [contributors-url]: https://github.com/ckalgos/Fifa21-RatingFilter/graphs/contributors 89 | [forks-shield]: https://img.shields.io/github/forks/ckalgos/Fifa21-RatingFilter.svg?style=flat-square 90 | [forks-url]: https://github.com/ckalgos/Fifa21-RatingFilter/network/members 91 | [stars-shield]: https://img.shields.io/github/stars/ckalgos/Fifa21-RatingFilter.svg?style=flat-square 92 | [stars-url]: https://github.com/ckalgos/Fifa21-RatingFilter/stargazers 93 | [issues-shield]: https://img.shields.io/github/issues/ckalgos/Fifa21-RatingFilter.svg?style=flat-square 94 | [issues-url]: https://github.com/ckalgos/Fifa21-RatingFilter/issues 95 | [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555 96 | [linkedin-url]: https://linkedin.com/in/ckalgos 97 | -------------------------------------------------------------------------------- /filter.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name FUT 21 Filters with TamperMonkey 3 | // @namespace http://tampermonkey.net/ 4 | // @version 1.0.4 5 | // @updateURL https://github.com/ckalgos/Fifa-AutoBuyer/blob/master/autobuyer.js 6 | // @description FUT Snipping Tool 7 | // @author CK Algos 8 | // @match https://www.ea.com/*/fifa/ultimate-team/web-app/* 9 | // @match https://www.ea.com/fifa/ultimate-team/web-app/* 10 | // ==/UserScript== 11 | 12 | (function () { 13 | "use strict"; 14 | 15 | window.UTSearchEnhancerViewController = function () { 16 | UTMarketSearchResultsViewController.call(this); 17 | this._jsClassName = "UTSearchEnhancerViewController"; 18 | }; 19 | 20 | JSUtils.inherits( 21 | UTSearchEnhancerViewController, 22 | UTMarketSearchResultsViewController 23 | ); 24 | 25 | var db = openDatabase("filter", "1.0", "FIFA Filter DB", 2 * 1024 * 1024); 26 | 27 | db.transaction(function (tx) { 28 | tx.executeSql( 29 | "CREATE TABLE IF NOT EXISTS PlayerId (id, nationid,leagueid,teamid)" 30 | ); 31 | tx.executeSql("CREATE TABLE IF NOT EXISTS CurrentRating (rating)"); 32 | }); 33 | 34 | window.currentRating = ""; 35 | 36 | db.transaction(function (tx) { 37 | tx.executeSql( 38 | "SELECT * FROM CurrentRating", 39 | [], 40 | function (tx, ratingResults) { 41 | if (ratingResults.rows.length) { 42 | window.currentRating = ratingResults.rows[0].rating || ""; 43 | } 44 | }, 45 | null 46 | ); 47 | }); 48 | 49 | window.getRandNumber = function (min, max) { 50 | return Math.round(Math.random() * (max - min) + min); 51 | }; 52 | 53 | UTItemService.prototype.searchTransferMarket = function searchTransferMarket( 54 | searchCriteria, 55 | pageNum, 56 | fromRequestItem, 57 | observable 58 | ) { 59 | var result = observable || new EAObservable(); 60 | if (!fromRequestItem && pageNum === 1) { 61 | this.updateCriteria(searchCriteria, pageNum, result); 62 | return result; 63 | } 64 | var response = new UTServiceResponseDTO(); 65 | function successSearch(param1, successResult) { 66 | param1.unobserve(this); 67 | response.success = successResult.success; 68 | response.status = successResult.status; 69 | response.data = {}; 70 | response.data.items = successResult.response.items; 71 | if (successResult.success && successResult.response.items.length > 0) { 72 | this.marketRepository.setPageCache( 73 | pageNum, 74 | successResult.response.items, 75 | Date.now(), 76 | successResult.maxAge > 0 ? successResult.maxAge : null 77 | ); 78 | } 79 | result.notify(response); 80 | } 81 | function refreshSuccess(currRefresh, refreshResult) { 82 | currRefresh.unobserve(this); 83 | response.success = !![]; 84 | response.status = refreshResult.success 85 | ? HttpStatusCode["OK"] 86 | : HttpStatusCode.NOT_MODIFIED; 87 | response.data = {}; 88 | response.data.items = this.marketRepository.getPageCache(pageNum); 89 | result.notify(response); 90 | } 91 | if (!this.marketRepository.isCacheExpired(pageNum)) { 92 | var currPageCache = this.marketRepository.getPageCache(pageNum); 93 | if (currPageCache.length > 0) { 94 | this.refreshAuctions(currPageCache).observe(this, refreshSuccess); 95 | } else { 96 | response.success = !![]; 97 | response.status = HttpStatusCode.NOT_MODIFIED; 98 | response.data = {}; 99 | response.data.items = currPageCache; 100 | result.notify(response); 101 | } 102 | } else { 103 | var currConfigObj = getAppMain() 104 | .getConfigRepository() 105 | .getConfigObject(EAConfigurationRepository.KEY_ITEMS_PER_PAGE); 106 | var currItemCount = JSUtils.isValid(currConfigObj) 107 | ? currConfigObj[ 108 | EAConfigurationRepository.ITEMS_PER_PAGE.TRANSFER_MARKET 109 | ] 110 | : 20; 111 | searchCriteria.offset = currItemCount * (pageNum - 1); 112 | searchCriteria.count = currItemCount + 1; 113 | accessobjects.Item.searchTransferMarket(searchCriteria).observe( 114 | this, 115 | successSearch 116 | ); 117 | } 118 | return result; 119 | }; 120 | 121 | UTItemService.prototype.updateCriteria = function updateCriteria( 122 | searchCriteria, 123 | l, 124 | result 125 | ) { 126 | db.transaction( 127 | function (tx) { 128 | tx.executeSql( 129 | `SELECT id FROM PlayerId WHERE (${searchCriteria.nation} IS -1 OR nationid = ${searchCriteria.nation}) AND 130 | (${searchCriteria.league} IS -1 OR leagueid = ${searchCriteria.league}) AND 131 | (${searchCriteria.club} IS -1 OR teamid = ${searchCriteria.club})`, 132 | [], 133 | function (tx, results) { 134 | let playerIds = []; 135 | for (let i = 0; i < results.rows.length; i++) { 136 | playerIds.push(results.rows[i].id); 137 | } 138 | 139 | if (playerIds.length) { 140 | searchCriteria.maskedDefId = 141 | playerIds[getRandNumber(0, playerIds.length - 1)]; 142 | } 143 | 144 | if (window.currentRating && !searchCriteria.maskedDefId) { 145 | searchCriteria.maskedDefId = 1; 146 | } 147 | this.searchTransferMarket(searchCriteria, l, true, result); 148 | }.bind(this) 149 | ); 150 | }.bind(this) 151 | ); 152 | }; 153 | 154 | UTMarketSearchResultsViewController.prototype._searchFut = function (l) { 155 | this._paginationViewModel.stopAuctionUpdates(), 156 | services.Item.searchTransferMarket(this._searchCriteria, l, true).observe( 157 | this, 158 | function _onRequestItemsComplete(e, t) { 159 | if ((e.unobserve(this), !t.success)) 160 | return NetworkErrorManager.checkCriticalStatus(t.status) 161 | ? void NetworkErrorManager.handleStatus(t.status) 162 | : (services.Notification.queue([ 163 | services.Localization.localize("popup.error.searcherror"), 164 | enums.UINotificationType.NEGATIVE, 165 | ]), 166 | void con.getNavigationController().popViewController()); 167 | if (0 < this._searchCriteria.offset && 0 === t.data.items.length) 168 | this._requestItems(l - 1); 169 | else { 170 | var i = this._paginationViewModel.getNumItemsPerPage(); 171 | var o = t.data.items.slice(); 172 | 173 | if ( 174 | (this.onDataChange.notify({ 175 | items: o, 176 | }), 177 | o.length > i && (o = o.slice(0, i)), 178 | this._paginationViewModel.setPageItems(o), 179 | this._paginationViewModel.setPageIndex(l), 180 | this._selectedItem && 0 < o.length) 181 | ) { 182 | var n = this._paginationViewModel.getIndexByItemId( 183 | this._selectedItem.id 184 | ); 185 | 0 < n && this._paginationViewModel.setIndex(n), 186 | (this._selectedItem = null); 187 | } 188 | var s = this.getView(), 189 | a = null; 190 | if ( 191 | (!this._stadiumViewmodel || 192 | (this._searchCriteria.type !== SearchType.VANITY && 193 | this._searchCriteria.type !== SearchType.CLUB_INFO && 194 | this._searchCriteria.type !== SearchType.BALL) || 195 | (a = this._stadiumViewmodel.getStadiumProgression( 196 | this._searchCriteria.subtypes 197 | )), 198 | s.setItems(this._paginationViewModel.getCurrentPageItems(), a), 199 | s.setPaginationState(1 < l, t.data.items.length > i), 200 | JSUtils.isValid(this._compareItem) && !this._squadContext) 201 | ) { 202 | var r = JSUtils.find( 203 | o, 204 | function (e) { 205 | return ( 206 | e.getAuctionData().tradeId === 207 | this._compareItem.getAuctionData().tradeId 208 | ); 209 | }.bind(this) 210 | ); 211 | JSUtils.isValid(r) 212 | ? this._pinnedListItem.setItem(r) 213 | : this._paginationViewModel.setPinnedItem(this._compareItem); 214 | } else 215 | !isPhone() && 216 | 0 < o.length && 217 | s.selectListRow(this._paginationViewModel.getCurrentItem().id); 218 | } 219 | this._paginationViewModel.startAuctionUpdates(); 220 | } 221 | ); 222 | }; 223 | 224 | window.UTSnipeFilterViewController = function () { 225 | UTAppSettingsViewController.call(this); 226 | this._jsClassName = "UTSnipeFilterViewController"; 227 | }; 228 | 229 | JSUtils.inherits(UTSnipeFilterViewController, UTAppSettingsViewController); 230 | 231 | window.snipeFilterInterface = function () { 232 | if ( 233 | services.Localization && 234 | jQuery("h1.title").html() === 235 | services.Localization.localize("navbar.label.home") 236 | ) { 237 | window.hasLoadedAll = true; 238 | } 239 | 240 | if (window.hasLoadedAll && jQuery(".ut-app-settings-actions").length) { 241 | if (jQuery(".ut-app-settings-actions").first().length) { 242 | if (!jQuery("#snipe_rating_filter").length) { 243 | jQuery(".ut-app-settings-actions") 244 | .first() 245 | .append( 246 | `
247 |
248 |

Snipe Settings:

249 |
250 |
251 |
252 |
253 | Rating: 254 |
255 |
256 |
257 |
258 |
261 |
262 |
263 |
264 | ` 265 | ); 266 | } 267 | } 268 | } else { 269 | window.setTimeout(snipeFilterInterface, 1000); 270 | } 271 | }; 272 | 273 | snipeFilterInterface(); 274 | 275 | window.notify = function (message, type) { 276 | services.Notification.queue([message, type]); 277 | }; 278 | 279 | window.saveSettings = function () { 280 | window.notify( 281 | "Saving setting , please wait...", 282 | enums.UINotificationType.POSITIVE 283 | ); 284 | jQuery(".ut-click-shield").addClass("showing"); 285 | 286 | let playerFieldString = jQuery("#ab_player_rating").val(); 287 | 288 | jQuery(".loaderIcon ").css("display", "block"); 289 | db.transaction(function (tx) { 290 | tx.executeSql( 291 | `DELETE FROM PlayerId`, 292 | [], 293 | function (tx, ratingResults) {}, 294 | null 295 | ); 296 | 297 | tx.executeSql( 298 | `DELETE FROM CurrentRating`, 299 | [], 300 | function (tx, ratingResults) {}, 301 | null 302 | ); 303 | 304 | let rating = parseInt(playerFieldString); 305 | 306 | if (rating) { 307 | tx.executeSql( 308 | `INSERT INTO CurrentRating (rating) VALUES (${rating})`, 309 | [], 310 | function (tx, ratingResults) {}, 311 | null 312 | ); 313 | } 314 | }); 315 | 316 | setTimeout(function () { 317 | window.currentRating = null; 318 | 319 | var rating = parseInt(playerFieldString); 320 | 321 | if (rating) { 322 | window.currentRating = rating; 323 | window.fetchPlayers(rating); 324 | } 325 | if (!rating) { 326 | jQuery(".ut-click-shield").removeClass("showing"); 327 | jQuery(".loaderIcon ").css("display", "none"); 328 | window.notify( 329 | "Saved settings successfully", 330 | enums.UINotificationType.POSITIVE 331 | ); 332 | return; 333 | } 334 | }, 1000); 335 | }; 336 | 337 | window.saveSearch = function () { 338 | window.playerJson = JSON.stringify(this._searchCriteria); 339 | }; 340 | 341 | window.fetchPlayers = function (rating) { 342 | jQuery.getJSON( 343 | `content/${fut_guid}/${fut_year}/fut/items/web/players.json`, 344 | function (res) { 345 | let playerFilteredIds = []; 346 | 347 | var legendReduced = res.LegendsPlayers.reduce(function ( 348 | filtered, 349 | option 350 | ) { 351 | if (rating && option.r === rating) { 352 | filtered.push(option.id); 353 | } 354 | return filtered; 355 | }, 356 | playerFilteredIds); 357 | 358 | var reduced = res.Players.reduce(function (filtered, option) { 359 | if (rating && option.r === rating) { 360 | filtered.push(option.id); 361 | } 362 | return filtered; 363 | }, playerFilteredIds); 364 | 365 | for (let i = 0; i < playerFilteredIds.length; i++) { 366 | services.Item.requestItemByDefId(playerFilteredIds[i]).observe( 367 | this, 368 | function (sender, response) { 369 | let item = response.data.item; 370 | db.transaction(function (tx) { 371 | tx.executeSql( 372 | `INSERT INTO PlayerId (id,nationid,leagueid,teamid) Values (${playerFilteredIds[i]},${item.nationId},${item.leagueId},${item.teamId})`, 373 | [], 374 | function (tx, ratingResults) {} 375 | ); 376 | }); 377 | 378 | if (i === playerFilteredIds.length - 1) { 379 | jQuery(".ut-click-shield").removeClass("showing"); 380 | jQuery(".loaderIcon ").css("display", "none"); 381 | window.notify( 382 | "Saved settings successfully", 383 | enums.UINotificationType.POSITIVE 384 | ); 385 | } 386 | } 387 | ); 388 | } 389 | } 390 | ); 391 | }; 392 | 393 | jQuery(document).on("click", "#ab_setting_save", saveSettings); 394 | })(); 395 | --------------------------------------------------------------------------------