I'm still a noobie with openkore so be patient

I don't know how to create a bot that returns in a specific map in a specific location when buffs are over and/or hp are under a %...obvously i'll put a priest in that spot.
how can i do this? the slave is not a problem...it's the master.
i need to use a macro for that? I'm a little bit confused....