Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- harvest(creep){
- let source = Game.getObjectById(creep.memory.target)
- if(creep.harvest(source) === ERR_NOT_IN_RANGE){
- let result = creep.moveTo(source,{visualizePathStyle: {stroke: '#ffaa00'}})
- //console.log(result)
- }else{
- creep.say("Mining")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement