Greasy Fork is available in English.
Automates many aspects of the game, that you can configure. Along with that, there are convenience changes, like Quick Crafting items.
// ==UserScript==
// @name Idle Pixel Automation
// @licence MIT
// @namespace http://tampermonkey.net/
// @version 2026-01-30
// @description Automates many aspects of the game, that you can configure. Along with that, there are convenience changes, like Quick Crafting items.
// @author You
// @match https://idle-pixel.com/login/play/
// @icon https://www.google.com/s2/favicons?sz=64&domain=idle-pixel.com
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Idle Pixel Ninjakiwi code
// @namespace http://tampermonkey.net/
// @version 2026-01-30
// @description Doing some stuff
// @author You
// @match https://idle-pixel.com/login/play/
// @icon https://www.google.com/s2/favicons?sz=64&domain=idle-pixel.com
// @grant none
// ==/UserScript==
function getItemName(prettyName){
prettyName = prettyName.replace("bear_skin","bear_fur").replace("qaulity","quality");
if(prettyName.endsWith("bars")){return prettyName.replace("bars","bar");}
return prettyName;
}
function isInTeam(){
return window.var_team_id != null;}
function getTeamItemCount(itemname){
if(!isInTeam()){return 0;}
const team_box = document.querySelector("#team-storage-box-content");
var item = team_box.querySelector(`[data-item-team-storage=${itemname}]`);
if(item == null){return 0;}
return Number(item.querySelector("span").innerHTML.replaceAll(",",""));}
var config = [ {id: "autoHarvest", label: "Auto Harvest", type: "boolean", default: true}, {id: "autoChop", label: "Auto Chop Trees", type: "boolean", default: true},
{id: "sendRocket", label: "Auto Send Rocket", type: "boolean", default: true}, {id: "storeFightPoints", label: "Store Fight Points (teams)", type: "boolean", default: false},
{id: "autoPlant", label: "Auto Plant", type: "boolean", default: false}, {id: "autoPlantSeed", label: "Auto Plant Seed Type", type: "string", default: "red mushroom seeds"},
{id: "autoFireBall", label: "Auto Fireball (fighting)", type: "boolean", default: false},{id: "autoFight", label: "Auto Fight Grind", type: "boolean", default: false}];
function getOptimalFireSpell(){
for(let index = 1; index <= 5; index++){
const weapon = window["var_preset_weapon_"+index]; const body = window["var_preset_body_"+index];
if(weapon == 'wooden_staff' || body == 'reaper_body'){
return index;}
}
return 6;
}
const items = ["body","legs","boots","gloves","head","weapon","arrows"];
function getCurrentPreset(){
for(let index = 1; index <=5; index++){
var itemsAreSame = true;
for(const itemind in items){
var itemName = items[itemind];
if(window["var_"+itemName] != window["var_preset_"+itemName+"_"+index]){
itemsAreSame = false;
}
}
if(itemsAreSame){
return index;
}
}
return null;
}
const helpers = ["autoHarvest", "autoChop", "sendRocket", "storeFightPoints", "autoFireBall"];
(function() {
'use strict';
const websocket = window.websocket;
class AutomaterPlugin extends window.IdlePixelPlusPlugin{constructor(){super("automater", {about: {name: GM_info.script.name, version: GM_info.script.version,
author: "Ninja", description: GM_info.script.description},config:config}); this.previous = "";}
GetIfNeeded(item, amount){
if(!isInTeam()){return;}
var needed = Math.max(0, amount - (window[item] || 0));
var total = Math.min(getTeamItemCount(item), amount);
if(total > 1){
websocket.send("TEAM_TAKE_ITEM="+item+"~"+amount);}}
functions = { autoHarvest:
function autoHarvest(){
var plotsUnplanted = 3;
for (let index = 0; index <= 3; index++){
if(window["var_farm_stage_" + index] == 4){console.log("Harvesting plot #"+index+"!"); websocket.send("CLICKS_PLOT="+index); continue;}
if(window["var_farm_stage_" + index] > 0){plotsUnplanted--}
}
var seedName = window.IdlePixelPlus.plugins.automater.getConfig("autoPlantSeed").replaceAll(" ", "_");
if(window.IdlePixelPlus.plugins.automater.getConfig("autoPlant") == true && window["var_" + seedName] != null){
window.IdlePixelPlus.plugins.automater.GetIfNeeded(seedName, plotsUnplanted);
websocket.send(`PLANT_ALL=${seedName}`);}
}, autoChop:
function autoChop(){
for (let index = 0; index <= 3; index++){
if(window["var_tree_stage_" + index] == 4){console.log("Chopping tree #"+index+"!"); websocket.send("CHOP_TREE="+index)}
}
}, sendRocket:
function sendRocket(){
if(window.var_rocket_crafted == 1 && window.var_rocket_km == 0){
if(window.var_mega_rocket_crafted == 1 && window.var_sun_distance < 120000000 && window.var_rocket_fuel >= 5){websocket.send("CLICKS_ROCKET=2"); return};
if(window.var_rocket == 1 && window.var_moon_distance < 300000 && window.var_rocket_fuel >= 1){websocket.send("CLICKS_ROCKET=1"); console.log("Sending rocket to moon.."); return}
};
if(window.var_rocket_distance_required == window.var_rocket_km && window.var_rocket_km > 1){console.log("Collection Rocket loot!"); websocket.send("ROCKET_COLLECT")}
}, storeFightPoints:
function storeFightPoints(){
if(isInTeam() && window.var_fight_points > 250){console.log("Storing fight points!");
websocket.send(`TEAM_STORE_ITEM=fight_points~${window.var_fight_points}`)}
}, autoFireBall:
function autoFireBall(){
var optimal = getOptimalFireSpell()
if(window.var_fighting_area == 'none' || window.var_mana < 3 ||
!window.var_fire_spellscroll_learnt || (!window.var_magic_ring && optimal == 6) || window.var_fire_cooldown > 1){return}
var current = getCurrentPreset()
websocket.send("PRESET_LOAD="+optimal+"~1")
websocket.send("SPELL=fire")
websocket.send("PRESET_LOAD="+current+"~1")
},
}
onLogin(){
document.addEventListener("keyup", (key) => {if(key.key == "w"){this.functions.autoFireBall()}})
Modals.searchTeamStorageKeyPress = function(inputEle) {
var input = inputEle.value;
var content = document.getElementById("team-storage-box-content");
var items = content.querySelectorAll("[data-item-team-storage]")
for(var i = 0; i < items.length; i++) {
var itemValue = items[i].getAttribute("data-item-team-storage").replaceAll("_", " ");
if(itemValue.includes(input) || input.length == 0) {
items[i].style.display = "";
if(itemValue.includes("shiny") && !items[i].children[2]){const shiny = new Image
items[i].appendChild(shiny);
shiny.src = "https://cdn.idle-pixel.com/images/shiny.gif" ; shiny.style.position = 'relative'; shiny.style.left = '-80px';
}
} else {
items[i].style.display = "none";
}
}
}
const auto = setInterval(() => {for(const helper in helpers){
if(this.getConfig(helpers[helper]) == true){this.functions[helpers[helper]]()}
}}, 1000 ); window.var_animal_grinder = 0
window.var_animal_grinder_upgraded = 1
const itemsto = ["bear_fur","bat_skin","lizard_skin","feathers","fire_feathers","ice_feathers","ancient_feathers","crocodile_hide"]
const craftable = document.getElementById("modal-crafting-custom-table")
var elements
function CraftAsMany(itemname){
const icon = $("itembox[data-item="+itemname+"]")
icon[0].onclick = function(){
var modalKey = itemname
if(modalKey.endsWith("feathers")){modalKey = "arrows"}
Modals.open_custom_crafting(modalKey)
elements = craftable.getElementsByClassName("center border hover-tr")
for(var element = 0; element < elements.length; element++){
const items = {}
for(var index = 0; index < elements[1].children[3].children.length; index++){
if(elements[element].children[3].children[index].tagName == "SPAN"){
const child = elements[element].children[3].children[index]
const text = child.textContent
const item = getItemName(text.split(" X")[0].toLowerCase().replaceAll(" ","_").substr(1).replace("bear_skin","bear_fur"))
const amount = Number(text.split("X ")[1].split(" ")[0])
items[item] = amount
}
}
const png = elements[element].children[0].children[0]
const itemsrc = png.src.split("images/")[1].split(".")[0]
console.log(items, itemsrc, png.src)
elements[element].onclick = function(){Modals.open_modern_input_dialogue_with_value(
itemsrc, png.src.split("com/")[1], items, "MAX", "Craft how many?", "Craft", "CRAFT="+itemsrc
)}
}}
}
for(const index in itemsto){
CraftAsMany(itemsto[index])
}
var acstring = $(`itembox[data-item="string"]`)[0]; console.log(acstring)
acstring.onclick = function(){
Modals.open_custom_crafting("string")
const string = document.getElementById("modal-crafting-custom-table").getElementsByClassName("center border hover-tr")[0]
console.log(string)
string.onclick = function(){
Modals.open_modern_input_dialogue_with_value('bad_fishing_net', 'images/bad_fishing_net.png',
{'string':10},'MAX','Convert how much string into Bad Fishing Nets? (200 crafting xp each)', 'Craft', 'CRAFT=bad_fishing_net')}}
}
}
const plugin = new AutomaterPlugin();
window.IdlePixelPlus.registerPlugin(plugin);
})();
function FightFarm(){
var monster = "forest_ent"
window.websocket.send("DRINK_SELECT_POTION="+monster)}
const second = setInterval(() => {
var area = Combat.modal_area_last_selected
if(window.var_rare_monster_potion_timer > 0 && IdlePixelPlus.plugins.automater.getConfig("autoFight") == true){
if(window.var_monster_name == "none"){
window.websocket.send("START_FIGHT="+area)}else{
if(window.var_reflect_cooldown == 0){window.websocket.send("SPELL=reflect")}}
}}, 1000)