Skip to content

Instantly share code, notes, and snippets.

View Darkosto's full-sized avatar

Darkosto Darkosto

View GitHub Profile
if(creep.carry.energy == 0) {
var sources = creep.room.find(FIND_SOURCES_ACTIVE);
if(creep.harvest(sources[0]) == ERR_NOT_IN_RANGE) {
creep.moveTo(sources[0]);
creep.harvest(source) -> ['50'];
}
}
els