This is my code:
mob
var/c=0
client.Click(O)
usr.c=1
walk_to(usr,O)Here I need something like if(src = turf/grass) which doesn't work<<<<<<<<<<<<<< <<
var/o=image('cursor.dmi',O,"click")
src << o
sleep(2)
usr.c=0
while(get_dist(usr,O) >0)
sleep(2)
if(usr.c==1)
del(o)
del(o)
client.Move()
usr << "Click to move."</<<<<<></<<></< ;<<<<<<<<<<<<></< <<<<<<></<<<<<<< <></<<<<<<<<<<<< <<></<<<<<<<<<<< <></<<<></<<<<<<< ;<<<<></<<<<></<<< ;<<<></<<<<<<<<<< ></<<<<<<<<<></<> ;</<></<<<<<<<<<<< ;<<<<>
There are two ways you could do this. You could either set the Click function to be for turf/grass, like this:
<code>turf/grass/Click() // do stuff</code>
or you could check to see if the Click action is used on turf/grass type like this
<code>client/Click(atom/target) if(target.type == turf/grass) / do stuff</code>