Find
You are looking at a command called setzone
synopsis:
setzone {object} as {zonename}
or
setzone {zonename}
(to change the location's zone)
If there is no zone set, and the object is unlocked (or was locked by you):
- add's the
zone
material.
- sets the zonename into the zone materials value.
If there was a zone already set:
- tells you the current zone name and doesn't change it.
But if you do it nicely:
- tells you the current zone name (if such exists) and changes it anyway.
see also:
read the material called zone
read the command called roam
Created by
thorn
, last updated 25 Jun 2009
Code
get $target,$rel,$text in $loc;
if $target > 0 then checktext else checkhere;
##checkhere:
get $text;
if $text == '' then getone else sethere;
##sethere:
$target = $loc;
runsub checktext;
##checktext:
if $text == 'zzzzz' then showzone else checklock;
##checklock:
if $pw like $target's pwd then checkset else locked;
##locked:
sayto $init_obj,"Sorry, but [$target] is locked.";
##checkset:
if $target's material like _zone_ then checknice else setzone;
##checknice:
$matvals = $target's matvals;
manipulate $matvals get zone to $was by 1;
sayto $init_obj,"[$target]'s zone name was
$was
";
if $niceness > 0 then setzone else trynice;
##setzone:
$material = $target's material;
$matvals = $target's matvals;
swap $material add '_zone_';
manipulate $matvals set zone to $text by 1;
set $target's material to $material;
set $target's matvals to $matvals;
print "[$target]'s zone is now
$text
";
##trynice:
if $target == $loc then trynice2 else trynice3;
##trynice2:
sayto $init_obj,"
Tip: If you wish to change it then:
please
setzone $text.
";
##trynice3:
sayto $init_obj,"
Tip: If you wish to change it then:
please
setzone [$target] $tiptext.
";
##showzone:
$matvals = $target's matvals;
manipulate $matvals get zone to $text by 1;
sayto $init_obj,"[$target]'s zone name is currently
$text
";
##getone:
var $click_cmd to 'setzone';
var $click_mid to 'as zzzzz';
var $desc_intro to 'Click on the object you want to set the zone:
';
look $loc,list;
msg $loc,$actor,$actor,0,'force',"force:look $loc,list";