Find
You are looking at a command called darken
darken {object}
darken location
You can darken your locations by either standing in it or beside it and using the darken command.
eg:
build a cave
darken the cave
or
build a door to a kitchen
go to the door
darken location
(this will darken the kitchen)
You can only darken a location you have created or is unlocked.
read the info about darkness
cowScript notes:
This sends out the trigger word 'darken' so things can react to a location being made dark.
I suggest any activity that darkens a location (say turning off a light) should send out 'darken' so objects can respond accordingly.
Created by
wolis
, last updated 19 Jul 2012
Code
if $cmd_text eq 'location' then uselocation else findobj;
##uselocation: $target = $loc;
runsub checkpw;
##findobj: get $target in $loc;
if $target > 0 then checkpw else fail;
##checkpw:
if $pw like $target's pwd then darkenit else itslocked;
##darkenit:
$mat = $target's material;
swap $mat add _dark_;
set $target's material to $mat;
say 'darken',"[$actor] darkens [$target]";
##fail:
if $counter > 0 then exit else listall;
##listall:
var $click_cmd to 'darken';
var $desc_intro to 'Click on the object you want to darken:
';
rem look $loc,list;
msg $loc,$actor,$actor,0,'force',"force:look $loc,list";