Find
You are looking at a lever
An iron lever protrudes from a mount on the wall.
pull the lever
Created by
thorn
, last updated 13 Dec 2008
Code
if reacting to whistle then checkwhere;
if target of pull then changedb;
##checkwhere:
if $init_obj == 66170 then checkdraw;
##checkdraw:
$drawbridgehere = 65432;
if $drawbridgehere's linkstate == 0 then changedb;
##changedb:
$drawbridgehere = 65432;
$drawbridgethere = 65431;
$moat = 65430;
$water = 66097;
if $drawbridgehere's linkstate == 1 then closeit else openit;
relook $loc;
##closeit:
print "The sounds of chains and gears fill [$loc] as [$drawbridgehere] closes.";
foreach in $moat do flushem player;
multiset $drawbridgehere = "link='0',linkstate='0',face='raised',facehow=''";
multiset $drawbridgethere = "link='0',linkstate='0',face='raised',facehow=''";
multiset $actor = "face='up',facehow='pointing'";
multiset $moat = "lochow='swimming in'";
multiset $water = "extra='all around you'";
##flushem:
relocate $for_id to $loc print "[$for_id] suddenly feels [$drawbridgethere] lurch up, and slides into [$loc]" then "[$for_id] slides down [$drawbridgehere] into [$loc]";
multiset $for_id = "host='$drawbridgehere',hosthow='beside'";
##openit:
print "The sounds of chains and gears fill [$loc] as [$drawbridgehere] opens.";
multiset $drawbridgehere = "link='$drawbridgethere',linkstate='1',face='west',facehow='to the'";
multiset $drawbridgethere = "link='$drawbridgehere',linkstate='1',face='east',facehow='to the'";
multiset $actor = "face='down',facehow='pointing'";
multiset $moat = "lochow='on a drawbridge over'";
multiset $water = "extra='under the drawbridge'";