Kingdoms of Camelot Attack helper

By niknah Last update Apr 1, 2011 — Installed 567,298 times.


Script Summary: Remembers your attacks and when you last attacked them. Displays levels & player names on the map

Script homepage

Helps you farm your neighbours, remembers attacks and how many troops & when they were sent. Shows you the levels + player of wildernesses on the map.

Thanks to RoadRunn for a lot of changes to the script to add transporting, skipping cities fix, etc.

To use...
* Attack as normal, put in a comment in the attack dialog if you want.

* Put your mouse over the map to see when you last attacked them and your comment about it.

* To unignore an attack after you have pressed "X" or to change an attack's troop numbers, go to the tile and click "attack" and attack without a knight.

* Easy copy and paste locations: You can copy and paste a location like 111,111 into the X coordinates box and it'll split it up into X and Y boxes.

* You can right click on "view report" in your messages and copy/bookmark the link, to see it again you'll have to be back in the messages screen and go to that link that you've copied.

* The delete barb/wild/transp button only deletes attacks from you to a non player wilderness or transport to your own city.

Recent attack list

* There're two links each row which take you to the location, and the hours since last attack which takes you to the attack page.

Note: It doesn't remember scouts, transports, etc. Only attacks of more than 1 troop.

Contributors

erthwjim |
Fred Flintstone |
Mr.H |
RoadRunn |
scriptogator |
SoCo |
sumtingwong |
totino |
uglierThanThou |
GotBud

various others, send me a message I probably forgot.

Auto attack

* The auto attack button is a blue tab button above the game. If you can see this button right click on the game, open the frame up in a new tab. Then right click on the greasemonkey icon at the bottom right of the browser and pick "user script commands" - "KOCAttack - ...."

* It'll auto attack barbarians in the attack list that haven't been attacked in the past hour. Starting from the closest within a max distance of 60.

* Make sure you click "X" on your attack list if you've failed a barbarian attack or else it'll attack that camp too with the failed number of troops.

* When attacking wildernesses, make sure you tick "Retry march if it has unknown error" in the options or else it'll skip attacks when the "unknown error" pops up.

* You can copy and paste a list of coords to attack into the "bulk add" box from a mapping site like http://koc.dunno.com/

Auto train

* The auto train will only work if you have 100% happiness and a full population. You can change this in the options.

* To disable auto train, click on the auto train button again.

Auto gold

* In the castle there is an "auto" button next to the gold, you can change when it clicks the gold button in the options.

Remote attack

Only works if two users are using the script, to use it...

  • Put Player A's name in the "allow these players..." box. Not "Lady A", just A"
  • You go off to work, sleep, etc. and leave the auto barb turned on.
  • Player A types in your name into the box and clicks "status"
  • Player A, goes to the attack screen and does a normal attack but puts in your name + one of your cities and clicks "remote attack"
  • Wait a few minutes or more and it should come back with an "attack.attempted" message.
  • If no other errors came up, your troops should be on their way. KOC could come up with various errors so it's not so accurate.

When things go wrong...

* I've been getting a lot of messages from people who simply say "it's not working", I can't do much with that, have to explain what's not working, what happens when you use it, etc.

* Go to options, click "reset all", this will wipe everything out and start you off from scratch.

* Go to tools > error console > messages and watch what it's doing. It may come up with an error or explaination.

* To completely wipe everything and start from scratch, right click on the greasemonkey icon at the bottom right of the browser, select "manage user scripts" > pick KOCAttack, tick "uninstall associated preferences", click "uninstall"

* Try a Previous versions.

* Note: if firefox does not exit normally(ie. windows update reboots, crashes, etc.), your settings will not be saved. Quit firefox normally once in a while to save everything.

To do

Here're some ideas people have, but I don't have the time to add them. If someone wants to do add these features I can tell you where to find the info and where you can add them in the script.

* Auto troop movements on an incoming attack.

* Auto send transport to your cities when resources reach a certain amount.

Tweeks

You can edit the script by right clicking on the greasemonkey icon at the bottom right of the browser and pick "manage user scripts", select "KOCAttack" and click "edit"

* Two players on same domain: http://userscripts.org/topics/55565 (untested)

* Pick which knights go out on the attack: http://userscripts.org/topics/56210

* Enable scouting: http://userscripts.org/topics/57749

* Here's a fix for poc helper if you use that script: http://userscripts.org/topics/56920


History

2/Apr/2011: Fix for new layout.
Fix for changes in the attack queue.

8/Mar/2011: Fix problems with the troop activity showing a bunch of javascript on the page when it fails.

21/Feb/2011: Ability to disable remote attacks or only allow non-attacks(transport, scouts, reinforce, etc.)
Exports can now be prettied up via jsbeautifier.org and then imported back.

20/Feb/2011: Fix for the new attack dialog.
Remote attack feature.

10/Feb/2011: Doesn't start the script until we remove Mixpanel tracking.
Fix for alert errors about cannot replace javascript, the errors will now appear on the game instead of blocking everything.

3/Feb/2011: Better fix for the refresh problem by Fred Flintstone

