Fetch the repository succeeded.
var B = require('behaviors');
var fac = Game.getObjectById('5e03dd3cc6101bb747cc9377');
var tasks = require('tasks');
module.exports = {
run: function(){
var fac = Game.getObjectById('5e03dd3cc6101bb747cc9377');
if(!Game.creeps['BtE']){
Game.spawns['R1S2'].spawnCreep([CARRY,CARRY,CARRY,CARRY,CARRY,MOVE,MOVE,MOVE,MOVE,MOVE],'BtE');
}else if(Game.creeps['BtE'].spawning) return;
var creep = Game.creeps['BtE'];
if(fac.store['battery'] > 10000 || (creep.room.storage.store['battery'] == 0 && creep.store['battery'] == 0) || fac.store.getFreeCapacity('battery') == 0 || fac.store['energy'] > 10000) creep.memory.pick = 'energy';
else creep.memory.pick = 'battery';
if(creep.memory.pick == 'battery') tasks.transport(creep.room.storage, fac, 'battery', creep);
else tasks.transport(fac, creep.room.storage, 'energy', creep);
console.log('Now BtE:'+fac.produce('energy'));
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。