Find
You are looking at a dark torch emitting darkness
Created by
omenofdoom
, last updated 16 Mar 2008
Code
if target of use then checkif;
##checkif:
if $actor's extra like 'emitting darkness' then offit else onit;
##onit:
foreach in $loc do checkit;
##checkit:
if $for_id's material like '_light_' then darkit;
##darkit:
$dmat = $for_id's material;
swap $dmat take '_light_';
set $for_id's material = $dmat;
set $actor's extra to 'emitting darkness';
print "A dense darkness fills the area";
relook $loc;
runsub checkloc;
##checkloc:
$lmat = $loc's material;
if $lmat like '_dark_' then nothing else darkit2;
##darkit2:
swap $lmat add '_dark_';
set $loc's material = $lmat;
relook $loc;
##offit:
$lmat = $loc's material;
swap $lmat take '_dark_';
set $loc's material = $lmat;
print "The darkness seems to dissapate";
relook $loc;