Find
You are looking at a janitor
Created by
wolis
, last updated 01 Aug 2015
Code
##txick:runsub whattodo;
##tickloc:runsub whattodo;
##tickhour2:runsub whattodo;
##wish:runsub whattodo;
##whattodo:
runsub findlost or startit or startit;
say 'force',"force:look";
##xfindlost:
rem - dont worry about lots items for now -
find 0,random lost;
set $found_id's loc to $actor's loc;
say 'act',"[$actor] found [$found_id] and knows that there are $found_count lost items left";
rem foreach in 0 do movehere lost;
rem ##movehere:
rem set $for_id's loc to $actor's loc;
##startit:
find $loc,random not player not me;
if $found_id's owner eq $actor then end else continue;
##continue:
if $found_id > 0 then chklock else end;
##chklock:
if $found_id's pwd eq '' then chklink else unlockit;
##chklink:
if $found_id's link > 0 then unlinkit else voidit;
##voidit:
set $found_id's loc to 0;
say 'act',"[$actor] cleans up [$found_id]";
##unlockit:
set $found_id's pwd to '';
say 'act',"[$actor] unlocks [$found_id]";
##unlinkit:
set $found_id's link to '';
say 'act',"[$actor] unlinks [$found_id]";
##end: