This script can be run on this screen:
/game.phpscreen=buddies
(otherwise it will redirect you here)
This is how the script looks like in practice:
Feel free to reply to this thread if you have any suggestions, need help, or found a bug in this script.