Shang-Zhe Yu's BLOG

Grandma's glasses

| Comments

See through grandma's glasses, become Omniscient in The Cookieverse

Full Source on Github

Features

  • Multiple timer for items.
  • Highlight best item/upgrade
      Max 3 buying steps optimization.

  • Calculating with Actual Data
      It calls a clone of in-game function Game.CalculateGains to calculate total cps. Effects from other products' amount and upgrades are included naturally.

  • Update Survivor
      Calculation keeps correct after each game-update, as the function name keep in the same.
      No need to wait me update script.

ChangeLog

  • What's next :
    • Timer for upgrades.
  • 9/30
    • v.1.036.13
      • improve: low frequency timer when waiting time is over 1 hour
      • improve: better way to check for highlight updating.
      • fix: avoided concurrent execution of hl.highlight
      • fix: timer text is mouse pass-through now
  • 9/21
    • v.1.036.12
      • New: Algorithm for best item is changed to Best bestGainedCps per second in payback time
      • improve: timer string limits to 2 field (e.g. "1d 10h" or "1h 5m")
      • improve: smarter highlight updating
      • improve: smarter timer updating
    • v.1.036.11 Multiple level optimize and green colors in different level
  • 9/20
    • v.1.036.10 Fix single highlight error
    • v.1.036.09 Choose available items for first buying
    • v.1.036.08 Add highlight for upgrades(include upgrade CP calc in level-1 optimize)
  • 9/19
    • v.1.036.07 Reduce timer's cpu usage
  • 9/18
    • v.1.036.06 Same color for level-1 and level-2 optimal item since page updates after each bought
    • v.1.036.05 Fix: auto mark Building every second
    • v.1.036.04 Faster timer(250ms) when click big cookie; only light 1 assist item
    • v.1.036.03 Fix multi level highlight
  • 9/15
    • v.1.036.02 Fix: Version is block by googleAds
    • v.1.036 9/15 Maximum 3 level highlights, as accurate as Cookie Monster

How to use Grandma's glasses?

  1. Drag Grandma's glasses to bookmark toolbar, or use following code to create a bookmarklet.

    Bookmarklet source
    javascript:(function a(e){if(e.length){var g=document.createElement("script");g.type="text/javascript";if(g.readyState){g.onreadystatechange=function(){if(g.readyState=="loaded"||g.readyState=="complete"){g.onreadystatechange=null;a(e.slice(1))}}}else{g.onload=function(){a(e.slice(1))}}e[0]+=(e[0].indexOf('?')===-1)?"?":"&";e[0]+="ts="+new Date().getTime();g.src=e[0];document.getElementsByTagName("head")[0].appendChild(g)}}([
    "//rawgithub.com/jcppkkk/Cookie-Clicker-Highlighter/master/cookie-highlighter.js"
    ]))
    
  2. Click the bookmarklet on Cookie-Clicker page.

  3. Done!

What do these colors mean?

Green product

  • Countdown timers shows how long you can buy the products if your cookies is not enough for them.
  • Light Green means the best item which has maximum Which means, (1) For affordable items, it is Fastest way to regain consumed cookies to get ready for next buying. (2) For starting from 0 cookies, it is actually calculating
  • Dark Green items is not the best one, but buying it can help you buy the Light Green item faster.

Calculates

  • Grandma's glasses picks the best item as buying target. the comparison is based on
  • To buy the target item faster, Grandma's glasses
    1. list all combination of 1~3 buying steps. For example, if we have items from 1 to 10, and item 9 has max Income Per Cost. We want to know if buying some other items can speed up the waiting time to buy item 9. Grandma's glasses will list all possible buying steps as following:
      [9]       Just wait and buy item 9
      [1, 9]    Wait(if don't have enough cookies), buy item 1, wait, buy item 9
      [2, 9]
      ...
      [8, 9]
      [9, 9]    *Skipped. We don't buy something first in order to buy itself again
      [10, 9]
      [1, 1, 9]
      ...
      [10, 10, 9]
      
    2. Calculates each buying chain's waiting time.
    3. Choose the combination with least waiting time.
    4. Highlighted the target item Yellow and item in first step Green.

Comments

comments powered by Disqus