hitsub / CookieAssistant

Assist tool for Cookie Clicker Steam Edition
MIT License
22 stars 15 forks source link

Auto hire brokers #60

Closed hitsub closed 3 years ago

hitsub commented 3 years ago

これでいける

let stock = Game.Objects["Bank"].minigame;
if (stock != undefined && stock.brokers < stock.getMaxBrokers() && Game.cookies>=stock.getBrokerPrice())
{
    l('bankBrokersdfsBuy').click();
}
hitsub commented 3 years ago

銀行のアップグレードもやってほしい

hitsub commented 3 years ago

アップグレードはこれでいける

l('bankOfficeUpgrade').click();

//内部コード
AddEvent(l('bankOfficeUpgrade'),'click',function(e){
    var me=M.offices[M.officeLevel];
    if (me.cost && Game.Objects['Cursor'].amount>=me.cost[0] && Game.Objects['Cursor'].level>=me.cost[1])
    {
        Game.Objects['Cursor'].sacrifice(me.cost[0]);
        M.officeLevel+=1;
        if (M.officeLevel>=M.offices.length-1) Game.Win('Pyramid scheme');
        PlaySound('snd/cashIn2.mp3',0.6);
        Game.SparkleOn(e.target);
    }
});