CursedSliver

huhWhatMod

Jan 6th, 2024 (edited)
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Game.registerMod("moreSB",{
  2.     init:function(){
  3.         this.spritesheet=App?this.dir+"/img.png":"https://cdn.discordapp.com/attachments/1188633339679232092/1193242780764479619/SBAllLarge.png"
  4.         this.createAchievements=function(){
  5.             this.achievements = []
  6.             this.achievements.push(new Game.Achievement("Speed baking -III", "Get to <b>1 million cookies</b> baked in <b>75 minutes</b>.",[0,0,this.spritesheet]))
  7.             this.achievements.push(new Game.Achievement("Speed baking -II", "Get to <b>1 million cookies</b> baked in <b>65 minutes</b>.",[1,0,this.spritesheet]))
  8. this.achievements.push(new Game.Achievement("Speed baking -I", "Get to <b>1 million cookies</b> baked in <b>55 minutes</b>.",[2,0,this.spritesheet]))
  9. this.achievements.push(new Game.Achievement("Speed baking O", "Get to <b>1 million cookies</b> baked in <b>45 minutes</b>.",[3,0,this.spritesheet]))
  10. for(let i of this.achievements){i.pool="shadow";i.order=30599;}
  11. this.achievements.push(new Game.Achievement("Speed baking IV", "Get to <b>1 million cookies</b> baked in <b>5 minutes</b>.",[3,1,this.spritesheet])); this.achievements[4].pool = "shadow"; this.achievements[4].order = 30601;
  12.             LocalizeUpgradesAndAchievs()
  13.         }
  14.         this.checkAchievements=function(){
  15.             if (Game.cookiesEarned>=1000000 && (Game.ascensionMode==1 || Game.resets==0))//challenge run or hasn't ascended yet
  16.                 {
  17.                     var timePlayed = new Date();
  18.                     if (timePlayed<=1000*60*75) Game.Win('Speed baking -III');
  19.                     if (timePlayed<=1000*60*65) Game.Win('Speed baking -II');
  20.                     if (timePlayed<=1000*60*55) Game.Win('Speed baking -I');
  21.                     if (timePlayed<=1000*60*45) Game.Win('Speed baking O');
  22.                     if (timePlayed<=1000*60*5) Game.Win('Speed baking IV');
  23.                 }
  24.         }
  25.         if(Game.ready) this.createAchievements()
  26.         else Game.registerHook("create", this.createAchievements)
  27.     Game.registerHook("check", this.checkAchievements)
  28.     },
  29.     save: function(){
  30.         let str = "";
  31.         for(let i of this.achievements)str+=i.won
  32.         return str;
  33.     },
  34.     load: function(str){
  35.         for(let i in this.achievements)this.achievements[i].won=Number(str[i])
  36.     }
  37. })
Advertisement
Add Comment
Please, Sign In to add comment