arping - please help with my first script :)

Hello, I want to start writing some scripts to Mikrotiks, but I would like to have some examples.
I would like to have something like arping for Mikrotik, I have thought about a script which:

  • finds interface of the given IP address
  • set the interface into arp=enabled mode
  • remove (and store) MAC address of given IP address
  • send 2-3 pings to that IP
  • check if there is any MAC visible and displays info
  • restores stored MAC
  • restores interface to arp=reply-only mode

Can anybody help me? With such example I can write next scripts by my own.
Thanks in advance.