// ==UserScript==
// @name pokerogue hack
// @name:en pokerogue hack
// @name:ja pokerogue ハッキング
// @name:zh pokerogue 黑客
// @name:ko pokerogue 해킹
// @namespace http://tampermonkey.net/
// @version 2024-09-09
// @description If you set isTrue to true, you can hack it.
// @description:en If you set isTrue to true, you can hack it.
// @description:ja isTrueをtrueにすればハッキングできます
// @description:zh 如果将 isTrue 设置为 true,你可以破解它
// @description:ko isTrue를 true로 설정하면 해킹할 수 있습니다.
// @author ぐらんぴ
// @match https://pokerogue.net/
// @icon https://www.google.com/s2/favicons?sz=64&domain=pokerogue.net
// @run-at document-start
// @license MIT
// ==/UserScript==
// hacks1
let money = { isTrue: true, value: 20000 };
let eggVoucher = { isTrue: false, value: { 0: 0, 1: 0, 2: 0, 3: 100 /*GoldEggVoucher*/} };
let pokeball = { isTrue: true, value: { 0: 0, 1: 0, 2: 0, 3: 0, 4: 10 /*MasterBall*/} };
let waveIndex = { isTrue: false, value: 199 };
let gender = { isTrue: false, value: 1}; // male is value: 1, female is value: 2
// hacks2
let partyLevel = { isTrue: false, value: [{ level: 100 }] };
let partyShiny = { isTrue: false, value: [{ shiny: true }] };
let partyLuck = { isTrue: true, value: [{ luck: 14 }] };// 0 - 14
// let partyHp = { isTrue: true, value: [{ hp: 15 }] }; // didnt work
// let partyStats = { isTrue: true, value: [{ stats: { 0: 15, 1: 10, 2: 10, 3: 10, 4: 10 , 5: 10,} }] }; // didnt work
// hacks3
let enemyParty = { isTrue: false, value: [{ level: 100 }] };
let enemyShiny = { isTrue: true, value: [{ shiny: true }] };
let enemyBoss = { isTrue: true, value: [{ boss: true }] };
///-----------------------------///
const hacks1 = [
{ key: 'money', data: money },
{ key: 'voucherCounts', data: eggVoucher },
{ key: 'pokeballCounts', data: pokeball },
{ key: 'waveIndex', data: waveIndex },
];
const hacks2 = [
{ key: 'level', data: partyLevel },
{ key: 'shiny', data: partyShiny },
{ key: 'luck', data: partyLuck },
// { key: 'hp', data: partyHp },
// { key: 'stats', data: partyStats },
];
const hacks3 = [
{ key: 'level', data: enemyParty },
{ key: 'shiny', data: enemyShiny },
{ key: 'boss', data: enemyBoss },
];
(()=>{
const originalConsoleDebug = unsafeWindow.console.debug;
unsafeWindow.console.debug = function(...args){
console.log('Captured console.debug:', ...args);
///-----------------------------///
hacks1.forEach(hack =>{
args.forEach(arg =>{
if(arg && arg[hack.key] !== undefined && hack.data.isTrue){
arg[hack.key] = hack.data.value;
// console.log(arg[hack.key]);
}
})
});
///-----------------------------///
hacks2.forEach(hack =>{
args.forEach(arg =>{
if(arg && arg.party !== undefined && Array.isArray(arg.party) && hack.data.isTrue){
arg.party[0][hack.key] = hack.data.value[0][hack.key];
// console.log(arg.party[0][hack.key]);
}
})
});
hacks3.forEach(hack =>{
args.forEach(arg =>{
if(arg && arg.enemyParty !== undefined && Array.isArray(arg.enemyParty) && hack.data.isTrue){
arg.enemyParty[0][hack.key] = hack.data.value[0][hack.key];
// console.log(arg.enemyParty[0][hack.key]);
}
})
});
}
})();
/* unlock all pokemon, (This script works but may be insecure.)
let newDexData = {seenAttr: 479n, caughtAttr: 255n, natureAttr: 100, seenCount: 50,
caughtCount: 50, hatchedCount: 50, ivs: [31, 31, 31, 31, 31, 31]};
const pokemons = [1, 4, 7, 10, 13, 16, 19, 21, 23, 25, 27, 29, 32, 35, 37, 39, 41, 43, 46, 48, 50, 52, 54, 56, 58, 60, 63, 66, 69, 72, 74, 77, 79, 81, 83, 84, 86, 88, 90, 92, 95, 96, 98, 100, 102, 104, 106, 107, 108, 109, 111, 113, 114, 115, 116, 118, 120, 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 137, 138, 140, 142, 143, 144, 145, 146, 147, 150, 151, 152, 155, 158, 161, 163, 165, 167, 170, 172, 173, 174, 175, 177, 179, 183, 185, 187, 190, 191, 193, 194, 198, 200, 201, 202, 203, 204, 206, 207, 209, 211, 213, 214, 215, 216, 218, 220, 222, 223, 225, 226, 227, 228, 231, 234, 235, 236, 238, 239, 240, 241, 243, 244, 245, 246, 249, 250, 251, 252, 255, 258, 261, 263, 265, 270, 273, 276, 278, 280, 283, 285, 287, 290, 293, 296, 298, 299, 300, 302, 303, 304, 307, 309, 311, 312, 313, 314, 315, 316, 318, 320, 322, 324, 325, 327, 328, 331, 333, 335, 336, 337, 338, 339, 341, 343, 345, 347, 349, 351, 352, 353, 355, 357, 358, 359, 360, 361, 363, 366, 369, 370, 371, 374, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 390, 393, 396, 399, 401, 403, 406, 408, 410, 412, 415, 417, 418, 420, 422, 425, 427, 431, 433, 434, 436, 438, 439, 440, 441, 442, 443, 446, 447, 449, 451, 453, 455, 456, 458, 459, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 498, 501, 504, 506, 509, 511, 513, 515, 517, 519, 522, 524, 527, 529, 531, 532, 535, 538, 539, 540, 543, 546, 548, 550, 551, 554, 556, 557, 559, 561, 562, 564, 566, 568, 570, 572, 574, 577, 580, 582, 585, 587, 588, 590, 592, 594, 595, 597, 599, 602, 605, 607, 610, 613, 615, 616, 618, 619, 621, 622, 624, 626, 627, 629, 631, 632, 633, 636, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 653, 656, 659, 661, 664, 667, 669, 672, 674, 676, 677, 679, 682, 684, 686, 688, 690, 692, 694, 696, 698, 701, 702, 703, 704, 707, 708, 710, 712, 714, 716, 717, 718, 719, 720, 721, 722, 725, 728, 731, 734, 736, 739, 741, 742, 744, 746, 747, 749, 751, 753, 755, 757, 759, 761, 764, 765, 766, 767, 769, 771, 772, 774, 775, 776, 777, 778, 779, 780, 781, 782, 785, 786, 787, 788, 789, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 805, 806, 807, 808, 810, 813, 816, 819, 821, 824, 827, 829, 831, 833, 835, 837, 840, 843, 845, 846, 848, 850, 852, 854, 856, 859, 868, 870, 871, 872, 874, 875, 876, 877, 878, 880, 881, 882, 883, 884, 885, 888, 889, 890, 891, 893, 894, 895, 896, 897, 898, 905, 906, 909, 912, 915, 917, 919, 921, 924, 926, 928, 931, 932, 935, 938, 940, 942, 944, 946, 948, 950, 951, 953, 955, 957, 960, 962, 963, 965, 967, 968, 969, 971, 973, 974, 976, 977, 978, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 999, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1012, 1014, 1015, 1016, 1017, 1020, 1021, 1022, 1023, 1024, 1025, 2670, 2019, 2027, 2037, 2050, 2052, 2074, 2088, 4052, 4077, 4079, 4083, 4122, 4144, 4145, 4146, 4222, 4263, 4554, 4562, 4618, 6058, 6100, 6211, 6215, 6570, 8128, 8194, 8901];
(()=>{
const originalConsoleDebug = unsafeWindow.console.debug;
unsafeWindow.console.debug = function(...args){
// console.log('Captured console.debug:', ...args);
args.forEach(arg =>{
if(arg && arg.dexData !== undefined){
pokemons.forEach(index => {
arg.dexData[index] = newDexData;
});
// console.log(arg.dexData);
}
});
}
})();
/*
"gameStats":{
"playTime":0,
"battles":0,
"classicSessionsPlayed":0,
"sessionsWon":0,
"ribbonsOwned":0,
"dailyRunSessionsPlayed":0,
"dailyRunSessionsWon":0,
"endlessSessionsPlayed":0,
"highestEndlessWave":0,
"highestLevel":0,
"highestMoney":0,
"highestDamage":0,
"highestHeal":0,
"pokemonSeen":0,
"pokemonDefeated":0,
"pokemonCaught":0,
"pokemonHatched":0,
"subLegendaryPokemonSeen":0,
"subLegendaryPokemonCaught":0,
"subLegendaryPokemonHatched":0,
"legendaryPokemonSeen":0,
"legendaryPokemonCaught":0,
"legendaryPokemonHatched":0,
"mythicalPokemonSeen":0,
"mythicalPokemonCaught":0,
"mythicalPokemonHatched":0,
"shinyPokemonSeen":0,
"shinyPokemonCaught":0,
"shinyPokemonHatched":0,
"pokemonFused":0,
"trainersDefeated":0,
"eggsPulled":0,
"rareEggsPulled":0,
"epicEggsPulled":0,
"legendaryEggsPulled":0,
"manaphyEggsPulled":0},
"unlocks":{"0":true,"1":true,"2":false,"3":true},
"achvUnlocks":{"CLASSIC_VICTORY":0,
"HATCH_SHINY":0,
"LV_100":0,
"PERFECT_IVS":0,
"UNEVOLVED_CLASSIC_VICTORY":0,
"_100K_MONEY":0,
"_10K_MONEY":0},
"voucherUnlocks":{"CLASSIC_VICTORY":0},
"voucherCounts":{"0":0,"1":0,"2":0,"3":0},
"eggs":
[
{
"id":0,
"tier":2,
"sourceType":1,
"hatchWaves":0,
"timestamp":0,
"variantTier":0,
"isShiny":false,
"species":0,
"eggMoveIndex":0,
"overrideHiddenAbility":false
},
{
"id":0,
"tier":2,
"sourceType":1,
"hatchWaves":0,
"timestamp":0,
"variantTier":0,
"isShiny":false,
"species":0,
"eggMoveIndex":0,
"overrideHiddenAbility":false
},
{
"id":0,
"tier":2,
"sourceType":1,
"hatchWaves":0,
"timestamp":0,
"variantTier":0,
"isShiny":false,
"species":0,
"eggMoveIndex":0,
"overrideHiddenAbility":false
}
],
"gameVersion":"1.0.4",
"timestamp":0,
"eggPity":[0,0,0,0],
"unlockPity":[0,0,0,0]}
/*
{
"seed": "",
"playTime": 0,
"gameMode": 0,
"party": [
{
"id": 0,
"player": true,
"species": 1,
"formIndex": 0,
"abilityIndex": 0,
"shiny": false,
"variant": 0,
"pokeball": 0,
"level": 5,
"exp": 128,
"levelExp": 0,
"gender": 0,
"hp": 20,
"stats": [
20,
10,
10,
12,
12,
10
],
"ivs": [
10,
10,
10,
10,
10,
10
],
"nature": 6,
"natureOverride": -1,
"friendship": 50,
"metLevel": 5,
"metBiome": -1,
"metSpecies": 1,
"luck": 0,
"pauseEvolutions": false,
"pokerus": false,
"fusionLuck": 0,
"boss": false,
"moveset": [
{
"moveId": 33,
"ppUsed": 0,
"ppUp": 0,
"virtual": false
},
{
"moveId": 45,
"ppUsed": 0,
"ppUp": 0,
"virtual": false
},
{
"moveId": 22,
"ppUsed": 0,
"ppUp": 0,
"virtual": false
}
],
"status": null,
"summonData": {
"battleStats": [
0,
0,
0,
0,
0,
0,
0
],
"moveQueue": [],
"disabledMove": 0,
"disabledTurns": 0,
"tags": [],
"abilitySuppressed": false,
"abilitiesApplied": [],
"ability": 0,
"types": []
}
}
],
"enemyParty": [
{
"id": 0,
"player": false,
"species": 0,
"formIndex": 0,
"abilityIndex": 0,
"shiny": false,
"variant": 0,
"pokeball": 0,
"level": 2,
"exp": 8,
"levelExp": 0,
"gender": 0,
"hp": 13,
"stats": [
13,
7,
4,
9,
7,
9
],
"ivs": [
31,
20,
18,
20,
24,
28
],
"nature": 1,
"natureOverride": -1,
"friendship": 50,
"metLevel": 2,
"metBiome": 0,
"metSpecies": 63,
"luck": 0,
"pauseEvolutions": false,
"pokerus": false,
"fusionLuck": 0,
"boss": false,
"moveset": [
{
"moveId": 93,
"ppUsed": 0,
"ppUp": 0,
"virtual": false
},
{
"moveId": 100,
"ppUsed": 0,
"ppUp": 0,
"virtual": false
}
],
"status": null,
"summonData": {
"battleStats": [
0,
0,
0,
0,
0,
0,
0
],
"moveQueue": [],
"disabledMove": 0,
"disabledTurns": 0,
"tags": [],
"abilitySuppressed": false,
"abilitiesApplied": [],
"ability": 0,
"types": []
}
}
],
"modifiers": [],
"enemyModifiers": [],
"arena": {
"biome": 0,
"weather": null,
"terrain": null,
"tags": []
},
"pokeballCounts": {
"0": 5,
"1": 0,
"2": 0,
"3": 0,
"4": 0
},
"money": 1000,
"score": 0,
"victoryCount": 0,
"faintCount": 0,
"reviveCount": 0,
"waveIndex": 1,
"battleType": 0,
"trainer": null,
"gameVersion": "1.0.4",
"timestamp": 0,
"challenges": []
}
*/