A method of treating, preventing, or ameliorating a pathological condition associated with a melatonin receptor in a mammal by using a pharmaceutical composition containing a compound of formula (I) as a ligand interacting with the melatonin receptor,R1, R2, R3, R4 and R7 are independently H, halo, alkyloxyl, alkyl or hydroxyl, provided that one of R1, R2, R3 and R7 is X—(CH2)n—R8; R5 is alkyl or arylalkyl; R6 is H or alkyl; X is a bond, O, S, SO, SO2, CO or NH; n=0-10; R8 is alkenyl, substituted or unsubstituted aryl, NR9R10, or OR9; R9 is H, substituted or unsubstituted arylmethyl, or alkenyl; and R10 is H or alkyl.