I think you are confused about how the coordinates work. x & y are the coordinates of where the player clicked, not where they have to click for the action to occur.
You probably want something more like the following:
Although that code requires the player to click exactly on one pixel, which could be tricky to do. In all likelihood, you'd be specifying a range for x and y (i.e. x>=10 and x<=20).
You probably want something more like the following:
Code (lua) Select
function sol.main:on_mouse_released(button,x,y)
if button=="right" and x==10 and y==100 then
print("right pressed")
end
end
Although that code requires the player to click exactly on one pixel, which could be tricky to do. In all likelihood, you'd be specifying a range for x and y (i.e. x>=10 and x<=20).