You could use command bulk statues 1000 in InjectCheatF4.MohAlnoaimi wrote: ↑Thu Oct 20, 2022 9:56 pmis there a way to make every statue to level 1000 since it take so long with spawning statues
Legends of Idleon
Re: Legends of Idleon
-
- Cheater
- Posts: 34
- Joined: Thu Mar 10, 2022 7:12 am
- Reputation: 2
Re: Legends of Idleon
i just saw this could you send the code if you still have it i would like to try and find a way to add it to cheats.jsDevilisious wrote: ↑Thu May 27, 2021 8:41 amI just took a text box, Made a function. And called that function in every map load. Its handy to know what u get back in values. So I use it to find and lock stuff that I want to use. I added the portal requirements in the same function so every portal opens up... there is probably better places to call the function tho..Creater0822 wrote: ↑Tue May 25, 2021 6:29 pmNice! How and where in the code did you manage to invoke the GUI components?Devilisious wrote: ↑Mon May 24, 2021 8:01 amBecause I like sharing Idea's:
created a way to log anything I want. for now I used the map id and active username ;p.
also made the portals auto unlock while going through them . maybe this will bring up some fun idea's for others
edit: For the people wondering why I showed the map id instead of the map name is because for people that understand code this is more logical
-
- Cheater
- Posts: 34
- Joined: Thu Mar 10, 2022 7:12 am
- Reputation: 2
Re: Legends of Idleon
found a way to log stuff in a new chat
-
- Cheater
- Posts: 34
- Joined: Thu Mar 10, 2022 7:12 am
- Reputation: 2
Re: Legends of Idleon
working on currently mob drop edit inventory edit skills edit gui creator shop edit event logger Chat console
-
- Cheater
- Posts: 34
- Joined: Thu Mar 10, 2022 7:12 am
- Reputation: 2
Re: Legends of Idleon
think i found a way for events
Edit1 : this["com.stencyl.Engine"].engine.getGameAttribute("DNSM").h["FrendChatyDL1"] is the most recent chat message no matter what channel Edit2: web workers suck
Edit1 : this["com.stencyl.Engine"].engine.getGameAttribute("DNSM").h["FrendChatyDL1"] is the most recent chat message no matter what channel Edit2: web workers suck
-
- Cheater
- Posts: 34
- Joined: Thu Mar 10, 2022 7:12 am
- Reputation: 2
Re: Legends of Idleon
Code: Select all
const worker = new Worker(onmessage = function onevent(params) {
const bEngine = params.data.bengine
var event_name = params.data.event
while (true) {
if (event_name.toLowerCase() == "changemap") {
if (typeof old_map == 'undefined') {
old_map = bEngine.getGameAttribute("CurrentMap")
} else if (old_map != null) {
new_map = bEngine.getGameAttribute("CurrentMap")
if (new_map != old_map) {
var myFunction = JSONfn.parse(e.data.myFunc)
myFunction(new_map)
old_map = new_map
}
}
}
else if (event_name.toLowerCase() == "changeplayer") {
if (typeof old_user == 'undefined') {
old_user = bEngine.getGameAttribute("UserInfo")[0]
} else if (old_user != null) {
new_name = bEngine.getGameAttribute("UserInfo")[0]
if (new_name != old_user) {
var myFunction = JSONfn.parse(e.data.myFunc)
myFunction(new_name)
old_user = new_name
}
}
}
}
})
original
Code: Select all
function onEvent(bEngine, event, func) {
while (true) {
if (event.toLowerCase() == "changemap") {
if (typeof old_map == 'undefined') {
old_map = bEngine.getGameAttribute("CurrentMap")
} else if (old_map != null) {
new_map = bEngine.getGameAttribute("CurrentMap")
if (new_map != old_map) {
func(new_map)
old_map = new_map
}
}
}
else if (event.toLowerCase() == "changeplayer") {
if (typeof old_user == 'undefined') {
old_user = bEngine.getGameAttribute("UserInfo")[0]
} else if (old_user != null) {
new_name = bEngine.getGameAttribute("UserInfo")[0]
if (new_name != old_user) {
func(new_name)
old_user = new_name
}
}
}
}
}
Re: Legends of Idleon
If you want to achieve the while loop without pausing the game, look into promises and async/await. There are plenty of articles online that explain better than I would.
For this use case, I would argue you are better off just adding functionality to the engine's enterScene method and you won't need a Worker or loop at all. It's also nice to keep the Proxy pattern that all the other cheats were implemented with which allows cheats to be dynamically toggled on and off in a tidy way:
For this use case, I would argue you are better off just adding functionality to the engine's enterScene method and you won't need a Worker or loop at all. It's also nice to keep the Proxy pattern that all the other cheats were implemented with which allows cheats to be dynamically toggled on and off in a tidy way:
Code: Select all
let cheatState = {
// other cheat states
showmapinfo: false,
}
function setup() {
//..... other setup methods, add the new one in:
setupChangeMapProxy.call(this);
}
function setupChangeMapProxy() {
const bEngine = this["com.stencyl.Engine"].engine;
bEngine.enterScene = new Proxy(bEngine.enterScene, {
apply: function (originalFn, context, argumentsList) {
let oldMap = bEngine.getGameAttribute("CurrentMap");
Reflect.apply(originalFn, context, argumentsList);
if (cheatState.showmapinfo) {
let newMap = bEngine.getGameAttribute("CurrentMap");
console.log(oldMap, newMap);
// code invoked each time a map is entered and showmapinfo cheat is toggled on
}
}
});
}
registerCheat("showmapinfo", function () {
cheatState.showmapinfo = !cheatState.showmapinfo;
return `${cheatState.showmapinfo ? 'Activated' : 'Deactived'} map info display`;
});
-
- Cheater
- Posts: 34
- Joined: Thu Mar 10, 2022 7:12 am
- Reputation: 2
Re: Legends of Idleon
thx i will try to figure it outvalleymon wrote: ↑Mon Oct 24, 2022 2:14 pmIf you want to achieve the while loop without pausing the game, look into promises and async/await. There are plenty of articles online that explain better than I would.
For this use case, I would argue you are better off just adding functionality to the engine's enterScene method and you won't need a Worker or loop at all. It's also nice to keep the Proxy pattern that all the other cheats were implemented with which allows cheats to be dynamically toggled on and off in a tidy way:
Code: Select all
let cheatState = { // other cheat states showmapinfo: false, } function setup() { //..... other setup methods, add the new one in: setupChangeMapProxy.call(this); } function setupChangeMapProxy() { const bEngine = this["com.stencyl.Engine"].engine; bEngine.enterScene = new Proxy(bEngine.enterScene, { apply: function (originalFn, context, argumentsList) { let oldMap = bEngine.getGameAttribute("CurrentMap"); Reflect.apply(originalFn, context, argumentsList); if (cheatState.showmapinfo) { let newMap = bEngine.getGameAttribute("CurrentMap"); console.log(oldMap, newMap); // code invoked each time a map is entered and showmapinfo cheat is toggled on } } }); } registerCheat("showmapinfo", function () { cheatState.showmapinfo = !cheatState.showmapinfo; return `${cheatState.showmapinfo ? 'Activated' : 'Deactived'} map info display`; });
-
- Cheater
- Posts: 34
- Joined: Thu Mar 10, 2022 7:12 am
- Reputation: 2
Re: Legends of Idleon
ive had problems trying to console.log() any ideas why?
Edit: nvm i got it printing to chat Edit2: it gets executed twice if theres no delay after printing to chat
Edit: nvm i got it printing to chat Edit2: it gets executed twice if theres no delay after printing to chat
Re: Legends of Idleon
So what is the general “safest” things to modify. I know there’s a risk of everything to an extent but not sure if anyone has ran tests to determine ban rates.
Re: Legends of Idleon
If you are using console.log and expecting it to log to the node console, then you'll have no luck. That's because the contents of cheats.js are injected into a chrome process running idleon, and the "cheat" function is called with the context of the element in an iframe __idleon_cheats__. console.log therefore logs to the chrome console, which you can see if you go to chrome://inspect and add a configuration for localhost:32123tympanicblock61 wrote: ↑Mon Oct 24, 2022 6:38 pmive had problems trying to console.log() any ideas why?
Edit: nvm i got it printing to chat Edit2: it gets executed twice if theres no delay after printing to chat
I actually added a config option in the injectcheatsF5 version to pass console.log back through to the node prompt because it was handy.
Re: logging twice, not sure, again I would inspect in chrome, put a breakpoint on the console.log line and step debug to see what is invoking it each time. It's only logging once for me, but again I'm using the F5 version, and there are some minor differences
-
- Cheater
- Posts: 34
- Joined: Thu Mar 10, 2022 7:12 am
- Reputation: 2
Re: Legends of Idleon
so i have this
which works but how would i do this and allow it to have this["com.stencyl.Engine"].engine bc ive tried to add that to the top but i get a error
Edit: nvm it doesnt i have to manually run the function meaning i can run it with a command in the console
Code: Select all
function setupButtonProxyTest() {
function build_button(params) {
var x = params[0]
var y = params[1]
var width = params[2]
var height = params[3]
var button = document.createElement("button");
button.innerHTML = params[4];
if (x < 0) {
button.style.left = Math.abs(x)+'px';
}
if (x > 0) {
button.style.right = x+'px';
}
if (y < 0) {
button.style.bottom = Math.abs(y)+'px';
}
if (y > 0) {
button.style.top = y+'px';
}
if (typeof params[5] == 'function') {
button.onclick = function() {params[5]();};
}
button.style.position = 'fixed';
button.style.font = 'inherit';
button.style.width = width+'px';
button.style.height = height+'px';
document.body.append(button);
}
function my_func() {
window.alert("test")
}
build_button([10, -10, 50, 50, "nice", my_func])
}
setupButtonProxyTest()
Edit: nvm it doesnt i have to manually run the function meaning i can run it with a command in the console
Re: Legends of Idleon
Is there a way to revert a portal unlock?
Unlock portals unlocks W5 now lol
Unlock portals unlocks W5 now lol
Re: Legends of Idleon
The function needs to be called in the correct context (context essentially defines the value of "this"). If you just execute a function in cheats.js, it's running in context space of it's own (not 100% sure, but appears to be created by chrome-remote-interface). If you look in main.js you see that window.executeCheat is defined as a function that executes the cheat function in cheats.js with the context:tympanicblock61 wrote: ↑Tue Oct 25, 2022 4:00 amso i have thiswhich works but how would i do this and allow it to have this["com.stencyl.Engine"].engine bc ive tried to add that to the top but i get a errorCode: Select all
function setupButtonProxyTest() { function build_button(params) { var x = params[0] var y = params[1] var width = params[2] var height = params[3] var button = document.createElement("button"); button.innerHTML = params[4]; if (x < 0) { button.style.left = Math.abs(x)+'px'; } if (x > 0) { button.style.right = x+'px'; } if (y < 0) { button.style.bottom = Math.abs(y)+'px'; } if (y > 0) { button.style.top = y+'px'; } if (typeof params[5] == 'function') { button.onclick = function() {params[5]();}; } button.style.position = 'fixed'; button.style.font = 'inherit'; button.style.width = width+'px'; button.style.height = height+'px'; document.body.append(button); } function my_func() { window.alert("test") } build_button([10, -10, 50, 50, "nice", my_func]) } setupButtonProxyTest()
Edit: nvm it doesnt i have to manually run the function meaning i can run it with a command in the console
Code: Select all
window.document.querySelector('iframe').contentWindow.__idleon_cheats__
Function.call allows you to pass a context (or "this" value) to a function when executing that is something other than the default.
If you want this["com.stencyl.Engine"].engine to be available, you therefore need to ensure that the function is executed with the context of that page element, which as mentioned, is achieved by doing something like setupButonProxyTest.call(context, [arguments]) where context is the idleon application page element.
As you discovered, running it from the console makes it work, because the console is passing the correct context for you.
Hope that helps
-
- Cheater
- Posts: 34
- Joined: Thu Mar 10, 2022 7:12 am
- Reputation: 2
Re: Legends of Idleon
yes this does help
Who is online
Users browsing this forum: AskaLangly, Bing [Bot], Google Adsense [Bot], Weldjerda