getcastleid()

Added 'getcastleid()' function to retrieve castle IDs and provided documentation.

Credits: jaBote