Find
You are looking at a button
It is a special kind of useful button.
Created by
xiii
, last updated 17 Jul 2012
Code
##txickloc:runsub itsme;
##push:runsub isitme;
##isitme:
if $target eq $actor then itsme else end;
##itsme:
foreach in $loc do findscope;
##findscope:
if $for_class like telescope then gotscope;
##gotscope:
var $scope to $for_id;
runsub chgme;
##chgme:
if $actor's slot1 eq 'opened' then closecupola else opencupola;
##opencupola:
var $status to 'opened';
set $actor's slot1 to '$status';
var $sound to 'the cupola moves slowly, you can see the sky now.';
say 'acts', $sound;
find $actor;
set $actor's slot2 to '$found_id';
set $found_id's loc to $loc;
runsub switchinfo;
##closecupola:
var $status to 'closed';
set $actor's slot1 to '$status';
var $sound to 'the cupola closes itself.';
say 'acts', $sound;
var $cible to $actor's slot2;
set $cible's loc to $actor;
runsub switchinfo;
##switchinfo:
var $newinfo to $actor's slot3;
set $actor's slot3 to $scope's info;
set $scope's info to '$newinfo';