Find
You are looking at a rabbit
A jackrabbit forages about in the forest in search of tasty roots.
Created by
thorn
, last updated 25 Jul 2012
Code
##tickloc:runsub ticked;
##ticked:
if $loc ne 65415 then gohome;
if $actor's health > 0 then dosomething;
##dosomething:
runsub forage/20 or preen/30 or hide/30;
##gohome:
getgender $actor;
print "[$actor] hops away to $hisher home";
set $actor's loc to 65415;
set $actor's host to '';
set $actor's hosthow to '';
relook $loc;
relook 65415;
##forage:
find $loc,random;
if $found_id's host > 0 then continue else forage2;
##forage2:
$looks = (searches,forages,sniffs around,scans);
$food = (food,roots,greens,berries);
$at = (at,behind,near,before,next to,under);
print "[$actor] $looks for $food $at [$found_id]";
multiset $actor to "host='$found_id',hosthow='$at',pose='foraging'";
relook $loc;
##preen:
getgender $actor;
$preening = (licking,wiping,scratching);
$bodypart = (paws,belly,back,tail);
$what = "$preening $hisher $bodypart";
print "[$actor] begins $what";
multiset $actor to "host='',hosthow='',pose='$what'";
relook $loc;
##hide:
find $loc,random not player not exit;
$hides = (hides,takes cover,sneaks);
$at = (at,behind,near,before,next to,under);
print "[$actor] $hides $at [$found_id]";
multiset $actor to "host='$found_id',hosthow='$at',pose='hiding'";
relook $loc;