Last active
August 7, 2018 08:50
-
-
Save secretdataz/fc1035ff85be4414de337eac04405139 to your computer and use it in GitHub Desktop.
Without strict server-side check, you can manipulate your stats in SIT Dino game
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @param level Your current level | |
| * @param EXP Just use 0, the server doesn't do sanity checks | |
| * @param targetLevel Where to | |
| **/ | |
| setExp = (level, exp, targetLevel) => { | |
| fetch("https://dino.sit.kmutt.ac.th/api/updateEggStatus/%7B%22name%22:%22loss%22,%22level%22:" + level + ",%22exp%22:" + exp + ",%22warm%22:500,%22hygine%22:500,%22fun%22:500,%22behaviorRatio%22:44,%22expLevelCap%22:" + exp + "%7D", { | |
| "credentials": "include", | |
| "headers": {}, | |
| "referrer": "https://dino.sit.kmutt.ac.th/", | |
| "referrerPolicy": "no-referrer-when-downgrade", | |
| "body": null, | |
| "method": "PUT", | |
| "mode": "cors" | |
| }).then((resp) => { | |
| fetch("https://dino.sit.kmutt.ac.th/api/status", { | |
| "credentials": "include", | |
| "headers": {}, | |
| "referrer": "https://dino.sit.kmutt.ac.th/", | |
| "referrerPolicy": "no-referrer-when-downgrade", | |
| "body": null, | |
| "method": "GET", | |
| "mode": "cors" | |
| }).then((resp) => resp.json()).then((json) => { | |
| console.log(json); | |
| if(json.level < targetLevel) | |
| setExp(json.level, json.expLevelCap, targetLevel); | |
| }) | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment