CREATE and FUCK your own AI GIRLFRIEND TRY FOR FREE
x

Tutorial HTML Cheating on HTML games (Continues updating)

flookout2

New Member
Jul 23, 2020
4
12
I will be going over a SugarCube as an example but this should work just fine with any other 'engine'

Ok first let's talk about how to edit variables. You start off by opening the console (Press 'F12' while in browser)

This opens up a console where you can edit and read variables and much much more. if you are on a game running SugarCube you can just use

JavaScript:
SugarCube.State.variables
Then press 'ENTER' this will show all variables used by the game

If you aren't using a SugarCube game

You don't have permission to view the spoiler content. Log in or register now.

Now you can edit a variable say

JavaScript:
SugarCube.State.variables.player.energy=100
Or

JavaScript:
SugarCube.State.variables.player.energy=SugarCube.State.variables.player.energyCap
Building on the second example lets see how we can keep the energy updated in a nice interval without freezing the game or causing us an issue.

You don't have permission to view the spoiler content. Log in or register now.

We start of by typing this

JavaScript:
var keepUpdating = async function() {
    SugarCube.State.variables.player.energy=SugarCube.State.variables.player.energyCap
    // Every 1000 ms = 1 s
    setTimeout(keepUpdating, 5000);
}
You don't have permission to view the spoiler content. Log in or register now.

Then you call:

JavaScript:
keepUpdating()
If you ever want to stop it from running or change it you can run:

JavaScript:
keepUpdating = undefined
To this point I can say happy cheating.