2/Feb/2011: Fixed problems with the alert box showing up cannot replace errors.
Fixed problem with the "resend" box appearing.
Aligned the bulk add box with the bulk add button.

24/Oct/2010: Moved the option/auto attack buttons for people with different languages.
Added an impending attack url in the options, opens this url when there is an impending attack.
Shows all saved attacks in the map now instead of just the top 80.
Fix problem with saving attacks when there is no troops.
List of attacks: Changed the default KOC knight listing to the type of troops & knight level.

30/Sep/2010: import/export settings
Select cities for attacking.
Thanks to Mr.H for adding a delay of 3 secs before we retry excess traffic/unknown errors.
Fixed problem with the "reset all" button causing the auto attack to not work afterwards.
Fix problem with the cities not changing sometimes when we're under attack.

22/Sep/2010: Fix problem with too many reloads.
Bulk adds were not starting after being added.
Market numbers weren't set to the defaults properly.

19/Sep/2010: Fix for the new game update thanks to scriptogator

11/Sep/2010: Lots of changes from RoadRunn
-Update attack types from drop-down to checkboxes
-Add new option for num of minutes between transports
-Started to code “lock attack to specific city” currently disabled
-Added button to delete attack completly (not just ignore)
-Added all of the functionality to store and set resources for transports
-Added option and code to automatically abandon wilds (this functionality i use, but others objected, this is a per city option like auto-gold)
-Moved ignore attack checkbox to top of attack box (ignore checkbox was hidden in transport types)
-Update ChangeAttack so that we don’t update the attack if the attack type is different

27/Aug/2010: Fix problem with auto gold button not appearing.
Fix problem with attacks not being sent out sometimes.

26/Aug/2010: Non-english version fixes: Fix for the auto attack button not showing up, fix for the comments box/attack history not showing up in the attack dialog.

4/Aug/2010: Fix freeze problem. Reloads page when it can't see the attack dialog instead of trying to bring it up again endlessly.
If it can't find the blue buttons up at the top, it'll now add the buttons on the top left in the black message area.

30/Jul/2010: Fix for the attack dialog appear on top of each other too much sometimes.
Fix for not attacking "forest" wildernesses.
Goes to the view reports page less now, instead it doesn't stop deleting reports until there is no more to delete.

26/Jul/2010: Google Chrome remembers attacks now, but doesn't do any of the auto features.
It now retries attacks when it sees the "excess traffic" message.
Fix for the attacks stopping after a while.
Fix for double attacks on the same target.
Fix for "C0" in the attack list after bulk adding, this will now change after the first attack.
Added "E" toggle in the attack list to show troop numbers in attacks.
Options: when to train troops, when to press the gold button, number of seconds to wait before changing cities.

21/Jul/2010: It installs in chrome now but doesn't do much other than the map & auto filling the market numbers.
Option: Disable viewing of reports
Map: Box to filter out target type of the attack.
Removed alert boxes about retrying the attacks.

12/Jul/2010: Fix for deleting old reports in the attack dialog.
UI: Better copying and pasting x y coords in the X Y boxes, uses regex now.

11/Jul/2010:
Attack: Changed so that a militiamen/Ballista only attack is considered a first attack.
Attack: Retry option for "unknown error" attacks.
Attack: Fix problem with attack dialog popping up but the numbers not getting filled in.
Reports: Only clears reports every 10 mins or after reload because it takes a lot of time.
Training: When auto train is on it doesn't train the wrong troop type if the troop dialog is brought up manually.
Bulk add attacks: Checkbox for overwriting existing attacks.
UI: Added greasemonkey menu for people who can't see the "option", "auto attack" buttons at the top.
UI: Fix for copying and pasting "x y" instead of "x,y"

5/Jul/2010: Added an options dialog with various adjustable things.
Auto gold feature: will get gold when happiness is more than 99%
A bulk add coords button to bulk add attacks with the same troop numbers.

16/Jun/2010: Removed english specific stuff.
Auto attack now attacks the closest first.
Reload/city rotation changes

9/Jun/2010: Auto attack barbarians toggle, attacks barbarians close to your home.
Auto trains troops button for when your population is full (needs happiness to be at 100%)
Remembers militiamen only attacks & normal attacks. A 2nd attack to the same location will be treated as a normal attack.
Fix for the tick all in the messages area.
Delete wild/barb/transport messages button.
Alliance's reports show you which attacks happened close to you.
The march button doesn't wait for the server to respond to the march now, but becareful when clicking it too fast before the attack has been sent out by the server.

19/May/2010: Fixed problem with title: null showing in the popups.
Fixed problem with not collecting reports properly for the attack screen.
Can now copy and paste xxx,yyy coords in the coords in the attack screen as well as the map screen.

18/May/2010: Added the display of levels + players on the map.
Added copy and paste to location feature.
You see the title number instead of the title name when you put the mouse over the tile.
You can right click on "view report" in your messages and copy/bookmark the link, to see it again you'll have to be back in the messages screen and go to the link.

16/May/2010: In the closest farms list, added an alternate link to bring up attack page.
The list of previous attacks are now sorted reverse, most newest to oldest.