Advertisement
Miguzepinu

Cookie Clicker route script

Jul 6th, 2016
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.22 KB | None | 0 0
  1. local c,r,t,i,u
  2. fg = false
  3. price = {17.25,100,1100,12000,130000,1400000}
  4. rate = {.1,1,8,47,260,1400}
  5. amount = {1,0,0,0,0,0}
  6. function neverclick(route)
  7.     c = 15
  8.     r = .1
  9.     t = 0
  10.     i = 1
  11.     while route[i] ~= nil and c < 1000000 do
  12.         u = route[i]
  13.         if u < 10 then
  14.             t = t+price[u]/r
  15.             c = c+price[u]
  16.             amount[u] = amount[u]+1
  17.             price[u] = price[u]*1.15
  18.         end
  19.         if u == 2 and fg then
  20.             rate[3] = rate[3]+(2^math.floor(math.log(rate[3],2)))/100
  21.         end        
  22.         if u == 10 then
  23.             t = t+100/r
  24.             c = c+100
  25.             rate[1] = rate[1]*2
  26.         end
  27.         if u == 11 then
  28.             t = t+500/r
  29.             c = c+500
  30.             rate[1] = rate[1]*2
  31.         end
  32.         if u == 12 then
  33.             t = t+10000/r
  34.             c = c+10000
  35.             rate[1] = rate[1]*2
  36.         end
  37.         if u == 17 then
  38.             t = t+1000/r
  39.             c = c+1000
  40.             rate[2] = rate[2]*2
  41.         end
  42.         if u == 18 then
  43.             t = t+5000/r
  44.             c = c+5000
  45.             rate[2] = rate[2]*2
  46.         end
  47.         if u == 19 then
  48.             t = t+50000/r
  49.             c = c+50000
  50.             rate[2] = rate[2]*2
  51.         end
  52.         if u == 20 then
  53.             t = t+11000/r
  54.             c = c+11000
  55.             rate[3] = rate[3]*2
  56.         end
  57.         if u == 21 then
  58.             t = t+55000/r
  59.             c = c+55000
  60.             rate[3] = rate[3]*2
  61.         end
  62.         if u == 26 then
  63.             t = t+120000/r
  64.             c = c+120000
  65.             rate[4] = rate[4]*2
  66.         end
  67.         if u == 67 then
  68.             t = t+55000/r
  69.             c = c+55000
  70.             fg = true
  71.             rate[2] = rate[2]*2
  72.             rate[3] = rate[3]*(1+amount[2]/100)
  73.         end
  74.         r = 0
  75.         for k = 1,5 do
  76.             r = r+amount[k]*rate[k]
  77.         end
  78.         i = i+1
  79.     end
  80.     print(c)
  81.     return (t+(1000000-c)/r)/60
  82. end
  83. print(neverclick({1,1,1,1,2,2,2,2,2,10,1,1,1,2,1,2,17,2,2,3,2,3,2,3,2,3,1,11,1,1,1,1,1,3,2,18,2,2,2,2,2,3,1,20,3,3,3,3,3,4,2,3,4,1,2,4,3,21,3,3,3,3,67,2,2,2,2,2,2,2,19,2,2,2,3,2,3,2,3,2,4,1,3,2,4,1,3,2,4,26,4,4,4,4,4,4,4,3,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement