Yes, actions.cpp
bool Actions::useItem(Player* player, const Position& pos, uint8_t index, Item* item, bool isHotkey)
here you can check slot from "clicked item" and do whatever you want, like
"slot" = item->getSlotPosition()
"ringslot" = ring slotp
then write something like that
if (slot...