Source for file square.php
Documentation is available at square.php
* DutchPIPE version 0.4; PHP version 5
* LICENSE: This source file is subject to version 1.0 of the DutchPIPE license.
* If you did not receive a copy of the DutchPIPE license, you can obtain one at
* http://dutchpipe.org/license/1_0.txt or by sending a note to
* license@dutchpipe.org, in which case you will be mailed a copy immediately.
* @subpackage dpuniverse_page
* @author Lennert Stock <ls@dutchpipe.org>
* @copyright 2006, 2007 Lennert Stock
* @license http://dutchpipe.org/license/1_0.txt DutchPIPE License
* @version Subversion: $Id: square.php 278 2007-08-19 22:52:25Z ls $
* @link http://dutchpipe.org/manual/package/DutchPIPE
* Builts upon the standard DpPage class
* @subpackage dpuniverse_page
* @author Lennert Stock <ls@dutchpipe.org>
* @copyright 2006, 2007 Lennert Stock
* @license http://dutchpipe.org/license/1_0.txt DutchPIPE License
* @version Release: 0.2.1
* @link http://dutchpipe.org/manual/package/DutchPIPE
* Sets up the page at object creation time
$this->title = dp_text('A Village Square');
width="450" height="330" border="0" usemap="#square_map" alt=""
style="border: solid 1px black; margin-right: 10px" title="" alt=""
<div style="width: 220px; float: left"><br /><b>' . dp_text('A Village Square')
beautiful fountain catches your attention.</p><p align="justify">To the
<a href="%s">north</a> you see a bar where they serve cold beer and to the
<a href="%s">east</a> is a small shop. An alley leads
<a href="%s">northeast</a>, while a darker alley heads off to the
<a href="%s">northwest</a>.</p>'),
. '</div><br clear="all" />');
$this->setMapArea('square_map', 'fountain_area', 'poly',
'113,288,113,254,136,248,136,226,148,222,148,205,176,205,176,224,'
. '187,224,187,249,207,251,212,258,212,282,190,290,140,292,113,'
dp_text('A beautiful fountain. '), 'getFountainItem',
'37,216,37,182,228,179,229,212,177,213,177,203,147,204,147,213,37,'
'shop_area', 'poly', '435,241,355,213,355,157,437,162,435,241'),
'alley_area', 'poly', '240,207,240,187,249,187,292,207,240,207'),
'alley2_area', 'poly', '7,226,0,226,0,197,22,197,22,217,7,226'),
* Called at regular intervals
$this->fountainSearched = FALSE;
$user->setActionFailure(dp_text('Search what?<br />'));
if ($this->fountainSearched) {
dp_text('You search the fountain but find nothing.<br />'));
dp_text("%s searches the fountain but doesn't seem to find anything.<br />"),
$this->fountainSearched = TRUE;
dp_text('You search the fountain and find some credits!<br />'));
dp_text("%s searches the fountain and finds some credits!<br />"),
return !$this->fountainSearched
? dp_text('You can search it.<br />')
: dp_text('It look like someone just searched it.<br />');
|