So you get ap for defending too? That's nice!If you are at a castle that has PVP near it you can get AP points as if you are defending even though the all out attack may not have started.
I got 50k+ AP the other day, I still didn't figure out why. I gained a complete level (7 --> 8), more than 15 PvP rewards at once, and a lot of PvP money. I was roaming next to a contested scroll, I guess this have to do something with it ...
(sorry for my broken english)
Screenshot from Codex :
http://postimg.org/image/sz4mzpffh/
Trad :
Players killed: 33
Death: 27
AP earned: 71290