mob/var
rand
client.Click(mob/M in view(1))
usr.rand = rand(1,2)
if(usr.rand == 1)
view() <<"<B><font size = 1><font color = aqua>*[usr] punches [M] in the stomach!*"
M.health -= ((usr.str/M.end))*2
if(usr.rand == 2)
..()
Problem description:Well, when I click on myself, it attacks myself, when I click on the grass under me, it attacks the grass, whats the problem?
Secondly you're using client/Click() when you should be using mob/Click(), that way you won't be calling the proc everytime a player clicks on anything.
Thirdly, you're never checking to see if the attacker and the victim are the same.
That should give the same effect, you'd probably want to throw some kind of death checking function below the line where you take health, just remember in mob/Click() 'src' is the one being clicked and 'usr' is the one clicking. If you want you can do something like:
And use 'clicker' in place of the one clicking and 'clickee' in place of the one being clicked.