// ==UserScript== // @name Mr. Script Redux // @namespace https://github.com/taeram/kol-mr-script // @description Kingdom of Loathing Helper // @version 1.82 // @author Lukifer // @contributor Ohayou // @contributor Hellion // @contributor Tard // @contributor JiK4eva // @contributor BeingEaten // @contributor Picklish // @contributor CharonTheHand // @contributor Taeram // @include https://*kingdomofloathing.com/* // @require https://ajax.googleapis.com/ajax/libs/jquery/3.5.0/jquery.min.js // @updateURL https://raw.githubusercontent.com/taeram/kol-mr-script/master/MrScript.user.js // @downloadURL https://raw.githubusercontent.com/taeram/kol-mr-script/master/MrScript.user.js // @grant GM_addStyle // @grant GM_deleteValue // @grant GM_getValue // @grant GM_log // @grant GM_setValue // @grant GM_xmlhttpRequest // @unwrap // ==/UserScript== !function(e){var _={};function r(a){if(_[a])return _[a].exports;var t=_[a]={i:a,l:!1,exports:{}};return e[a].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=e,r.c=_,r.d=function(e,_,a){r.o(e,_)||Object.defineProperty(e,_,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,_){if(1&_&&(e=r(e)),8&_)return e;if(4&_&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&_&&"string"!=typeof e)for(var t in e)r.d(a,t,function(_){return e[_]}.bind(null,t));return a},r.n=function(e){var _=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(_,"a",_),_},r.o=function(e,_){return Object.prototype.hasOwnProperty.call(e,_)},r.p="",r(r.s=1)}([function(e,_){e.exports=jQuery},function(e,_,r){"use strict";r.r(_);var a=r(0),t=r.n(a);class o{static createLink(e,_){let r=document.createElement("font");t()(r).addClass("mrfont").attr("size",1).html(" "+e);let a=document.createElement("a");t()(a).addClass("mrlink").attr("href",_).attr("target","mainpane").append(r);let o=document.createElement("span");return t()(o).addClass("mrspan").append(" ").append(a),o}static GM_get(e,_,r){GM_xmlhttpRequest({method:"GET",url:"https://"+location.host+"/"+e,headers:{Referer:"http://"+location.host+"/game.php"},onerror:function(e){"function"==typeof r&&r(e)},onload:function(e){"function"==typeof _&&_(e.responseText)}})}static GM_post(e,_,r,a){GM_xmlhttpRequest({method:"POST",url:"https://"+location.host+"/"+e,headers:{Referer:"http://"+location.host+"/game.php","Content-Type":"application/x-www-form-urlencoded"},data:t.a.param(_),onerror:function(e){"function"==typeof a&&a(e)},onload:function(e){"function"==typeof r&&r(e.responseText)}})}static getSnarfblatUrl(e){return"adventure.php?snarfblat="+e}static getPlaceUrl(e){return"place.php?whichplace="+e}static getInvUseUrl(e){return"inv_use.php?pwd="+n.getHash()+"&which=3&whichitem="+e}}class n{static init(){t()("#nudges").parent().css({height:"200px"})}static getCharacter(){o.GM_get("api.php?what=status&for=MrScript",(function(e){let _=JSON.parse(e);GM_setValue("character",_)}))}static getHash(){return GM_getValue("character").pwd}static get(e){return GM_getValue("character")[e]}}class i{static maintenance(){window.setTimeout((function(){window.location.reload()}),6e4)}static reportBug(){$("body").prepend("

You currently have Greasemonkey/Tampermonkey enabled and at least 1 script active.

Before reporting a bug, please make sure that you can reproduce the issue with Greasemonkey disabled.

[click to continue]

