@Czar thanks for the trial you gave me for testing out this script.
Few things I want to bring up whilst ranging+cannon'ing ogres at caged ogres.
1)The script does not seem very interested in repairing the cannon after it decayed(25mins) and just continues to range ogres, manual human input>repair cannon, fixes the problem.
2)The script got stuck at this corner ONCE and kept spam clicking on ogre and couldn't reach it. Tried manually to "get it stuck" but then it just kept running back to the cannon location, not sure why it didn't do that when it got stuck the first time.
SS of location: It is just to show the location where it got stuck the first time, the action(fire cannon) does not represent it being stuck the first time, was just trying to get it stuck myself and test what's the problem after.
All in all, there is extremely high amount of options and settings on this script, so I believe that I might not have set something correctly, other than that, it works fine.