Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Please read the forum rules before posting.



Check if you are posting in the correct category.



The Off Topic section is not meant for discussing Cookie Clicker.

IGM bookmarklets/scripts

12346

Comments

  • szczepakszczepak Member Posts: 23 ✭✭
    edited January 2015
    Well... now nothing happens for me when I click it.

    But keep trying, I know You can do it! :D
  • DashivaDashiva Member Posts: 12 ✭✭

    What does unexpected end of input mean?

    It usually means you have a missing quote mark / brace / bracket / parenthesis. The parser knows these come in pairs, so it complains if the program finishes before seeing the second of a pair.
    "Don't worry, the Universe IS out to get you."
  • [Deleted User][Deleted User] Posts: 4,218
    edited April 18
    gouchnox said:
    Erm..
    function s(a){document.styleSheets[0].insertRule(a)};s('#upgrades{display:flex;flex-wrap:wrap;justify-content:center}');s('.notbought{order:1;width:81%}');s('.bought{order:2}')
    This function is not working anymore some reason...
    And since I'm stupid, I don't know how to fix it....
    Yeah.

    Sorry for not responding earlier since I forgot to check this thread. :p
    This should work instead:
    customstyles = document.createElement('style')
    customstyles.type = 'text/css';
    document.head.appendChild(customstyles)
    function s(a){
    customstyles.innerHTML +=a;
    }
    Then just use the function s as you did before. That other method can give permission errors.
    Post edited by Chisako on
    I had a dream my life would be
    So different from this hell I'm living
    So different now, from what it seemed
    Now life has killed the dream I dreamed
  • GouchnoxGouchnox Member, Friendly, Cool, Conversationalist Posts: 6,496 ✭✭✭✭✭✭
    Zyzzyzus said:

    Sorry for not responding earlier since I forgot to check this thread. :p
    This should work instead:
    customstyles = document.createElement('style') customstyles.type = 'text/css'; document.head.appendChild(customstyles) function s(a){ customstyles.innerHTML +=a; }
    Then just use the function s as you did before. That other method can give permission errors.

    TypeError: Not enough arguments to CSSStyleSheet.insertRule.
    Either I'm stupid and not understanding or I'm stupid and not understanding.
    image Packs: (CC ~ MC ~ BoI ~ DNF) image
  • [Deleted User][Deleted User] Posts: 4,218
    edited April 18
    gouchnox said:
    TypeError: Not enough arguments to CSSStyleSheet.insertRule.
    Either I'm stupid and not understanding or I'm stupid and not understanding.

    You don't need 'insertrule'. Just use s('#upgrades{display:flex;flex-wrap:wrap;justify-content:center}');s('.notbought{order:1;width:81%}');s('.bought{order:2}' after the code I gave. It worked for me when I tested it.

    I should have made it clear to replace function s(a){document.styleSheets[0].insertRule(a)}with the code I gave. :p
    Post edited by Chisako on
    I had a dream my life would be
    So different from this hell I'm living
    So different now, from what it seemed
    Now life has killed the dream I dreamed
  • GouchnoxGouchnox Member, Friendly, Cool, Conversationalist Posts: 6,496 ✭✭✭✭✭✭
    Thanks ^^
    image Packs: (CC ~ MC ~ BoI ~ DNF) image
  • [Deleted User][Deleted User] Posts: 4,218
    edited April 18
    This comes with a warning since it needs testing but it is an updated version of multibuy. To buy 10/100/1000 use shift/ctrl/z+click (same as when you buy 1) respectively. It doesn't have sell all yet. I need to be sure this works correctly first.

    var buyamount = 1
    document.body.onkeydown = function(e){
    switch(e.key){
    case 'Shift':
    buyamount = 10;
    break;
    case 'Control':
    buyamount = 100;
    break;
    case 'z':
    buyamount = 1000;
    break
    default:
    buyamount = 1;
    break
    }}
    document.body.onkeyup = function()
    {
    buyamount = 1;
    }
    document.body.onfocus = function()
    {
    buyamount = 1;
    }
    for(i in Game.buildings)
    {
    with(Game.buildings[i])
    {
    if(!Game.buildings[i].buybuilding)
    {
    Game.buildings[i].buybuilding = Buy
    Game.buildings[i].Buy = function()
    {
    for(j=0;j
    Post edited by Chisako on
    I had a dream my life would be
    So different from this hell I'm living
    So different now, from what it seemed
    Now life has killed the dream I dreamed
  • 1234abcdcba43211234abcdcba4321 Member, Friendly, Flagger, Conversationalist Posts: 9,714 ✭✭✭✭✭
    javascript:with(document)(head.appendChild(createElement('script')).src='http://pastebin.com/raw.php?i=RTUFWdBa')._

    I did a thing.
    >Below a million, use the normal beautify script.
    >Above a million, use short numbers with sandcastle builder SI.
    >At infinity, display infinity.
  • ReepileReepile Member Posts: 1,703 ✭✭✭✭
    Sorry to bump, but, this saved my ar- tush..
    ...se
    whats wrongwith me
  • IdlerIdler Member, Wiener, Double Wiener Posts: 3,235 ✭✭✭✭✭
    Re-bumping this thread, pardon the necrobump but I want more script.
    "Banned for not putting your quote to signature." - Tellurium
  • MyloMylo Member Posts: 50 ✭✭
    Game.PopNumber = function(el, text) {} //else it goes crazy.
    var autoclicker = function(clicksatonce,clickinterval)
    {
     autoclick = function()
     {
      for(j in  Object.keys(Game.clickables))
      {
       with(Game.clickables[Object.keys(Game.clickables)[j]])
       if(visible)
        {
         for(i=0;i<clicksatonce;i++)
         {
          Click()
      }}}}
    return setInterval(autoclick,clickinterval)
    }
    autoclicker(100,1)
  • CalamityCalamity Member, Friendly Posts: 15,093 ✭✭✭✭✭
    Thats a auto clicker correct?


  • LucidCruxLucidCrux Member Posts: 8
    edited September 2015
    I rewrote, added, updated, and linked to a couple existing scripts. It sits on pastebin at:
    gT4wVsFY (first post, so can't post the full link)

    It includes:
    -Number Formatting
    About 25 suffixs, if you want more, you can add em easily
    -Removal of unneeded income indicators
    -Multibuy/sell
    This is by keypress+click: shift-10, ctrl-25, z-100, x-10000(effectively max)
    I haven't gotten to test selling, but there _should_ be a confirm box for multisell
    I may eventually modify cost indicators when a key is pressed.
    -Reset Safety Check
    -Import/Export Save
    -Hide/Show Upgrades
    -Autoclick (only 5/s on one clickable, if you want it more cheaty, edit it yourself)

    =Copied/Linked=
    -IGM Achivement/Upgrade Counter
    -IGM Close Popups (close all popups)

    Everything should hopefully be nice and cleanly formatted so things are easy to find.

    If there is something else you think I should add or you find errors, let me know. I did a lot of testing, but it's always possible. Also, if you were the author of one of the copied/linked scripts and want me to just do an append instead of full text copy, let me know.

    edit: doubt it was used yet, but fixed a little bug with multibuy getting stuck on high numbers.
    Post edited by LucidCrux on
  • TheManStacheTheManStache Member Posts: 55 ✭✭
    LucidCrux said:

    I rewrote, added, updated, and linked to a couple existing scripts. It sits on pastebin at:
    gT4wVsFY (first post, so can't post the full link)

    It includes:
    -Number Formatting
    About 25 suffixs, if you want more, you can add em easily
    -Removal of unneeded income indicators
    -Multibuy/sell
    This is by keypress+click: shift-10, ctrl-25, z-100, x-10000(effectively max)
    I haven't gotten to test selling, but there _should_ be a confirm box for multisell
    I may eventually modify cost indicators when a key is pressed.
    -Reset Safety Check
    -Import/Export Save
    -Hide/Show Upgrades
    -Autoclick (only 5/s on one clickable, if you want it more cheaty, edit it yourself)

    =Copied/Linked=
    -IGM Achivement/Upgrade Counter
    -IGM Close Popups (close all popups)

    Everything should hopefully be nice and cleanly formatted so things are easy to find.

    If there is something else you think I should add or you find errors, let me know. I did a lot of testing, but it's always possible. Also, if you were the author of one of the copied/linked scripts and want me to just do an append instead of full text copy, let me know.

    edit: doubt it was used yet, but fixed a little bug with multibuy getting stuck on high numbers.

    This is incredibly useful, thank you so much bro
  • LucidCruxLucidCrux Member Posts: 8
    edited September 2015
    I went ahead and added in a tooltip fix to try to keep the tooltips on screen. It is a little crude, so might not work with all modified tooltips styles, but it's better than nothing.

    Also, selling has been tested and multi sell does work and has a confirmation box to prevent accidental clicks.

    (Again it is on pastebin / gT4wVsFY (no spaces) in case this is bumped to the next page)

    And you are welcome themanstache. :)

    edit: Also added a Pop Number toggle (the numbers when you click a clickable)

    edit again: My Pop Number thing broke autoclick, but I have now fixed it. Might have to do a forced refresh of
    pastebin.com / raw.php?i=gT4wVsFY (remove spaces around /)
    to get it working.
    Post edited by LucidCrux on
  • LucidCruxLucidCrux Member Posts: 8
    Updated the script again. Added a refresh to the autoclick list when you click to turn it on or off. Also limited its width so it doesn't get ridiculous and make things inaccessible.
  • CalamityCalamity Member, Friendly Posts: 15,093 ✭✭✭✭✭
    nice update can you make a script to show the amount of pastebin views somewhere in game like at the top somewhere ?


  • LucidCruxLucidCrux Member Posts: 8
    Cookie said:

    nice update can you make a script to show the amount of pastebin views somewhere in game like at the top somewhere ?

    Probably not. I have no clue what would be required and don't want to put in the research time. On top of that, a number of IGM games don't even use pastebin. So, yeah, not really useful enough to spend time on to figure out.
  • [Deleted User][Deleted User] Posts: 4,218
    edited September 2015
    The user and all related content has been deleted.
    I had a dream my life would be
    So different from this hell I'm living
    So different now, from what it seemed
    Now life has killed the dream I dreamed
  • LucidCruxLucidCrux Member Posts: 8
    edited September 2015
    Just a tiny update. I got past the suffix list in a game and realized the numbers weren't staying short like I expected. So, really big numbers should now stay a bit more pretty as #.###e+# instead of huge decimals. They still go in groups of three as well, so UnV then e+69, e+72, e+75 etc.

    If anyone notices weirdness with it, let me know. I didn't test much as it should be a simple change.

    edit: Actually, I went ahead and changed it again. The e's go up every digit now, so e+69, e+70, e+71. I decided I didn't like going up 3 at a time in e notation. The 3 at a time is still there, but commented out if you want to make a copy and use that instead.
    Post edited by LucidCrux on
  • 1234abcdcba43211234abcdcba4321 Member, Friendly, Flagger, Conversationalist Posts: 9,714 ✭✭✭✭✭
    LucidCrux said:

    Just a tiny update. I got past the suffix list in a game and realized the numbers weren't staying short like I expected. So, really big numbers should now stay a bit more pretty as #.###e+# instead of huge decimals. They still go in groups of three as well, so UnV then e+69, e+72, e+75 etc.

    If anyone notices weirdness with it, let me know. I didn't test much as it should be a simple change.

    edit: Actually, I went ahead and changed it again. The e's go up every digit now, so e+69, e+70, e+71. I decided I didn't like going up 3 at a time in e notation. The 3 at a time is still there, but commented out if you want to make a copy and use that instead.

    Why not just kep going up until uncentillions (e306)?
  • LucidCruxLucidCrux Member Posts: 8


    Why not just kep going up until uncentillions (e306)?

    If you mean add all the suffixes to the list, it is just a preference thing. After a point I find them more of an annoyance and prefer simple e notation. If that is what you like though, you are more than welcome to make a copy for yourself and add em all in and use that instead. (I'm not sure why I put unvigintillion on the list and didn't just stop at vigintillion, actually, but it was there so I just left it.)

    If you mean something else, then I didn't understand. You'll have to explain more/differently.

  • angarg12angarg12 Member Posts: 3
    I don't know if this is the right place, but I made an speedrun script for Wall Destroyer that I wanted to share.

    After destroying the last wall, the only way to progress is to rerun the game to rack up future capsules. At that point I decided to spend some time writing an script to do so.

    speedruns = function(length){ speedrun = function(){ for(k=0;k<length;k++){ setTimeout(function() { for(i in Game.buildings){ if(Game.buildings[i].visible && Game.buildings[i].real) { for(j=0;j<100;j++){ if(Game.buildings[i].visible && Game.buildings[i].CanBuy()) { Game.buildings[i].Buy(); } } Game.upgrades['finalwallunlock'].Buy(); } }} , 1000*(k+1)); } setTimeout(function() { Game.upgrades['resetunlock'].Buy(); Game.clickables['damageconverter'].Click(); Game.clickables['reset'].Click();} , 1000*length); }; speedrun(); return setInterval(speedrun,(length+2)*1000); }

    The code works as follows: each second it tries to buy up to 100 of each building and destroy some walls. It also tries to buy the black research just to be safe. At the end of the round, it buys the reset upgrade, convert all damage to points and reset the run.

    Then you can activate the script by passing the number of seconds for the run. speedruns(60) will make 60 seconds speedruns (62 to be precise).

    Lastly, make sure that you are running an autoclicker at the same time or otherwise it wont work (you need to click at least once to get some money to start buying buildings).

    By using this script I was able to reach infinite in about 60 runs, so a little bit more than an hour.
  • HugnaHugna Member Posts: 8
    Has anyone made an autobuy script yet? Would be nice to try it out on Wall Destroyer. Where it autobuys the cheapest building everytime it's available, maybe able to set it to maybe every couple of seconds or so just to not lag too much.
  • VeryIdleClickerVeryIdleClicker Member Posts: 37
    In which section should I put the script?
  • PurgePurge Member, Friendly, Helpful Posts: 2,014 ✭✭✭✭✭

    In which section should I put the script?

    If you use chrome (I don't know about other browsers) you can hold control+Shift_I on the IGM page and go to the console tab. Paste the script and press enter. If you do not use chrome, look up "Open developer console in (insert browser here)" cause I'm too lazy to do so
    ""My game will be playable on all Samsung Microwaves with firmware update 5.3.2 and up." - Audiot" - RunningInReverse
Sign In or Register to comment.