"),$("table:first").attr("style","display:none"),$("#H_MRS_BR1").click((function(){$("table:first").attr("style","display:inline")}))}}i.inventoryTab={Consumables:1,Equipment:2,Miscellaneous:3};let s;s={_12_West_Main:475,_8_Bit_Realm:73,A_boo_Peak:296,An_Illicit_Bohemian_Party:411,An_Oasis:122,An_Octopuss_Garden:190,An_Overgrown_Shrine_Northeast:348,An_Overgrown_Shrine_Northwest:346,An_Overgrown_Shrine_Southeast:349,An_Overgrown_Shrine_Southwest:347,Ancient_Burial_Ground:431,Ancient_Hobo_Burial_Ground:171,Anemone_Mine:196,Anger_Mans_Level:301,Archwizards_Tower:524,Arid__Extra_Dry_Desert:364,Arrrboretum_On_Arrrbor_Day:174,Art_Class:329,Back_40:142,Bad_Trip:96,Bandit_Crossroads:502,Barf_Mountain:442,Barn:137,Barracks:220,Barroom_Brawl:233,Barrow_Mounds:515,Barrrneys_Barrr:157,Bat_Hole_Entrance:30,Batrat_and_Ratbat_Burrow:32,Battlefield_Frat_Warrior_Fatigues:132,Battlefield_In_Cloaca_Cola_Uniform:86,Battlefield_In_Dyspepsi_Cola_Uniform:87,Battlefield_Undisguised:85,Battlefield_War_Hippy_Fatigues:140,Beanbat_Chamber:33,Beehive:432,Belowdecks:160,Black_Forest:405,Bog:145,Boss_Bats_Lair:34,Brinier_Deepers:187,Briniest_Deepests:189,Briny_Deeps:186,Broodling_Grounds:214,Bubblin_Caldera:451,Bugbear_Pens_Post_Felonia:49,Bugbear_Pens_Pre_Felonia:47,Burnbarrel_Blvd_:168,Caliginous_Abyss:337,Camp_Logging_Camp:44,Canadian_Wildlife_Preserve:529,Castle_in_the_Clouds_in_the_Sky_Basement:322,Castle_in_the_Clouds_in_the_Sky_Ground_Floor:323,Castle_in_the_Clouds_in_the_Sky_Top_Floor:324,Cave_Before_Time:410,Center_Park_After_Dark:461,Cheerless_Spire_Level_1:497,Cheerless_Spire_Level_2:498,Cheerless_Spire_Level_3:499,Cheerless_Spire_Level_4:500,Cheerless_Spire_Level_5:501,Chemistry_Class:328,Chinatown_Shops:309,Chinatown_Tenement:314,City_of_Goooold:434,Clumsiness_Grove:277,Cobbs_Knob_Barracks:257,Cobbs_Knob_Harem:259,Cobbs_Knob_Kitchens:258,Cobbs_Knob_Treasury:260,Convention_Hall_Lobby:218,Copperhead_Club:383,Coral_Corral:199,Corpse_Bog:332,Crashed_U_F_O_:433,Crater_Full_of_Space_Beasts:409,Crimbonium_Mining_Camp:419,Crimbos_Beard:492,Crimbos_Boots:489,Crimbos_Hat:493,Crimbos_Jelly:490,Crimbos_Reindeer:491,Crimbos_Sack:488,Cursed_Village:506,Cursed_Village_Thieves_Guild:516,Daily_Dungeon:325,Dark_and_Spooky_Swamp:331,Dark_Elbow_of_the_Woods:237,Dark_Heart_of_the_Woods:238,Dark_Neck_of_the_Woods:239,Deep_Dark_Jungle:417,Deep_Machine_Tunnels:458,Defiled_Alcove:261,Defiled_Cranny:262,Defiled_Niche:263,Defiled_Nook:264,Degrassi_Knoll_Bakery:352,Degrassi_Knoll_Garage:354,Degrassi_Knoll_Gym:353,Degrassi_Knoll_Restroom:351,Deserted_Stretch_of_I_911:373,Dire_Warren:92,Dive_Bar:197,Domed_City_of_Grimacia:266,Domed_City_of_Ronaldus:265,Doubt_Mans_Level:303,Dragons_Moor:520,Dreadsylvanian_Castle:340,Dreadsylvanian_Village:339,Dreadsylvanian_Woods:338,Dripping_Trees:542,Druidic_Campsite:512,Drunken_Stupor:23,Duke_Vampires_Chateau:521,Dungeons_of_Doom:39,Eager_Rice_Burrows:371,Edge_of_the_Swamp:330,Electric_Lemonade_Acid_Parade:232,Engineering:287,Enormous_Greater_Than_Sign:226,Evil_Cathedral:514,Exploaded_Battlefield:533,Exposure_Esplanade:169,eXtreme_Slope:273,Faerie_Cyrkle:511,Family_Plot:146,Fcle:158,Fear_Mans_Level:302,Feeding_Chamber:128,Floor_1:311,Floor_2:312,Floor_3:313,Foreboding_Cave:510,Frat_House_Bombed_Back_to_the_Stone_Age:150,Fun_Guy_Mansion:402,Fun_House:20,Fungal_Nethers:452,Galley:289,GameInformPowerDailyPro_Dungeon_Level_1:319,GameInformPowerDailyPro_Dungeon_Level_2:320,GameInformPowerDailyPro_Dungeon_Level_3:321,Ghoul_Kings_Catacomb:526,Gingerbread_Civic_Center:477,Gingerbread_Industrial_Zone:479,Gingerbread_Reef:536,Gingerbread_Sewers:481,Gingerbread_Train_Station:478,Gingerbread_Upscale_Retail_District:480,Glacier_of_Jerks:279,Globe_Theatre_Backstage:454,Globe_Theatre_Main_Stage:453,Goatlet:271,Gotpork_City_Sewers:467,Gotpork_Clock__Inc_:470,Gotpork_Conservatory_of_Flowers:464,Gotpork_Foundry:471,Gotpork_Gardens_Cemetery:466,Gotpork_Municipal_Reservoir:465,Gourd:316,Granary:144,Great_Trip:97,Grocery_Bag:307,Guano_Junction:31,Guards_Chamber:129,Gumdrop_Forest:372,Haiku_Dungeon:138,Hallowed_Halls:326,Hamburglaris_Shield_Generator:267,Hatching_Chamber:127,Haunted_Ballroom:395,Haunted_Bathroom:392,Haunted_Bedroom:393,Haunted_Billiards_Room:391,Haunted_Boiler_Room:399,Haunted_Conservatory:389,Haunted_Gallery:394,Haunted_Kitchen:388,Haunted_Laboratory:396,Haunted_Laundry_Room:400,Haunted_Library:390,Haunted_Nursery:397,Haunted_Pantry:113,Haunted_Storage_Room:398,Haunted_Wine_Cellar:401,Heap:170,Heartbreakers_Hotel:148,Hell:428,Hidden_Apartment_Building:341,Hidden_Bowling_Alley:344,Hidden_Hospital:342,Hidden_Office_Building:343,Hidden_Park:345,Hidden_Temple:280,Hippy_Camp_Bombed_Back_to_the_Stone_Age:149,Hippy_Camp_In_Disguise:65,Hippy_Camp_Undisguised:26,Hippy_Camp_Verge_of_War_In_Filthy_Hippy_Disguise_or_War_Hippy_Fatigues__or_undisguised:133,Hippy_Camp_Verge_of_War_In_Frat_Boy_Ensemble_or_Frat_Warrior_Fatigues:131,Hobopolis_Town_Square:167,Hole_in_the_Sky:83,Huge_A_Ma_Tron:228,Ice_Caves:426,Ice_Hole:457,Ice_Hotel:455,Icy_Peak:110,Impenetrable_Kelp_Holly_Forest:538,Infernal_Rackets_Backstage:243,Inner_Wolf_Gym:369,Inside_the_Palindome:386,Invader:534,Investigating_a_Plaintive_Telegram:474,Itznotyerzitz_Mine:270,JokesterCo:473,Jungle:425,Jungles_of_Ancient_Loathing:205,Junkyard_Post_War:154,Kegger_in_the_Woods:231,Kitchen_Drawer:306,Knob_Shaft:101,Kokomo_Resort:446,KoL_Con_Clan_Party_House:476,Laboratory:50,Labyrinthine_Crypt:518,Lair_of_the_Ninja_Snowmen:272,Lair_of_the_Phoenix:519,Landscapers_Lair:224,Large_Chamber:213,Laugh_Floor:242,LavaCo_Lamp_Factory:450,Ley_Nexus:525,Limerick_Dungeon:19,LOLmecs_Lair:435,Madness_Bakery:440,Madness_Reef:194,Maelstrom_of_Lovers:278,Mansion_of_Dr_Weirdeaux:415,Marinara_Trench:195,Massive_Ziggurat:350,Master_Thiefs_Chalet:522,Maze_of_Sewer_Tunnels:166,McMillicancuddys_Farm_Post_War:155,Mean_Streets:462,Medbay:281,Mediocre_Trip:98,Menagerie_Level_1:51,Menagerie_Level_2:52,Menagerie_Level_3:53,Mer_kin_Colosseum:210,Mer_kin_Elementary_School:207,Mer_kin_Gymnasium:209,Mer_kin_Library:208,Mer_Kin_Outpost:198,Middle_Chamber:407,Mine_Foremens_Office:176,Mines:424,Mob_of_Zeppelin_Protesters:384,Monorail_Station:508,Monorail_Work_Site:496,Moonshiners_Woods:412,Morgue:285,Mouldering_Mansion:152,Mt_Molehill:177,Mystic_Wood:504,Navigation_Bugbear_Mothership:288,Near_an_Abandoned_Refrigerator:183,Near_the_Witchs_House:513,Neckback_Crick:236,Nemesis_Lair:221,Neverending_Party:528,Next_to_that_Barrel_with_Something_Burning_in_it:182,Nightmare_Meatrealm:305,Noob_Cave:240,Obligatory_Pirates_Cove:66,Ogre_Chieftains_Keep:527,Oil_Peak:298,Old_Gotpork_Library:469,Old_Landfill:356,Old_Mans_Bathtime_Adventure:318,Old_Rubee_Mine:509,Orcish_Frat_House_In_Disguise:29,Orcish_Frat_House_Undisguised:27,Orcish_Frat_House_Verge_of_War_In_Filthy_Hippy_Disguise_or_War_Hippy_Fatigues:134,Orcish_Frat_House_Verge_of_War_In_Frat_Boy_Ensemble_or_Frat_Warrior_Fatigues__or_undisguised:135,Other_Back_40:143,Out_By_that_Rusted_Out_Car:185,Outer_Compound:215,Outside_the_Club:219,Outskirts_of_Camp_Logging_Camp:43,Outskirts_of_Cobbs_Knob:114,Over_Where_the_Old_Tires_Are:184,Overgrown_Lot:441,Pandamonium:438,Pandamonium_Slums:248,Penultimate_Fantasy_Airship:81,PirateRealm_Island:531,Pirates_of_the_Garbage_Barges:443,Poker_Room:71,Pond:141,Poop_Deck:159,Porkham_Asylum:468,Portal_to_Horrible_Parents:381,Post_Mall:418,Primordial_Soup:204,Princes_Ball_At_the_Canapes_Table:379,Princes_Ball_In_the_Restroom:374,Princes_Ball_On_the_Balcony:377,Princes_Ball_On_the_Dance_Floor:375,Princes_Ball_The_Kitchen:376,Princes_Ball_The_Lounge:378,Purple_Light_District:172,Putrid_Swamp:505,Queens_Chamber:130,Red_Queens_Garden:225,Red_Zeppelin:385,Regret_Mans_Level:304,Road_to_the_White_Citadel:413,Rogue_Windmill:153,Roman_Forum:414,Roulette_Tables:70,Rowdy_Saloon:422,Ruined_Wizard_Tower:333,Ruins_of_the_Fully_Automated_Crimbo_Factory:459,Rumble_Near_the_Fountain_Ice_Skate_Territory_Roller_Skate_Territory:188,Rumpelstiltskins_Workshop:382,Sailing_the_PirateRealm_Seas:530,Science_Lab:284,Seaside_Megalopolis:206,Secret_Council_Warehouse:437,Secret_Government_Laboratory:416,Shady_Thicket:147,Shimmering_Portal:164,Shop_Class:327,Shore__Inc_Travel_Agency:355,Skeleton_Store:439,Sleazy_Back_Alley:112,Slime_Tube:203,Sloppy_Seconds_Diner:403,Small_O_Fier:227,SMOOCH_Army_HQ:448,Smut_Orc_Logging_Camp:295,Snake_Pit:429,Some_Scattered_Smoking_Debris:408,Sonar:283,Sonofa_Beach:136,South_of_The_Border:45,Special_Ops:286,Spectral_Pickle_Factory:37,Spider_Hole:430,Spider_Queens_Lair:523,Spooky_Forest:15,Spooky_Gravy_Burrow:48,Spooky_Old_Abandoned_Mine:423,Sprawling_Cemetery:507,St_Sneaky_Petes_Day_Stupor_On_St_Sneaky_Petes_Day:84,Stately_Pleasure_Dome:151,Sunken_Party_Yacht:404,Super_Villains_Lair:495,Swamp_Beaver_Territory:335,Sweet_Ade_Lake:370,Swim_in_the_Fountain_On_Generic_Summer_Holiday:173,Temple_Portico:217,Temple_Ruins:427,Themthar_Hills:126,Thinknerd_Warehouse:387,Through_the_Spacegate:494,Thugnderdome:46,Tower_of_Procedurally_Generated_Skeletons:317,Tower_Ruins:22,Towering_Mountains:503,Toxic_Teacups:444,Triad_Factory:310,Trivial_Pursuits__LLC:472,Troll_Fortress:517,Twin_Peak:297,Uncle_Gators_Country_Fun_Time_Liquid_Waste_Sluice:445,Unquiet_Garves:21,Upper_Chamber:406,Valley_of_Rof_Lm_Fao:80,Vanyas_Castle_Chapel:230,Vanyas_Castle_Foyer:229,Velvet_Gold_Mine:449,VERY_Unquiet_Garves:58,VYKEA:456,Warehouse_Row:463,Waste_Processing:282,Weird_Swamp_Village:336,Whiteys_Grove:100,Wildlife_Sanctuarrrrrgh:334,Wreck_of_the_Edgar_Fitzsimmons:191,Wreck_of_the_H_M_S_Kringle:537,X_32_F_Combat_Training_Snowman:460,Ye_Olde_Medievale_Villagee:380,Yomamas_Throne:436,Your_Bung_Chakra:482,Your_Guts_Chakra:483,Your_Hat_Chakra:487,Your_Liver_Chakra:484,Your_Nipple_Chakra:485,Your_Nose_Chakra:486,Yuletide_Bonfire_On_Yuletide:163};let l=location.pathname.replace(/\/|\.(php|html)$/gi,"").toLowerCase();if("place"===l){let e=location.search.match(/whichplace=([0-9a-zA-Z_\-]*)/);e&&e.length>1&&(l=e[1])}switch(l){case"adminmail":i.reportBug();break;case"charpane":n.init();break;case"main":n.getCharacter(),class{static init(){t()('tr:contains("Noob."):eq(1)').append(o.createLink("[Toot]","tutorial.php?action=toot")),t()('tr:contains("responded to a trade offer"):eq(1)').append(o.createLink("[trade]","makeoffer.php")),t()('tr:contains("new announcement"):eq(1)').append(o.createLink("[go read it]","clan_hall.php"))}}.init();break;case"maint":i.maintenance();break;case"town_wrong":(class{static wrongSideOfTheTracks(){-1!=document.location.search.indexOf("artist")&&t()("p").each((function(){let e=t()(this),_=e.text();-1!==_.indexOf("Knob Goblin")&&e.append(o.createLink("[Knob outskirts (1)]",o.getSnarfblatUrl(s.Outskirts_of_Cobbs_Knob))),-1!==_.indexOf("Haunted Pantry")&&e.append(o.createLink("[Pantry (1)]",o.getSnarfblatUrl(s.Haunted_Pantry))),-1!==_.indexOf("Back Alley")&&e.append(o.createLink("[Alley (1)]",o.getSnarfblatUrl(s.Sleazy_Back_Alley)))}))}}).wrongSideOfTheTracks()}GM_addStyle("@-moz-keyframes nodeInserted { from { clip: rect(1px,auto,auto,auto) } to { clip: rect(0px,auto,auto,auto) } }"),GM_addStyle("center > center > table > tbody > tr > td > b { animation-duration: 0.001s;animation-name: nodeInserted;}")}]);