At which condition do you earn exp/fame from monster kill in RotMG?
If you got EXP from it, you earned fame. If you are in the area of a kill, even if you did not participate in killing it, you get EXP. From the [wiki]:
Fame can be gathered from defeating monsters. The harder the monsters you fight, the faster you gain fame. If you want more proof than that, remembering that fame is VERY little of the percent of EXP, compare your fame before and after attacking a large number of low-level monsters (sometimes you can find swarms of them). Also, :
From fame-train practice I know that you don't need even to hit a monster to earn fame.
There is a fame bonus to this effect (Pacifist).
But you do not earn fame from all gods killed over a realm. So there should be something like maximum distance to killed god condition. What is this distance?
I'm sorry, I misread this question. I'm not aware of if anyone has calculated what the exact distance is, but I personally would guess it's somwhere around a max distance of 1-2 "screens" away.
Do you earn fame if you killed the god, with poison for example, but was far away from it?
If you are too far away from a monster when it dies, you do not get EXP.
What if you just hit it once?
Does not matter if you hit it 0 times, 1 time, or 10000 times, you still get fame if you are in range.