var selectSizeWithoutStatus = 8;
var selectSizeWithStatus = 6;
var numCommands = 0;
var thisCommand = 0;
var commandsList = new Array();
var tmrTick = null;
var tickCount = 0;
var sendNextGameTickerAfter = 0;
var verbButtonCount = 9;
var commandLog = null;
//JS
var is_asl_event=false;
function init() {
	var smusic = getStorage("music");
	if (smusic===null)
		$("#soundMenu").modal({backdrop: 'static',keyboard: false});
	else
		init2(null);
}
function init2(sound) {
    
	if (sound) {
		setStorage("music","on");
		music_on=true;
	} else if (sound===false) {
		setStorage("music","off");
		music_on=false;
	}
    showStatusVisible(false);

    $("#button-restart").button().click(function () {
        $("#button-restart").removeClass("ui-state-focus ui-state-hover");
        uiDoRestart();
    });
    $("#button-undo").button().click(function () {
        $("#button-undo").removeClass("ui-state-focus ui-state-hover");
        uiDoUndo();
    });
    $("#button-wait").button().click(function () {
        $("#button-wait").removeClass("ui-state-focus ui-state-hover");
        uiDoWait();
    });
        $("#button-options").button().click(function () {
        $("#button-options").removeClass("ui-state-focus ui-state-hover");
        $("#gameMore").hide();
        $("#gameOptions").show();
    });
    $("#fontOptions").change(function () {
        var newFont = $("#fontOptions option:selected").text();
        $("#divOutput div span").css("font-family", newFont);
        $("#fontSample").css("font-family", newFont);
        currentFont = newFont;
        set(GetObject("game"), "defaultfont", newFont);
        saveGame();
    });
    $("#fontSize").change(function () {
        var newFontSize = $("#fontSize option:selected").val();
        $("#divOutput div span").css("font-size", newFontSize + "pt");
        $("#fontSample").css("font-size", newFontSize + "pt");
        currentFontSize = newFontSize;
        set(GetObject("game"), "defaultfontsize", parseInt(newFontSize));
        saveGame();
    });

    $(document).on("click", ".elementmenu", function (event) {
        if (!$(this).hasClass("disabled")) {
            event.preventDefault();
            event.stopPropagation();
            // TO DO
			//$(this).jjmenu_popup();
			bindMenuEl($(this));
			//--
			$(this).click();
        		
			//--
            //$(this).blur();
            return false;
        }
    });

    $(document).on("click", ".exitlink", function () {
        if (!$(this).hasClass("disabled")) {
            sendCommand($(this).data("command"));
        }
    });

    $(document).on("click", ".commandlink", function () {
        var $this = $(this);
        if (!$this.hasClass("disabled") && canSendCommand) {
            if ($this.data("deactivateonclick")) {
                $this.addClass("disabled");
                $this.data("deactivated", true);
            }
            sendCommand($this.data("command"));
        }
    });

    worldmodelInitialise();
    if (!loadGame_()) {
        worldModelBeginGame();
    }
}

function extLink(url) {
    window.open(url, "_system");
}

function showStatusVisible(visible) {
    if (visible) {
        $("#statusVars").show();
        $("#statusLabel").show();
    }
    else {
        $("#statusVars").hide();
        $("#statusLabel").hide();
    }
}

var beginningOfCurrentTurnScrollPosition = 0;
var scrollTimeout = null;

function scrollToEnd() {
    if (scrollTimeout != null) {
        clearTimeout(scrollTimeout);
    }

    scrollTimeout = setTimeout(function () {
        scrollTimeout = null;
        scrollToEndNow();
    }, 200);
}

function scrollToEndNow() {
    $('html, body').animate({ scrollTop: beginningOfCurrentTurnScrollPosition - 30 }, 200);
}

function updateLocation(text) {
}

var _waitMode = false;
var _pauseMode = false;
var _waitingForSoundToFinish = false;

var waitButtonId = 0;

function beginWait() {
    if (runningWalkthrough) {
        awaitingCallback = false;
        waitCallback();
        TryFinishTurn();
        return;
    }
    _waitMode = true;
    waitButtonId++;
    addText("<a class=\"cmdlink\" style=\"color:" + currentLinkForeground + ";font-family:" + currentFont + ";font-size:" + currentFontSize + "pt;\" id=\"waitButton" + waitButtonId + "\" >Continue...</a><br/><br/>");
    $("#waitButton" + waitButtonId).click(function () {
        _waitMode = false;
        $(this).hide();
        $("#divCommand").show();
        beginningOfCurrentTurnScrollPosition = $("#gameContent").height();
        window.setTimeout(function () {
            awaitingCallback = false;
            waitCallback();
            TryFinishTurn();
        }, 100);
    });
    $("#divCommand").hide();
}

function beginPause(ms) {
    _pauseMode = true;
    $("#divCommand").hide();
    window.setTimeout(function () {
        endPause()
    }, ms);
}

function endPause() {
    _pauseMode = false;
    $("#divCommand").show();
    window.setTimeout(function () {
        // TO DO
        //$("#fldUIMsg").val("endpause");
        //$("#cmdSubmit").click();
    }, 100);
}

function globalKey(e) {
    if (_waitMode) {
        endWait();
        return;
    }
}

function commandKey(e) {
    switch (keyPressCode(e)) {
        case 13:
            runCommand();
            return false;
        case 38:
            thisCommand--;
            if (thisCommand == 0) thisCommand = numCommands;
            $("#txtCommand").val(commandsList[thisCommand]);
            break;
        case 40:
            thisCommand++;
            if (thisCommand > numCommands) thisCommand = 1;
            $("#txtCommand").val(commandsList[thisCommand]);
            break;
        case 27:
            thisCommand = numCommands + 1;
            $("#txtCommand").val("");
            break;
    }
}

function runCommand() {
    var command = $("#txtCommand").val();
    if (command.length > 0) {
        numCommands++;
        commandsList[numCommands] = command;
        thisCommand = numCommands + 1;
        sendCommand(command);
        $("#txtCommand").val("");
    }
}

function prepareCommand(command) {
    // TO DO
    //$("#fldUITickCount").val(getTickCountAndStopTimer());
    //$("#fldUIMsg").val("command " + command);
}

function showQuestion(title) {
    $("#msgboxCaption").html(title);

    var msgboxOptions = {
        modal: true,
        autoOpen: false,
        buttons: [
            {
                text: "Yes",
                click: function () { msgboxSubmit("yes"); }
            },
            {
                text: "No",
                click: function () { msgboxSubmit("no"); }
            }
        ],
        closeOnEscape: false,
        open: function (event, ui) { $(".ui-dialog-titlebar-close").hide(); }    // suppresses "close" button
    };

    $("#msgbox").dialog(msgboxOptions);
    $("#msgbox").dialog("open");
}

function msgboxSubmit(text) {
    $("#msgbox").dialog("close");
    window.setTimeout(function () {
        // TO DO
        //$("#fldUIMsg").val("msgbox " + text);
        //$("#cmdSubmit").click();
    }, 100);
}

var _menuSelection = "";

function showMenu(title, options, allowCancel) {
    $("#dialogOptions").empty();
    $.each(options, function (key, value) {
        $("#dialogOptions").append(
            $("<option/>").attr("value", key).text(value)
        );
    });

    $("#dialogCaption").html(title);

    var dialogOptions = {
        modal: true,
        autoOpen: false,
        buttons: [{
            text: "Select",
            click: function () { dialogSelect(); }
        }]
    };

    if (allowCancel) {
        dialogOptions.buttons = dialogOptions.buttons.concat([{
            text: "Cancel",
            click: function () { dialogCancel(); }
        }]);
        dialogOptions.close = function (event, ui) { dialogClose(); };
    }
    else {
        dialogOptions.closeOnEscape = false;
        dialogOptions.open = function (event, ui) { $(".ui-dialog-titlebar-close").hide(); };    // suppresses "close" button
    }

    _menuSelection = "";
    $("#dialog").dialog(dialogOptions);

    $("#dialog").dialog("open");
}

function dialogSelect() {
    _menuSelection = $("#dialogOptions").val();
    if (_menuSelection.length > 0) {
        $("#dialog").dialog("close");
        window.setTimeout(function () {
            SetMenuSelection(_menuSelection);
            updateLists();
        }, 100);
    }
}

function dialogCancel() {
    $("#dialog").dialog("close");
}

function dialogClose() {
    if (_menuSelection.length == 0) {
        dialogSendCancel();
    }
}

function dialogSendCancel() {
    window.setTimeout(function () {
        // TO DO
        //$("#fldUIMsg").val("choicecancel");
        //$("#cmdSubmit").click();
    }, 100);
}

function sessionTimeout() {
    disableInterface();
}

function gameFinished() {
    disableInterface();
}

function disableInterface() {
    $("#divCommand").hide();
    $("#gamePanesRunning").hide();
    $("#gamePanesFinished").show();
}

function playWav(filename, sync, looped) {
}

function playMp3(filename, sync, looped) {
    playAudio(filename, "mp3", sync, looped);
}

function playAudio(filename, format, sync, looped) {
//TODO: parameters
	if (music_on) {
		new Audio(filename).play();
	}
}

function stopAudio() {
}

function finishSync() {
    _waitingForSoundToFinish = false;
    window.setTimeout(function () {
        $("#divCommand").show();
        $("#fldUIMsg").val("endwait");
        $("#cmdSubmit").click();
    }, 100);
}

function panesVisible(visible) {
    if (visible) {
        $("#gamePanes").show();
    }
    else {
        $("#gamePanes").hide();
    }
}

function uiShow(element) {
    if (element == "") return;
    $(element).show();
}

function uiHide(element) {
    if (element == "") return;
    $(element).hide();
}

var _compassDirs = ["northwest", "north", "northeast", "west", "east", "southwest", "south", "southeast", "up", "down", "in", "out"];

var lastPaneLinkId = 0;

function updateList(listName, listData) {
    var listElement = "";
    var emptyListLabel = "";

    if (listName == "inventory") {
        listElement = "#inventoryList";
        emptyListLabel = "#inventoryEmpty";
    }

    if (listName == "placesobjects") {
        listElement = "#objectsList";
        emptyListLabel = "#placesObjectsEmpty";
    }

    $(listElement).empty();
    $(listElement).show();
    var listcount = 0;
    var anyItem = false;

    $.each(listData, function (key, value) {
        var splitString = value.split(":");
        var objectDisplayName = splitString[0];
        var objectVerbs = splitString[1];

        if (listName == "inventory" || $.inArray(objectDisplayName, _compassDirs) == -1) {
            listcount++;
            lastPaneLinkId++;
            var paneLinkId = "paneLink" + lastPaneLinkId;
            $(listElement).append(
                "<li id=\"" + paneLinkId + "\" href=\"#\">" + objectDisplayName + "</li>"
            );
            bindMenu(paneLinkId, objectVerbs, objectDisplayName, false);
            anyItem = true;
        }
    });
    $(listElement + " li:last-child").addClass('last-child')
    if (listcount == 0) $(listElement).hide();
    if (anyItem) {
        $(emptyListLabel).hide();
    }
    else {
        $(emptyListLabel).show();
    }
}

function updateCompass(directions) {
    updateDir(directions, "NW", _compassDirs[0]);
    updateDir(directions, "N", _compassDirs[1]);
    updateDir(directions, "NE", _compassDirs[2]);
    updateDir(directions, "W", _compassDirs[3]);
    updateDir(directions, "E", _compassDirs[4]);
    updateDir(directions, "SW", _compassDirs[5]);
    updateDir(directions, "S", _compassDirs[6]);
    updateDir(directions, "SE", _compassDirs[7]);
    updateDir(directions, "U", _compassDirs[8]);
    updateDir(directions, "D", _compassDirs[9]);
    updateDir(directions, "In", _compassDirs[10]);
    updateDir(directions, "Out", _compassDirs[11]);
}

function updateDir(directions, label, dir) {
    $("#cmdCompass" + label).attr("disabled", $.inArray(dir, directions) == -1);
}

function compassClick(direction) {
    sendCommand(direction);
}

function sendCommand(text) {
    if (!gameRunning) return;
	//JS
	if (e_start.cmds.length%50==0)
		clearPast(150)
    //--
	if (awaitingInputCallback) {
        awaitingInputCallback = false;
        awaitingCallback = false;
		//JS
		if (e_start.record) {
			listadd (e_start.cmds, "%"+text);
		}
		
		//--
        getinputCallback(text);
		TryFinishTurn();
        return;
    }
    if (awaitingCallback) return;
    beginningOfCurrentTurnScrollPosition = $("#gameContent").height();

    if (_pauseMode || _waitingForSoundToFinish) return;
    if (_waitMode) {
        endWait();
        return;
    }
    window.setTimeout(function () {
        // TO DO - send tick count
        //prepareCommand(text);

        
                    if (text.substring(0, 6) == "cheat ") {
                runCheatCode(text.substring(6));
            }
            else {
                sendCommandInternal(text);
            }
                }, 100);
}

function sendCommandInternal(command) {
    var start = (new Date).getTime();
    addToCommandLog(command);
    HandleCommand(command);
    var diff = (new Date).getTime() - start;
    TryFinishTurn();
}

function addToCommandLog(command) {
    if (commandLog == null) {
        commandLog = new Array();
    }
    commandLog.push(command);
}

function runCheatCode(code) {
    var walkthrough = window["object_main"];
    if (walkthrough.steps.indexOf("label:" + code) > -1) {
        runWalkthrough("main", 0, 0, code);
    }
    else {
        sendCommandInternal("cheat " + code);
    }
}


function generateSaveLog(fn) {
    var gameElementArray = new Array();
    gameElementArray.push(GetObject("game"));
    generateSaveLogForArray(gameElementArray, fn);
    generateSaveLogForArray(allObjects, fn);
    generateSaveLogForArray(allExits, fn);
    generateSaveLogForArray(allCommands, fn);
    generateSaveLogForArray(allTurnScripts, fn);
    generateSaveLogForArray(allTimers, fn);
    thisTurnModifiedItems = new Array();
}

function generateSaveLogForArray(array, fn) {
    for (var idx in array) {
        var object = array[idx];
        var attrs = object["__modified"];
        if (attrs != undefined) {
            for (var attrIdx in attrs) {
                var attr = attrs[attrIdx];
                fn(object, attr, object[attr]);
            }
        }

        for (var attr in object) {
            var value = object[attr];
            if (typeof value === "object") {
                for (var idx in thisTurnModifiedItems) {
                    var item = thisTurnModifiedItems[idx];

                    if (value === item) {
                        markAttributeModified(object, attr);
                        fn(object, attr, value);
                        break;
                    }
                }
            }
        }
    }
}

function saveGame() {
	return;
    if (!gameRunning) return;
    if (awaitingCallback) return;
    if (runningWalkthrough) return;
    setTimeout(function () {
        var start = (new Date).getTime();
        saveGameInternal();
        var diff = (new Date).getTime() - start;
    }, 250);
}

function saveGameInternal() {
    if (!gameRunning) return;
    if (awaitingCallback) return;
    if (!localStorage) return;
    try {
        localStorageTransactionId = localStorage.getItem("transaction");
        if (localStorageTransactionId == undefined) {
            localStorageTransactionId = 1;
        }
        else {
            localStorageTransactionId = 3 - localStorageTransactionId;
        }

        localStorageSet("output", allOutput);
        localStorageSet("output2", $("#divOutput").html());
        localStorageSet("divCount", _divCount);
        if (commandLog != null) {
            localStorageSet("commandLog", commandLog.join(";"));
        }
        localStorageSet("nextObjectId", nextObjectId);

        // Save all object creations
        var createId = 0;
        for (var idx in createdObjects) {
            createId++;
            localStorageSet("create" + createId, createdObjects[idx]);
        }
        localStorageSet("numCreates", createId);

        // Save all object type additions
        var addTypeId = 0;
        for (var idx in addedTypes) {
            addTypeId++;
            localStorageSet("addtype" + addTypeId, addedTypes[idx]);
        }
        localStorageSet("numAddTypes", addTypeId);

        // Save all object attribute changes
        var changeId = 0;
        generateSaveLog(function (object, attribute, value) {
            var valueType = TypeOf(value);
            if (object.name == "player" && StartsWith(attribute, "currentcommand")) return;
            changeId++;
            var key = "change" + changeId;
            var storeValue = value;
            switch (valueType) {
                case "stringlist":
                    storeValue = value.length;
                    var count = 0;
                    for (var idx in value) {
                        localStorageSet(key + "_" + count, value[idx]);
                        count++;
                    }
                    break;
                case "objectlist":
                    storeValue = value.length;
                    var count = 0;
                    for (var idx in value) {
                        localStorageSet(key + "_" + count, value[idx]._js_name);
                        count++;
                    }
                    break;
                case "stringdictionary":
                case "scriptdictionary":
                    var count = 0;
                    for (var dictKey in value) {
                        localStorageSet(key + "_k" + count, dictKey);
                        localStorageSet(key + "_v" + count, value[dictKey]);
                        count++;
                    }
                    storeValue = count;
                    break;
                case "objectdictionary":
                    var count = 0;
                    for (var dictKey in value) {
                        localStorageSet(key + "_k" + count, dictKey);
                        localStorageSet(key + "_v" + count, value[dictKey]._js_name);
                        count++;
                    }
                    storeValue = count;
                    break;
                case "object":
                    storeValue = value._js_name;
                    break;
                case "null":
                    storeValue = "";
            }

            localStorageSet(key, object._js_name + "." + attribute + "=" + valueType + ":" + storeValue);
        });
        localStorageSet("numChanges", changeId);

        // Save all object destroys
        var destroyId = 0;
        for (var idx in destroyedObjects) {
            destroyId++;
            localStorageSet("destroy" + destroyId, destroyedObjects[idx]);
        }
        localStorageSet("numDestroys", destroyId);

        localStorage.setItem("transaction", localStorageTransactionId);
    }
    catch (err) {
        reportError("Failed to save game: " + err);
    }
}

function loadGame_() {
	return false;
    if (!localStorage) return false;

    localStorageTransactionId = localStorage.getItem("transaction");
    if (localStorageTransactionId == undefined) {
        return false;
    }
    try {
        nextObjectId = parseInt(localStorageGet("nextObjectId"));

        // Load object creations

        var commandLogList = localStorageGet("commandLog");
        if (commandLogList != null) {
            commandLog = commandLogList.split(";");
        }
        addToCommandLog("* loaded game");

        var createCount = localStorageGet("numCreates");
        for (var i = 1; i <= createCount; i++) {
            var data = localStorageGet("create" + i);
            var params = data.split(";");
            // format is name;defaultTypeObject.name;objectType
            switch (params[2]) {
                case "object":
                    var array = allObjects;
                    break;
                case "exit":
                    var array = allExits;
                    break;
                case "timer":
                    break;
                case "turnscript":
                    break;
                default:
                    throw "Unhandled create object type " + params[2];
            }
            if (params[2] == "timer") {
                createtimer(params[0]);
            }
            else if (params[2] == "turnscript") {
                createturnscript(params[0]);
            }
            else {
                createInternal(params[0], array, GetObject(params[1]), params[2]);
                // TODO: Add to objectsNameMap
            }
        }

        // Load object type additions

        var addTypeCount = localStorageGet("numAddTypes");
        for (var i = 1; i <= addTypeCount; i++) {
            var data = localStorageGet("addtype" + i);
            var params = data.split(";");
            // format is object;type
            addTypeToObject(window[params[0]], window[params[1]]);
        }

        // Load object attribute changes

        var changeCount = localStorageGet("numChanges");
        for (var i = 1; i <= changeCount; i++) {
            var data = localStorageGet("change" + i);
            var dotPos = data.indexOf(".");
            var eqPos = data.indexOf("=");
            var colonPos = data.indexOf(":");
            var objectName = data.substring(0, dotPos);
            var attrName = data.substring(dotPos + 1, eqPos);
            var type = data.substring(eqPos + 1, colonPos);
            var valueString = data.substring(colonPos + 1);

            var object = window[objectName];
            var value = valueString;

            switch (type) {
                case "script":
                    eval("_temp_assignfn=" + valueString);
                    value = _temp_assignfn;
                    break;
                case "stringlist":
                    var count = parseInt(valueString);
                    value = new Array();
                    for (var listIdx = 0; listIdx < count; listIdx++) {
                        value.push(localStorageGet("change" + i + "_" + listIdx));
                    }
                    break;
                case "objectlist":
                    var count = parseInt(valueString);
                    value = new Array();
                    for (var listIdx = 0; listIdx < count; listIdx++) {
                        value.push(window[localStorageGet("change" + i + "_" + listIdx)]);
                    }
                    break;
                case "stringdictionary":
                    var count = parseInt(valueString);
                    value = new Object();
                    for (var listIdx = 0; listIdx < count; listIdx++) {
                        var dictKey = localStorageGet("change" + i + "_k" + listIdx);
                        var dictVal = localStorageGet("change" + i + "_v" + listIdx);
                        value[dictKey] = dictVal;
                    }
                    break;
                case "objectdictionary":
                    var count = parseInt(valueString);
                    value = new Object();
                    for (var listIdx = 0; listIdx < count; listIdx++) {
                        var dictKey = localStorageGet("change" + i + "_k" + listIdx);
                        var dictVal = localStorageGet("change" + i + "_v" + listIdx);
                        value[dictKey] = window[dictVal];
                    }
                    break;
                case "scriptdictionary":
                    var count = parseInt(valueString);
                    value = new Object();
                    for (var listIdx = 0; listIdx < count; listIdx++) {
                        var dictKey = localStorageGet("change" + i + "_k" + listIdx);
                        var dictVal = localStorageGet("change" + i + "_v" + listIdx);
                        eval("_temp_assignfn=" + dictVal);
                        value[dictKey] = _temp_assignfn;
                    }
                    break;
                case "object":
                    value = window[valueString];
                    break;
                case "null":
                    value = null;
                    break;
                case "int":
                    value = parseInt(valueString);
                    break;
                case "double":
                    value = parseFloat(valueString);
                    break;
                case "boolean":
                    value = (valueString == "true");
            }

            set(object, attrName, value, false);
        }

        // Load object destroys

        var destroyCount = localStorageGet("numDestroys");
        for (var i = 1; i <= destroyCount; i++) {
            var data = localStorageGet("destroy" + i);
            destroy(data);
        }

        currentFont = GetObject("game").defaultfont;
        $("#fontOptions").val(currentFont);

        currentFontSize = GetObject("game").defaultfontsize.toString();
        $("#fontSize").val(currentFontSize);

        $("#fontSample").css("font-family", currentFont);
        $("#fontSample").css("font-size", currentFontSize + "pt");

        clearScreen();
        _divCount = localStorageGet("divCount");
        $("#divOutput").html(localStorageGet("output2"));
        msg(localStorageGet("output"));

        beginningOfCurrentTurnScrollPosition = $("#gameContent").height();
        scrollToEnd();

        updateLists();
        return true;
    }
    catch (err) {
        reportError("Failed to load game: " + err);
        return false;
    }
}

var localStorageTransactionId;
var lastRead;

function localStorageSet(key, value) {
    localStorage.setItem("c" + localStorageTransactionId + key, value);
}

function localStorageGet(key) {
    lastRead = key;
    return localStorage.getItem("c" + localStorageTransactionId + key);
}

var currentWalkthroughSteps;
var runningWalkthrough = false;
var stepCount;
var walkthroughMaxSteps;
var walkthroughFinishCode;

function runWalkthrough(name, startStep, maxSteps, cheatCode) {
        stepCount = 0;
        walkthroughMaxSteps = maxSteps;
    walkthroughFinishCode = cheatCode;
    var walkthrough = getElement(name);
    if (walkthrough) {
        currentWalkthroughSteps = addWalkthroughSteps(walkthrough);
        currentWalkthroughSteps.splice(0, startStep);
        runningWalkthrough = true;
        runWalkthroughSteps();
    }
    else {
        msg("No walkthrough of that name");
    }
}

function addWalkthroughSteps(walkthrough) {
    var list = new Array();
    if (walkthrough.parent != null) {
        list = list.concat(addWalkthroughSteps(walkthrough.parent));
    }
    list = list.concat(walkthrough.steps);
    return list;
}

var postStep = null;

function runWalkthroughSteps() {
    
    if (currentWalkthroughSteps == null || currentWalkthroughSteps.length == 0 || (walkthroughMaxSteps > 0 && stepCount >= walkthroughMaxSteps)) {
                runningWalkthrough = false;
        saveGame();
        return;
    }

    var step = currentWalkthroughSteps.splice(0, 1)[0];

    if (step == "label:" + walkthroughFinishCode) {
        runningWalkthrough = false;
        saveGame();
        return;
    }

    msg("");
    if (StartsWith(step, "assert:")) {
            }
    else if (StartsWith(step, "label:")) {
        // ignore
    }
    else {
        stepCount++;
                beginningOfCurrentTurnScrollPosition = $("#gameContent").height();
                sendCommandInternal(step);
        scrollToEndNow();
    }
    while (postStep) {
        var fn = postStep;
        postStep = null;
        fn();
    }

    setTimeout(function () {
        runWalkthroughSteps();
    }, 100);
}

function updateStatus(text) {
    if (text.length > 0) {
        showStatusVisible(true);
        $("#statusVars").html(text.replace(/\n/g, "<br/>"));
    }
    else {
        showStatusVisible(false);
    }
}

function setBackground(col) {
    $("#divOutput").css("background-color", col);
    $("#gamePanel").css("background-color", col);
}

function ASLEvent(event, parameter) {
	is_asl_event=true;   // JS
    var fn = window[event];
    fn.apply(null, [parameter]);
	is_asl_event=false;  //JS
}

function disableMainScrollbar() {
    $("#divOutput").css("overflow", "hidden");
}

function stopTimer() {
    clearInterval(tmrTick);
}

function getTickCountAndStopTimer() {
    stopTimer();
    return tickCount;
}

function goUrl(href) {
    window.open(href);
}

function setCompassDirections(directions) {
    _compassDirs = directions;
    $("#cmdCompassNW").attr("title", _compassDirs[0]);
    $("#cmdCompassN").attr("title", _compassDirs[1]);
    $("#cmdCompassNE").attr("title", _compassDirs[2]);
    $("#cmdCompassW").attr("title", _compassDirs[3]);
    $("#cmdCompassE").attr("title", _compassDirs[4]);
    $("#cmdCompassSW").attr("title", _compassDirs[5]);
    $("#cmdCompassS").attr("title", _compassDirs[6]);
    $("#cmdCompassSE").attr("title", _compassDirs[7]);
    $("#cmdCompassU").attr("title", _compassDirs[8]);
    $("#cmdCompassD").attr("title", _compassDirs[9]);
    $("#cmdCompassIn").attr("title", _compassDirs[10]);
    $("#cmdCompassOut").attr("title", _compassDirs[11]);
}

function setInterfaceString(name, text) {
    switch (name) {
        case "InventoryLabel":
            $("#inventoryLabel").html(text);
            break;
        case "PlacesObjectsLabel":
            $("#placesObjectsLabel").html(text);
            break;
        case "CompassLabel":
            $("#compassLabel").html(text);
            break;
        case "InButtonLabel":
            $("#cmdCompassIn").attr("value", text);
            break;
        case "OutButtonLabel":
            $("#cmdCompassOut").attr("value", text);
            break;
        case "EmptyListLabel":
            break;
        case "NothingSelectedLabel":
            break;
    }
}

function updateVerbButtons(list, verbsArray, idprefix) {
    var selectedIndex = list.prop("selectedIndex");
    var verbs = verbsArray[selectedIndex].split("/");
    var count = 1;
    $.each(verbs, function () {
        var target = $("#" + idprefix + count);
        target.attr("value", this);
        target.show();
        count++;
    });
    for (var i = count; i <= verbButtonCount; i++) {
        var target = $("#" + idprefix + i);
        target.hide();
    }
}
var _currentDiv = null;

function setCommandBarStyle(style) {
    var width = $("#txtCommand").width();
    $("#txtCommand").attr("style", style);
    //$("#txtCommand").width(width); //??????????????????????  JS
}

function addText(text) {
    if (_currentDiv == null) {
        createNewDiv("left");
    }

    _currentDiv.append(text);
    scrollToEnd();
}

var _divCount = 0;

function createNewDiv(alignment) {
	var classes = _outputSections.join(" ");
    _divCount++;
    $("<div/>", {
        id: "divOutputAlign" + _divCount,
        style: "text-align: " + alignment,
		"class": classes
    }).appendTo("#divOutput");
    _currentDiv = $("#divOutputAlign" + _divCount);
}

function bindMenu(linkid, verbs, text, inline) {
    var verbsList = verbs.split("/");

    var options = [];
    $.each(verbsList, function (key, value) {
        options = options.concat({ title: value, action: { type: "fn", callback: "doMenuClick('" + value.toLowerCase() + " " + text.replace("'", "\\'") + "');" } });
    });

    $("#" + linkid).jjmenu("both", options, {}, { show: "fadeIn", speed: 100, xposition: "left", yposition: "auto", "orientation": "auto" });
}
function bindMenuEl(el) {
	var verbs = el.data("verbs");
    var text = el.html();
    var elementId = el.data("elementid");
	var id = el.attr("id");
    bindMenu(id, verbs, text, false);
	
	
}
// added from desktop version:
function buildMenuOptions(verbs, text, elementId) {
    var verbsList = verbs.split("/");
    var options = [];
    var metadata = new Object();
    metadata[text] = elementId;
    var metadataString = JSON.stringify(metadata);

    $.each(verbsList, function (key, value) {
        options = options.concat({
            title: value,
            action: {
                callback: function (selectedValue) {
                    sendCommand(selectedValue.toLowerCase() + " " + text, metadataString);
                }
            }
        });
    });

    return options;
}
function doMenuClick(command) {
    $("div[id^=jjmenu]").remove();
    sendCommand(command);
}

function updateObjectLinks(data) {
    $(".elementmenu").each(function (index, e) {
        var $e = $(e);
        var verbs = data[$e.data("elementid")];
        if (verbs) {
            $e.removeClass("disabled");
            $e.data("verbs", verbs);
            // also set attribute so verbs are persisted to savegame
            $e.attr("data-verbs", verbs);
			bindMenuEl($e); // added by vourtram
        } else {
            $e.addClass("disabled");
        }
    });
}

function updateExitLinks(data) {
    $(".exitlink").each(function (index, e) {
        var $e = $(e);
        var exitid = $e.data("elementid");
        var available = $.inArray(exitid, data) > -1;
        if (available) {
            $e.removeClass("disabled");
        } else {
            $e.addClass("disabled");
        }
    });
}

function updateCommandLinks(data) {
    $(".commandlink").each(function (index, e) {
        var $e = $(e);
        var exitid = $e.data("elementid");
        var available = $.inArray(exitid, data) > -1;
        if (available) {
            $e.removeClass("disabled");
        } else {
            $e.addClass("disabled");
        }
    });
}

function disableAllCommandLinks() {
    $(".commandlink").each(function (index, e) {
        $(e).addClass("disabled");
    });
}

function clearScreen() {
    allOutput = "";
    $("#divOutput").html("");
    createNewDiv("left");
    beginningOfCurrentTurnScrollPosition = 0;
}
function clearPast(keep) {
	while ( $("#divOutput").children().length>keep)  {
		$("#divOutput").children().first().remove();
	}
}
function keyPressCode(e) {
    var keynum
    if (window.event) {
        keynum = e.keyCode
    } else if (e.which) {
        keynum = e.which
    }
    return keynum;
}

function AddYouTube(id) {
    var embedHTML = "<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"http://www.youtube.com/v/" + id + "\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/" + id + "\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>";
    addText(embedHTML);
}

function AddVimeo(id) {
    var embedHTML = "<object width=\"400\" height=\"225\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=" + id + "&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=" + id + "&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"400\" height=\"225\"></embed></object>";
    addText(embedHTML);
}

function SetMenuBackground(color) {
    var css = getCSSRule("div.jj_menu_item");
    if (css) {
        css.style.backgroundColor = color;
    }
}

function SetMenuForeground(color) {
    var css = getCSSRule("div.jj_menu_item");
    if (css) {
        css.style.color = color;
    }
}

function SetMenuHoverBackground(color) {
    var css = getCSSRule("div.jj_menu_item_hover");
    if (css) {
        css.style.backgroundColor = color;
    }
}

function SetMenuHoverForeground(color) {
    var css = getCSSRule("div.jj_menu_item_hover");
    if (css) {
        css.style.color = color;
    }
}

function SetMenuFontName(font) {
    var css = getCSSRule("div.jjmenu");
    if (css) {
        css.style.fontFamily = font;
    }
}

function SetMenuFontSize(size) {
    // disabled
    //var css = getCSSRule("div.jjmenu");
    //if (css) {
    //    css.style.fontSize = size;
    //}
}

function TurnOffHyperlinksUnderline() {
    var css = getCSSRule("a.cmdlink");
    if (css) {
        css.style.textDecoration = "none";
    }
}

var _outputSections = new Array();

function JsStartOutputSection(name) {
    if ($.inArray(name, _outputSections) == -1) {
        _outputSections.push(name);
        createNewDiv("left");
    }
}

function JsEndOutputSection(name) {
    var index = $.inArray(name, _outputSections);
    if (index != -1) {
        _outputSections.splice(index, 1);
        createNewDiv("left");
    }
}

function JsHideOutputSection(name) {
    EndOutputSection(name);
    $("." + name + " a").attr("onclick", "");
    setTimeout(function () {
        $("." + name).hide(250, function () { $(this).remove(); });
    }, 250);
}

function getCSSRule(ruleName, deleteFlag) {
    ruleName = ruleName.toLowerCase();
    if (document.styleSheets) {
        for (var i = 0; i < document.styleSheets.length; i++) {
            var styleSheet = document.styleSheets[i];
            var ii = 0;
            var cssRule = false;
			try {
				do {
					if (styleSheet.cssRules) {
						cssRule = styleSheet.cssRules[ii];
					} else if (styleSheet.rules) {
						cssRule = styleSheet.rules[ii];
					}
					if (cssRule) {
						if (typeof cssRule.selectorText != "undefined") {
							if (cssRule.selectorText.toLowerCase() == ruleName) {
								if (deleteFlag == 'delete') {
									if (styleSheet.cssRules) {
										styleSheet.deleteRule(ii);
									} else {
										styleSheet.removeRule(ii);
									}
									return true;
								} else {
									return cssRule;
								}
							}
						}
					}
					ii++;
				} while (cssRule)
			} catch(err) {
				//security errors...
			}
        }
    }
    return false;
}

function killCSSRule(ruleName) {
    return getCSSRule(ruleName, 'delete');
}

function addCSSRule(ruleName) {
    if (document.styleSheets) {
        if (!getCSSRule(ruleName)) {
            if (document.styleSheets[0].addRule) {
                document.styleSheets[0].addRule(ruleName, null, 0);
            } else {
                document.styleSheets[0].insertRule(ruleName + ' { }', 0);
            }
        }
    }
    return getCSSRule(ruleName);
}

function uiDoRestart() {
    if (localStorage) {
        //localStorage.clear(); //JS
    }
    window.location.reload();
}

function reportError(errorMessage) {
    alert(errorMessage);
    console.log(errorMessage);
}

// WORLDMODEL ===================================================================================================================

var webPlayer = true;
var tmrTick = null;
var awaitingCallback = false;
var gameRunning = true;
var gameActive = true;

function worldmodelInitialise() {
    resolveObjectReferences();
    GetObject("game").timeelapsed = 0;
    for (var idx in allTimers) {
        var timer = allTimers[idx];
        if (timer.enabled) {
            timer.trigger = timer.interval;
        }
    }
    setObjectChildAttributes();
    if (typeof InitInterface == 'function') {
        InitInterface();
    }
    updateLists();
    tmrTick = setInterval(function () {
        timerTick();
    }, 1000);
}

function worldModelBeginGame() {
    StartGame();
    TryRunOnReadyScripts();
    updateLists();
}

function resolveObjectReferences() {
    for (var item in objectReferences) {
        var objData = objectReferences[item];
        window[objData[0]][objData[1]] = window[objData[2]];
    }
    for (var item in objectListReferences) {
        var objData = objectListReferences[item];
        var parent = window[objData[0]];
        var attribute = objData[1].replace(/ /g, "___SPACE___");
        var itemValue = objData[2];
        if (typeof parent[attribute] == "undefined") {
            parent[attribute] = new Array();
        }
        parent[attribute].push(window[itemValue]);
    }
    for (var item in objectDictionaryReferences) {
        var objData = objectDictionaryReferences[item];
        var parent = window[objData[0]];
        var attribute = objData[1].replace(/ /g, "___SPACE___");
        var itemKey = objData[2];
        var itemValue = objData[3];
        if (typeof parent[attribute] == "undefined") {
            parent[attribute] = new Object();
        }
        parent[attribute][itemKey] = window[itemValue];
    }
}

function setObjectChildAttributes() {
    for (var idx in allObjects) {
        var obj = allObjects[idx];
        if (obj.parent) {
            addChildObject(obj.parent, obj);
        }
    }
}

function addChildObject(parent, child) {
    if (!parent["_children"]) {
        parent["_children"] = new Array();
    }
    parent["_children"].push(child);
}

function updateLists() {
    setTimeout(function () {
        updateListsInternal();
    }, 1000);
}

function updateListsInternal() {
    updateObjectsLists();
    updateExitsList();
    if (typeof UpdateStatusAttributes == "function") {
        UpdateStatusAttributes();
    }
}

function updateObjectsLists() {
    updateObjectsList("GetPlacesObjectsList", "placesobjects");
    updateObjectsList("ScopeInventory", "inventory");
}

function updateObjectsList(scope, listName) {
    var listItems = window[scope]();
    if (scope == "GetPlacesObjectsList") {
        listItems = listItems.concat(ScopeExits());
    }
    var listData = new Array();
    for (var item in listItems) {
        var verbs = (listName == "inventory") ? listItems[item].inventoryverbs : listItems[item].displayverbs;
        if (verbs != undefined) {
            var verbsList = verbs.join("/");
        }
        else {
            var verbsList = "";
        }
        listData.push(GetDisplayAlias(listItems[item]) + ":" + verbsList);
    }
    updateList(listName, listData);
}

function updateExitsList() {
    var listItems = ScopeExits();
    var listData = new Array();
    for (var item in listItems) {
        listData.push(listItems[item].alias);
    }
    updateCompass(listData);
}

function attributeChanged(object, attribute, runscript, oldParent) {
    // TO DO: "Meta" field SortIndex - changed when object moves to a new parent, so it appears at the end of the list
    // of children.
    markAttributeModified(object, attribute);
    if (runscript) {
        var changedScript = "changed" + attribute;
        if (typeof object[changedScript] == "function") {
            object[changedScript](oldParent);
        }
    }
}

var nextObjectId = 0;

function getUniqueId() {
    nextObjectId++;
    return "dynid" + nextObjectId;
}

var transactions = new Array();
var currentTransaction;

function preAttributeChange(object, attribute, newValue) {
    if (currentTransaction != undefined) {
        // store the old value on the undo list
        var oldValue = object[attribute];
        var undoFunction;
        if (attribute == "parent") {
            undoFunction = function () {
                newValue = object[attribute];
                object[attribute] = oldValue;
                objectMoved(object, newValue, oldValue);
            };
        }
        else {
            undoFunction = function () {
                object[attribute] = oldValue;
            };
        }

        currentTransaction.undolist.push(undoFunction);
    }

    var type = TypeOf(newValue);

    // if value requires cloning first then return a clone
    if (type == "stringdictionary" || type == "objectdictionary" || type == "scriptdictionary") {
        var result = new Object();
        for (key in newValue) {
            result[key] = newValue[key];
        }
        return result;
    }
    else if (type == "objectlist" || type == "stringlist") {
        var result = new Array();
        for (idx in newValue) {
            result.push(newValue[idx]);
        }
        return result;
    }

    return newValue;
}

function markAttributeModified(object, attribute) {
    if (object["__modified"] == undefined) {
        object["__modified"] = new Array();
    }
    if (object["__modified"].indexOf(attribute) == -1) {
        object["__modified"].push(attribute);
    }
}

var thisTurnModifiedItems = new Array();

function markModified(item) {
    if (thisTurnModifiedItems.indexOf(item) == -1) {
        thisTurnModifiedItems.push(item);
    }
}

// Javascript magic to support function overloading
// from http://ejohn.org/blog/javascript-method-overloading/
// addMethod - By John Resig (MIT Licensed)

function addMethod(object, name, fn) {
    var old = object[name];
    object[name] = function () {
        if (fn.length == arguments.length)
            return fn.apply(this, arguments);
        else if (typeof old == 'function')
            return old.apply(this, arguments);
    };
}

// Script commands

var objectTag = new XRegExp("\<object (id='(.*?)' )?verbs='(?<verbs>.*?)'\>(?<text>.*?)\<\/object\>");
var colorTag = /\<color color="(.*?)"\>(.*?)\<\/color\>/;
var commandTag = /\<command input="(.*?)"\>(.*?)\<\/command\>/;
var alignTag = /\<align align="(.*?)"\>(.*?)\<\/align\>/;
var fontTag = /\<font size="(.*?)"\>(.*?)\<\/font\>/;
var currentFont = "";
var currentFontSize = "";
var currentForeground = "";
var currentLinkForeground = "";
var nextID = 1;
var allOutput = "";

function msg(text) {
    //%%MIN V540
    OutputText(text);
    //%%END MIN V540

    }

function listadd(list, item) {
    if (currentTransaction != undefined) {
        var undoFunction = function () {
            list.splice(list.length - 1, 1);
        }
        currentTransaction.undolist.push(undoFunction);
    }
    list.push(item);
    markModified(list);
}

function listremove(list, item) {
    var index = list.indexOf(item);
    if (index != -1) {
        if (currentTransaction != undefined) {
            var undoFunction = function () {
                listadd(list, item);
            }
            currentTransaction.undolist.push(undoFunction);
        }

        list.splice(index, 1);
    }
    markModified(list);
}

function dictionaryadd(dictionary, key, item) {
    if (currentTransaction != undefined) {
        var oldValue = dictionary[key];
        if (oldValue != undefined) {
            var undoFunction = function () {
                dictionary[key] = oldValue;
            }
        }
        else {
            var undoFunction = function () {
                delete dictionary[key];
            }
        }
        currentTransaction.undolist.push(undoFunction);
    }
    dictionary[key] = item;
    markModified(dictionary);
}

function dictionaryremove(dictionary, key) {
    if (currentTransaction != undefined) {
        var oldValue = dictionary[key];
        var undoFunction = function () {
            dictionary[key] = oldValue;
        }
        currentTransaction.undolist.push(undoFunction);
    }
    delete dictionary[key];
    markModified(dictionary);
}

function request(requestType, data) {
    switch (requestType) {
        case "UpdateLocation":
            updateLocation(data);
            break;
        case "SetStatus":
            updateStatus(data);
            break;
        case "SetInterfaceString":
            var splitString = data.split("=");
            var element = splitString[0];
            var string = splitString[1];
            setInterfaceString(element, string);
            break;
        case "SetCompassDirections":
            setCompassDirections(data.split(";"));
            break;
        case "Show":
            uiShow(requestShowHide_GetElement(data));
            break;
        case "Hide":
            uiHide(requestShowHide_GetElement(data));
            break;
        case "Foreground":
            currentForeground = data;
            break;
        case "Background":
            setBackground(data);
            break;
        case "LinkForeground":
            currentLinkForeground = data;
            break;
        case "FontName":
            currentFont = data;
            break;
        case "FontSize":
            currentFontSize = data;
            break;
        case "ClearScreen":
            clearScreen();
            break;
        case "SetPanelContents":
            setPanelContents(data);
            break;
        case "Log":
            break;
        case "Speak":
            break;
        default:
            throw "Request not supported: " + requestType + "; " + data;
    }
}

function requestShowHide_GetElement(element) {
    switch (element) {
        case "Panes":
            return "#gamePanes";
        case "Location":
            return "#location";
        case "Command":
            return "#divCommand";
        default:
            return "";
    }
}

function setPanelHeight() {
    setTimeout(function () {
        var height = $("#gamePanel").height();
        if ($("#gamePanel").html() == "") {
            // workaround for IE weirdness where an empty div has height
            height = 0;
            $("#gamePanel").hide();
        }
        else {
            $("#gamePanel").show();
        }
        $("#gamePanelSpacer").height(height);
        scrollToEnd();
    }, 100);
}

function setPanelContents(html) {
    $("#gamePanel").html(html);
    setPanelHeight();
}

function starttransaction(command) {
    var previousTransaction = currentTransaction;
    currentTransaction = new Object();
    transactions.push(currentTransaction);
    currentTransaction.undolist = new Array();
    currentTransaction.previous = previousTransaction;
    currentTransaction.command = command;
}

function undo() {
    if (currentTransaction) {
        var transactionToUndo = currentTransaction;
        if (dynamicTemplates["UndoTurn"]) {
            msg(overloadedFunctions.DynamicTemplate("UndoTurn", transactionToUndo.command));
        }
        else {
            msg("Undo: " + transactionToUndo.command);
        }
        currentTransaction = undefined;
        transactionToUndo.undolist.reverse();
        for (idx in transactionToUndo.undolist) {
            var fn = transactionToUndo.undolist[idx];
            fn();
        }
        currentTransaction = transactionToUndo.previous;
    }
    else {
        if (templates["NothingToUndo"]) {
            msg(templates["NothingToUndo"]);
        }
        else {
            msg("Nothing to undo");
        }
    }
}

function runscriptattribute2(object, attribute) {
    var fn = GetAttribute(object, attribute);
    fn.call(object);
}

function runscriptattribute3(object, attribute, parameters) {
    var fn = GetAttribute(object, attribute);
    fn.call(object, parameters);
}

function invoke(script, parameters) {
    if (parameters) {
        script.apply(null, [parameters["result"]]);
    } else {
        script();
    }
}

function error(message) {
    throw message;
}

function set(object, attribute, value, runscript) {
    if (runscript === undefined) {
        runscript = true;
    }
    attribute = attribute.replace(/ /g, "___SPACE___");
    var changed = (object[attribute] != value);

    value = preAttributeChange(object, attribute, value);
	var oldParent=null;
    if (attribute == "parent") {
        oldParent = object[attribute];
    }

    object[attribute] = value;

    if (changed) {
        if (attribute == "parent") {
            objectMoved(object, oldParent, value);			
        }

        attributeChanged(object, attribute, runscript,oldParent);
		if (attribute == "parent") {            
			UpdateObjectLinks();
        }
    }
}

function objectMoved(object, oldParent, newParent) {
    if (object.elementtype == "object" && object.type == "object") {
        if (oldParent) {
            var idx = oldParent["_children"].indexOf(object);
            if (idx == -1) {
                throw "Object wasn't in room!";
            }
            oldParent["_children"].splice(idx, 1);
        }
        if (newParent) {
            if (!newParent["_children"]) {
                newParent["_children"] = new Array();
            }
            newParent["_children"].push(object);
        }
    }
}

var menuOptions;
var menuCallback;
var finishTurnAfterSelection;

function showmenu_async(title, options, allowCancel, callback) {
    showmenu_async_internal(title, options, allowCancel, callback, true);
}

function showmenu_async_internal(title, options, allowCancel, callback, finishTurn) {
    menuOptions = options;
    menuCallback = callback;
    awaitingCallback = true;
    finishTurnAfterSelection = finishTurn;

    if (runningWalkthrough) {
        var step = currentWalkthroughSteps.splice(0, 1);
        var response = step[0];
        if (response.substring(0, 5) == "menu:") {
            var selection = response.substring(5);
            var selectionKey = "";
            for (var option in options) {
                msg(options[option]);
                if (options[option] == selection) {
                    selectionKey = option;
                }
            }
            if (selectionKey.length == 0) {
                msg("Error running walkthrough - menu response was not present in menu");
            }
            else {
                postStep = function () {
                    msg(" - " + selection);
                    SetMenuSelection(selectionKey);
                };
            }
        }
        else {
            msg("Error running walkthrough - expected menu response");
        }
    }
    else {
        showMenu(title, options, allowCancel);
    }
}

function ask(question, callback) {
    if (runningWalkthrough) {
        var step = currentWalkthroughSteps.splice(0, 1);
        var response = step[0];
        if (response.substring(0, 7) == "answer:") {
            awaitingCallback = true;
            postStep = function () {
                awaitingCallback = false;
                callback(response.substring(7) == "yes");
                TryFinishTurn();
            };
        }
        else {
            msg("Error running walkthrough - expected ask response");
        }
    }
    else {
        var result = confirm(question);
        callback(result);
        TryFinishTurn();
    }
}

var waitCallback;

function wait_async(callback) {
    waitCallback = callback;
    awaitingCallback = true;
    beginWait();
}

var getinputCallback;
var awaitingInputCallback = false;

function getinput_async(callback) {
    getinputCallback = callback;
    awaitingCallback = true;
    awaitingInputCallback = true;
}

function create(name) {
    createInternal(name, allObjects, GetObject("defaultobject"), "object");
}

function createexit(name, from, to) {
    var newExit = createInternal(getUniqueId(), allExits, GetObject("defaultexit"), "exit");
    set(newExit, "alias", name);
    set(newExit, "parent", from);
    set(newExit, "to", to);
    return newExit;
}

function createexit_withtype(name, from, to, type) {
    var newExit = createexit(name, from, to);
    if (type) {
        addTypeToObject(newExit, type);
    }
}

function createtimer(name) {
    createdObjects.push(name + ";;timer");

    if (currentTransaction != undefined) {
        var undoFunction = function () {
            destroy(name);
        }
        currentTransaction.undolist.push(undoFunction);
    }

    newObject = new Object();
    // TODO: Add to object map
    window["object_" + name] = newObject;
    allTimers.push(newObject);
    newObject.elementtype = "timer";
    newObject.name = name;
    newObject["_js_name"] = name;
    return newObject;
}

function createturnscript(name) {
    return createInternal(name, allTurnScripts, "defaultturnscript", "turnscript");
}

var createdObjects = new Array();

function createInternal(name, array, defaultTypeObject, objectType) {

    createdObjects.push(name + ";" + defaultTypeObject.name + ";" + objectType);

    if (currentTransaction != undefined) {
        var undoFunction = function () {
            destroy(name);
        }
        currentTransaction.undolist.push(undoFunction);
    }

    newObject = new Object();
    window[name] = newObject;
    objectsNameMap[name] = newObject;
    elementsNameMap[name] = newObject;
    array.push(newObject);
    newObject.elementtype = "object";
    newObject.name = name;
    newObject["_js_name"] = name;
    newObject.type = objectType;
    addTypeToObject_NoLog(newObject, defaultTypeObject);
    return newObject;
}

var addedTypes = new Array();

function addTypeToObject(object, type) {
    addedTypes.push(object.name + ";" + type.name);
    addTypeToObject_NoLog(object, type);
}

function addTypeToObject_NoLog(object, type) {
    if (type != undefined) {
        for (var attribute in type) {
            if (object[attribute] == undefined) {
                object[attribute] = type[attribute];
            }
        }
    }
}

var destroyedObjects = new Array();

function destroy(name) {
    destroyedObjects.push(name);
    destroyObject(GetObject(name));
}

function destroyObject(object) {
    var childObjects = new Array();
    for (var idx in allObjects) {
        var thisObject = allObjects[idx];
        if (thisObject.parent == object) {
            childObjects.push(thisObject);
        }
    }
    for (var childObject in childObjects) {
        destroyObject(childObjects[childObject]);
    }
    destroyObject_removeFromArray(object, allObjects);
    destroyObject_removeFromArray(object, allExits);
    destroyObject_removeFromArray(object, allCommands);
    destroyObject_removeFromArray(object, allTurnScripts);

    if (currentTransaction != undefined) {
        var undoFunction = function () {
            delete object["__destroyed"];
        }
        currentTransaction.undolist.push(undoFunction);
    }
    object["__destroyed"] = true;
}

function destroyObject_removeFromArray(object, array) {
    var removeIdx = $.inArray(object, array);
    if (removeIdx != -1) {
        if (currentTransaction != undefined) {
            var undoFunction = function () {
                array.push(object);
            }
            currentTransaction.undolist.push(undoFunction);
        }
        array.splice(removeIdx, 1);
    }
}

function insertHtml(filename) {
    addText(embeddedHtml[filename]);
}

function picture(filename) {
    msg("<img src=\"" + filename + "\" onload=\"scrollToEnd();\" /><br />");
}

function playsound(file, wait, loop) {
    // TO DO: support wav format
    playMp3(file, wait, loop);
}

function stopsound() {
    stopAudio();
}

function pauseEvent() {
    gameActive = false;
}

function resumeEvent() {
    gameActive = true;
}

function timerTick() {
    if (!gameRunning) return;
    if (!gameActive) return;
    var tickCount = GetObject("game").timeelapsed + 1;
    set(GetObject("game"), "timeelapsed", tickCount);
    var scriptRan = false;
    for (var idx in allTimers) {
        var timer = allTimers[idx];
        if (timer.enabled) {
            if (tickCount >= timer.trigger) {
                set(timer, "trigger", timer.trigger + timer.interval);
                timer.script();
                scriptRan = true;
            }
        }
    }
    if (scriptRan) {
        saveGame();
        updateLists();
    }
}

function finish() {
    gameRunning = false;
    if (localStorage) {
        //localStorage.clear(); //JS
    }
    $("#divCommand").hide();
}

var onReadyCallback = null;

function on_ready(callback) {
    if (!awaitingCallback) {
        callback();
    }
    else {
        onReadyCallback = callback;
    }
}

function getElement(name) {
    return elementsNameMap[name];
}

function setGameWidth() {
}

function setGamePadding() {
}

function hideBorder() {
}

// Functions

function NewObjectList() {
    return new Array();
}
// Added JS (missing)
function NewList() {
    return new Array();
}
function NewStringList() {
    return new Array();
}

function NewDictionary() {
    return new Object();
}

function NewObjectDictionary() {
    return new Object();
}

function NewStringDictionary() {
    return new Object();
}

function ToString(value) {
    return value.toString();
}

function ToInt(value) {
    return parseInt(value);
}

function ToDouble(value) {
    return parseFloat(value);
}

function Join(array, separator) {
    return array.join(separator);
}

function Split(input, delimiter) {
    return input.split(delimiter);
}

function Trim(input) {
    return $.trim(input);
}

function LengthOf(input) {
    if (input == null) return 0;
    return input.length;
}

function StartsWith(input, text) {
    return input.indexOf(text) == 0;
}

function LCase(text) {
    return text.toLowerCase();
}

function UCase(text) {
    return text.toUpperCase();
}

function CapFirst(text) {
    return text.substring(0, 1).toUpperCase() + text.substring(1);
}

function Left(text, count) {
    return text.substring(0, count);
}

function Right(text, count) {
    return text.substring(text.length - count - 1);
}

function Mid(text, start, count) {
    return text.substr(start - 1, count);
}

function Instr(p1, p2, p3) {
    var input, search;
    if (p3 === undefined) {
        input = p1;
        search = p2;
        return input.indexOf(search) + 1;
    } else {
        var start = p1;
        input = p2;
        search = p3;
        return input.indexOf(search, start - 1) + 1;
    }
}

function Replace(input, text, newText) {
    return input.split(text).join(newText);
}

var regexCache = new Object();

function getRegex(regexString, cacheID) {
    var result = regexCache[cacheID];
    if (result) {
        return result;
    }
    result = new XRegExp(regexString, "i");
    regexCache[cacheID] = result;
    return result;
}

function IsRegexMatch(regexString, input, cacheID) {
    var regex = getRegex(regexString, cacheID);
    return regex.test(input);
}

function GetMatchStrength(regexString, input, cacheID) {
    var regex = getRegex(regexString, cacheID);
    var lengthOfTextMatchedByGroups = 0;
    var matches = regex.exec(input);
    var namedGroups = GetRegexNamedGroups(matches);
    for (var groupIdx in namedGroups) {
        if (matches[namedGroups[groupIdx]] != undefined) {
            lengthOfTextMatchedByGroups += matches[namedGroups[groupIdx]].length;
        }
    }
    return input.length - lengthOfTextMatchedByGroups;
}

function Populate(regexString, input, cacheID) {
    var regex = getRegex(regexString, cacheID);
    var matches = regex.exec(input);
    var result = new Object();
    var namedGroups = GetRegexNamedGroups(matches);
    for (var groupIdx in namedGroups) {
        if (matches[namedGroups[groupIdx]] != undefined) {
            var varName = namedGroups[groupIdx];
            var mapIndex = varName.indexOf("_map_");
            if (mapIndex != -1) {
                varName = varName.substring(mapIndex + 5);
            }
            result[varName] = matches[namedGroups[groupIdx]];
        }
    }
    return result;
}

function GetRegexNamedGroups(matches) {
    var result = new Array();
    for (var prop in matches) {
        if (matches.hasOwnProperty(prop)) {
            if (StartsWith(prop, "object") || prop.indexOf("_map_object") != -1
             || StartsWith(prop, "text") || prop.indexOf("_map_text") != -1
             || StartsWith(prop, "exit") || prop.indexOf("_map_exit") != -1) {
                result.push(prop);
            }
        }
    }
    return result;
}

function GetAttribute(element, attribute) {
    attribute = attribute.replace(/ /g, "___SPACE___");
    return element[attribute];
}

function GetBoolean(element, attribute) {
    if (HasBoolean(element, attribute)) {
        return GetAttribute(element, attribute);
    }
    return false;
}

function GetInt(element, attribute) {
    if (HasInt(element, attribute)) {
        return GetAttribute(element, attribute);
    }
    return 0;
}

function GetObject(element) {
    result = objectsNameMap[element];
    if (result == undefined) return result;
    if (result["__destroyed"]) return null;
    return result;
}

function GetTimer(name) {
    return GetObject(name);
}

function GetString(element, attribute) {
    if (HasString(element, attribute)) {
        return GetAttribute(element, attribute);
    }
    return null;
}

function HasAttribute(element, attribute) {
    return (GetAttribute(element, attribute) != undefined);
}

function HasBoolean(element, attribute) {
    return (TypeOf(GetAttribute(element, attribute)) == "boolean");
}

function HasInt(element, attribute) {
    return (TypeOf(GetAttribute(element, attribute)) == "int");
}

function HasObject(element, attribute) {
    return (TypeOf(GetAttribute(element, attribute)) == "object");
}

function HasString(element, attribute) {
    return (TypeOf(GetAttribute(element, attribute)) == "string");
}

function HasScript(element, attribute) {
    return (TypeOf(GetAttribute(element, attribute)) == "script");
}

function HasDelegateImplementation(element, attribute) {
    return (TypeOf(GetAttribute(element, attribute)) == "script");
}

function GetAttributeNames(element, includeInheritedAttributes) {
    var result = [];
    for (var name in element) {
        result.push(name);
    }
    return result;
}

function AllObjects() {
    return allObjects;
}

function AllExits() {
    return allExits;
}

function AllCommands() {
    return allCommands;
}

function AllTurnScripts() {
    return allTurnScripts;
}

function TypeOf(value) {
    return overloadedFunctions.TypeOf(value);
}

function OverloadedFunctions() {
    addMethod(this, "TypeOf", function (value) {
        var type = typeof value;
        if (type == "function") return "script";
        if (type == "object") {
            if (value == null) return "null";
            if (Object.prototype.toString.call(value) === '[object Array]') {
                // could be an objectlist or stringlist
                var allObjects = true;
                var allStrings = true;

                for (var index in value) {
                    var item = value[index];
                    if (typeof item != "string") allStrings = false;
                    if (typeof item != "object") allObjects = false;
                    if (!allStrings && !allObjects) break;
                }

                if (allStrings) return "stringlist";
                if (allObjects) return "objectlist";
                return "unknown";
            }
            else {
                // could be an object, stringdictionary, objectdictionary or scriptdictionary
                var allObjects = true;
                var allStrings = true;
                var allScripts = true;

                for (var key in value) {
                    var item = value[key];
                    if (typeof item != "string") allStrings = false;
                    if (TypeOf(item) != "object") allObjects = false;
                    if (typeof item != "function") allScripts = false;
                    if (!allStrings && !allObjects && !allScripts) break;
                }

                if (allStrings) {
                    return "stringdictionary";
                }
                if (allObjects) {
                    return "objectdictionary";
                }
                if (allScripts) {
                    return "scriptdictionary";
                }
                return "object";
            }
        }
        if (type == "boolean") return "boolean";
        if (type == "string") return "string";
        if (type == "number") {
            // TO DO: Also need to handle double
            return "int";
        }
        if (type == "undefined") return "null";

        // TO DO: Also valid: Delegate name
    });

    addMethod(this, "TypeOf", function (object, attribute) {
        return TypeOf(GetAttribute(object, attribute));
    });

    addMethod(this, "DynamicTemplate", function (name, arg1) {
        params = new Object();
        params["object"] = arg1;
        params["exit"] = arg1;
        params["text"] = arg1;
        return dynamicTemplates[name](params);
    });

    addMethod(this, "DynamicTemplate", function (name, arg1, arg2) {
        params = new Object();
        params["object1"] = arg1;
        params["object2"] = arg2;
        return dynamicTemplates[name](params);
    });

    addMethod(this, "Eval", function (expression) {
        return eval(expression);
    });

    addMethod(this, "Eval", function (expression, params) {
        for (var varname in params) {
            var varvalue = params[varname];
            eval("var " + varname + "=varvalue");
        }
        return eval(expression);
    });
}

var overloadedFunctions = new OverloadedFunctions();

function DictionaryContains(dictionary, key) {
    return dictionary[key] != undefined;
}

function DictionaryItem(dictionary, key) {
    return dictionary[key];
}

function StringDictionaryItem(dictionary, key) {
    return dictionary[key];
}

function ScriptDictionaryItem(dictionary, key) {
    return dictionary[key];
}

function ObjectDictionaryItem(dictionary, key) {
    return dictionary[key];
}

function DictionaryCount(dictionary) {
    var count = 0;
    for (key in dictionary) {
        count++;
    }
    return count;
}

function ListCombine(list1, list2) {
    return list1.concat(list2);
}

function ListExclude(list, element) {
    var listCopy = list.slice(0);
    var index = listCopy.indexOf(element);
    if (index != -1) {
        listCopy.splice(index, 1);
    }
    return listCopy;
}

function ListContains(list, element) {
    return ($.inArray(element, list) != -1);
}

function ListCount(list) {
    return list.length;
}

function ListItem(list, index) {
    return list[index];
}

function StringListItem(list, index) {
    return list[index];
}

function ObjectListItem(list, index) {
    return list[index];
}

function Template(name) {
    return templates["t_" + name];
}

// TO DO: Need overloads to handle passing function parameters
function RunDelegateFunction(object, attribute) {
    return GetAttribute(object, attribute)();
}

function Contains(parent, child) {
    if (child.parent == null || child.parent == undefined) return false;
    if (child.parent == parent) return true;
    return Contains(parent, child.parent);
}

function ShowMenu() {
    throw "Synchronous ShowMenu function is not supported. Use showmenu_async function instead";
}

function SetMenuSelection(result) {
    if (Object.prototype.toString.call(menuOptions) === '[object Array]') {
        awaitingCallback = false;
        menuCallback(menuOptions[result]);
    }
    else {
        awaitingCallback = false;
        menuCallback(result);
    }
    if (finishTurnAfterSelection) {
        TryFinishTurn();
    }
}

function GetExitByName(parent, name) {
    for (var idx in allExits) {
        var obj = allExits[idx];
        if (obj.parent == parent && obj.alias == name) {
            return obj.name;
        }
    }
}

function GetExitByLink(parent, to) {
    for (var idx in allExits) {
        var obj = allExits[idx];
        if (obj.parent == parent && obj.to == to) {
            return obj.name;
        }
    }
}

function GetFileURL(file) {
    return file;
}

function Ask(question) {
    if (runningWalkthrough) {
        msg("<i>" + question + "</i>");
        var step = currentWalkthroughSteps.splice(0, 1);
        var response = step[0];
        if (response.substring(0, 7) == "answer:") {
            return (response.substring(7) == "yes");
        }
        else {
            msg("Error running walkthrough - expected menu response");
        }
    }
    else {
        return confirm(question);
    }
}

function GetUniqueElementName(prefix) {
    return prefix + getUniqueId();
}

function TryFinishTurn() {
    updateLists();
    TryRunOnReadyScripts();
    if (!awaitingCallback) {
        saveGame();
        if (typeof FinishTurn == "function") {
            FinishTurn();
        }
    }
	if (!mobilecheck())
		$("#txtCommand").focus();  // JS foco
}

function TryRunOnReadyScripts() {
    if (awaitingCallback) return;
    if (onReadyCallback != null) {
        var callback = onReadyCallback;
        onReadyCallback = null;
        callback();
    }
}

function GetDirectChildren(element) {
    if (!element["_children"]) {
        return new Array();
    }
    return element["_children"];
}

function GetAllChildObjects(element) {
    var result = new Array();
    var directChildren = GetDirectChildren(element);
    for (var idx in directChildren) {
        var obj = directChildren[idx];
        result.push(obj);
        result = result.concat(GetAllChildObjects(obj));
    }
    return result;
}

function IsGameRunning() {
    return gameRunning;
}

function IsDefined(variable) {
    return true;
}

function GetRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min + 1)) + min;
}

function SafeXML(input) {
    return input.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
}

function GetUIOption() {
    return null;
}

function DoesInherit(obj, type) {
    return ListContains(obj._types, type);
}

function Floor(n) {
    return Math.floor(n);
}

var templates = new Object();
var dynamicTemplates = new Object();
var allObjects = new Array();
var allExits = new Array();
var allCommands = new Array();
var allTurnScripts = new Array();
var allTimers = new Array();
var objectReferences = new Array();
var objectListReferences = new Array();
var objectDictionaryReferences = new Array();
var embeddedHtml = new Object();
var objectsNameMap = new Object();
var elementsNameMap = new Object();

var e= elementsNameMap; //JS shortcut

templates.t_HelpThief = "You can stealth walk, pick pockets and play all sorts of dirty tricks with your enemies. <br/>The thief has the following special commands:<br/><br/><b>steal <i>someone</i></b>: You will try to steal money or objects from a victim.<br/><b>hide <i>somewhere</i></b>: You will try to hide from someone.<br/><b>stab <i>someone</i></b>: You will try to sneak and stab someone from behind. A victim aware or wearing armor will be harder to back-stab.<br/><b>climb <i>something</i></b>: You will try to climb something.<br/><b>picklock <i>object/door</i></b>: You will try to pick the door/object's lock.<br/><i>A thief will always try to move silently when he feels necessary.</i>"
templates.t_HelpMage = "You can read, write and practice spells.<br/>Special commands for a Wizard:<br/><b>read <i>something</i></b>: Only wizards are literate and therefore capable of reading and writing.<br/><b>cast <i>spell</i></b>: Wizards can cast spells contained in his book of spells. You can also learn spells found in scrolls and books. Some spells require special items and ingredients.<br/><b>spells</b>: This command lists all the spells you know."
templates.t_HelpWarrior = "You can use swords, shields and armor to subjugate your enemies.<br/>The warrior has the following special commands:<br/><b>fight <i>someone</i></b>: Will start a fight. Better have weapons and armor.<br/><b>throw <i>something</i> at <i>enemy/target</i></b>: Will throw an object/weapon<br/><b>consider <i>someone</i></b>: Will give a hint about how prepared you are to fight someone, and evaluate the enemy's condition during a battle.<br/>  You can also use the <b>look at me</b> command to check your condition during a fight."
templates.t_LanguageId = "en"
templates.t_UnresolvedObject = "I can't see that."
templates.t_UnresolvedLocation = "You can't go there."
templates.t_DefaultObjectDescription = "Nothing out of the ordinary."
templates.t_DefaultSelfDescription = "Looking good."
templates.t_SeeListHeader = "You can see"
templates.t_GoListHeader = "You can go"
templates.t_And = "and"
templates.t_Or = "or"
templates.t_NothingToUndo = "Nothing to undo!"
templates.t_NotCarryingAnything = "You are not carrying anything."
templates.t_CarryingListHeader = "You are carrying"
templates.t_UnrecognisedCommand = "I don't understand your command."
templates.t_YouAreIn = "You are in"
templates.t_LookAt = "Look at"
templates.t_Take = "Take"
templates.t_SpeakTo = "Speak to"
templates.t_Use = "Use"
templates.t_Drop = "Drop"
templates.t_GoTo = "Go to"
templates.t_Go = "Go"
templates.t_SwitchOn = "Switch on"
templates.t_SwitchOff = "Switch off"
templates.t_Open = "Open"
templates.t_Close = "Close"
templates.t_Eat = "Eat"
templates.t_NeutralGender = "it"
templates.t_MaleGender = "he"
templates.t_FemaleGender = "she"
templates.t_SelfGender = "you"
templates.t_NeutralPluralGender = "they"
templates.t_MalePluralGender = "they"
templates.t_FemalePluralGender = "they"
templates.t_NeutralArticle = "it"
templates.t_MaleArticle = "him"
templates.t_FemaleArticle = "her"
templates.t_SelfArticle = "yourself"
templates.t_NeutralPluralArticle = "them"
templates.t_MalePluralArticle = "them"
templates.t_FemalePluralArticle = "them"
templates.t_SelfAlias = "me"
templates.t_SelfAlt = "myself; self"
templates.t_AllObjects = "all; everything"
templates.t_ParserIgnorePrefixes = "the; a; an"
templates.t_CannotDoThat = "You can't do that."
templates.t_Done = "Done."
templates.t_ContainerContentsPrefix = "containing"
templates.t_SurfaceContentsPrefix = "on which there is"
templates.t_LockedExit = "That way is locked."
templates.t_NoKey = "You do not have the key."
templates.t_UnlockMessage = "Unlocked."
templates.t_LockMessage = "Locked."
templates.t_DefaultOops = "There is nothing to correct."
templates.t_VerbObjectSeparator = "with; using"
templates.t_DefaultMultiObjectVerb = "That doesn't work."
templates.t_MultiObjectVerbMenu = "With which object?"
templates.t_UseOnMenu = "On which object?"
templates.t_GiveToMenu = "To which object?"
templates.t_NoObjectsAvailable = "There are no objects available to do that with."
templates.t_Yes = "Yes"
templates.t_No = "No"
templates.t_By = "by"
templates.t_CompassNW = "northwest"
templates.t_CompassN = "north"
templates.t_CompassNE = "northeast"
templates.t_CompassW = "west"
templates.t_CompassE = "east"
templates.t_CompassSW = "southwest"
templates.t_CompassS = "south"
templates.t_CompassSE = "southeast"
templates.t_CompassUp = "up"
templates.t_CompassDown = "down"
templates.t_CompassIn = "in"
templates.t_CompassOut = "out"
templates.t_CompassDirectionPrefix = ""
templates.t_CompassDirectionSuffix = ""
templates.t_UpDownDirectionPrefix = ""
templates.t_UpDownDirectionSuffix = ""
templates.t_InOutDirectionPrefix = ""
templates.t_InOutDirectionSuffix = ""
templates.t_CompassNWShort = "nw"
templates.t_CompassNShort = "n"
templates.t_CompassNEShort = "ne"
templates.t_CompassWShort = "w"
templates.t_CompassEShort = "e"
templates.t_CompassSWShort = "sw"
templates.t_CompassSShort = "s"
templates.t_CompassSEShort = "se"
templates.t_CompassUpShort = "u"
templates.t_CompassDownShort = "d"
templates.t_CompassInShort = ""
templates.t_CompassOutShort = "o"
templates.t_InventoryLabel = "Inventory"
templates.t_StatusLabel = "Status"
templates.t_PlacesObjectsLabel = "Places and Objects"
templates.t_CompassLabel = "Compass"
templates.t_InButtonLabel = "in"
templates.t_OutButtonLabel = "out"
templates.t_EmptyListLabel = "(empty)"
templates.t_NothingSelectedLabel = "(nothing selected)"
templates.t_TypeHereLabel = "Type here..."
templates.t_ContinueLabel = "Continue..."
templates.t_go = "^go to (?<exit>.*)$|^go (?<exit>.*)$|^(?<exit>north|east|south|west|northeast|northwest|southeast|southwest|in|out|up|down|n|e|s|w|ne|nw|se|sw|o|u|d)$"
templates.t_lookdir = "^look (?<exit>north|east|south|west|northeast|northwest|southeast|southwest|out|up|down|n|e|s|w|ne|nw|se|sw|o|u|d)$"
templates.t_look = "^look$|^l$"
templates.t_lookat = "look at; x; examine; exam; ex"
templates.t_take = "take; get; pick up"
templates.t_undo = "^undo$"
templates.t_inventory = "^i$|^inv$|^inventory$"
templates.t_quit = "^quit$"
templates.t_drop = "drop"
templates.t_use = "use"
templates.t_speakto = "speak to; speak with; speak; talk to; talk"
templates.t_open = "open"
templates.t_close = "close"
templates.t_put = "^put (?<object1>.*) (on|in) (?<object2>.*)$"
templates.t_removefrom = "^remove (?<object1>.*) from (?<object2>.*)$"
templates.t_ask = "^ask (?<object>.*) about (?<text>.*)$"
templates.t_tell = "^tell (?<object>.*) about (?<text>.*)$"
templates.t_oops = "^oops (?<text>.*)$"
templates.t_buy = "buy"
templates.t_climb = "climb"
templates.t_drink = "drink"
templates.t_eat = "eat"
templates.t_givesingle = "give"
templates.t_give = "^give (?<object1>.*) to (?<object2>.*)$"
templates.t_hit = "hit"
templates.t_kill = "kill"
templates.t_kiss = "kiss"
templates.t_knock = "knock"
templates.t_lick = "lick"
templates.t_lie = "lie on; lie upon; lie down on; lie down upon"
templates.t_listento = "listen to"
templates.t_lock = "lock"
templates.t_move = "move"
templates.t_pull = "pull"
templates.t_push = "push"
templates.t_read = "read"
templates.t_search = "search"
templates.t_show = "show"
templates.t_sit = "sit on; sit upon; sit down on; sit down upon"
templates.t_smell = "smell; sniff"
templates.t_taste = "taste"
templates.t_throw = "throw"
templates.t_tie = "tie"
templates.t_touch = "touch"
templates.t_turnon = "turn on; turn #object# on; switch on; switch #object# on"
templates.t_turnoff = "turn off; turn #object# off; switch off; switch #object# off"
templates.t_turn = "turn"
templates.t_unlock = "unlock"
templates.t_untie = "untie"
templates.t_useon = "^use (?<object1>.*) (on|with) (?<object2>.*)$"
templates.t_wear = "wear"
templates.t_listen = "^listen$"
templates.t_DefaultListen = "You can't hear much."
templates.t_jump = "^jump$"
templates.t_DefaultJump = "You jump, but nothing happens."
templates.t_sitdown = "^sit$|^sit down$"
templates.t_DefaultSitDown = "No time for lounging about now."
templates.t_liedown = "^lie$|^lie down$"
templates.t_DefaultLieDown = "No time for lounging about now."
templates.t_sleep = "^sleep$|^rest$"
templates.t_DefaultSleep = "No time for lounging about now."
templates.t_wait = "^wait$|^z$"
templates.t_DefaultWait = "Time passes."
templates.t_xyzzy = "^xyzzy$"
templates.t_DefaultXyzzy = "Surprisingly, absolutely nothing happens."
templates.t_help = "^help$|^\?$"
templates.t_save = "^save$"
//JS changed compass
templates.t_DefaultHelp = "<u>Quick Help</u><br/><br/><b>- Objects:</b>  Try LOOK AT..., SPEAK TO..., TAKE..., DROP..., OPEN..., GIVE... TO..., USE... ON/WITH...<br/><b>- Inventory:</b>  See which items you are carrying by typing I, INV or INVENTORY.<br/><b>- Moving around:</b>  Press the direction links, or type GO NORTH, SOUTH, E, GO TO...<br/><b>- Shortcuts:</b>  Press the up arrow and down arrow to scroll through commands you have already typed in. Try X... as a shortcut for LOOK AT..."
templates.t_LanguageSpecificObjectTypes = ""
dynamicTemplates.TakeSuccessful = function(params) { return "You pick " + params["object"].article + " up."; };
dynamicTemplates.TakeUnsuccessful = function(params) { return "You can't take " + params["object"].article + "."; };
dynamicTemplates.FullInventory = function(params) { return WriteVerb(params["object"], "be") + " too heavy to be taken."; };
dynamicTemplates.MaxObjectsInInventory = function(params) { return "You can't carry any more items."; };
dynamicTemplates.MaxObjectsInContainer = function(params) { return "You can't put more items in " + params["object"].article + "."; };
dynamicTemplates.DropSuccessful = function(params) { return "You drop " + params["object"].article + "."; };
dynamicTemplates.DropUnsuccessful = function(params) { return "You can't drop " + params["object"].article + "."; };
dynamicTemplates.AlreadyTaken = function(params) { return "You are already carrying " + params["object"].article + "."; };
dynamicTemplates.NotCarrying = function(params) { return "You are not carrying " + params["object"].article + "."; };
dynamicTemplates.CantUse = function(params) { return "You can't use " + params["object"].article + "."; };
dynamicTemplates.CantGive = function(params) { return "You can't give " + params["object"].article + "."; };
dynamicTemplates.DefaultSpeakTo = function(params) { return WriteVerb(params["object"], "say") + " nothing."; };
dynamicTemplates.ObjectNotOpen = function(params) { return CapFirst(GetDisplayAlias(params["object"])) + " " + Conjugate(params["object"], "be") + " not open."; };
dynamicTemplates.AlreadyOpen = function(params) { return WriteVerb(params["object"], "be") + " already open."; };
dynamicTemplates.AlreadyClosed = function(params) { return WriteVerb(params["object"], "be") + " already closed."; };
dynamicTemplates.CantOpen = function(params) { return "You can't open " + params["object"].article + "."; };
dynamicTemplates.CantClose = function(params) { return "You can't close " + params["object"].article + "."; };
dynamicTemplates.OpenSuccessful = function(params) { return "You open " + params["object"].article + "."; };
dynamicTemplates.CloseSuccessful = function(params) { return "You close " + params["object"].article + "."; };
dynamicTemplates.AlreadyThere = function(params) { return WriteVerb(params["object"], "be") + " already there."; };
dynamicTemplates.ObjectContains = function(params) { return WriteVerb(params["object"], "contain"); };
dynamicTemplates.ContainerFull = function(params) { return WriteVerb(params["object"], "be") + " full."; };
dynamicTemplates.DisambiguateMenu = function(params) { return "Please choose which '" + params["text"] + "' you mean:"; };
dynamicTemplates.UndoTurn = function(params) { return "Undo: " + params["text"]; };
dynamicTemplates.DefaultAsk = function(params) { return WriteVerb(params["object"], "do") + " not reply."; };
dynamicTemplates.DefaultTell = function(params) { return WriteVerb(params["object"], "do") + " not reply."; };
dynamicTemplates.LockedObject = function(params) { return WriteVerb(params["object"], "be") + " locked."; };
dynamicTemplates.AlreadyLocked = function(params) { return WriteVerb(params["object"], "be") + " already locked."; };
dynamicTemplates.AlreadyUnlocked = function(params) { return WriteVerb(params["object"], "be") + " already unlocked."; };
dynamicTemplates.CannotLockOpen = function(params) { return "You cannot lock " + params["object"].article + " when " + params["object"].gender + " " + Conjugate(params["object"], "be") + " open."; };
dynamicTemplates.AlreadySwitchedOn = function(params) { return WriteVerb(params["object"], "be") + " already switched on."; };
dynamicTemplates.AlreadySwitchedOff = function(params) { return WriteVerb(params["object"], "be") + " already switched off."; };
dynamicTemplates.SwitchedOn = function(params) { return "You switch " + params["object"].article + " on."; };
dynamicTemplates.SwitchedOff = function(params) { return "You switch " + params["object"].article + " off."; };
dynamicTemplates.Eaten = function(params) { return "You eat " + params["object"].article + "."; };
dynamicTemplates.ObjectDoesNotContain = function(params) { return CapFirst(GetDisplayAlias(params["object1"])) + " " + Conjugate(params["object1"], "do") + " not contain " + GetDisplayAlias(params["object2"]) + "."; };
dynamicTemplates.YouLooking = function(params) { return "You are looking " + params["text"] +"."; };
dynamicTemplates.LookAtDarkness = function(params) { return "It is too dark to make anything out."; };
dynamicTemplates.DefaultBuy = function(params) { return "You can't buy " + params["object"].article + "."; };
dynamicTemplates.DefaultClimb = function(params) { return "You can't climb " + params["object"].article + "."; };
dynamicTemplates.DefaultDrink = function(params) { return "You can't drink " + params["object"].article + "."; };
dynamicTemplates.DefaultEat = function(params) { return "You can't eat " + params["object"].article + "."; };
dynamicTemplates.DefaultGive = function(params) { return WriteVerb(params["object1"], "do") + " not want " + params["object2"].article + "."; };
dynamicTemplates.DefaultHit = function(params) { return "You can't hit " + params["object"].article + "."; };
dynamicTemplates.DefaultKill = function(params) { return "You can't kill " + params["object"].article + "."; };
dynamicTemplates.DefaultKiss = function(params) { return "You can't kiss " + params["object"].article + "."; };
dynamicTemplates.DefaultKnock = function(params) { return "You can't knock " + params["object"].article + "."; };
dynamicTemplates.DefaultLick = function(params) { return "You can't lick " + params["object"].article + "."; };
dynamicTemplates.DefaultLie = function(params) { return "You can't lie on " + params["object"].article + "."; };
dynamicTemplates.DefaultListenTo = function(params) { return "You listen, but " + params["object"].article + " makes no sound."; };
dynamicTemplates.DefaultLock = function(params) { return "You can't lock " + params["object"].article + "."; };
dynamicTemplates.DefaultMove = function(params) { return "You can't move " + params["object"].article + "."; };
dynamicTemplates.DefaultPull = function(params) { return "You can't pull " + params["object"].article + "."; };
dynamicTemplates.DefaultPush = function(params) { return "You can't push " + params["object"].article + "."; };
dynamicTemplates.DefaultRead = function(params) { return "You can't read " + params["object"].article + "."; };
dynamicTemplates.DefaultSearch = function(params) { return "You can't search " + params["object"].article + "."; };
dynamicTemplates.DefaultShow = function(params) { return "You can't show " + params["object"].article + "."; };
dynamicTemplates.DefaultSit = function(params) { return "You can't sit on " + params["object"].article + "."; };
dynamicTemplates.DefaultSmell = function(params) { return "You sniff, but " + params["object"].article + " doesn't smell of much."; };
dynamicTemplates.DefaultTaste = function(params) { return "You can't taste " + params["object"].article + "."; };
dynamicTemplates.DefaultThrow = function(params) { return "You can't throw " + params["object"].article + "."; };
dynamicTemplates.DefaultTie = function(params) { return "You can't tie " + params["object"].article + "."; };
dynamicTemplates.DefaultTouch = function(params) { return "You can't touch " + params["object"].article + "."; };
dynamicTemplates.DefaultTurnOn = function(params) { return "You can't turn " + params["object"].article + " on."; };
dynamicTemplates.DefaultTurnOff = function(params) { return "You can't turn " + params["object"].article + " off."; };
dynamicTemplates.DefaultTurn = function(params) { return "You can't turn " + params["object"].article + "."; };
dynamicTemplates.DefaultUnlock = function(params) { return "You can't unlock " + params["object"].article + "."; };
dynamicTemplates.DefaultUntie = function(params) { return "You can't untie " + params["object"].article + "."; };
dynamicTemplates.DefaultUseOn = function(params) { return "You can't use " + params["object2"].article + " that way."; };
dynamicTemplates.DefaultWear = function(params) { return "You can't wear " + params["object"].article + "."; };
e_game = {
"elementtype": "object",
"name": "game",
"type": "game",
"gamename": "The Castle of Vourtram",
"gameid": "bd3bbdcf-62e2-4d5e-a4f9-4af041fe080a",
"version": "0.94",
"firstpublished": "2017",
"author": "Alexandre Torres",
"category": "Fantasy",
"css": "",
"debug": true,
"license": "<a rel='license' href='http://creativecommons.org/licenses/by-nc-nd/4.0/'><img alt='Creative Commons License' style='border-width:0' src='images/88x31.png' /></a><br/>",
"description": "<u><b>The Castle of Vourtram</b></u> v{game.version}<br/><br/>{game.license}The Kingdom of Gwalinad is in its last days of existence. The evil wizard Vourtram, aided by an army of demoniac creatures, razed most of the old cities, spreading terror everywhere. When the capital Linwynne fell, the loyal forces of the old King fled to the hidden city of Chuma Huppic, an old stronghold defended by a magical maze that prevents enemy forces from entering. <br/><br/>However, Princess Grardobeth was captured, and many died in the hands of the evil wizard. The princess is kept as a hostage in the high tower of the Castle of Vourtram. Vourtram demands a marriage with the princess followed by the King's abdication, thus making him the new King over Gwalinad.<br/><br/>You are the hero, an orphan born under the sign of the Phoenix who, according to the prophecies, is destined to defeat Vourtram and his evil forces. It is up to you to first develop your skills as a hero, and afterwards depart in the quest to rescue the princess and destroy the evil of ... <b>The Castle of Vourtram</b>.",
"startmsg": true,
"turns": 0,
"difficulty": "Medium",
"cruelty": "Merciful",
"gridmap": false,
"mapscale": 10,
"mapsize": 200,
"feature_asktell": true,
"showborder": false,
"showpanes": true,
"showlocation": true,
"setcustomwidth": false,
"defaultfontsize": 14,
"defaultwebfont": "Lancelot",
"defaultbackground": "#F0F0E0",
"cover": "Vourtram.png",
"backgroundimage": "parch.png",
"setbackgroundopacity": true,
"backgroundopacity": 5,
"setcustompadding": false,
"defaultlinkforeground": "DarkGoldenRod",
"multiplecommands": true,
"skip_command": false,
"web": true,
"publishfileextensions": "*.jpg;*.jpeg;*.png;*.gif;*.js;*.wav;*.mp3;*.htm;*.html;*.svg;*.css",
"autodescription_youarein_useprefix": true,
"start": function() { var css = e_game.css;
var css = Replace(css,"ui-bg_inset-hard_100_F0F0E0_1x100.png",GetFileURL("ui-bg_inset-hard_100_F0F0E0_1x100.png"));
var css = Replace(css,"ui-icons_A0A060_256x240.png",GetFileURL("ui-icons_A0A060_256x240.png"));
var css = Replace(css,"ui-bg_gloss-wave_55_b7b2af_500x100.png",GetFileURL("ui-bg_gloss-wave_55_b7b2af_500x100.png"));
var css = Replace(css,"ui-bg_glass_85_C0C080_1x400.png",GetFileURL("ui-bg_glass_85_C0C080_1x400.png"));
set(e_game, "css", css);
executeJS ("startVourtram"); },
"_js_name": "e_game",
"_types": ["theme_typewriter", "defaultgame"],
"customwidth": 650,
"custompaddingtop": 60,
"defaultfont": "'Courier New', Courier, monospace",
"enablehyperlinks": true,
"echocommand": true,
"echohyperlinks": true,
"showdescriptiononenter": true,
"autodescription": true,
"defaultforeground": "Black",
"menufont": "Arial",
"menufontsize": 9,
"menubackground": "White",
"menuforeground": "Black",
"menuhoverbackground": "LightGrey",
"menuhoverforeground": "Black",
"underlinehyperlinks": true,
"compassdirections": ["northwest", "north", "northeast", "west", "east", "southwest", "south", "southeast", "up", "down", "in", "out"],
"clearframe": true,
"timeelapsed": 0,
"appendobjectdescription": false,
"allobjects": ["all", "everything"],
"parserignoreprefixes": ["the", "a", "an"],
"displayroomdescriptiononstart": true,
"showcommandbar": true,
"custompaddingbottom": 0,
"custompaddingleft": 20,
"custompaddingright": 20,
"showscore": false,
"showhealth": false,
"showtitle": true,
"autodisplayverbs": true,
"autodescription_youarein": 1,
"autodescription_youcansee": 2,
"autodescription_youcango": 3,
"autodescription_description": 4,
"autodescription_youarein_newline": false,
"autodescription_youcansee_newline": false,
"autodescription_youcango_newline": false,
"autodescription_description_newline": false,
"changeroom_newline": true,
"command_newline": false,
"languageid": "en",
"feature_lightdark": false,
"feature_pictureframe": false,
"feature_limitinventory": false,
"deactivatecommandlinks": false,
"changedpov": function(oldvalue) { InitPOV (oldvalue, e_game.pov); }
};
elementsNameMap["game"] = e_game;
objectsNameMap["game"] = e_game;
e_wooden_spear = {
"elementtype": "object",
"name": "wooden_spear",
"parent": e_game,
"type": "object",
"look": "Probably the most ordinary weapon available in the kingdom's armory. But it is well balanced for trowing at unarmored targets.{if wooden_spear.horned:You attached the horn of a demon in the tip.}",
"take": true,
"damage": 0,
"alias": "wooden spear",
"selfuseon": "To start a fight, or throw, use the specific command.",
"horned": false,
"usedefaultprefix": false,
"prefix": "a",
"suffix": "",
"inventoryverbs": ["Look at", "Drop"],
"_js_name": "e_wooden_spear",
"_types": ["Weapon", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["wooden_spear"] = e_wooden_spear;
allObjects.push(e_wooden_spear);
objectsNameMap["wooden_spear"] = e_wooden_spear;
e_picklock = {
"elementtype": "object",
"name": "picklock",
"parent": e_game,
"type": "object",
"look": "An indispensable tool of the trade...",
"drop": false,
"dropmsg": "You don't want to loose this precious tool.",
"take": true,
"inventoryverbs": ["Look at"],
"_js_name": "e_picklock",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["picklock"] = e_picklock;
allObjects.push(e_picklock);
objectsNameMap["picklock"] = e_picklock;
e_dagger = {
"elementtype": "object",
"name": "dagger",
"parent": e_game,
"type": "object",
"look": "An easy to conceal weapon, perfect for backstabbing.",
"feature_usegive": true,
"use": true,
"givesingle": true,
"drop": false,
"dropmsg": "I'm not going to drop my dagger here.",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"take": function() { get_gold_dagger (this); },
"ontake": function() { get_gold_dagger (this); },
"_js_name": "e_dagger",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dagger"] = e_dagger;
allObjects.push(e_dagger);
objectsNameMap["dagger"] = e_dagger;
e_smallsword = {
"elementtype": "object",
"name": "smallsword",
"parent": e_game,
"type": "object",
"alias": "small sword",
"look": "It is an iron sword with a silvery tilt. The blade is decorated with silvery symbols ... maybe it has some witchcraft.",
"take": true,
"givesingle": true,
"inventoryverbs": ["Look at", "Drop", "Give"],
"selfuseon": "To start a fight, or throw, use the specific command.",
"feature_usegive": true,
"giveto": {"elf_smith": function() { OutputText ("<i>This magical sword belonged to an old friend of mine. Perhaps I could trust you ... but first you must prove yourself. Find my ring and bring it back to me. It is a silver emerald ring, kept by the captain.</i><br/>The smith skillfully fixes your sword. It looks sharper than ever");
set(e_smallsword, "damage", 2);
set(e_smallsword, "alias", "small sword");
set(e_elf_smith, "friend", true); } },
"_js_name": "e_smallsword",
"_types": ["Weapon", "defaultobject"],
"damage": 1,
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["smallsword"] = e_smallsword;
allObjects.push(e_smallsword);
objectsNameMap["smallsword"] = e_smallsword;
e_calm_spell = {
"elementtype": "object",
"name": "calm_spell",
"parent": e_game,
"type": "object",
"take": true,
"alias": "calm spell",
"look": "The Calm Spell turns aggressive <b>beasts</b> and <b>monsters </b>into pacific creatures for some time. It also can remove aggressiveness from intelligent beings, especially <b>orcs</b>, but that won't prevent them from defending or using force to achieve their designs ... but they may consider not <b>KILLING</b> you. Creatures under magic command will resist this spell.",
"ObjectNotOpen": "test123",
"listalias": "-- calm spell",
"inventoryverbs": ["Look at", "Cast"],
"_js_name": "e_calm_spell",
"_types": ["Spell", "defaultobject"],
"castspell": true,
"castonobject": true,
"drop": function() { OutputText ("You don't want to rip your book apart."); },
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"read_away": false,
"read": function() { doRead (this); },
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["calm_spell"] = e_calm_spell;
allObjects.push(e_calm_spell);
objectsNameMap["calm_spell"] = e_calm_spell;
e_dispel_potion = {
"elementtype": "object",
"name": "dispel potion",
"parent": e_game,
"type": "object",
"alias": "dispel magic potion",
"look": "It is a closed ceramic bottle. You better not use it until the time you need it.",
"take": true,
"drop": false,
"dropmsg": "I don't want to loose it.",
"use": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"feature_usegive": true,
"useCmds": ["pour"],
"selfuseon": {"Wolf": function() { OutputText ("The werewolf transforms back to the human form. The spell is broken.<br/>The man says: <i>Thank you for breaking the werewolf curse. My name is Hector and I was a wizard apprentice. One day I was looking for some wolf's claws in the hills, and was suddenly bitten by a werewolf, becoming a cursed monster. Please take this <b>reveal spell</b> as a reward. We will meet again at the Guild!</i>. <br/>The man went his way after this.");
DisableTurnScript (e_wolfTurn);
MakeObjectVisible (e_Hector);
MoveObject (e_Wolf, e_void);
MoveObject (e_Hector, e_guild_mages);
set(e_player, "level", 1);
MoveObject (e_dispel_potion, e_void);
MoveObject (e_reveal_spell, e_spell_book);
MoveObject (e_RedGirl, e_WoodCabin);
MakeObjectVisible (e_RedGirl); } },
"_js_name": "e_dispel_potion",
"_types": ["UseAltType", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dispel potion"] = e_dispel_potion;
allObjects.push(e_dispel_potion);
objectsNameMap["dispel potion"] = e_dispel_potion;
e_fireball_spell = {
"elementtype": "object",
"name": "fireball_spell",
"parent": e_game,
"type": "object",
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "cast"],
"alt": ["fireball", "fire"],
"alias": "fireball spell",
"look": "The Fireball Spell creates a deadly ball of fire guided by the will of the caster against a target. To cast the fireball the magic user needs to spent a <b>fire crystal</b>. The fireball power depends on the type of crystal used.",
"listalias": "aliasbla",
"ontake": function() { MoveObject (fireball___SPACE___spell, e_spell_book);
if (e_player.class == "mage") {
OutputText ("You write the spell into your spell book.");
}
else {
OutputText ("The spell just fizzles and disappears.");
} },
"selfuseon": {"__dummyKey": function() {  } },
"_js_name": "e_fireball_spell",
"_types": ["Spell", "defaultobject"],
"castspell": true,
"castonobject": true,
"drop": function() { OutputText ("You don't want to rip your book apart."); },
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"read_away": false,
"read": function() { doRead (this); },
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["fireball_spell"] = e_fireball_spell;
allObjects.push(e_fireball_spell);
objectsNameMap["fireball_spell"] = e_fireball_spell;
e_kobold = {
"elementtype": "object",
"name": "kobold",
"parent": e_game,
"type": "object",
"alias": "Kobold",
"look": "The Kobold is a little blue creature, as tall as a five-year old kid, with a large nose, white hair and a green outfit. He looks harmless and quite clever ... for a Kobold.",
"speak": "<i>{once:I'm Heinzel the kobold.}{notfirst:Greetings again {player.playername}.} I live here in this dark alley in the company of {command:ask kobold about thieves:thieves} and other people of questionable morality. At least until I recover my {command:ask kobold about ring:ring}.</i>",
"ask": {"thieves thief thug": function() { OutputText ("<i>Hmm ... I sense that you are looking for something. I may be a Kobold, but I am an old and wise one. The man you are looking for, I saw him speaking with a girl a few hours ago. He will meet her at the maze very soon, so we should get there straightaway... but I need to have that {command:ask kobold about ring:ring} first!</i>"); }, "ring": function() { OutputText ("<i>It is an emerald ring with magical powers. A long time ago, someone from this town stole a ring from me. My freedom belongs to who wear this ring. I know that this ring is near here, but Kobolds can't enter anywhere without being invited. If you can return this ring to me, I'm sure I could help you with your quest. Otherwise, I'm cursed to be here waiting for the ring ... forever.</i>");
set(e_kobold_ring, "known", 1); } },
"give": {"kobold_ring": function() { OutputText ("<i>Thank you very much! You gave me back my freedom. Now I will help you at the capture of that thug. Find the thug in the maze and let me deal with him!</i>. The Kobold disappears in the shadows.");
MoveObject (e_outlaw_thug, e_Maze);
MoveObject(e_kobold, e_void);
RemoveObject (e_kobold_ring);
MakeObjectVisible (e_outlaw_thug); } },
"_js_name": "e_kobold",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["kobold"] = e_kobold;
allObjects.push(e_kobold);
objectsNameMap["kobold"] = e_kobold;
e_apport_spell = {
"elementtype": "object",
"name": "apport_spell",
"parent": e_game,
"type": "object",
"alias": "apportation spell",
"alt": ["fetch"],
"take": true,
"drop": false,
"look": "The Apportation (or fetch) spell lets you fetch an object from some distance, and levitate it towards your hand.",
"listalias": "-- apportation spell",
"inventoryverbs": ["Look at", "Cast"],
"_js_name": "e_apport_spell",
"_types": ["Spell", "defaultobject"],
"castspell": true,
"castonobject": true,
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"read_away": false,
"read": function() { doRead (this); },
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["apport_spell"] = e_apport_spell;
allObjects.push(e_apport_spell);
objectsNameMap["apport_spell"] = e_apport_spell;
e_brigand1 = {
"elementtype": "object",
"name": "brigand1",
"parent": e_game,
"type": "object",
"aggressive": true,
"alias": "brigand",
"exp": 4,
"armour": 0,
"_js_name": "e_brigand1",
"_types": ["male", "Enemy", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"enemy": "yes",
"danger": "death",
"ht": 10,
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["brigand1"] = e_brigand1;
allObjects.push(e_brigand1);
objectsNameMap["brigand1"] = e_brigand1;
e_book_plants = {
"elementtype": "object",
"name": "book_plants",
"parent": e_game,
"type": "object",
"alias": "book about plants",
"look": "Very technical stuff regarding plant classifications and alchemical uses.",
"read": "Very technical stuff regarding plant classifications and alchemical uses such as <i>The term \"gymnosperm\" comes from the Greek composite word \u03b3\u03c5\u03bc\u03bd\u03cc\u03c3\u03c0\u03b5\u03c1\u03bc\u03bf\u03c2 (\u03b3\u03c5\u03bc\u03bd\u03cc\u03c2 gymnos, \"naked\" and \u03c3\u03c0\u03ad\u03c1\u03bc\u03b1 sperma, \"seed\"), meaning \"naked seeds\", after the unenclosed condition of their seeds (called ovules in their unfertilized state)</i>",
"givesingle": true,
"inventoryverbs": ["Look at", "Drop", "Give"],
"take": true,
"_js_name": "e_book_plants",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["book_plants"] = e_book_plants;
allObjects.push(e_book_plants);
objectsNameMap["book_plants"] = e_book_plants;
e_teleport_spell = {
"elementtype": "object",
"name": "teleport_spell",
"parent": e_game,
"type": "object",
"alias": "teleport spell",
"alt": ["teleport", "teleportation"],
"drop": false,
"take": true,
"inventoryverbs": ["Look at", "Cast"],
"look": "The Teleport spell moves the caster to the position of the teleport orb.",
"listalias": "-- teleport spell",
"castonobject": false,
"_js_name": "e_teleport_spell",
"_types": ["Spell", "defaultobject"],
"castspell": true,
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"read_away": false,
"read": function() { doRead (this); },
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["teleport_spell"] = e_teleport_spell;
allObjects.push(e_teleport_spell);
objectsNameMap["teleport_spell"] = e_teleport_spell;
e_teleport_orb = {
"elementtype": "object",
"name": "teleport_orb",
"parent": e_game,
"type": "object",
"alias": "teleportation orb",
"look": "It is a red, apple shaped orb. When you cast teleport, you will come back to the place where the orb is.",
"take": true,
"feature_usegive": true,
"use": true,
"useCmds": ["put"],
"selfuseon": {"fruit_stand": function() { if (e_fruit_dealer.blind>0) {
MoveObject (e_teleport_orb, e_pantry);
OutputText ("You place the orb among the apples. After some time, a group of soldiers carries the apples to the castle, with the teleportation orb.");
MoveObject (e_fruit_stand, e_void);
MoveObject (e_fruit_dealer, e_void);
MoveObject (e_sc_apple, e_void);
set(e_fruit_dealer, "blind", 0);
}
else {
OutputText ("The fruit dealer will not let you do that.");
} } },
"_js_name": "e_teleport_orb",
"_types": ["UseAltType", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["teleport_orb"] = e_teleport_orb;
allObjects.push(e_teleport_orb);
objectsNameMap["teleport_orb"] = e_teleport_orb;
e_null_key = {
"elementtype": "object",
"name": "null_key",
"parent": e_game,
"type": "object",
"_js_name": "e_null_key",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["null_key"] = e_null_key;
allObjects.push(e_null_key);
objectsNameMap["null_key"] = e_null_key;
e_tourmaline = {
"elementtype": "object",
"name": "tourmaline",
"parent": e_game,
"type": "object",
"alias": "tourmaline stone",
"look": "This Tourmaline stone is very similar to a ruby gem, but much less expensive.",
"inventoryverbs": ["Look at", "Drop", "Give", "Use"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_tourmaline",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"take": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["tourmaline"] = e_tourmaline;
allObjects.push(e_tourmaline);
objectsNameMap["tourmaline"] = e_tourmaline;
e_mercenary_leader = {
"elementtype": "object",
"name": "mercenary_leader",
"parent": e_game,
"type": "object",
"alias": "Lareak",
"alt": ["leader", "mercenary"],
"look": "He is a tall middle aged man with a dark leather armor.",
"no_steal": true,
"knows": false,
"feature_usegive": true,
"usedefaultprefix": false,
"suffix": " the mercenary leader",
"speak": function() { if (e_mercenary_leader.knows) {
psay ("If the {ask:leader:resistence} make a good {command:ask leader about offer:offer}, we will join them");
if (e_hall_guard.parent==e_hallway) {
psay ("Did you managed to pass by the {command:ask leader about guard:guard} in the hallway ?");
}
}
else {
OutputText ("<i>You are not supposed to be here, {command:tell leader about rat:rat killer}.</i>");
} },
"tell": {"rat killer": function() { OutputText ("You tell him that you are not a rat killer, and tells all about what you heard behind the curtains.");
OutputText ("Them you tell him that the brigands are willing to make an {command:ask leader about offer:offer} to turn over the mercenaries against Vourtram.");
psay ("Most of us are tired of this {ask:leader:vourtram:tyrant}, including myself. But it will cost you a lot of gold!");
set(e_mercenary_leader, "knows", true); }, "chest gold": function() { OutputText ("<i>A chest of gold could turn my mercenaries against Vourtram.</i>"); } },
"ask": {"offer": function() { if (e_gold_chest.parent==e_void) {
OutputText ("<i>We are only waiting for the order from your leader.</i>");
}
else {
OutputText ("<i>Something like a chest of gold coins would make a good offer.</i>");
} }, "guard": function() { psay ("The only way I know to remove that guard is with a leave order."); }, "chest gold": function() { psay ("A chest of gold could turn my mercenaries against Vourtram."); }, "resistence": function() { psay ("In order to win this war you have to find a way to {ask:leader:defeat:defeat Vourtram}."); }, "defeat vourtram": function() { psay ("Vourtram is virtually immortal. I saw a man trespass his heart with a spear, and the wizard just laughed.");
psay ("It is said that Vourtram placed his soul in a magical {ask:leader:jar}, thus making him immortal."); }, "jar immortality": function() { psay ("The only way to break the immortality spell is to find the soul jar and show it to the wizard."); } },
"give": {"gold_chest": function() { OutputText ("You better leave the gold with Bernard, in the inn. It would be foolish to show the stolen gold INSIDE the castle."); } },
"_js_name": "e_mercenary_leader",
"_types": ["namedmale", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["mercenary_leader"] = e_mercenary_leader;
allObjects.push(e_mercenary_leader);
objectsNameMap["mercenary_leader"] = e_mercenary_leader;
e_banish_spell = {
"elementtype": "object",
"name": "banish_spell",
"parent": e_game,
"type": "object",
"alias": "banish spell",
"take": true,
"drop": false,
"look": "This spell can banish a demon back to his realm. The most experienced the caster, better are the chances of this working.",
"listalias": "-- banish spell",
"inventoryverbs": ["Look at", "Cast"],
"_js_name": "e_banish_spell",
"_types": ["Spell", "defaultobject"],
"castspell": true,
"castonobject": true,
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"read_away": false,
"read": function() { doRead (this); },
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["banish_spell"] = e_banish_spell;
allObjects.push(e_banish_spell);
objectsNameMap["banish_spell"] = e_banish_spell;
e_lookat = {
"elementtype": "object",
"name": "lookat",
"type": "command",
"pattern": "^look at (?<object>.*)$|^x (?<g2_map_object>.*)$|^examine (?<g3_map_object>.*)$|^exam (?<g4_map_object>.*)$|^ex (?<g5_map_object>.*)$",
"script": function(parameters) { var object = parameters['object'];
if (GetBoolean(object, "hidechildren")) {
set(object, "hidechildren", false);
}
if (overloadedFunctions.TypeOf(object, "look") == "script") {
runscriptattribute2 (object, "look");
}
else {
var lookdesc = "";
if (HasString(object, "look")) {
var lookdesc = object.look;
}
if (LengthOf(lookdesc) == 0) {
var lookdesc = Template("DefaultObjectDescription");
}
if (GetBoolean(object, "switchedon")) {
if (HasString(object, "switchedondesc")) {
var lookdesc = lookdesc + " " + object.switchedondesc;
}
}
else {
if (HasString(object, "switchedoffdesc")) {
var lookdesc = lookdesc + " " + object.switchedoffdesc;
}
}
var isDark = CheckDarkness();
if (isDark && !(GetBoolean(object, "lightsource"))) {
var lookdesc = overloadedFunctions.DynamicTemplate("LookAtDarkness", object);
}
OutputText (lookdesc);
}
ListObjectContents (object); },
"_js_name": "e_lookat",
"_types": ["defaultcommand"]
};
elementsNameMap["lookat"] = e_lookat;
allCommands.push(e_lookat);
objectsNameMap["lookat"] = e_lookat;
e_take = {
"elementtype": "object",
"name": "take",
"type": "command",
"pattern": "^take (?<object>.*)$|^get (?<g2_map_object>.*)$|^pick up (?<g3_map_object>.*)$",
"multiple": function() { var takeList = NewObjectList();
var list_obj = ListExclude(ScopeVisibleNotHeldNotScenery(), e_game.pov);
var list_obj_isarray = (Object.prototype.toString.call(list_obj) === '[object Array]');
for (var iterator_obj in list_obj) {
var obj = list_obj_isarray ? list_obj[iterator_obj] : iterator_obj;
if (list_obj_isarray || iterator_obj!="__dummyKey") { if (obj.parent == e_game.pov.parent) {
listadd (takeList, obj);
} }
}
return (takeList); },
"script": function(parameters) { var object = parameters['object'];
var multiple = parameters['multiple'];
var object_isarray = (Object.prototype.toString.call(object) === '[object Array]');
for (var iterator_obj in object) {
var obj = object_isarray ? object[iterator_obj] : iterator_obj;
if (object_isarray || iterator_obj!="__dummyKey") { DoTake (obj, multiple); }
} },
"_js_name": "e_take",
"_types": ["defaultcommand"]
};
elementsNameMap["take"] = e_take;
allCommands.push(e_take);
objectsNameMap["take"] = e_take;
e_drop = {
"elementtype": "object",
"name": "drop",
"type": "command",
"pattern": "^drop (?<object>.*)$",
"multiple": function() { return (GetDirectChildren(e_game.pov)); },
"script": function(parameters) { var object = parameters['object'];
var multiple = parameters['multiple'];
var object_isarray = (Object.prototype.toString.call(object) === '[object Array]');
for (var iterator_obj in object) {
var obj = object_isarray ? object[iterator_obj] : iterator_obj;
if (object_isarray || iterator_obj!="__dummyKey") { DoDrop (obj, multiple); }
} },
"_js_name": "e_drop",
"_types": ["defaultcommand"]
};
elementsNameMap["drop"] = e_drop;
allCommands.push(e_drop);
objectsNameMap["drop"] = e_drop;
e_use = {
"elementtype": "object",
"name": "use",
"type": "command",
"pattern": "^use (?<object>.*)$",
"script": function(parameters) { var object = parameters['object'];
if (HasScript(object, "use")) {
runscriptattribute2 (object, "use");
}
else {
if (GetBoolean(object, "use")) {
var menu = NewStringDictionary();
var candidates = NewObjectList();
var candidates = CreateUseMenuList (object);
if (ListCount(candidates) == 0) {
OutputText (Template("NoObjectsAvailable"));
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "usemenuobject", object);
if (HasString(object, "usemenuprompt")) {
var menucaption = object.usemenuprompt;
}
else {
var menucaption = Template("UseOnMenu");
}
ShowMenu (menucaption, menu, true, function (result) { if (result != null) {
HandleUseOn (e_game.pov.usemenuobject, GetObject(result));
set(e_game.pov, "usemenuobject", null);
} });
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("CantUse", object));
}
} },
"_js_name": "e_use",
"_types": ["defaultcommand"]
};
elementsNameMap["use"] = e_use;
allCommands.push(e_use);
objectsNameMap["use"] = e_use;
e_undo = {
"elementtype": "object",
"name": "undo",
"type": "command",
"pattern": "^undo$",
"isundo": true,
"script": function(parameters) { undo(); },
"_js_name": "e_undo",
"_types": ["defaultcommand"]
};
elementsNameMap["undo"] = e_undo;
allCommands.push(e_undo);
objectsNameMap["undo"] = e_undo;
e_inventory = {
"elementtype": "object",
"name": "inventory",
"type": "command",
"pattern": "^i$|^inv$|^inventory$",
"script": function(parameters) { var list = FormatObjectList(Template("CarryingListHeader"), e_game.pov, Template("And"), ".");
if (list == "") {
OutputText (Template("NotCarryingAnything"));
}
else {
OutputText (list);
} },
"_js_name": "e_inventory",
"_types": ["defaultcommand"]
};
elementsNameMap["inventory"] = e_inventory;
allCommands.push(e_inventory);
objectsNameMap["inventory"] = e_inventory;
e_look = {
"elementtype": "object",
"name": "look",
"type": "command",
"pattern": "^look$|^l$",
"script": function(parameters) { ShowRoomDescription(); },
"_js_name": "e_look",
"_types": ["defaultcommand"]
};
elementsNameMap["look"] = e_look;
allCommands.push(e_look);
objectsNameMap["look"] = e_look;
e_lookdir = {
"elementtype": "object",
"name": "lookdir",
"type": "command",
"pattern": "^look (?<exit>north|east|south|west|northeast|northwest|southeast|southwest|out|up|down|n|e|s|w|ne|nw|se|sw|o|u|d)$",
"script": function(parameters) { var exit = parameters['exit'];
if (HasScript(exit, "look")) {
runscriptattribute2 (exit, "look");
}
else {
var message = overloadedFunctions.DynamicTemplate("YouLooking",exit.alias);
if (HasString(exit, "look")) {
if (exit.look != "") {
var message = exit.look;
}
}
if (exit.locked) {
if (HasString(exit,"lockmessage")) {
var lockmessage = exit.lockmessage;
}
else {
var lockmessage = Template("LockedExit");
}
OutputText (message+" "+lockmessage);
}
else {
OutputText (message);
}
} },
"_js_name": "e_lookdir",
"_types": ["defaultcommand"]
};
elementsNameMap["lookdir"] = e_lookdir;
allCommands.push(e_lookdir);
objectsNameMap["lookdir"] = e_lookdir;
e_quit = {
"elementtype": "object",
"name": "quit",
"type": "command",
"pattern": "^quit$",
"script": function(parameters) { request ("Quit", ""); },
"_js_name": "e_quit",
"_types": ["defaultcommand"]
};
elementsNameMap["quit"] = e_quit;
allCommands.push(e_quit);
objectsNameMap["quit"] = e_quit;
e_go = {
"elementtype": "object",
"name": "go",
"type": "command",
"pattern": "^go to (?<exit>.*)$|^go (?<g2_map_exit>.*)$|^(?<g3_map_exit>north|east|south|west|northeast|northwest|southeast|southwest|in|out|up|down|n|e|s|w|ne|nw|se|sw|o|u|d)$",
"unresolved": "You can't go there.",
"script": function(parameters) { var exit = parameters['exit'];
if (exit.visible) {
if (exit.locked) {
OutputText (exit.lockmessage);
}
else if (exit.runscript) {
if (HasScript(exit, "script")) {
runscriptattribute2 (exit, "script");
}
}
else if (exit.lookonly) {
OutputText ("You can't go there.");
}
else {
set(e_game.pov, "parent", exit.to);
}
}
else {
OutputText ("You can't go there.");
} },
"_js_name": "e_go",
"_types": ["defaultcommand"]
};
elementsNameMap["go"] = e_go;
allCommands.push(e_go);
objectsNameMap["go"] = e_go;
e_open = {
"elementtype": "object",
"name": "open",
"type": "command",
"pattern": "^open (?<object>.*)$",
"script": function(parameters) { var object = parameters['object'];
TryOpenClose (true, object); },
"_js_name": "e_open",
"_types": ["defaultcommand"]
};
elementsNameMap["open"] = e_open;
allCommands.push(e_open);
objectsNameMap["open"] = e_open;
e_close = {
"elementtype": "object",
"name": "close",
"type": "command",
"pattern": "^close (?<object>.*)$",
"script": function(parameters) { var object = parameters['object'];
TryOpenClose (false, object); },
"_js_name": "e_close",
"_types": ["defaultcommand"]
};
elementsNameMap["close"] = e_close;
allCommands.push(e_close);
objectsNameMap["close"] = e_close;
e_put = {
"elementtype": "object",
"name": "put",
"type": "command",
"pattern": "^put (?<object1>.*) (on|in) (?<object2>.*)$",
"script": function(parameters) { var object1 = parameters['object1'];
var object2 = parameters['object2'];
if (object1.parent == object2) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyThere", object1));
}
else if (!(ListContains(ScopeInventory(), object1))) {
OutputText (overloadedFunctions.DynamicTemplate("NotCarrying", object1));
}
else if (!(ListContains(ScopeReachable(), object1))) {
OutputText (overloadedFunctions.DynamicTemplate("ObjectNotOpen", GetBlockingObject(object1)));
}
else if (!(ListContains(ScopeReachable(), object2))) {
OutputText (overloadedFunctions.DynamicTemplate("ObjectNotOpen", GetBlockingObject(object2)));
}
else if (!(object2.container)) {
OutputText (Template("CannotDoThat"));
}
else if (!(object2.isopen)) {
OutputText (overloadedFunctions.DynamicTemplate("ObjectNotOpen", object2));
}
else {
if (GetBoolean(object2, "hidechildren")) {
set(object2, "hidechildren", false);
}
if (HasDelegateImplementation(object2, "addscript")) {
rundelegate (object2, "addscript", object1);
}
else {
set(object1, "parent", object2);
OutputText (Template("Done"));
}
} },
"_js_name": "e_put",
"_types": ["defaultcommand"]
};
elementsNameMap["put"] = e_put;
allCommands.push(e_put);
objectsNameMap["put"] = e_put;
e_removefrom = {
"elementtype": "object",
"name": "removefrom",
"type": "command",
"pattern": "^remove (?<object1>.*) from (?<object2>.*)$",
"script": function(parameters) { var object1 = parameters['object1'];
var object2 = parameters['object2'];
if (!(Contains(object2, object1))) {
OutputText (overloadedFunctions.DynamicTemplate("ObjectDoesNotContain", object2, object1));
}
else {
DoTake (object1, false);
} },
"_js_name": "e_removefrom",
"_types": ["defaultcommand"]
};
elementsNameMap["removefrom"] = e_removefrom;
allCommands.push(e_removefrom);
objectsNameMap["removefrom"] = e_removefrom;
e_givesingle = {
"elementtype": "object",
"name": "givesingle",
"type": "command",
"pattern": "^give (?<object>.*)$",
"script": function(parameters) { var object = parameters['object'];
if (HasScript(object, "givesingle")) {
runscriptattribute2 (object, "givesingle");
}
else {
if (GetBoolean(object, "givesingle")) {
var menu = NewStringDictionary();
var candidates = NewObjectList();
var candidates = CreateGiveMenuList (object);
if (ListCount(candidates) == 0) {
OutputText (Template("NoObjectsAvailable"));
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "givemenuobject", object);
if (HasString(object, "givemenuprompt")) {
var menucaption = object.givemenuprompt;
}
else {
var menucaption = Template("GiveToMenu");
}
ShowMenu (menucaption, menu, true, function (result) { if (result != null) {
HandleGiveTo (e_game.pov.givemenuobject, GetObject(result));
set(e_game.pov, "givemenuobject", null);
} });
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("CantGive", object));
}
} },
"_js_name": "e_givesingle",
"_types": ["defaultcommand"]
};
elementsNameMap["givesingle"] = e_givesingle;
allCommands.push(e_givesingle);
objectsNameMap["givesingle"] = e_givesingle;
e_give = {
"elementtype": "object",
"name": "give",
"type": "command",
"pattern": "^give (?<object1>.*) to (?<object2>.*)$",
"script": function(parameters) { var object1 = parameters['object1'];
var object2 = parameters['object2'];
HandleGiveTo (object1, object2); },
"_js_name": "e_give",
"_types": ["defaultcommand"]
};
elementsNameMap["give"] = e_give;
allCommands.push(e_give);
objectsNameMap["give"] = e_give;
e_useon = {
"elementtype": "object",
"name": "useon",
"type": "command",
"pattern": "^use (?<object1>.*) (on|with) (?<object2>.*)$",
"script": function(parameters) { var object1 = parameters['object1'];
var object2 = parameters['object2'];
HandleUseOn (object1, object2); },
"_js_name": "e_useon",
"_types": ["defaultcommand"]
};
elementsNameMap["useon"] = e_useon;
allCommands.push(e_useon);
objectsNameMap["useon"] = e_useon;
e_ask = {
"elementtype": "object",
"name": "ask",
"type": "command",
"pattern": "^ask (?<object>.*) about (?<text>.*)$",
"script": function(parameters) { var object = parameters['object'];
var text = parameters['text'];
DoAskTell (object, text, "ask", "askdefault", "DefaultAsk"); },
"_js_name": "e_ask",
"_types": ["defaultcommand"]
};
elementsNameMap["ask"] = e_ask;
allCommands.push(e_ask);
objectsNameMap["ask"] = e_ask;
e_tell = {
"elementtype": "object",
"name": "tell",
"type": "command",
"pattern": "^tell (?<object>.*) about (?<text>.*)$",
"script": function(parameters) { var object = parameters['object'];
var text = parameters['text'];
DoAskTell (object, text, "tell", "telldefault", "DefaultTell"); },
"_js_name": "e_tell",
"_types": ["defaultcommand"]
};
elementsNameMap["tell"] = e_tell;
allCommands.push(e_tell);
objectsNameMap["tell"] = e_tell;
e_oops = {
"elementtype": "object",
"name": "oops",
"type": "command",
"pattern": "^oops (?<text>.*)$",
"isoops": true,
"script": function(parameters) { var text = parameters['text'];
var hasoops = false;
if (HasAttribute(e_game, "unresolvedcommand")) {
if (e_game.unresolvedcommand != null) {
var hasoops = true;
}
}
if (!(hasoops)) {
OutputText (Template("DefaultOops"));
}
else {
dictionaryremove (e_game.unresolvedcommandvarlist, e_game.unresolvedcommandkey);
dictionaryadd (e_game.unresolvedcommandvarlist, e_game.unresolvedcommandkey, text);
HandleSingleCommandPattern ("", e_game.unresolvedcommand, e_game.unresolvedcommandvarlist);
} },
"_js_name": "e_oops",
"_types": ["defaultcommand"]
};
elementsNameMap["oops"] = e_oops;
allCommands.push(e_oops);
objectsNameMap["oops"] = e_oops;
e_speak = {
"elementtype": "object",
"name": "speak",
"displayverb" : "Speak to",// JS VOURTRAM
"type": "command",
"property": "speak",
"isverb": true,
"pattern": "^speak (to|with) (?<object>.*)$|^speak (?<g2_map_object>.*)$|^talk to (?<g3_map_object>.*)$|^talk (?<g4_map_object>.*)$",
"defaulttemplate": "DefaultSpeakTo",
"_js_name": "e_speak",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["speak"] = e_speak;
allCommands.push(e_speak);
objectsNameMap["speak"] = e_speak;
e_buy = {
"elementtype": "object",
"name": "buy",
"type": "command",
"property": "buy",
"isverb": true,
"pattern": "^buy (?<object>.*)$",
"defaulttemplate": "DefaultBuy",
"_js_name": "e_buy",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["buy"] = e_buy;
allCommands.push(e_buy);
objectsNameMap["buy"] = e_buy;
e_climb = {
"elementtype": "object",
"name": "climb",
"type": "command",
"property": "climb",
"isverb": true,
"pattern": "^climb (?<object>.*)$",
"defaulttemplate": "DefaultClimb",
"_js_name": "e_climb",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["climb"] = e_climb;
allCommands.push(e_climb);
objectsNameMap["climb"] = e_climb;
e_drink = {
"elementtype": "object",
"name": "drink",
"type": "command",
"property": "drink",
"isverb": true,
"pattern": "^drink (?<object>.*)$",
"defaulttemplate": "DefaultDrink",
"_js_name": "e_drink",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["drink"] = e_drink;
allCommands.push(e_drink);
objectsNameMap["drink"] = e_drink;
e_eat = {
"elementtype": "object",
"name": "eat",
"type": "command",
"property": "eat",
"isverb": true,
"pattern": "^eat (?<object>.*)$",
"defaulttemplate": "DefaultEat",
"_js_name": "e_eat",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["eat"] = e_eat;
allCommands.push(e_eat);
objectsNameMap["eat"] = e_eat;
e_hit = {
"elementtype": "object",
"name": "hit",
"type": "command",
"property": "hit",
"isverb": true,
"pattern": "^hit (?<object>.*)$",
"defaulttemplate": "DefaultHit",
"_js_name": "e_hit",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["hit"] = e_hit;
allCommands.push(e_hit);
objectsNameMap["hit"] = e_hit;
e_kill = {
"elementtype": "object",
"name": "kill",
"type": "command",
"property": "kill",
"isverb": true,
"pattern": "^kill (?<object>.*)$",
"defaulttemplate": "DefaultKill",
"_js_name": "e_kill",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["kill"] = e_kill;
allCommands.push(e_kill);
objectsNameMap["kill"] = e_kill;
e_kiss = {
"elementtype": "object",
"name": "kiss",
"type": "command",
"property": "kiss",
"isverb": true,
"pattern": "^kiss (?<object>.*)$",
"defaulttemplate": "DefaultKiss",
"_js_name": "e_kiss",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["kiss"] = e_kiss;
allCommands.push(e_kiss);
objectsNameMap["kiss"] = e_kiss;
e_knock = {
"elementtype": "object",
"name": "knock",
"type": "command",
"property": "knock",
"isverb": true,
"pattern": "^knock (?<object>.*)$",
"defaulttemplate": "DefaultKnock",
"_js_name": "e_knock",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["knock"] = e_knock;
allCommands.push(e_knock);
objectsNameMap["knock"] = e_knock;
e_lick = {
"elementtype": "object",
"name": "lick",
"type": "command",
"property": "lick",
"isverb": true,
"pattern": "^lick (?<object>.*)$",
"defaulttemplate": "DefaultLick",
"_js_name": "e_lick",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["lick"] = e_lick;
allCommands.push(e_lick);
objectsNameMap["lick"] = e_lick;
e_lieon = {
"elementtype": "object",
"name": "lieon",
"type": "command",
"property": "lie",
"isverb": true,
"pattern": "^lie on (?<object>.*)$|^lie upon (?<g2_map_object>.*)$|^lie down on (?<g3_map_object>.*)$|^lie down upon (?<g4_map_object>.*)$",
"defaulttemplate": "DefaultLie",
"_js_name": "e_lieon",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["lieon"] = e_lieon;
allCommands.push(e_lieon);
objectsNameMap["lieon"] = e_lieon;
e_listento = {
"elementtype": "object",
"name": "listento",
"type": "command",
"property": "listen",
"isverb": true,
"pattern": "^listen to (?<object>.*)$",
"defaulttemplate": "DefaultListenTo",
"_js_name": "e_listento",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["listento"] = e_listento;
allCommands.push(e_listento);
objectsNameMap["listento"] = e_listento;
e_lock = {
"elementtype": "object",
"name": "lock",
"type": "command",
"property": "lock",
"isverb": true,
"pattern": "^lock (?<object>.*)$",
"defaulttemplate": "DefaultLock",
"_js_name": "e_lock",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["lock"] = e_lock;
allCommands.push(e_lock);
objectsNameMap["lock"] = e_lock;
e_move = {
"elementtype": "object",
"name": "move",
"type": "command",
"property": "move",
"isverb": true,
"pattern": "^move (?<object>.*)$",
"defaulttemplate": "DefaultMove",
"_js_name": "e_move",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["move"] = e_move;
allCommands.push(e_move);
objectsNameMap["move"] = e_move;
e_pull = {
"elementtype": "object",
"name": "pull",
"type": "command",
"property": "pull",
"isverb": true,
"pattern": "^pull (?<object>.*)$",
"defaulttemplate": "DefaultPull",
"_js_name": "e_pull",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["pull"] = e_pull;
allCommands.push(e_pull);
objectsNameMap["pull"] = e_pull;
e_push = {
"elementtype": "object",
"name": "push",
"type": "command",
"property": "push",
"isverb": true,
"pattern": "^push (?<object>.*)$",
"defaulttemplate": "DefaultPush",
"_js_name": "e_push",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["push"] = e_push;
allCommands.push(e_push);
objectsNameMap["push"] = e_push;
e_read = {
"elementtype": "object",
"name": "read",
"type": "command",
"property": "read",
"isverb": true,
"pattern": "^read (?<object>.*)$",
"defaulttemplate": "DefaultRead",
"_js_name": "e_read",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["read"] = e_read;
allCommands.push(e_read);
objectsNameMap["read"] = e_read;
e_search = {
"elementtype": "object",
"name": "search",
"type": "command",
"property": "search",
"isverb": true,
"pattern": "^search (?<object>.*)$",
"defaulttemplate": "DefaultSearch",
"_js_name": "e_search",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["search"] = e_search;
allCommands.push(e_search);
objectsNameMap["search"] = e_search;
e_show = {
"elementtype": "object",
"name": "show",
"type": "command",
"property": "show",
"isverb": true,
"pattern": "^show (?<object>.*)$",
"defaulttemplate": "DefaultShow",
"_js_name": "e_show",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["show"] = e_show;
allCommands.push(e_show);
objectsNameMap["show"] = e_show;
e_siton = {
"elementtype": "object",
"name": "siton",
"type": "command",
"property": "sit",
"isverb": true,
"pattern": "^sit on (?<object>.*)$|^sit upon (?<g2_map_object>.*)$|^sit down on (?<g3_map_object>.*)$|^sit down upon (?<g4_map_object>.*)$",
"defaulttemplate": "DefaultSit",
"_js_name": "e_siton",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["siton"] = e_siton;
allCommands.push(e_siton);
objectsNameMap["siton"] = e_siton;
e_smell = {
"elementtype": "object",
"name": "smell",
"type": "command",
"property": "smell",
"isverb": true,
"pattern": "^smell (?<object>.*)$|^sniff (?<g2_map_object>.*)$",
"defaulttemplate": "DefaultSmell",
"_js_name": "e_smell",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["smell"] = e_smell;
allCommands.push(e_smell);
objectsNameMap["smell"] = e_smell;
e_taste = {
"elementtype": "object",
"name": "taste",
"type": "command",
"property": "taste",
"isverb": true,
"pattern": "^taste (?<object>.*)$",
"defaulttemplate": "DefaultTaste",
"_js_name": "e_taste",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["taste"] = e_taste;
allCommands.push(e_taste);
objectsNameMap["taste"] = e_taste;
e_throw = {
"elementtype": "object",
"name": "throw",
"type": "command",
"property": "throw",
"isverb": true,
"pattern": "^throw (?<object>.*)$",
"defaulttemplate": "DefaultThrow",
"_js_name": "e_throw",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["throw"] = e_throw;
allCommands.push(e_throw);
objectsNameMap["throw"] = e_throw;
e_tie = {
"elementtype": "object",
"name": "tie",
"type": "command",
"property": "tie",
"isverb": true,
"pattern": "^tie (?<object>.*)$",
"defaulttemplate": "DefaultTie",
"_js_name": "e_tie",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["tie"] = e_tie;
allCommands.push(e_tie);
objectsNameMap["tie"] = e_tie;
e_touch = {
"elementtype": "object",
"name": "touch",
"type": "command",
"property": "touch",
"isverb": true,
"pattern": "^touch (?<object>.*)$",
"defaulttemplate": "DefaultTouch",
"_js_name": "e_touch",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["touch"] = e_touch;
allCommands.push(e_touch);
objectsNameMap["touch"] = e_touch;
e_turnon = {
"elementtype": "object",
"name": "turnon",
"type": "command",
"property": "turnon",
"isverb": true,
"pattern": "^turn on (?<object>.*)$|^turn (?<g2_map_object>.*) on$|^switch on (?<g3_map_object>.*)$|^switch (?<g4_map_object>.*) on$",
"defaulttemplate": "DefaultTurnOn",
"_js_name": "e_turnon",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["turnon"] = e_turnon;
allCommands.push(e_turnon);
objectsNameMap["turnon"] = e_turnon;
e_turnoff = {
"elementtype": "object",
"name": "turnoff",
"type": "command",
"property": "turnoff",
"isverb": true,
"pattern": "^turn off (?<object>.*)$|^turn (?<g2_map_object>.*) off$|^switch off (?<g3_map_object>.*)$|^switch (?<g4_map_object>.*) off$",
"defaulttemplate": "DefaultTurnOff",
"_js_name": "e_turnoff",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["turnoff"] = e_turnoff;
allCommands.push(e_turnoff);
objectsNameMap["turnoff"] = e_turnoff;
e_turn = {
"elementtype": "object",
"name": "turn",
"type": "command",
"property": "turn",
"isverb": true,
"pattern": "^turn (?<object>.*)$",
"defaulttemplate": "DefaultTurn",
"_js_name": "e_turn",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["turn"] = e_turn;
allCommands.push(e_turn);
objectsNameMap["turn"] = e_turn;
e_unlock = {
"elementtype": "object",
"name": "unlock",
"type": "command",
"property": "unlock",
"isverb": true,
"pattern": "^unlock (?<object>.*)$",
"defaulttemplate": "DefaultUnlock",
"_js_name": "e_unlock",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["unlock"] = e_unlock;
allCommands.push(e_unlock);
objectsNameMap["unlock"] = e_unlock;
e_untie = {
"elementtype": "object",
"name": "untie",
"type": "command",
"property": "untie",
"isverb": true,
"pattern": "^untie (?<object>.*)$",
"defaulttemplate": "DefaultUntie",
"_js_name": "e_untie",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["untie"] = e_untie;
allCommands.push(e_untie);
objectsNameMap["untie"] = e_untie;
e_wear = {
"elementtype": "object",
"name": "wear",
"type": "command",
"property": "wear",
"isverb": true,
"pattern": "^wear (?<object>.*)$",
"defaulttemplate": "DefaultWear",
"_js_name": "e_wear",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["wear"] = e_wear;
allCommands.push(e_wear);
objectsNameMap["wear"] = e_wear;
e_listen = {
"elementtype": "object",
"name": "listen",
"type": "command",
"pattern": "^listen$",
"script": function(parameters) { OutputText (Template("DefaultListen")); },
"_js_name": "e_listen",
"_types": ["defaultcommand"]
};
elementsNameMap["listen"] = e_listen;
allCommands.push(e_listen);
objectsNameMap["listen"] = e_listen;
e_jump = {
"elementtype": "object",
"name": "jump",
"type": "command",
"pattern": "^jump$",
"script": function(parameters) { OutputText (Template("DefaultJump")); },
"_js_name": "e_jump",
"_types": ["defaultcommand"]
};
elementsNameMap["jump"] = e_jump;
allCommands.push(e_jump);
objectsNameMap["jump"] = e_jump;
e_sit = {
"elementtype": "object",
"name": "sit",
"type": "command",
"pattern": "^sit$|^sit down$",
"script": function(parameters) { OutputText (Template("DefaultSitDown")); },
"_js_name": "e_sit",
"_types": ["defaultcommand"]
};
elementsNameMap["sit"] = e_sit;
allCommands.push(e_sit);
objectsNameMap["sit"] = e_sit;
e_lie = {
"elementtype": "object",
"name": "lie",
"type": "command",
"pattern": "^lie$|^lie down$",
"script": function(parameters) { OutputText (Template("DefaultLieDown")); },
"_js_name": "e_lie",
"_types": ["defaultcommand"]
};
elementsNameMap["lie"] = e_lie;
allCommands.push(e_lie);
objectsNameMap["lie"] = e_lie;
e_sleep = {
"elementtype": "object",
"name": "sleep",
"type": "command",
"pattern": "^sleep$|^rest$",
"script": function(parameters) { OutputText (Template("DefaultSleep")); },
"_js_name": "e_sleep",
"_types": ["defaultcommand"]
};
elementsNameMap["sleep"] = e_sleep;
allCommands.push(e_sleep);
objectsNameMap["sleep"] = e_sleep;
e_wait = {
"elementtype": "object",
"name": "wait",
"type": "command",
"pattern": "^wait$|^z$",
"script": function(parameters) { OutputText (Template("DefaultWait")); },
"_js_name": "e_wait",
"_types": ["defaultcommand"]
};
elementsNameMap["wait"] = e_wait;
allCommands.push(e_wait);
objectsNameMap["wait"] = e_wait;
e_xyzzy = {
"elementtype": "object",
"name": "xyzzy",
"type": "command",
"pattern": "^xyzzy$",
"script": function(parameters) { OutputText (Template("DefaultXyzzy")); },
"_js_name": "e_xyzzy",
"_types": ["defaultcommand"]
};
elementsNameMap["xyzzy"] = e_xyzzy;
allCommands.push(e_xyzzy);
objectsNameMap["xyzzy"] = e_xyzzy;
e_help = {
"elementtype": "object",
"name": "help",
"type": "command",
"pattern": "^help$|^\\?$",
"script": function(parameters) { OutputText (Template("DefaultHelp")); },
"_js_name": "e_help",
"_types": ["defaultcommand"]
};
elementsNameMap["help"] = e_help;
allCommands.push(e_help);
objectsNameMap["help"] = e_help;
e_save = {
"elementtype": "object",
"name": "save",
"type": "command",
"pattern": "^save$",
"script": function(parameters) { request ("RequestSave", ""); },
"_js_name": "e_save",
"_types": ["defaultcommand"]
};
elementsNameMap["save"] = e_save;
allCommands.push(e_save);
objectsNameMap["save"] = e_save;
e_clue = {
"elementtype": "object",
"name": "clue",
"type": "command",
"pattern": "^clue$|^clues$|^hint$|^hints$",
"script": function(parameters) { OutputText ("Select the text between the brackets to reveal the clue.");
if (e_player.level<3 && e_player.class!="none") {
invisClue ("What am I doing now?", "You have to perform quests to the guildmasters, in order to increase your score.");
}
if (e_player.level==0) {
if (e_player.class=="none") {
invisClue ("You must pick a profession by finding a guild", "You can train to be a warrior, a mage, or a thief.");
invisClue ("The Warrior's guild is", "North and Northeast.");
invisClue ("The Wizard's guild is", "North and Northwest.");
invisClue ("The Thief's guild is", "North, West, South, West.");
invisClue ("Once in the guild", "Speak to the guildmaster: Derrick, Dashiel or Kadrak.");
}
else if (e_player.isWarrior) {
invisClue ("I'm a warrior, what now?", "Ask Derrick about training.");
invisClue ("Where is the thug?", "Look at the bakery.");
invisClue ("How can I defeat the thug?", "Throw a spear at him.");
}
else if (e_player.isThief) {
invisClue ("I'm a thief, what now?", "Ask Kadrak about training.");
invisClue ("Where can I steal a necklace?", "Look at the bakery.");
invisClue ("But where is the necklace?", "Look at the second floor of the bakery.");
invisClue ("But how can I enter there?", "Climb the tree.");
invisClue ("But I can't get the necklace", "Try to picklock the table.");
invisClue ("But... I still can't get the necklace", "Try to hide under the bed.");
invisClue ("Got the necklace, and now?", "Give the necklace to Kadrak.");
}
else if (e_player.isMage) {
invisClue ("I'm a wizard, what now?", "Ask Dashiel about training.");
invisClue ("Where is the wolf?", "Go to the maze (east of market), then north, then east.");
invisClue ("The wolf tries to kill me", "Cast calm at wolf.");
invisClue ("Where is the fur?", "Look at the lair.");
invisClue ("I can't get the fur!", "Lure the wolf out the lair and then cast calm.");
invisClue ("What do I do with the fur?", "Give to Dashiel. He will give a potion to you. Use the potion with the wolf.");
}
if (e_player.class!="none") {
invisClue ("Finished the quest, what now?", "Ask your guildmaster about training.");
}
}
else if (e_player.level==1) {
if (e_player.isWarrior) {
invisClue ("Where are the hills?", "Go east to the maze, and then go north.");
invisClue ("Found the wolf, but I got stuck", "Pay a visit to the baker. Is anything different?");
invisClue ("Still stuck with the wolf?", "Talk to the red hooded girl in front of the bakery.");
invisClue ("I helped the girl, what now?", "The wolf follows you. Make the wolf sees the red hooded girl.");
invisClue ("Defeated the wolf, what now?", "Give his corpse to Derrick.");
}
else if (e_player.isThief) {
invisClue ("Where is the thug?", "Look at the gray tavern, east and north of the thieves guild.");
invisClue ("I cannot stab the thug", "You need to find a distraction. Look for the yellow hooded girl at the dark alley.");
invisClue ("I need something valuable", "Perhaps someone in the tavern has something of worth.");
invisClue ("How do I steal an object from someone?", "Try to buy a drink.");
invisClue ("I still can't finish the thug", "Steal the ring from the drunk guy, give the ring to the girl, and stab thug.");
}
else if (e_player.isMage) {
invisClue ("Where do I start?", "Start by playing with the new reveal spell. Cast reveal everywhere.");
invisClue ("Can't find anything interesting with reveal", "Try at the dark alley. Talk to the Kobold.");
invisClue ("Who has the Kobold's ring", "Kadrak, at the guild of thieves, west of the dark alley.");
invisClue ("How do I get the Kobold's ring", "Cast reveal at the guild of mages. Give the diamond to Kadrak.");
invisClue ("After giving the ring to the Kobold...", "North, and east four times.");
}
}
else if (e_player.level==2) {
if (e_player.isWarrior) {
invisClue ("Where is the tournament?", "In the courtyard, north of the market. Speak to the referee.");
invisClue ("I can't win the tournament", "fight derrick until he tells you are ready.");
invisClue ("Where can I find protection?", "look at the pile of armor in the courtyard.");
invisClue ("What about headgear?", "Talk to the baker. Give the pot to the dog.");
invisClue ("I am out of money", "Talk to Coriander.");
}
else if (e_player.isThief) {
invisClue ("Can't steal from Dashiel!", "Examine the trash in his laboratory.");
invisClue ("Can't steal from Derrick!", "To prevent the trap, replace the gold dagger with your dagger.");
}
else if (e_player.isMage) {
invisClue ("How do I start?", "Take a look at the board in the courtyard.");
invisClue ("Can't get the paper in the tree?", "You will need the apportation spell, seek Rafaella in the tavern.");
invisClue ("How do I learn the new spell?", "Talk to Rafaella in the tavern. She will make a request.");
invisClue ("Where is the pie?", "Go to the hills, north of the maze. Search the red hooded girl.");
invisClue ("How do I get the pie?", "Go to the courtyard and examine the armour. You will find the red hat. Give it to the girl.");
invisClue ("Got the paper, now what?", "Give it to Dashiel.");
invisClue ("I\u00b4m still lost", "Look board, talk to Raffaella, get hat, give hat to girl, give pie to Raffaella, cast apportation at paper.");
}
}
else if (e_player.level==3) {
invisClue ("What am I doing now?", "You have to get rid of the brigands blocking the way to the castle and meet the King.");
invisClue ("Where should I go?", "Go all way east, then south. You should be able to deal with the Orc now.");
invisClue ("I can't get the bucket", "You have to use the carrots with the bucket.");
if (e_player.isWarrior) {
invisClue ("How do I free the tied man?", "Throw spear at the rope.");
invisClue ("How do I talk to the man?", "You have to wake him up. Perhaps with a bucket of water?");
invisClue ("Where can I fill the bucket?", "At the rapids.");
invisClue ("How do I cross the rapids?", "After cutting the rope, use it with the trees.");
invisClue ("Can't find the Brigand's hideout?", "Talk to Elias. Ask Elias about hideout.");
invisClue ("Cannot enter the hideout?", "Push boulder.");
invisClue ("Removed the brigands? what now?", "Go see the king, north of the courtyard.");
}
else if (e_player.isThief) {
invisClue ("The orc is killing me", "Stab orc.");
invisClue ("How do I free the tied man?", "Climb the tree.");
invisClue ("How do I talk to the man?", "You have to wake him up. Perhaps with a bucket of water?");
invisClue ("Where can I fill the bucket?", "At the rapids.");
invisClue ("How do I cross the rapids?", "After cutting the rope, use it with the trees.");
invisClue ("Can't find the Brigand's hideout?", "Talk to Elias. Ask Elias about hideout.");
invisClue ("Cannot enter the hideout?", "Hide behind bushes. Use the magical word.");
invisClue ("How can I go pass the entrance?", "Climb pallet, turn off lamps, and go.");
invisClue ("Heard the conversation in the cave, what do I do?", "Picklock the chest and replace the potion with water.");
invisClue ("Still lost", "Fill bucket, use bucket with bottle, put bottle in chest, close chest.");
invisClue ("Removed the brigands? what now?", "Go see the king, north of the courtyard.");
}
else if (e_player.isMage) {
invisClue ("The orc is killing me", "Cast calm at orc.");
invisClue ("How do I enter the tower?", "Cast Reveal, cast fetch at lever.");
invisClue ("Where can I get fairy dust?", "At the dark corner, cast reveal. Talk to the fairy.");
invisClue ("Cannot solve the first riddle", "clouds");
invisClue ("Cannot solve the second riddle", "Trow");
invisClue ("How do I free the tied man?", "Cast fetch at the rope to untie it.");
invisClue ("How do I cross the rapids?", "Use your shape plant spell.");
invisClue ("How do I talk to the tied man?", "You have to wake him up. Perhaps with a bucket of water?");
invisClue ("Where can I fill the bucket?", "At the rapids.");
invisClue ("How do I manage the Trow?", "You need the flute. Trade it for the dust. Play the flute and give to the Trow.");
invisClue ("How do I restore the man's memory?", "At Midgaard, the Trow will give you a sword. Give it to the man.");
}
}
else if (e_player.parent==e_battle) {
OutputText ("This is the final showdown! No clues available right now. Use Look, Inventory, and your skills to solve the puzzle.");
}
else if (e_player.level>3) {
invisClue ("What am I doing now?", "You have to enter the castle and find a way to defeat Vourtram.");
invisClue ("I can't walk to the castle", "Take the horse at Sheila's stable.");
invisClue ("I can't find the way back from the castle", "Take the horse at inn.");
invisClue ("Entered the castle, but cannot pass the kitchen!", "Try to get the job of rat killer.");
invisClue ("How to get the job [1]", "Ask Cook About Cooking. While he is out, open cabinet and get trap.");
invisClue ("How to get the job [2]", "Ask Cook About Cooking. Go to the pantry while the cook drinks. Get the wine.");
invisClue ("How to get the job [3]", "Give the wine to the man at the courtyard. Use cheese with trap. Use trap. Give rat to cook.");
invisClue ("What about the music hall?", "There is a secret passage to the dungeon.");
invisClue ("What about the music hall[2]?", "You will need to play a specific tune in the harpsichord.");
invisClue ("What about the music hall[3]?", "If you talked to Amicia, before taking the horse, you will know the tune.");
invisClue ("What about the music hall[4]?", "at the improvised throne room, ask Amicia about harpsichord.");
invisClue ("What about the music hall[5]?", "Talk to the bard and ask for him to play the Pavane. Push wall.");
invisClue ("Can't pass the jailer", "Put herring on the vent on the middle level.");
if (e_player.isWarrior) {
invisClue ("After talking to the king...", "Talk to Derrick. Ask about training.");
invisClue ("How can I enter the castle?", "Find a guard (eastern wall) and drink the disguise potion.");
invisClue ("I'm getting beaten all the time", "Train with Rodney until you can't get anymore experience.");
invisClue ("What about the elf smith?", "Give your sword to him.");
invisClue ("The Captain is unbeatable", "Do you have all the equipment? Helmet, buckler, werewolf jacket, small sword?");
invisClue ("The Captain is unbeatable[2]", "You had better have more than 60 fighting experience to stand a chance.");
invisClue ("The Captain is unbeatable[3]", "If your sword is damaged it won't work.");
invisClue ("The Captain is unbeatable[4]", "Experiment the stances. Ask Derrick about it.");
invisClue ("The Demons are unbeatable", "You will need the elven sword. Give the captain's ring to the elf.");
invisClue ("Can't pass by the wyvern?", "use the horn with the spear and throw it at the wyvern.");
invisClue ("How to get the medallion?", "Talk to the woman in the bedroom. Kill the wyvern and she will help you.");
invisClue ("Can't pass the barred doors in the dungeon", "pull door.");
invisClue ("How to save the princess after releasing her?", "At the music room, look at the great hall, cut ropes...");
invisClue ("How can I defeat the stone god?", "Just push and it will break. You will never win by force.");
invisClue ("Where is the key for the obsidian chamber?", "At the southwestern bedroom, hidden in the paint. The key is in the cupboard of the Captain's Office.");
invisClue ("I'm at the bedroom, but can't find the key?", "At the southwestern bedroom, use the mirror with the opening to reveal the jade key.");
invisClue ("The obsidian chamber is empty!", "You must use the portable portal in the right spot.");
invisClue ("The obsidian chamber is empty[2]!", "Drop the portal at the throne room in the castle and use it there.");
}
else if (e_player.isThief) {
invisClue ("After talking to the king...", "Try to steal money and property. Kadrak can buy the stuff you find.");
invisClue ("How can I enter the castle?", "Climb the sewers at the western wall.");
invisClue ("Entered the throne room, but what now?", "At the dinning room, hide behind the curtains.");
invisClue ("How to remove the guard in the hallway?", "Give the mead to the guard on leave in the courtyard. Give the leave order to the guard at the hallway.");
invisClue ("How can I steal the elf?", "Wait for the moment he is doing loud sounds and take the mead.");
invisClue ("How can I enter the captain's Office?", "Climb the window in the hallway.");
invisClue ("How can I enter the captain's Office[2]?", "Stab the captain from outside the window.");
invisClue ("How can I pass the demon?", "Hide at archway.");
invisClue ("How can I pass the demon[2]?", "Throw rock. You can get the rock at the maze.");
invisClue ("How to steal the treasury?", "You will need the Kadrack's invisibility potion.");
invisClue ("How can I make money?", "The locked bedrooms in the corridor are full of valuable items.");
invisClue ("How can I make money[2]?", "After the arrival of the bard, the dancing couples can also be stolen.");
invisClue ("What can I steal from the southern bedroom?", "open chest, hide at chest, take all in chest, examine the bed while the woman is out.");
invisClue ("What can I steal from the western bedroom?", "When the man knocks the door, use the dress and stab him as soon as possible.");
invisClue ("How can I return from the corridor area?", "One of the rooms has a window. Open and climb. You can now go up by this entrance, instead of passing by the demon.");
invisClue ("Can't pass by the wyvern?", "Give sweeties to him.");
invisClue ("Can't pass by the wyvern[2]?", "Steal sugar from the cook. Get the candies in the Captain's Office.");
invisClue ("Got the medallion, how to escape Vourtram?", "Climb the window!");
invisClue ("Got the medallion, how to escape Vourtram[2]?", "Use medallion. DON\u00b4T BREAK IT.");
invisClue ("Where is the key for the treasury?", "Push the cupboard at the captain's office.");
invisClue ("Can't pass the barred doors in the dungeon", "Get the horn at the throne room and use it with the barred doors.");
invisClue ("How to save the princess after releasing her?", "At the music room, look at the great hall, cut ropes...");
invisClue ("How can I enter the temple in the portable portal?", "examine statues, get rope and climb columns.");
invisClue ("How can I defeat the stone god?", "fill the bucket with water, use bucket with pentagram.");
invisClue ("Can't picklock the keyhole in the temple?", "You will need the key.");
invisClue ("Where is the key for the obsidian chamber?", "At the southwestern bedroom, hidden in the paint.");
invisClue ("I'm at the bedroom, but can't find the key?", "At the southwestern bedroom, use the mirror with the opening to reveal the jade key.");
invisClue ("The obsidian chamber is empty!", "You must use the portable portal in the right spot.");
invisClue ("The obsidian chamber is empty[2]!", "Drop the portal at the throne room in the castle and use it there.");
}
else if (e_player.isMage) {
invisClue ("After talking to the king...", "Talk to Dashiel. Ask about training.");
invisClue ("How can I enter the castle?", "Talk to Eva. Perhaps you can put the teleport orb with the apples.");
invisClue ("Still can't enter the castle?", "Cast blind at Eva. Use orb with stand. Cast teleport.");
invisClue ("How to pass by Medusa", "Cast blind at Medusa. Get the knapsack hidden at the statues and use it with Medusa.");
invisClue ("Stuck in the library?", "Cast reveal.");
invisClue ("Stuck in the library [2]?", "Cast calm at firewall.");
invisClue ("Cannot get that thing in the library?", "Cast apportation at parchment.");
invisClue ("What should I do with the levitation spell?", "Try to cast levitate at the well on the courtyard.");
invisClue ("What about the bookcase?", "Down the well, examine the wall, push the runes, get the book. Use the book with the bookcase.");
invisClue ("What about the dragon?", "You need to find the key. It is at the throne room, cast reveal.");
invisClue ("What about the portal?", "Levitate and use the teleport orb. Get the key that will free the dragon.");
invisClue ("How do I get out?", "Levitate down the well, go to the ramp.");
invisClue ("What do I do with the diary?", "Give it to Dashiel?");
invisClue ("Who is the last wizard?", "Erasmus the cat, you will need to make a potion to turn him back.");
invisClue ("How do I make the potion?", "The recipe is on the blue book. Turn on the cauldron. Put all ingredients at the cauldron.");
invisClue ("Where can I find ashes?", "At the trophy room, look at the armour. Get the burned shield. It will do it.");
invisClue ("Where can I find the other ingredients?", "Cheese from the man at courtyard. Garlic on the pantry. Everything else at the shelf.");
invisClue ("How do I pass the guard at the hall?", "Examine the window. Pull the vines. Blind the guard. Shape the vines.");
invisClue ("How do I pass the demons?", "Erasmus will give you the banish spell.");
invisClue ("Can't pass the barred doors in the dungeon", "Get the horn at the throne room and use it with the barred doors.");
invisClue ("Opened the princess cell. Talked to her. And now?", "Leave the orb in the sewers, meet the princess, teleport both of you, go ramp...");
invisClue ("How do I pass the wyvern?", "cast calm.");
invisClue ("How do I take the medallion?", "cast apportation.");
invisClue ("How can I defeat the stone god?", "cast levitate, fill the bucket with water, use bucket with pentagram.");
invisClue ("Got stuck at the portable portal 'ocean'", "calm the water, shape fern, fetch lever.");
}
invisClue ("I think I am ready to defeat Vourtram...", "stay the night at the inn.");
} 
//JS
$('font.clue').click(function() {
            this.color="black";
        });
},
"_js_name": "e_clue",
"_types": ["defaultcommand"]
};
elementsNameMap["clue"] = e_clue;
allCommands.push(e_clue);
objectsNameMap["clue"] = e_clue;
e_start = {
"elementtype": "object",
"name": "start",
"type": "object",
"usedefaultprefix": false,
"descprefix": "",
"objectslistprefix": "",
"description": "",
"alias": " ",
"callback": false,
"loading": false,
"beforefirstenter": function() { set(e_game, "autodescription_youarein_useprefix", false);
initMultiSave();
if (e_game.startmsg) {
gameStart();
set(e_game, "startmsg", false);
request ("Hide", "Command");
}
executeJS ("restartLoading"); },
"enter": function() { 
set(e_game, "autodescription_youarein_useprefix", true); 
},
"onexit": function() { request ("Show", "Command"); },
"enter": function() { set(e_game, "autodescription_youarein_useprefix", true); },
"_js_name": "e_start",
"_types": ["SaveType", "defaultobject"],
"cmds": [],
"saves": {"__dummyKey": "" },
"record": true,
"savename": "",
"random": [],
"random_play": [],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["start"] = e_start;
allObjects.push(e_start);
objectsNameMap["start"] = e_start;
e_player = {
"elementtype": "object",
"name": "player",
"parent": e_start,
"type": "object",
"statusattributes": {"__dummyKey": "" },
"class": "none",
"level": 0,
"contest": 0,
"fightexp": 0,
"look": "You look at yourself ... you see you looking at yourself.",
"disguise_potion": false,
"deaths": 0,
"isMage": false,
"isWarrior": false,
"isThief": false,
"stance": false,
"dress": false,
"pov_look": function() { if (e_player.parent == e_combat_room) {
OutputText ("You are figthing");
var health = 100*e_combat.pl_ht / ( 10+e_combat.pl_exp);
debmsg ("h="+health+","+e_combat.pl_ht+","+(10+e_combat.pl_exp));
if (health>90) {
OutputText ("You are perfectly healthy");
}
else if (health>70) {
OutputText ("You have a few bruises");
}
else if (health>50) {
OutputText ("You have some bruises and is a bit tired");
}
else if (health>25) {
OutputText ("You have a lot of bruises and is tired");
}
else if (health>10) {
OutputText ("You are wounded and is thinking about fleeing this combat");
}
else {
OutputText ("You are really wounded and should flee as soon as possible");
}
}
else {
if (e_player.disguise_potion) {
OutputText ("You are under the effect of the disguise potion.");
}
if (e_player.dress) {
OutputText ("You are dressed like a noblewoman.");
}
if (e_player.isWarrior) {
OutputText ("You have big biceps, perfect abs, a firm gluteus, and combat reflexes. What more do you need?");
OutputText ("You are perfectly healthy. Look at yourself during a fight to check your wounds.");
}
else if (e_player.isMage) {
OutputText ("You have shaggy hair, simple clothes, and should probably take more sun. Carrying a book is what sets you apart from the beggars. To will is your greatest strength, nothing more is required.");
}
else if (e_player.isThief) {
OutputText ("Despite your bad social position, you manages to look and behave like in the court all the time. You are thin and weak, but you are also very flexible, discreet, and always aware of what happens around you.");
}
else {
OutputText ("You better find some trainment! Right now you are lazy, weak, and uncultured. With this qualities you will never be a hero.");
}
} },
"_js_name": "e_player",
"_types": ["defaultplayer", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["player"] = e_player;
objectReferences.push(["e_player", "seekingthug", "e_player"]);
objectReferences.push(["e_player", "bak_room", "e_temple_phoenix"]);
objectReferences.push(["e_player", "last_room", "e_temple_phoenix"]);
allObjects.push(e_player);
objectsNameMap["player"] = e_player;
e_purse = {
"elementtype": "object",
"name": "purse",
"parent": e_player,
"type": "object",
"drop": false,
"dropmsg": "I like my purse",
"coins": 1,
"inventoryverbs": ["Look at"],
"look": function() { var plural = "s";
if (e_purse.coins==1) {
var plural = "";
}
OutputText ("You have "+e_purse.coins+" coin"+plural+"."); },
"_js_name": "e_purse",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"take": false,
"use": false,
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["purse"] = e_purse;
allObjects.push(e_purse);
objectsNameMap["purse"] = e_purse;
e_load = {
"elementtype": "object",
"name": "load",
"parent": e_start,
"type": "command",
"pattern": "^load$",
"script": function(parameters) { 
//JS
if (e_start.loading) {
		
	return;
}
if (e_game.web) {
loadGame();
}
else {
OutputText ("Use the File-Open menu in the client version (or CTRL+O).");
} },
"_js_name": "e_load",
"_types": ["defaultcommand"]
};
elementsNameMap["load"] = e_load;
allCommands.push(e_load);
objectsNameMap["load"] = e_load;
e_new_game = {
"elementtype": "object",
"name": "new_game",
"parent": e_start,
"type": "command",
"pattern": "^new$",
"script": function(parameters) { newGame(); },
"_js_name": "e_new_game",
"_types": ["defaultcommand"]
};
elementsNameMap["new_game"] = e_new_game;
allCommands.push(e_new_game);
objectsNameMap["new_game"] = e_new_game;
e_set_name = {
"elementtype": "object",
"name": "set_name",
"parent": e_start,
"type": "command",
"pattern": "^my name is (?<text>.*)$",
"script": function(parameters) { var text = parameters['text'];
set(e_player, "playername", text);
MoveObject (e_player, e_temple_phoenix); },
"_js_name": "e_set_name",
"_types": ["defaultcommand"]
};
elementsNameMap["set_name"] = e_set_name;
allCommands.push(e_set_name);
objectsNameMap["set_name"] = e_set_name;
e_void = {
"elementtype": "object",
"name": "void",
"type": "object",
"description": "TODO:<br/>- usar ditados populates nos puzzles (lavar o carro)<br/>- \u00f3leo para abrir algo tarnish<br/><br/>-atras da porta<br/>-pesos e contrapesos para abrir uma passagem (pedras?)<br/>- mapa de tras de algo que tem que fechar<br/><br/>---<br/>-apresentar problemas antes das solu\u00e7\u00f5es<br/>-mago usa levitate para descer no po\u00e7o. Aprende na lib?<br/>-checar se mago sabe o blind antes de entregar o orb<br/>-warrior usa a po\u00e7\u00e3o de transmuta\u00e7\u00e3o<br/><br/>-Dungeon quando \u00e9 derrotado (warrior)<br/>- espada m\u00e1gica (warrior)<br/>-Capela<br/>-Princesa adormecida acorda com beijo<br/><br/>",
"_js_name": "e_void",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["void"] = e_void;
allObjects.push(e_void);
objectsNameMap["void"] = e_void;
e_pot_helmet = {
"elementtype": "object",
"name": "pot_helmet",
"parent": e_void,
"type": "object",
"alias": "makeshift helmet",
"look": "Ok, it is a cooking pot. But fits perfectly well at your head.",
"loc": "head",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_pot_helmet",
"_types": ["Armour", "defaultobject"],
"armour": 1,
"visible": true,
"displayverbs": ["Look at", "Take"],
"take": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["pot_helmet"] = e_pot_helmet;
allObjects.push(e_pot_helmet);
objectsNameMap["pot_helmet"] = e_pot_helmet;
e_disguise_potion2 = {
"elementtype": "object",
"name": "disguise_potion2",
"parent": e_void,
"type": "object",
"alias": "disguise potion",
"potion": true,
"look": "It is a bottle filled with a purple potion. When you drink, you will take the form of the person that you are looking at.",
"take": true,
"inventoryverbs": ["Look at", "Drop", "Drink"],
"useCmds": ["pour", "fill"],
"feature_usegive": true,
"drink": function() { if (e_castle_guard.parent == e_player.parent) {
OutputText ("You drank the potion, and assumed the shape, including the cloths, of the guard. He doesn't seem very happy with this spell...");
set(e_player, "disguise_potion", true);
MoveObject (e_disguise_potion2, e_void);
set(e_castle_guard, "danger", "death");
set(e_castle_guard, "aggressive", true);
attack (e_player.parent, e_castle_guard);
UnlockExit (e_gate_lock);
UnlockExit (e_lobby_exit);
UnlockExit (e_exit_to_forge);
}
else {
OutputText ("You should first find an enemy with compatible height and weight.");
} },
"_js_name": "e_disguise_potion2",
"_types": ["UseAltType", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["disguise_potion2"] = e_disguise_potion2;
allObjects.push(e_disguise_potion2);
objectsNameMap["disguise_potion2"] = e_disguise_potion2;
e_combat = {
"elementtype": "object",
"name": "combat",
"type": "object",
"pushed": false,
"_js_name": "e_combat",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["combat"] = e_combat;
allObjects.push(e_combat);
objectsNameMap["combat"] = e_combat;
e_combat_room = {
"elementtype": "object",
"name": "combat_room",
"type": "object",
"descprefix": "",
"objectslistprefix": "You are fighting",
"alias": "FIGHT",
"usedefaultprefix": false,
"description": function() { printCombatRoom(); },
"_js_name": "e_combat_room",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["combat_room"] = e_combat_room;
allObjects.push(e_combat_room);
objectsNameMap["combat_room"] = e_combat_room;
e_flee = {
"elementtype": "object",
"name": "flee",
"parent": e_combat_room,
"type": "command",
"pattern": "^flee$",
"script": function(parameters) { if (e_player.parent==e_combat_room) {
var enemy = GetObject(e_combat_room.enemy);
var action = "Flee.";
fightMenu (enemy, action);
}
else {
OutputText ("You are not in a fight");
} },
"_js_name": "e_flee",
"_types": ["defaultcommand"]
};
elementsNameMap["flee"] = e_flee;
allCommands.push(e_flee);
objectsNameMap["flee"] = e_flee;
e_combat_cmd = {
"elementtype": "object",
"name": "combat_cmd",
"parent": e_combat_room,
"type": "command",
"pattern": "^combat (?<text>.*)$",
"script": function(parameters) { var text = parameters['text'];
set(e_player, "parent", e_combat_room);
if (e_player.parent==e_combat_room) {
var enemy = GetObject(e_combat_room.enemy);
if (text=="normal") {
var action = "Attack and defend.";
fightMenu (enemy, action);
}
else if (text=="full") {
var action = "Full attack.";
fightMenu (enemy, action);
}
else if (text=="defensive") {
var action = "Full defense.";
fightMenu (enemy, action);
}
else {
OutputText ("In the normal combat, you have normal chances to hit and avoid a blow; in the full combat, you have increased chances to hit, and no defense; In the defensive combat, you will only try to defend for a while.");
}
}
else {
OutputText ("You are not in a fight");
} },
"_js_name": "e_combat_cmd",
"_types": ["defaultcommand"]
};
elementsNameMap["combat_cmd"] = e_combat_cmd;
allCommands.push(e_combat_cmd);
objectsNameMap["combat_cmd"] = e_combat_cmd;
e_drop_on_combat = {
"elementtype": "object",
"name": "drop_on_combat",
"parent": e_combat_room,
"type": "command",
"pattern": "^drop (?<object_drop>.*)$",
"script": function(parameters) { var object_drop = parameters['object_drop'];
OutputText ("you cannot drop nothing now"); },
"_js_name": "e_drop_on_combat",
"_types": ["defaultcommand"]
};
elementsNameMap["drop_on_combat"] = e_drop_on_combat;
allCommands.push(e_drop_on_combat);
objectsNameMap["drop_on_combat"] = e_drop_on_combat;
e_fight_on_combat = {
"elementtype": "object",
"name": "fight_on_combat",
"parent": e_combat_room,
"type": "command",
"pattern": "^fight (?<object_en>.*)$",
"script": function(parameters) { var object_en = parameters['object_en'];
OutputText ("You are already fighting"); },
"_js_name": "e_fight_on_combat",
"_types": ["defaultcommand"]
};
elementsNameMap["fight_on_combat"] = e_fight_on_combat;
allCommands.push(e_fight_on_combat);
objectsNameMap["fight_on_combat"] = e_fight_on_combat;
e_stance_cmd = {
"elementtype": "object",
"name": "stance_cmd",
"parent": e_combat_room,
"type": "command",
"pattern": "^stance (?<text1>.*)$",
"script": function(parameters) { var text1 = parameters['text1'];
changeStance (text1); },
"_js_name": "e_stance_cmd",
"_types": ["defaultcommand"]
};
elementsNameMap["stance_cmd"] = e_stance_cmd;
allCommands.push(e_stance_cmd);
objectsNameMap["stance_cmd"] = e_stance_cmd;
e_stance_cmd2 = {
"elementtype": "object",
"name": "stance_cmd2",
"parent": e_combat_room,
"type": "command",
"pattern": "^stance$",
"script": function(parameters) { changeStance (""); },
"_js_name": "e_stance_cmd2",
"_types": ["defaultcommand"]
};
elementsNameMap["stance_cmd2"] = e_stance_cmd2;
allCommands.push(e_stance_cmd2);
objectsNameMap["stance_cmd2"] = e_stance_cmd2;
e_stance = {
"elementtype": "object",
"name": "stance",
"parent": e_combat_room,
"type": "object",
"alias": "none",
"scenery": true,
"usedefaultprefix": false,
"_js_name": "e_stance",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["stance"] = e_stance;
allObjects.push(e_stance);
objectsNameMap["stance"] = e_stance;
e_The_hidden_city = {
"elementtype": "object",
"name": "The hidden city",
"type": "object",
"_js_name": "e_The_hidden_city",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["The hidden city"] = e_The_hidden_city;
allObjects.push(e_The_hidden_city);
objectsNameMap["The hidden city"] = e_The_hidden_city;
e_temple_phoenix = {
"elementtype": "object",
"name": "temple_phoenix",
"parent": e_The_hidden_city,
"type": "object",
"alias": "Temple of Phoenix",
"description": "You are standing in the most important temple of the hidden city of Chuma Huppic. This is the place where people seek peace and comfort in these dark days of exile. The high ceiling is made of glass, and within it the figure of a wild phoenix is depicted.",
"usedefaultprefix": false,
"prefix": "the",
"public_greeting": "An unknown believer silently waves to you.",
"beforeenter": function() { if (e_game.startmsg) {
gameStart();
set(e_game, "startmsg", false);
} },
"_js_name": "e_temple_phoenix",
"_types": ["PublicRoom", "defaultobject"],
"public_level": 3,
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["temple_phoenix"] = e_temple_phoenix;
allObjects.push(e_temple_phoenix);
objectsNameMap["temple_phoenix"] = e_temple_phoenix;
e_sage = {
"elementtype": "object",
"name": "sage",
"parent": e_temple_phoenix,
"type": "object",
"alias": "Coriander",
"look": "He is the Sage of Phoenix. The wise and elderly man that raised you among many other orphans. ",
"usedefaultprefix": false,
"prefix": "",
"suffix": "the sage",
"alt": ["sage"],
"speak": function() { if (e_player.class == "none") {
psay ("My child you have reached the age and is now a young man. You should now seek one of the {ask:coriander:guild:guild masters} and ask him to train you. Choose well because you cannot change your mind later. You can choose the Guild of Warriors, if you prefer to solve problems by force; or you can choose the Guild of Mages, if you prefer to solve problems with magic; or you can choose the Guild of Thieves, if you prefer to solve problems with cunning and trickery..");
}
else if (e_player.level<3) {
OutputText ("<i>Now you have to gain the respect of the guild master by performing tasks for him. I will pray to the gods to protect and rescue you in case of peril.</i>");
}
else {
OutputText ("<i>You now should venture abroad, and learn a way to defeat Vourtram and rescue the princess. I will pray to the gods to protect and rescue you in case or peril.</i>");
}
if (e_purse.coins<1) {
psay ("Here, take this coin, I don't want you to be without any money");
set(e_purse, "coins", 1);
} },
"ask": {"guild master guildmaster guildmasters": function() { OutputText ("<i>There are three guilds in the hidden city. The guild of the warriors is northeast of the main square; the guild of the wizards is northwest of the main square; and the guild of the thieves is located in the dark alley, to the west and south of the main square.</i>"); }, "king": function() { OutputText ("<i>The King's court is located to the north of the courtyard. You must be invited or be an important person to enters the throne room.</i>"); }, "court courtyard": function() { OutputText ("<i>The courtyard is located just in front of the temple, in the main square.</i>"); } },
"_js_name": "e_sage",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sage"] = e_sage;
allObjects.push(e_sage);
objectsNameMap["sage"] = e_sage;
e_k3 = {
"elementtype": "object",
"name": "k3",
"parent": e_temple_phoenix,
"type": "exit",
"alias": "north",
"_js_name": "e_k3",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k3"] = e_k3;
objectReferences.push(["e_k3", "to", "e_main_square"]);
allExits.push(e_k3);
objectsNameMap["k3"] = e_k3;
e_ceiling1 = {
"elementtype": "object",
"name": "ceiling1",
"parent": e_temple_phoenix,
"type": "object",
"alias": "ceiling",
"look": "It has the figure of the mythical Phoenix, an immortal bird that can be reborn from its own ashes. This is probably the only unbroken window in the whole kingdom.",
"alt": ["roof", "phoenix"],
"scenery": true,
"_js_name": "e_ceiling1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ceiling1"] = e_ceiling1;
allObjects.push(e_ceiling1);
objectsNameMap["ceiling1"] = e_ceiling1;
e_believer = {
"elementtype": "object",
"name": "believer",
"parent": e_temple_phoenix,
"type": "object",
"scenery": true,
"alias": "believer",
"look": "You can find many believers in the temple. Many of them are sick or disabled.",
"speak": "The best way you can help them now is by defeating Vourtram.",
"_js_name": "e_believer",
"_types": ["namedmale", "defaultobject"],
"usedefaultprefix": false,
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["believer"] = e_believer;
allObjects.push(e_believer);
objectsNameMap["believer"] = e_believer;
e_main_square = {
"elementtype": "object",
"name": "main_square",
"parent": e_The_hidden_city,
"type": "object",
"alias": "main square",
"description": "You stand in the middle of a crowded square. To the north are the {if courtdoor.locked:closed}{if not courtdoor.locked:open} gates to the courtyard, to the south you see the great Temple of Phoenix. The Guild of Warriors is in the northeast and the Guild of Wizards to the northwest. To the east you see the main street and to the west you see an unpaved street.",
"usedefaultprefix": false,
"prefix": "the",
"suffix": "of Chuma Huppic",
"enter": function() { if (Contains (this,e_outlaw_thug)) {
OutputText ("<b>The thug runs west!</b>");
MoveObject (e_outlaw_thug, e_street_peasants);
}
if (e_player.class!="none") {
UnlockExit (e_courtdoor);
}
if (e_pot.parent == e_player) {
OutputText ("The dog circles you wagging his tail...");
} },
"_js_name": "e_main_square",
"_types": ["PublicRoom", "defaultobject"],
"public_level": 3,
"public_greeting": "An unknown passerby says <i>Hi {player.playername}! Good luck with your quest!</i>",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["main_square"] = e_main_square;
allObjects.push(e_main_square);
objectsNameMap["main_square"] = e_main_square;
e_k4 = {
"elementtype": "object",
"name": "k4",
"parent": e_main_square,
"type": "exit",
"alias": "south",
"look": "It is a marvelous marble temple",
"to": e_temple_phoenix,
"_js_name": "e_k4",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k4"] = e_k4;
allExits.push(e_k4);
objectsNameMap["k4"] = e_k4;
e_k5 = {
"elementtype": "object",
"name": "k5",
"parent": e_main_square,
"type": "exit",
"alias": "northeast",
"_js_name": "e_k5",
"_types": ["northeastdirection", "defaultexit"],
"alt": ["ne"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k5"] = e_k5;
objectReferences.push(["e_k5", "to", "e_guild_warriors"]);
allExits.push(e_k5);
objectsNameMap["k5"] = e_k5;
e_k6 = {
"elementtype": "object",
"name": "k6",
"parent": e_main_square,
"type": "exit",
"alias": "northwest",
"_js_name": "e_k6",
"_types": ["northwestdirection", "defaultexit"],
"alt": ["nw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k6"] = e_k6;
objectReferences.push(["e_k6", "to", "e_guild_mages"]);
allExits.push(e_k6);
objectsNameMap["k6"] = e_k6;
e_k7 = {
"elementtype": "object",
"name": "k7",
"parent": e_main_square,
"type": "exit",
"alias": "west",
"_js_name": "e_k7",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k7"] = e_k7;
objectReferences.push(["e_k7", "to", "e_street_peasants"]);
allExits.push(e_k7);
objectsNameMap["k7"] = e_k7;
e_k8 = {
"elementtype": "object",
"name": "k8",
"parent": e_main_square,
"type": "exit",
"alias": "east",
"_js_name": "e_k8",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k8"] = e_k8;
objectReferences.push(["e_k8", "to", "e_main_street"]);
allExits.push(e_k8);
objectsNameMap["k8"] = e_k8;
e_courtdoor = {
"elementtype": "object",
"name": "courtdoor",
"parent": e_main_square,
"type": "exit",
"alias": "north",
"locked": true,
"_js_name": "e_courtdoor",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["courtdoor"] = e_courtdoor;
objectReferences.push(["e_courtdoor", "to", "e_courtyard1"]);
allExits.push(e_courtdoor);
objectsNameMap["courtdoor"] = e_courtdoor;
e_fido = {
"elementtype": "object",
"name": "fido",
"parent": e_main_square,
"type": "object",
"alias": "beastly fido",
"usedefaultprefix": false,
"prefix": "a",
"suffix": "mucking through the garbage looking for food here",
"look": "The fido is a small dog that has a foul smell and pieces of rotted meat hanging around his teeth.",
"displayverbs": ["Look at"],
"friend": false,
"alt": ["dog"],
"speak": "<i>GRRRR...</i>",
"give": {"pot": function() { OutputText ("The Fido eats the stew and looks friendly towards you.");
RemoveObject (e_pot);
if (e_guard_helmet.parent==e_castle_guard) {
OutputText ("The pot is cleaner than before, and you realize that it fits perfectly in your head as a <b>makeshift helmet</b>.");
AddToInventory (e_pot_helmet);
} } },
"_js_name": "e_fido",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["fido"] = e_fido;
allObjects.push(e_fido);
objectsNameMap["fido"] = e_fido;
e_garbage1 = {
"elementtype": "object",
"name": "garbage1",
"parent": e_main_square,
"type": "object",
"alias": "garbage",
"visible": true,
"scenery": true,
"look": "You dirty your hands and is just rubbish.",
"_js_name": "e_garbage1",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["garbage1"] = e_garbage1;
allObjects.push(e_garbage1);
objectsNameMap["garbage1"] = e_garbage1;
e_guild = {
"elementtype": "object",
"name": "guild",
"parent": e_main_square,
"type": "object",
"alt": ["temple", "guild of warriors", "guild of wizards", "temple of phoenix"],
"scenery": true,
"look": "An imposing building.",
"_js_name": "e_guild",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guild"] = e_guild;
allObjects.push(e_guild);
objectsNameMap["guild"] = e_guild;
e_guild_warriors = {
"elementtype": "object",
"name": "guild_warriors",
"parent": e_The_hidden_city,
"type": "object",
"alias": "the main hall of the Guild of the Warriors",
"usedefaultprefix": false,
"description": "You are standing in a large room full of warriors training with all kinds of weapons. The room has few windows and a poor ventilation; the air is heavy and filled with the stink of male sweat and the noise of clashing swords. There is a small door leading northeast.",
"public_level": 2,
"public_greeting": "An apprentice greets you: <i>Hi {player.playername}! Good luck with your quest!</i>",
"enter": function() { if (e_player.class=="thief" && e_player.level>=2) {
UnlockExit (e_lock_wroom);
} },
"_js_name": "e_guild_warriors",
"_types": ["PublicRoom", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guild_warriors"] = e_guild_warriors;
allObjects.push(e_guild_warriors);
objectsNameMap["guild_warriors"] = e_guild_warriors;
e_k9 = {
"elementtype": "object",
"name": "k9",
"parent": e_guild_warriors,
"type": "exit",
"alias": "southwest",
"to": e_main_square,
"_js_name": "e_k9",
"_types": ["southwestdirection", "defaultexit"],
"alt": ["sw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k9"] = e_k9;
allExits.push(e_k9);
objectsNameMap["k9"] = e_k9;
e_derrick = {
"elementtype": "object",
"name": "derrick",
"parent": e_guild_warriors,
"type": "object",
"usedefaultprefix": false,
"alias": "Derrick",
"alt": ["Derrick", "master"],
"talk_level": 0,
"look": "He is a tall and muscled bald man with a thick grizzled mustache. He has a wooden pegleg in place of his right leg.",
"suffix": ", the weapons' master",
"speak": function() { psay ("{once:I'm Derrick the weapons' master, and this is {command:ask Derrick about Rodney:Rodney}.}{notfirst:Greetings again {player.playername}.}");
if (e_player.class == "none") {
Ask ("<i>Are you sure you want to become a Warrior?</i>", function (result) { if (result) {
set(e_player, "class", "warrior");
set(e_player, "isWarrior", true);
OutputText ("After a long time of intense training, you became an apprentice of warrior. "+Template("HelpWarrior"));
AddToInventory (e_wooden_spear);
UnlockExit (e_hide_hall_exit);
MoveObject (e_brigand1, e_forest_current2);
set(e_sparring, "displayverbs", Split("Look at;Speak to;Fight", ";"));
}
else {
OutputText ("<i>Come back if you change your mind...</i>");
} });
}
else if (e_player.class == "warrior") {
if (e_player.level>=3 && e_jacket.parent==e_derrick) {
AddToInventory (e_jacket);
OutputText ("<i>Here, your werewolf armor is ready! It is light, flexible, and as resistent as steel.</i>");
}
else {
OutputText ("<i>You can ask me about {command:ask Derrick about fighting:fighting}. You can also ask about {command:ask Derrick about training:training} if you need it.</i>");
}
} },
"ask": {"train training": function() { if (e_player.class == "warrior") {
if (e_player.level == 0) {
if (e_derrick.talk_level<=0) {
OutputText ("Derrick teaches you about the art of throwing spears");
set(e_derrick, "talk_level", 1);
}
OutputText ("<i>There is a thug robbing and causing all kinds of troubles in the city. If you can find and capture him, I will train you.</i>");
set(e_player, "seekingthug", e_bakery);
}
else if (e_player.level==1) {
if (e_derrick.talk_level<=1) {
OutputText ("Derrick teaches you about the basic fighting movements.");
set(e_derrick, "talk_level", 2);
}
psay ("Prove you are worthy by hunting the evil {ask:Derrick:wolf} that wanders in the hills. Bring me its corpse. Take this sword to help you in your hunt.");
AddToInventory (e_smallsword);
}
else if (e_player.level==2) {
if (e_derrick.talk_level<=2) {
OutputText ("Derrick teaches you some tricks in order better attack and defend yourself.");
set(e_derrick, "talk_level", 3);
}
OutputText ("<i>Train hard with Rodney and then win the spring contest!</i>");
}
else {
if (e_derrick.talk_level<=3) {
OutputText ("Derrick tells you about fighting stances, but you have a hard time understanding. <i>You need more practical experience on fighting before learning the adanced stances.</i>.");
set(e_derrick, "talk_level", 4);
}
OutputText ("<i>The training is over. Ask me about {command:ask Derrick about stances:stances} if you want to know about then.</i>");
}
}
else {
OutputText ("<i>Sorry, I cannot help you with that.</i>");
} }, "fight fighting": function() { OutputText ("<i>I was the captain of the guard once, but I was betrayed by my lieutenant. After that, I become just an instructor.</i>");
if (e_player.class == "warrior") {
OutputText ("<i>The core of fighting is mastering the basic three {command:ask Derrick about manuevers:manuevers}: normal attack, full defense, and full attack.</i>");
if (e_player.level>2) {
OutputText ("<i>After a long training, the manuevers can be replaced by fighting {command:ask Derrick about stances:stances}.</i>");
}
} }, "manuevers manuever": function() { OutputText ("<i>The normal attack tries to balance between risk and defense. The full attack focuses in a fast and strong blow, but leaving the guard open for a counter-attack. The full defense focus only on preventing the enemy to hit you, in order to recover from dizziness for instance.</i>"); }, "stances stance": function() { OutputText ("<i>There are five possible stances:</i>");
OutputText ("<i>The <b>Eisenport</b> stance is used with a normal attack manuever. It is very effective against any of the other manuevers.</i>");
OutputText ("<i>The <b>Nebenhut</b> stance is used with normal attack manuever with a feint. It is a powerful counter attack.</i>");
OutputText ("<i>The <b>Right vom tag</b> stance is used with a full attack manuever, but allows the attacker to defend itself.</i>");
OutputText ("<i>The <b>Bocca di falcone</b> stance is used with an aggressive full attack manuever, and produces maximum effect against defensive positions.</i>");
OutputText ("<i>The <b>Fool's guard</b> stance is used with a full defense manuever, but is a feint. The harder the attack, the best is the counter-attack.</i>"); }, "wolf werewolf": function() { psay ("Some people think that this wolf in the hills is a werewolf. If this is true, the only weakness of a werewolf are silver and the innocence."); }, "Rodney": function() { psay ("Rodney is here to help the warriors in their training."); } },
"give": {"werewolf corpse": function() { OutputText ("Great Job! I will make a werewolf jacket for you. Meanwhile, your next task will be to participate in the spring festival's warrior contest. If you win the prize, your training will be completed.");
set(e_player, "level", 2);
MoveObject (e_werewolf_corpse, e_void); } },
"_js_name": "e_derrick",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["derrick"] = e_derrick;
allObjects.push(e_derrick);
objectsNameMap["derrick"] = e_derrick;
e_jacket = {
"elementtype": "object",
"name": "jacket",
"parent": e_derrick,
"type": "object",
"alias": "wereworlf-leather jacket",
"take": true,
"look": "It is light, flexible, but super strong jacket made from wereworlf leather.",
"armour": 4,
"_js_name": "e_jacket",
"_types": ["Armour", "defaultobject"],
"loc": "body",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["jacket"] = e_jacket;
allObjects.push(e_jacket);
objectsNameMap["jacket"] = e_jacket;
e_sparring = {
"elementtype": "object",
"name": "sparring",
"parent": e_guild_warriors,
"type": "object",
"alias": "Rodney",
"look": "He is not a formidable warrior, but may teach you one or two tricks.",
"ht": 8,
"danger": "friend",
"coins": 1,
"usedefaultprefix": false,
"suffix": " the sparring partner.",
"alt": ["sparring"],
"speak": "<i>You can fight with me to improve your fighting skills.</i>",
"_js_name": "e_sparring",
"_types": ["male", "Enemy", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"enemy": "yes",
"exp": 1,
"armour": 0,
"aggressive": false,
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sparring"] = e_sparring;
allObjects.push(e_sparring);
objectsNameMap["sparring"] = e_sparring;
e_lock_wroom = {
"elementtype": "object",
"name": "lock_wroom",
"parent": e_guild_warriors,
"type": "exit",
"alias": "northeast",
"locked": true,
"lockmessage": "Derrick blocks your way. It is private.",
"_js_name": "e_lock_wroom",
"_types": ["northeastdirection", "defaultexit"],
"alt": ["ne"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["lock_wroom"] = e_lock_wroom;
objectReferences.push(["e_lock_wroom", "to", "e_warrior_room"]);
allExits.push(e_lock_wroom);
objectsNameMap["lock_wroom"] = e_lock_wroom;
e_apprentices2 = {
"elementtype": "object",
"name": "apprentices2",
"parent": e_guild_warriors,
"type": "object",
"scenery": true,
"alias": "apprentices",
"look": "The apprentices are training their skills.",
"speak": "The apprentices are too busy to chat now.",
"alt": ["warrior", "warriors"],
"_js_name": "e_apprentices2",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["apprentices2"] = e_apprentices2;
allObjects.push(e_apprentices2);
objectsNameMap["apprentices2"] = e_apprentices2;
e_guild_mages = {
"elementtype": "object",
"name": "guild_mages",
"parent": e_The_hidden_city,
"type": "object",
"alias": "the main hall of the Guild of Mages",
"usedefaultprefix": false,
"description": "It is a large room filled with the smell of incense and mystery. On the walls you can see several magical drawings, and the Dashiel's monogram.",
"public_level": 2,
"public_greeting": "An apprentice greets you: <i>Hi {player.playername}! Good luck with your quest!</i>",
"_js_name": "e_guild_mages",
"_types": ["PublicRoom", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guild_mages"] = e_guild_mages;
allObjects.push(e_guild_mages);
objectsNameMap["guild_mages"] = e_guild_mages;
e_k10 = {
"elementtype": "object",
"name": "k10",
"parent": e_guild_mages,
"type": "exit",
"alias": "southeast",
"to": e_main_square,
"_js_name": "e_k10",
"_types": ["southeastdirection", "defaultexit"],
"alt": ["se"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k10"] = e_k10;
allExits.push(e_k10);
objectsNameMap["k10"] = e_k10;
e_archmage = {
"elementtype": "object",
"name": "archmage",
"parent": e_guild_mages,
"type": "object",
"usedefaultprefix": false,
"alt": ["master", "mage", "Dashiel", "archmage"],
"alias": "Dashiel",
"look": "Dashiel is a white-headed wizard wearing a blue robe with embroidered stars and a blue pointed hat.",
"suffix": ", the archmage of the kingdom",
"speak": function() { psay ("{once:I'm Dashiel the wizard and {command:ask Dashiel about Erasmus:Erasmus} is my cat.}{notfirst:Greetings again {player.playername}.}");
if (e_player.class == "none") {
Ask ("<i>Are you sure you want to become a Wizard?</i>", function (result) { if (result) {
set(e_player, "class", "mage");
set(e_player, "isMage", true);
OutputText ("After a long time of intense study and training, you became an apprentice of magery. "+Template("HelpMage"));
AddToInventory (e_spell_book);
} });
}
else if (e_player.class == "mage") {
OutputText ("<i>Ask me about {command:ask Dashiel about training:training} if you need to improve your status.</i>");
if (e_erasmus_cat.parent==e_guild_mages) {
psay ("{ask:Dashiel:Erasmus} seems interested in you.");
}
} },
"ask": {"train training": function() { if (e_player.class == "mage") {
if (e_player.level == 0) {
OutputText ("<i>Here is your first assignment: In the hill forest you will find an evil werewolf. Bring me some of his fur, so that I can make a dispel potion. </i>");
if (!(Contains (e_spell_book,e_calm_spell))) {
MoveObject (e_calm_spell, e_spell_book);
OutputText ("<i>Take this scroll with the <b>calm spell</b>, I think it may help you deal with his aggressiveness.</i>");
}
}
else if (e_player.level==1) {
OutputText ("<i>Here is your second assignment: There is a thug robbing and causing all kinds of troubles in the city. Can you find and capture him for me?</i>");
}
else if (e_player.level==2) {
OutputText ("<i>This is your last task: There is a spy of Vourtram in the town. The only clue we have is his secret name: White Wolf. Find him, and I will send a guard to capture him.</i>");
}
else {
OutputText ("<i>Training is over. Ask me about {command:ask Dashiel about spells:spells} after you be declared a hero by the king.</i>");
}
}
else {
psay ("Sorry, I cannot help you with that.");
} }, "erasmus": function() { OutputText ("Dashiel says: <i>Erasmus was a great wizard, but a few years ago he tried to create an immortality potion. Unluckily, he picked an untrusted ingredient supplier and the potion had odd results</i>.<br/>Erasmus says: <i>In fact, the {command:ask erasmus about potion:potion} worked... partially. Now I have seven lives to spent.</i><br/>Dashiel comments: <i>Always buy from syndicated suppliers.</i>"); }, "spells spell": function() { if (e_player.class=="mage") {
if (e_player.level<4) {
OutputText ("<i>You must learn by your own... it is the only way to become a powerful mage.</i>");
OutputText ("<i>Well, when you become a hero, come back here and I will teach you a spell.</i>");
}
else {
if (e_teleport_spell.parent==e_game) {
OutputText ("<i>I have a gift for you. This is the teleportation spell and the orb. When you cast the spell, you will come back to the place where the orb is.</i>");
MoveObject (e_teleport_spell, e_spell_book);
AddToInventory (e_teleport_orb);
}
else {
OutputText ("<i>Go into adventure and learn!</i>");
}
}
}
else {
OutputText ("<i>I could not teach you.</i>");
} } },
"give": {"wolf_fur": function() { OutputText ("The archmage takes the fur, tells you to wait a few minutes, and disappears in a puff of smoke. After half an hour, he reappears in a bang and says:<br/><i>Take this dispel magic potion and use it on the werewolf. I hope it will break the enchantment.</i>");
AddToInventory (e_dispel_potion);
set(e_wolf_fur, "parent", e_void); }, "letter": function() { OutputText ("<i>Yes, that's a letter from the spy. Now I can identify him using my seek spell</i><br/>Dashiel leaves with some guards, and they capture the spy. You just completed your last guild quest.");
RemoveObject (e_letter);
set(e_player, "level", 3);
OutputText ("<i>So, are you interested in learning new spells? Do me a favor and deliver this book to Flamel, the Alchemist. He lives in the dark forest near the road, in a small tower. There is a spell in this book that he can decipher for us.</i>");
AddToInventory (e_book_plants); } },
"_js_name": "e_archmage",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["archmage"] = e_archmage;
allObjects.push(e_archmage);
objectsNameMap["archmage"] = e_archmage;
e_erasmus_cat = {
"elementtype": "object",
"name": "erasmus_cat",
"parent": e_guild_mages,
"type": "object",
"alias": "Erasmus",
"look": "It looks like an ordinary black cat with a blue pointed hat attached to its head. You wonder if this cat was some kind of enemy of the archmage in the past... before being the archmage's pet.",
"meows": 0,
"usedefaultprefix": false,
"suffix": ", Dashiel's pet",
"alt": ["cat"],
"feature_usegive": true,
"speak": function() { if (e_erasmus_cat.meows == 2) {
OutputText ("<i>Meow... aren't you too busy to be talking to a cat like me?</i>");
}
if (e_erasmus_cat.meows == 1) {
OutputText ("<i>Meow...Meow...</i>");
set(e_erasmus_cat, "meows", e_erasmus_cat.meows+1);
}
if (e_erasmus_cat.meows == 0) {
OutputText ("<i>Meow...</i>");
set(e_erasmus_cat, "meows", e_erasmus_cat.meows+1);
} },
"ask": {"potion": function() { psay ("The magic immortality potion gave me seven lives... I guess I could {ask:Erasmus:cure} myself, but I am too busy with the {ask:Erasmus:rats} right now."); }, "mouse rat rats": function() { psay ("Yummy!"); }, "cure": function() { psay ("To undo this spell I will need ashes of an oak burned by a blind dragon. I could easily find this ingredient in the old days... but as a cat, I'm too distracted by those little tasty pests."); } },
"give": {"revert_potion": function() { OutputText ("You give the potion to the cat");
psay ("Refreshing beverage... I kind of miss some spider webs...ARRRGH");
OutputText ("After a few seconds he chokes and transforms back into an old man");
MoveObject (e_erasmus_cat, e_void);
MoveObject (e_revert_potion, e_void);
MakeObjectVisible (e_erasmus);
OutputText ("<i>Thank you my boy! In exchange for this favor, please accept this spell as a gift. The banish spell sends any demon back to his realm</i>");
MoveObject (e_banish_spell, e_spell_book); } },
"_js_name": "e_erasmus_cat",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["erasmus_cat"] = e_erasmus_cat;
allObjects.push(e_erasmus_cat);
objectsNameMap["erasmus_cat"] = e_erasmus_cat;
e_fake_diamond = {
"elementtype": "object",
"name": "fake_diamond",
"parent": e_guild_mages,
"type": "object",
"alias": "fake diamond",
"look": "It is a magical fake... ",
"take": true,
"visible": false,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_fake_diamond",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["fake_diamond"] = e_fake_diamond;
allObjects.push(e_fake_diamond);
objectsNameMap["fake_diamond"] = e_fake_diamond;
e_erasmus = {
"elementtype": "object",
"name": "erasmus",
"parent": e_guild_mages,
"type": "object",
"visible": false,
"alias": "Erasmus",
"suffix": "the wizard",
"look": "An old bearded wizard with a cerulean blue robe and a pointed blue hat. He has a wand with a star in the tip. So stereotypical...",
"speak": "He is too busy reading his spell book. Better leave him alone.",
"askdefault": function() { OutputText ("He is too busy reading his spell book."); },
"_js_name": "e_erasmus",
"_types": ["namedmale", "defaultobject"],
"usedefaultprefix": false,
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["erasmus"] = e_erasmus;
allObjects.push(e_erasmus);
objectsNameMap["erasmus"] = e_erasmus;
e_apprentices3 = {
"elementtype": "object",
"name": "apprentices3",
"parent": e_guild_mages,
"type": "object",
"scenery": true,
"alias": "apprentices",
"look": "The apprentices are training their skills.",
"speak": "The apprentices are too busy to chat now.",
"_js_name": "e_apprentices3",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["apprentices3"] = e_apprentices3;
allObjects.push(e_apprentices3);
objectsNameMap["apprentices3"] = e_apprentices3;
e_monogram = {
"elementtype": "object",
"name": "monogram",
"parent": e_guild_mages,
"type": "object",
"alias": "monogram",
"scenery": true,
"look": "{if player.isMage:It is a stylised letter D.}{if not player.isMage:Some ancient rune, who knows?}",
"_js_name": "e_monogram",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["monogram"] = e_monogram;
allObjects.push(e_monogram);
objectsNameMap["monogram"] = e_monogram;
e_street_peasants = {
"elementtype": "object",
"name": "street_peasants",
"parent": e_The_hidden_city,
"type": "object",
"alias": "the commoner's street",
"usedefaultprefix": false,
"description": "You are standing in an unpaved street that leads to the houses of simple peasants and lower class workers. This part of the town is also the place for thieves, beggars, and other dangerous types of citizens. To the north you see the Gray Tavern, and to the south a dark alley.",
"enter": function() { if (Contains (this,e_outlaw_thug)) {
OutputText ("<b>The thug runs south!</b>");
MoveObject (e_outlaw_thug, e_dark_alley);
} },
"_js_name": "e_street_peasants",
"_types": ["PublicRoom", "defaultobject"],
"public_level": 3,
"public_greeting": "An unknown passerby says <i>Hi {player.playername}! Good luck with your quest!</i>",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["street_peasants"] = e_street_peasants;
allObjects.push(e_street_peasants);
objectsNameMap["street_peasants"] = e_street_peasants;
e_k11 = {
"elementtype": "object",
"name": "k11",
"parent": e_street_peasants,
"type": "exit",
"alias": "east",
"to": e_main_square,
"_js_name": "e_k11",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k11"] = e_k11;
allExits.push(e_k11);
objectsNameMap["k11"] = e_k11;
e_k12 = {
"elementtype": "object",
"name": "k12",
"parent": e_street_peasants,
"type": "exit",
"alias": "south",
"_js_name": "e_k12",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k12"] = e_k12;
objectReferences.push(["e_k12", "to", "e_dark_alley"]);
allExits.push(e_k12);
objectsNameMap["k12"] = e_k12;
e_k13 = {
"elementtype": "object",
"name": "k13",
"parent": e_street_peasants,
"type": "exit",
"alias": "north",
"_js_name": "e_k13",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k13"] = e_k13;
objectReferences.push(["e_k13", "to", "e_gray_tavern"]);
allExits.push(e_k13);
objectsNameMap["k13"] = e_k13;
e_houses2 = {
"elementtype": "object",
"name": "houses2",
"parent": e_street_peasants,
"type": "object",
"alias": "houses",
"scenery": true,
"look": "The houses in this area are mostly shacks and ruins.",
"alt": ["house"],
"displayverbs": ["Look at"],
"_js_name": "e_houses2",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["houses2"] = e_houses2;
allObjects.push(e_houses2);
objectsNameMap["houses2"] = e_houses2;
e_dark_alley = {
"elementtype": "object",
"name": "dark_alley",
"parent": e_The_hidden_city,
"type": "object",
"description": "There is a door guarded by a big bouncer to the west. The door leads to stairs, and the stairs leads to darkness... ",
"alias": "dark alley",
"enter": function() { if (Contains (this,e_outlaw_thug)) {
OutputText ("The thug is cornered in this alley!");
} },
"onexit": function() { if (Contains (e_dark_alley,e_outlaw_thug)) {
set(e_outlaw_thug, "parent", e_main_square);
} },
"_js_name": "e_dark_alley",
"_types": ["PublicRoom", "defaultobject"],
"public_level": 3,
"public_greeting": "An unknown passerby says <i>Hi {player.playername}! Good luck with your quest!</i>",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dark_alley"] = e_dark_alley;
allObjects.push(e_dark_alley);
objectsNameMap["dark_alley"] = e_dark_alley;
e_k14 = {
"elementtype": "object",
"name": "k14",
"parent": e_dark_alley,
"type": "exit",
"alias": "north",
"to": e_street_peasants,
"_js_name": "e_k14",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k14"] = e_k14;
allExits.push(e_k14);
objectsNameMap["k14"] = e_k14;
e_k15 = {
"elementtype": "object",
"name": "k15",
"parent": e_dark_alley,
"type": "exit",
"alias": "west",
"suffix": "",
"_js_name": "e_k15",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k15"] = e_k15;
objectReferences.push(["e_k15", "to", "e_guild_thieves"]);
allExits.push(e_k15);
objectsNameMap["k15"] = e_k15;
e_YellowWoman = {
"elementtype": "object",
"name": "YellowWoman",
"parent": e_dark_alley,
"type": "object",
"alias": "yellow hooded woman",
"look": "What could I say... she is a kind of lower class courtesan. <br/>She has a recent black eye, and some bruises in the face.",
"visible": false,
"alt": ["woman"],
"speak": function() { if (Contains (e_dark_alley,e_YellowWoman)) {
OutputText ("She starts crying, trying to conceal her {command:ask woman about bruises:bruises}");
}
else {
OutputText ("<i>Hey baby... when you will have time to buy me drink ?</i>");
} },
"give": {"drunkring": function() { OutputText ("<i>- It is beautiful! Thank you very much ... don't you want to drink something in my home?<br/>- I would be delighted, but first I need to ask you a favor: go to the tavern and find your boyfriend, the thug. Then, distract him for me. Can I count on you?<br/>- Ok. I will help you.</i><br/>She left in the direction of the Grey Tavern");
MoveObject (e_YellowWoman, e_gray_tavern);
MoveObject (e_drunkring, e_YellowWoman); } },
"ask": {"bruises eye": function() { if (e_drunkguy.visible) {
OutputText ("<i>Give me something valuable and I will help you find that thug.</i>");
}
else {
OutputText ("<i>My boyfriend, that bastard thug! He has stolen all my money.</i>");
OutputText ("As she tells you about her boyfriend, you suspect that he is the man you are looking for.");
OutputText ("You ask her to help you, and she replies:");
OutputText ("<i>Give me something valuable and I will help you find that thug.</i>");
MakeObjectVisible (e_drunkguy);
} } },
"_js_name": "e_YellowWoman",
"_types": ["female", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["YellowWoman"] = e_YellowWoman;
allObjects.push(e_YellowWoman);
objectsNameMap["YellowWoman"] = e_YellowWoman;
e_bouncer = {
"elementtype": "object",
"name": "bouncer",
"parent": e_dark_alley,
"type": "object",
"scenery": true,
"look": "He is menacing. Better not stare too much at him.",
"speak": "He does not want to talk.",
"displayverbs": ["Look at"],
"_js_name": "e_bouncer",
"_types": ["male", "defaultobject"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bouncer"] = e_bouncer;
allObjects.push(e_bouncer);
objectsNameMap["bouncer"] = e_bouncer;
e_guild_thieves = {
"elementtype": "object",
"name": "guild_thieves",
"parent": e_The_hidden_city,
"type": "object",
"alias": "the Guild of the Thieves",
"usedefaultprefix": false,
"description": "You are standing in a dark hall, filled with shabby furniture and wicked looking people. ",
"public_level": 2,
"public_greeting": "An apprentice greets you: <i>Hi {player.playername}! Let's kick that evil wizard back to hell!</i>",
"onexit": function() { if (e_player.isMage || e_player.isWarrior) {
if (e_purse.coins>0) {
OutputText ("After you exit the room, you realize that your purse seems lighter.");
set(e_purse, "coins", e_purse.coins -1);
}
} },
"_js_name": "e_guild_thieves",
"_types": ["PublicRoom", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guild_thieves"] = e_guild_thieves;
allObjects.push(e_guild_thieves);
objectsNameMap["guild_thieves"] = e_guild_thieves;
e_k16 = {
"elementtype": "object",
"name": "k16",
"parent": e_guild_thieves,
"type": "exit",
"alias": "east",
"to": e_dark_alley,
"_js_name": "e_k16",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k16"] = e_k16;
allExits.push(e_k16);
objectsNameMap["k16"] = e_k16;
e_elder_thief = {
"elementtype": "object",
"name": "elder_thief",
"parent": e_guild_thieves,
"type": "object",
"usedefaultprefix": false,
"look": "He is an old man with a long beard, very few teeths, and an eye patch. He smiles at you, which only makes you feel more scared!",
"displayverbs": ["Look at", "Speak to"],
"alias": "Kadrak",
"suffix": "the elder thief",
"alt": ["thief", "elder thief"],
"feature_usegive": true,
"speak": function() { psay ("{once:I'm Kadrak the elder.}{notfirst:Greetings again {player.playername}.}");
if (e_player.class == "none") {
Ask ("<i>Are you sure you want to become a Thief?</i>", function (result) { if (result) {
set(e_player, "class", "thief");
set(e_player, "isThief", true);
set(e_demon_guard2, "parent", e_void);
UnlockExit (e_corridor2_to_antechamber);
OutputText ("After a long time of street training, robbing, and gambling you became a decent thief. "+Template("HelpThief"));
AddToInventory (e_picklock);
set(e_well_exit, "locked", false);
set(e_exit_to_forge, "locked", false);
set(e_dragon_sewer_exit, "locked", false);
} });
}
else if (e_player.class == "thief") {
OutputText ("<i>Ask me if you need something. Ask about {command:ask Kadrak about training:training} if you need it.</i>");
OutputText ("<i>I can also buy off the product of your work. Just give me your item and I can make an offer for it.</i>");
if (e_invis_potion.parent== e_elder_thief && e_player.level>2) {
OutputText ("<i>If you are interested in something for a big heist, I have an invisibility {command:ask kadrak about potion:potion} for sale for 500 coins.</i>");
}
}
else if (e_player.class == "mage" && e_kobold_ring.visible && e_kobold_ring.parent==e_elder_thief) {
OutputText ("<i>{command:ask Kadrak about ring:Ring}? ah... this ring. How did you know about it? </i>");
} },
"askdefault": function() { OutputText ("You can ask me about training if you are a thief. I can also buy stolen objects."); },
"giveanything": function() { 
var object = arguments[0].object; //JS
if (HasAttribute(object,"worth")) {
set(e_elder_thief, "deal_obj", object);
Ask ("<i>I can pay "+object.worth+" for this "+GetDisplayAlias(object)+". Are you interested?</i>", function (result) { if (result) {
var obj = e_elder_thief.deal_obj;
var val = GetInt(obj,"worth");
MoveObject (obj, e_void);
set(e_purse, "coins", e_purse.coins + val);
OutputText ("You place "+val+" coins at your purse.");
} });
}
else {
OutputText ("<i>I'm not interested on buying this "+GetDisplayAlias(object)+".</i>");
} },
"ask": {"train training": function() { if (e_player.isThief) {
switch (e_player.level) {
case 0:
psay ("Only if you can steal something for me: Let me see... steal a necklace from someone and bring it to me.");
break;
case 1:
psay ("Inside the gray tavern you will find a short thug with a scar in his face. He is operating at my city without paying the proper taxes. You know, for our guild. He is a convicted outlaw, but nobody cares about arresting and executing him. Please, make him ... uh ... disappear.");
break;
case 2:
psay ("This is the last task of your training. It will prove the supremacy of the guild of the thieves over all other guilds in this town. Steal a personal object from Dashiel and Derrick. Bring these items back to me");
break;

}
if (e_player.level>2) {
psay ("The training is over. But if you are interested in something for a big heist, I have an invisibility {command:ask kadrak about potion:potion} for sale.");
}
}
else {
psay ("Sorry, I cannot help you with that.");
} }, "ring": function() { if (e_kobold_ring.parent==e_elder_thief) {
if (e_kobold_ring.visible) {
psay ("It's a nice ring. I could sell it to you, but by the size of your purse, you will never have enough money.");
}
else {
psay ("What are you talking about?");
}
}
else {
psay ("I don't have it anymore...");
} }, "potion": function() { if (e_player.isThief) {
if (e_purse.coins<500) {
psay ("The price is 500 coins, and you do not have enough money.");
}
else {
Ask ("Do you want to pay 500 coins for an invisibilty potion?", function (result) { if (result) {
set(e_invis_potion, "parent", e_player);
set(e_purse, "coins", e_purse.coins-500);
OutputText ("Now, it is only one dose, and it will work just for a few minutes. Good luck!");
} });
}
}
else {
OutputText ("I known NOTHING about such things.");
} } },
"give": {"necklace": function() { psay ("Nice! Now I can give this necklace to another unhappy lady. Take this dagger. You can try to sneak an opponent and backstab him ... well, if he doesn't wear any armor. Ask me about {ask:kadrak:training} when you are ready to the next training task.");
set(e_player, "level", 1);
AddToInventory (e_dagger);
RemoveObject (e_necklace); }, "gold_dagger": function() { psay ("Perfect! This should teach that weapon's master what guild rules the town! Here, take this dagger as a replacement for your previous one.");
AddToInventory (e_dagger);
MoveObject (e_gold_dagger, e_void);
check_thief_quest(); }, "wand": function() { psay ("Amazing! A used wand from the archmage... he will be amazed by our superiority! No magery can stop wits...");
MoveObject (e_wand, e_void);
check_thief_quest(); }, "fake_diamond": function() { psay ("That is something of real value... Take my ring, I hope you will find it useful.");
MoveObject (e_kobold_ring, e_player);
RemoveObject (e_fake_diamond); } },
"_js_name": "e_elder_thief",
"_types": ["male", "defaultobject"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["elder_thief"] = e_elder_thief;
allObjects.push(e_elder_thief);
objectsNameMap["elder_thief"] = e_elder_thief;
e_kobold_ring = {
"elementtype": "object",
"name": "kobold_ring",
"parent": e_elder_thief,
"type": "object",
"alias": "emerald ring",
"take": true,
"look": "It is an emerald ring.{if kobold_ring.known=1: It may be the Kobold's magical ring.}<br/>",
"visible": false,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"known": 0,
"_js_name": "e_kobold_ring",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["kobold_ring"] = e_kobold_ring;
allObjects.push(e_kobold_ring);
objectsNameMap["kobold_ring"] = e_kobold_ring;
e_invis_potion = {
"elementtype": "object",
"name": "invis_potion",
"parent": e_elder_thief,
"type": "object",
"take": true,
"alias": "invisibility potion",
"look": "It looks like water. {if invis_potion.uses=1:It is full.}{if invis_potion.uses>1:It is 1/{invis_potion.uses} full.}",
"feature_usegive": true,
"uses": 1,
"inventoryverbs": ["Look at", "Drop", "Drink"],
"givesingle": true,
"use": function() { drinkInvisPotion(); },
"drink": function() { drinkInvisPotion(); },
"_js_name": "e_invis_potion",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["invis_potion"] = e_invis_potion;
allObjects.push(e_invis_potion);
objectsNameMap["invis_potion"] = e_invis_potion;
e_apprentices1 = {
"elementtype": "object",
"name": "apprentices1",
"parent": e_guild_thieves,
"type": "object",
"scenery": true,
"alias": "apprentices",
"look": "The apprentices are training their skills.",
"speak": "The apprentices are too busy to chat now.",
"_js_name": "e_apprentices1",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["apprentices1"] = e_apprentices1;
allObjects.push(e_apprentices1);
objectsNameMap["apprentices1"] = e_apprentices1;
e_people_thief = {
"elementtype": "object",
"name": "people_thief",
"parent": e_guild_thieves,
"type": "object",
"scenery": true,
"alias": "people",
"look": "They are probably thieves.",
"speak": "They don't talk too much.",
"_js_name": "e_people_thief",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["people_thief"] = e_people_thief;
allObjects.push(e_people_thief);
objectsNameMap["people_thief"] = e_people_thief;
e_furniture = {
"elementtype": "object",
"name": "furniture",
"parent": e_guild_thieves,
"type": "object",
"look": "Ordinary furniture for ordinary people.",
"scenery": true,
"_js_name": "e_furniture",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["furniture"] = e_furniture;
allObjects.push(e_furniture);
objectsNameMap["furniture"] = e_furniture;
e_main_street = {
"elementtype": "object",
"name": "main_street",
"parent": e_The_hidden_city,
"type": "object",
"alias": "the main street",
"description": "It is the widest street of Chuma Huppic. To the north you see a large and crowded building. To the south you see a big stable. Many other nice looking houses spread along the street that continues to the east. To the west, you see the Main Square.",
"usedefaultprefix": false,
"enter": function() { if (Contains (this,e_outlaw_thug)) {
OutputText ("<b>The thug runs west!</b>");
MoveObject (e_outlaw_thug, e_main_square);
} },
"_js_name": "e_main_street",
"_types": ["PublicRoom", "defaultobject"],
"public_level": 3,
"public_greeting": "An unknown passerby says <i>Hi {player.playername}! Good luck with your quest!</i>",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["main_street"] = e_main_street;
allObjects.push(e_main_street);
objectsNameMap["main_street"] = e_main_street;
e_k17 = {
"elementtype": "object",
"name": "k17",
"parent": e_main_street,
"type": "exit",
"alias": "west",
"to": e_main_square,
"_js_name": "e_k17",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k17"] = e_k17;
allExits.push(e_k17);
objectsNameMap["k17"] = e_k17;
e_k18 = {
"elementtype": "object",
"name": "k18",
"parent": e_main_street,
"type": "exit",
"alias": "east",
"_js_name": "e_k18",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k18"] = e_k18;
objectReferences.push(["e_k18", "to", "e_city_exit"]);
allExits.push(e_k18);
objectsNameMap["k18"] = e_k18;
e_k19 = {
"elementtype": "object",
"name": "k19",
"parent": e_main_street,
"type": "exit",
"alias": "north",
"_js_name": "e_k19",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k19"] = e_k19;
objectReferences.push(["e_k19", "to", "e_bakery_front"]);
allExits.push(e_k19);
objectsNameMap["k19"] = e_k19;
e_k20 = {
"elementtype": "object",
"name": "k20",
"parent": e_main_street,
"type": "exit",
"alias": "south",
"_js_name": "e_k20",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k20"] = e_k20;
objectReferences.push(["e_k20", "to", "e_stable"]);
allExits.push(e_k20);
objectsNameMap["k20"] = e_k20;
e_houses1 = {
"elementtype": "object",
"name": "houses1",
"parent": e_main_street,
"type": "object",
"alias": "houses",
"scenery": true,
"look": "The houses in this area are ranging from good to very good real state investments. You wonder what this means...",
"alt": ["house"],
"_js_name": "e_houses1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["houses1"] = e_houses1;
allObjects.push(e_houses1);
objectsNameMap["houses1"] = e_houses1;
e_golden_statue = {
"elementtype": "object",
"name": "golden_statue",
"parent": e_houses1,
"type": "object",
"alias": "golden statue",
"look": "A one feet gold plated statue. Should worth a fortune.",
"take": true,
"worth": 60,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_golden_statue",
"_types": ["Treasure", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["golden_statue"] = e_golden_statue;
allObjects.push(e_golden_statue);
objectsNameMap["golden_statue"] = e_golden_statue;
e_city_exit = {
"elementtype": "object",
"name": "city_exit",
"parent": e_The_hidden_city,
"type": "object",
"alias": "exit to the maze",
"description": "You are at the end of the main street. A gate leads to the rocky maze that protects the hidden city of Chuma Huppic in the east. The main street leads to the city in the west. Two strong guards keep an eye on who enters and exits the city.",
"usedefaultprefix": false,
"prefix": "the",
"public_greeting": "A guard says <i>Hi {player.playername}! Good luck with your quest!</i>",
"enter": function() { if (e_player.class!="none" && e_exitToMaze.locked==true) {
UnlockExit (e_exitToMaze);
}
if (e_barrier.visible==false && e_player.level==3) {
OutputText ("You hear the voice of Coriander inside your head: <span style=\"color:blue\"><i>The King is expecting you...</i></span>");
} },
"_js_name": "e_city_exit",
"_types": ["PublicRoom", "defaultobject"],
"public_level": 3,
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["city_exit"] = e_city_exit;
allObjects.push(e_city_exit);
objectsNameMap["city_exit"] = e_city_exit;
e_k21 = {
"elementtype": "object",
"name": "k21",
"parent": e_city_exit,
"type": "exit",
"alias": "west",
"to": e_main_street,
"_js_name": "e_k21",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k21"] = e_k21;
allExits.push(e_k21);
objectsNameMap["k21"] = e_k21;
e_exitToMaze = {
"elementtype": "object",
"name": "exitToMaze",
"parent": e_city_exit,
"type": "exit",
"alias": "east",
"lockmessage": "You feel it is a better idea to stay in town until you choose a guild. Seek the guild masters for training.",
"locked": true,
"_js_name": "e_exitToMaze",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["exitToMaze"] = e_exitToMaze;
objectReferences.push(["e_exitToMaze", "to", "e_Maze"]);
allExits.push(e_exitToMaze);
objectsNameMap["exitToMaze"] = e_exitToMaze;
e_houses3 = {
"elementtype": "object",
"name": "houses3",
"parent": e_city_exit,
"type": "object",
"alias": "houses",
"scenery": true,
"look": "The houses in this area are just a few, all with large yards.",
"alt": ["house"],
"displayverbs": ["Look at"],
"_js_name": "e_houses3",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["houses3"] = e_houses3;
allObjects.push(e_houses3);
objectsNameMap["houses3"] = e_houses3;
e_guards1 = {
"elementtype": "object",
"name": "guards1",
"parent": e_city_exit,
"type": "object",
"alias": "guards",
"scenery": true,
"prefix": "the",
"suffix": "",
"look": "You see two guards in chain mails. They are busy watching the exit to the maze.",
"speak": "They are too busy to chat now.",
"alt": ["guard"],
"coins": 1,
"displayverbs": ["Look at"],
"_js_name": "e_guards1",
"_types": ["maleplural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guards1"] = e_guards1;
allObjects.push(e_guards1);
objectsNameMap["guards1"] = e_guards1;
e_maze = {
"elementtype": "object",
"name": "maze",
"parent": e_city_exit,
"type": "object",
"alias": "maze",
"look": "It is a magical maze that protects the city, keeping the invaders out.",
"scenery": true,
"displayverbs": ["Look at"],
"_js_name": "e_maze",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["maze"] = e_maze;
allObjects.push(e_maze);
objectsNameMap["maze"] = e_maze;
e_bakery_front = {
"elementtype": "object",
"name": "bakery_front",
"parent": e_The_hidden_city,
"type": "object",
"alias": " the front of the Bakery",
"description": "You are standing in the front of the bakery. It is a two story building where lives the baker and his family. The first floor is where the bread is sold. You guess that the second floor is the baker's private residence. ",
"descprefix": "You are in",
"usedefaultprefix": false,
"enter": function() { if (Contains (this,e_outlaw_thug)) {
OutputText ("<b>The thug runs south!</b>");
MoveObject (e_outlaw_thug, e_main_street);
} },
"_js_name": "e_bakery_front",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bakery_front"] = e_bakery_front;
allObjects.push(e_bakery_front);
objectsNameMap["bakery_front"] = e_bakery_front;
e_k22 = {
"elementtype": "object",
"name": "k22",
"parent": e_bakery_front,
"type": "exit",
"alias": "south",
"to": e_main_street,
"_js_name": "e_k22",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k22"] = e_k22;
allExits.push(e_k22);
objectsNameMap["k22"] = e_k22;
e_k23 = {
"elementtype": "object",
"name": "k23",
"parent": e_bakery_front,
"type": "exit",
"alias": "in",
"_js_name": "e_k23",
"_types": ["indirection", "defaultexit"],
"alt": [""],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k23"] = e_k23;
objectReferences.push(["e_k23", "to", "e_bakery"]);
allExits.push(e_k23);
objectsNameMap["k23"] = e_k23;
e_Old_Tree = {
"elementtype": "object",
"name": "Old Tree",
"parent": e_bakery_front,
"type": "object",
"look": "The tree is tall and strong, quite remarkable considering the garbage produced by this bakery.",
"displayverbs": ["Look at"],
"useindividualverblist": false,
"usestandardverblist": true,
"alias": "old tree",
"climb": function() { if (e_player.class=="thief") {
OutputText ("Ok.");
MoveObject (e_player, e_old_treetop);
}
else {
OutputText ("I'm not a children anymore.");
} },
"_js_name": "e_Old_Tree",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Old Tree"] = e_Old_Tree;
allObjects.push(e_Old_Tree);
objectsNameMap["Old Tree"] = e_Old_Tree;
e_RedGirl = {
"elementtype": "object",
"name": "RedGirl",
"parent": e_bakery_front,
"type": "object",
"alias": "red hooded girl",
"visible": false,
"displayverbs": ["Look at", "Speak to"],
"look": function() { if (e_RedGirl.parent==e_bakery_front) {
OutputText ("She is a young teenager wearing a red hood. She is crying by the tree. ");
}
else {
OutputText ("She is a young teenager wearing a red hood. She smiles at you.");
} },
"speak": function() { if (e_RedGirl.parent==e_bakery_front) {
OutputText ("You ask why is she crying.");
psay ("I need to visit my grandma. She lives in a wooden cabin, in the forest. But I'm not certain of the path, and there is an evil wolf that would not let me get there.");
if (GetBoolean(e_player, "woodcabin")) {
Ask ("are you going to escort the girl to the house?", function (result) { if (result) {
OutputText ("You take the girl to the cabin in the forest. Nothing interesting happens in the way to her house.");
MoveObject (e_RedGirl, e_WoodCabin);
MoveObject (e_player, e_WoodCabin);
} });
}
else {
OutputText ("If only you knew where is this cabin, perhaps you could help her...");
}
}
else if (e_player.class=="mage") {
psay ("Sir, I lost my red {ask:girl:hat} in the city. Could you find it for me? I could not leave my grandma alone.");
}
else {
psay ("Thank you for your help, sir.");
} },
"give": {"red_hat": function() { OutputText ("<i>Oh thank you sir! Do you like apple pies? Here, take one piece for you.</i><br/>She got into the cabin to help her grandma.");
AddToInventory (e_apple_pie);
RemoveObject (e_red_hat);
MakeObjectInvisible (e_RedGirl); } },
"ask": {"hat": function() { psay ("I went to the town courtyard to see the festival, but I forgot my hat somewhere."); }, "pie": function() { if (e_player.class=="mage") {
psay ("It is an apple pie.");
}
else {
psay ("What?");
} } },
"_js_name": "e_RedGirl",
"_types": ["female", "defaultobject"],
"gender": "she",
"article": "her",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["RedGirl"] = e_RedGirl;
allObjects.push(e_RedGirl);
objectsNameMap["RedGirl"] = e_RedGirl;
e_apple_pie = {
"elementtype": "object",
"name": "apple_pie",
"parent": e_RedGirl,
"type": "object",
"alias": "piece of apple pie",
"eat": "Too many carbs...",
"_js_name": "e_apple_pie",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": true,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["apple_pie"] = e_apple_pie;
allObjects.push(e_apple_pie);
objectsNameMap["apple_pie"] = e_apple_pie;
e_bakery_building = {
"elementtype": "object",
"name": "bakery_building",
"parent": e_bakery_front,
"type": "object",
"scenery": true,
"look": "It is a two story building where lives the baker and his family. The first floor is where the bread is sold. You guess that the second floor is the baker's private residence. ",
"alias": "bakery",
"alt": ["building"],
"_js_name": "e_bakery_building",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bakery_building"] = e_bakery_building;
allObjects.push(e_bakery_building);
objectsNameMap["bakery_building"] = e_bakery_building;
e_bakery = {
"elementtype": "object",
"name": "bakery",
"parent": e_The_hidden_city,
"type": "object",
"alias": "bakery",
"description": "You are standing inside the baker's shop. The sweet smell of bread contrasts with the dirty walls and the wet flour all over the ground.",
"usedefaultprefix": false,
"descprefix": "You are inside",
"prefix": "the",
"enter": function() { if (e_player.class=="warrior" && e_player.seekingthug==this) {
OutputText ("<b>As you enter the bakery, a sinister man leaves by the door at full speed.</b><br/>The Baker exclaims: <i>Oh my! someone stop that thief! he just robbed me! help!</i>");
set(e_player, "seekingthug", e_bakery_front);
MoveObject (e_outlaw_thug, e_bakery_front);
MakeObjectVisible (e_outlaw_thug);
}
EnableTurnScript (e_bakerTalk); },
"onexit": function() { DisableTurnScript (e_bakerTalk); },
"_js_name": "e_bakery",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bakery"] = e_bakery;
allObjects.push(e_bakery);
objectsNameMap["bakery"] = e_bakery;
e_k24 = {
"elementtype": "object",
"name": "k24",
"parent": e_bakery,
"type": "exit",
"alias": "out",
"to": e_bakery_front,
"_js_name": "e_k24",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k24"] = e_k24;
allExits.push(e_k24);
objectsNameMap["k24"] = e_k24;
e_Baker = {
"elementtype": "object",
"name": "Baker",
"parent": e_bakery,
"type": "object",
"alias": "baker",
"look": "He is fat and sweats a lot... hygiene is not strongly valued around here.",
"buy": "You don't want to buy bread... not from him... disgusting!",
"displayverbs": ["Look at", "Speak to", "Buy"],
"usedefaultprefix": false,
"prefix": "a sweating agitated",
"speak": function() { if (e_player.class=="warrior" && e_player.level>0 && e_pot.parent==e_Baker) {
psay ("Thanks for capturing that thief! Here, take this pot of stew that my wife just prepared for me.");
AddToInventory (e_pot);
}
else {
OutputText ("He is too busy to talk now.");
} },
"useon": {"purse": function() { OutputText ("You would never buy those dirty breads..."); } },
"ask": {"pie pies": function() { psay ("We don't bake these fancy things here..."); } },
"_js_name": "e_Baker",
"_types": ["male", "defaultobject"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Baker"] = e_Baker;
allObjects.push(e_Baker);
objectsNameMap["Baker"] = e_Baker;
e_pot = {
"elementtype": "object",
"name": "pot",
"parent": e_Baker,
"type": "object",
"alias": "pot with a suspicious stew",
"take": true,
"look": "It is a sturdy iron pot filled with a cold and suspicious stew. Probably unclean pork guts.",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_pot",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["pot"] = e_pot;
allObjects.push(e_pot);
objectsNameMap["pot"] = e_pot;
e_bakerTalk = {
"elementtype": "object",
"name": "bakerTalk",
"parent": e_bakery,
"type": "turnscript",
"script": function() { if (e_player.class=="thief") {
var x = GetRandomInt(1,5);
switch (x) {
case 1:
OutputText ("The Baker yells to his wife: <i>Honey, bring me some floor here</i>");
break;
case 2:
OutputText ("The Baker's wife yells to the baker: <i>Sweet, can you buy me a new ring? The only jewelry I have is this old necklace</i>");
break;
case 3:
OutputText ("The Baker yells to his wife <i>Do you think I make gold with this floor honey? </i>");
break;
case 4:
OutputText ("The Baker's wife yells to the baker: <i>Sweet, I need a new dress</i>");
break;
case 5:
OutputText ("The Baker mumbles to himself: <i>dresses, necklaces... </i>");
break;

}
} },
"_js_name": "e_bakerTalk",
"_types": []
};
elementsNameMap["bakerTalk"] = e_bakerTalk;
allTurnScripts.push(e_bakerTalk);
objectsNameMap["bakerTalk"] = e_bakerTalk;
e_old_treetop = {
"elementtype": "object",
"name": "old_treetop",
"parent": e_The_hidden_city,
"type": "object",
"alias": "top of an old tree",
"description": "You are in the top of an old tree. Strong branches reach near an open window to the bedroom.",
"usedefaultprefix": false,
"prefix": "the",
"_js_name": "e_old_treetop",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["old_treetop"] = e_old_treetop;
allObjects.push(e_old_treetop);
objectsNameMap["old_treetop"] = e_old_treetop;
e_k25 = {
"elementtype": "object",
"name": "k25",
"parent": e_old_treetop,
"type": "exit",
"alias": "down",
"to": e_bakery_front,
"_js_name": "e_k25",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k25"] = e_k25;
allExits.push(e_k25);
objectsNameMap["k25"] = e_k25;
e_large_window = {
"elementtype": "object",
"name": "large window",
"parent": e_old_treetop,
"type": "exit",
"alias": "in",
"script": function() { OutputText ("you sneaked by the window inside the room");
MoveObject (e_player, e_baker_bedroom); },
"_js_name": "e_large_window",
"_types": ["indirection", "defaultexit"],
"alt": [""],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["large window"] = e_large_window;
objectReferences.push(["e_large_window", "to", "e_baker_bedroom"]);
allExits.push(e_large_window);
objectsNameMap["large window"] = e_large_window;
e_window_bakery = {
"elementtype": "object",
"name": "window_bakery",
"parent": e_old_treetop,
"type": "object",
"alias": "window",
"scenery": true,
"look": "The window to the bedroom is open, and the room seems to be empty.",
"alt": ["bedroom"],
"displayverbs": ["Look at"],
"_js_name": "e_window_bakery",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["window_bakery"] = e_window_bakery;
allObjects.push(e_window_bakery);
objectsNameMap["window_bakery"] = e_window_bakery;
e_baker_bedroom = {
"elementtype": "object",
"name": "baker_bedroom",
"parent": e_The_hidden_city,
"type": "object",
"alias": "bedroom of the baker",
"description": "It is a messy bed room, with dirty clothes everywhere.",
"usedefaultprefix": false,
"prefix": "the",
"_js_name": "e_baker_bedroom",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["baker_bedroom"] = e_baker_bedroom;
allObjects.push(e_baker_bedroom);
objectsNameMap["baker_bedroom"] = e_baker_bedroom;
e_k26 = {
"elementtype": "object",
"name": "k26",
"parent": e_baker_bedroom,
"type": "exit",
"alias": "out",
"to": e_old_treetop,
"_js_name": "e_k26",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k26"] = e_k26;
allExits.push(e_k26);
objectsNameMap["k26"] = e_k26;
e_bed = {
"elementtype": "object",
"name": "bed",
"parent": e_baker_bedroom,
"type": "object",
"look": "A large bed for two large citizens. You can't find anything under the bed.",
"displayverbs": ["Look at"],
"hide": function() { if (ListContains(ScopeReachable(), e_necklace)) {
if (e_necklace.hide_on) {
OutputText ("I do not need to hide anymore.");
}
else {
OutputText ("You hide under the bed while the huge baker's wife enters the room. When she starts changing her dress, you decide to close your eyes ... after a few minutes she leaves the room and you get out of your hiding place.");
SetObjectFlagOn (e_necklace, "hide_on");
DisableTurnScript (e_necklaceTimer);
}
}
else {
OutputText ("I do not need to hide now.");
} },
"_js_name": "e_bed",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"useindividualverblist":false,
"usestandardverblist":true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bed"] = e_bed;
allObjects.push(e_bed);
objectsNameMap["bed"] = e_bed;
e_dressing_table = {
"elementtype": "object",
"name": "dressing table",
"parent": e_baker_bedroom,
"type": "object",
"alt": ["drawer"],
"look": "It is just an ordinary dress table with a small wooden door.",
"feature_container": true,
"keycount": 1,
"listchildren": true,
"displayverbs": ["Look at", "Open"],
"useindividualverblist":false,
"usestandardverblist":true,
"picklock": function() { if (e_dressing_table.locked==true) {
OutputText ("You unlock the dressing table.");
set(e_dressing_table, "locked", false);
HelperOpenObject (e_dressing_table);
OutputText("It contains a {object:necklace}.");
}
else {
OutputText ("It is open");
} },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"key": e_null_key,
"_js_name": "e_dressing_table",
"_types": ["container_lockable", "container_closed", "defaultobject"],
"locked": true,
"nokeymessage": "You do not have the key.",
"unlockmessage": "Unlocked.",
"lockmessage": "Locked.",
"canlockopen": false,
"autoopen": true,
"autounlock": true,
"openscript": function() { if (this.locked) {
if (this.autounlock && AllKeysAvailable(this)) {
runscriptattribute2 (this, "unlock");
if (!(this.isopen)) {
OpenObject (this);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
}
else {
OpenObject (this);
} },
"closescript": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
else {
CloseObject (this);
} },
"lock": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyLocked", this));
}
else if (this.isopen && !(this.canlockopen)) {
OutputText (overloadedFunctions.DynamicTemplate("CannotLockOpen", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.lockmessage);
set(this, "locked", true);
}
else {
OutputText (this.nokeymessage);
}
} },
"unlock": function() { if (!(this.locked)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyUnlocked", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.unlockmessage);
set(this, "locked", false);
if (this.autoopen && !(this.isopen)) {
TryOpenClose (true, this);
}
}
else {
OutputText (this.nokeymessage);
}
} },
"open": true,
"close": true,
"container": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dressing table"] = e_dressing_table;
allObjects.push(e_dressing_table);
objectsNameMap["dressing table"] = e_dressing_table;
e_necklace = {
"elementtype": "object",
"name": "necklace",
"parent": e_dressing_table,
"type": "object",
"hide_on": false,
"look": "It is made of cooper with some colorful stones. It has a dubious value...",
"inventoryverbs": ["Look at", "Drop", "Give"],
"alias": "necklace",
"visible": true,
"displayverbs": ["Look at", "Take"],
"turns": 0,
"givesingle": true,
"useindividualverblist": false,
"usestandardverblist": true,
"feature_usegive": true,
"take": function() { if (e_necklace.hide_on) {
AddToInventory (e_necklace);
OutputText ("You got it!");
}
else {
OutputText ("Before you could think about taking it, someone approaches the room...");
MoveObject (e_necklace, e_baker_bedroom);
EnableTurnScript (e_necklaceTimer);
} },
"_js_name": "e_necklace",
"_types": ["defaultobject"],
"use": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["necklace"] = e_necklace;
allObjects.push(e_necklace);
objectsNameMap["necklace"] = e_necklace;
e_necklaceTimer = {
"elementtype": "object",
"name": "necklaceTimer",
"parent": e_baker_bedroom,
"type": "turnscript",
"script": function() { if (e_necklace.hide_on) {
DisableTurnScript (e_necklaceTimer);
set(e_necklace, "turns", 0);
}
else if (e_necklace.turns<2) {
set(e_necklace, "turns", e_necklace.turns+1);
}
else {
OutputText ("<b>You managed to escape in the last minute, without the necklace...</b>");
MoveObject (e_player, e_old_treetop);
set(e_necklace, "turns", 0);
DisableTurnScript (e_necklaceTimer);
} },
"_js_name": "e_necklaceTimer",
"_types": []
};
elementsNameMap["necklaceTimer"] = e_necklaceTimer;
allTurnScripts.push(e_necklaceTimer);
objectsNameMap["necklaceTimer"] = e_necklaceTimer;
e_clothes = {
"elementtype": "object",
"name": "clothes",
"parent": e_baker_bedroom,
"type": "object",
"alt": ["cloth"],
"look": "I will not touch this!",
"scenery": true,
"displayverbs": ["Look at"],
"_js_name": "e_clothes",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["clothes"] = e_clothes;
allObjects.push(e_clothes);
objectsNameMap["clothes"] = e_clothes;
e_gray_tavern = {
"elementtype": "object",
"name": "gray_tavern",
"parent": e_The_hidden_city,
"type": "object",
"alias": "the gray tavern",
"usedefaultprefix": false,
"description": "You stand inside a noisy and dark tavern filled with lower class harlots, thieves, and other people of low moral fiber. The beer is weak like water and the wine tastes like vinegar.",
"public_greeting": "An unknown customer says <i>Hi {player.playername}! Good luck with your quest!</i>.",
"enter": function() { if (Contains (e_gray_tavern,e_YellowWoman) && Contains (e_gray_tavern,e_outlaw_thug) && e_outlaw_thug.visible) {
OutputText ("The woman and the thug are distracted in some kind of argument...");
} },
"_js_name": "e_gray_tavern",
"_types": ["PublicRoom", "defaultobject"],
"public_level": 3,
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["gray_tavern"] = e_gray_tavern;
allObjects.push(e_gray_tavern);
objectsNameMap["gray_tavern"] = e_gray_tavern;
e_k27 = {
"elementtype": "object",
"name": "k27",
"parent": e_gray_tavern,
"type": "exit",
"alias": "south",
"to": e_street_peasants,
"_js_name": "e_k27",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k27"] = e_k27;
allExits.push(e_k27);
objectsNameMap["k27"] = e_k27;
e_outlaw_thug = {
"elementtype": "object",
"name": "outlaw_thug",
"parent": e_gray_tavern,
"type": "object",
"visible": false,
"look": "He has a huge scar in his face.",
"displayverbs": ["Look at", "Speak to"],
"stablist": ["Kill the bastard! He deserves this", "Deliver him to the authorities"],
"speak": "<i>Get lost, peasant!</i>",
"alias": "outlaw thug",
"alt": ["thug"],
"_js_name": "e_outlaw_thug",
"_types": ["male", "defaultobject"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["outlaw_thug"] = e_outlaw_thug;
allObjects.push(e_outlaw_thug);
objectsNameMap["outlaw_thug"] = e_outlaw_thug;
e_drunkguy = {
"elementtype": "object",
"name": "drunkguy",
"parent": e_gray_tavern,
"type": "object",
"alias": "drunk guy",
"visible": false,
"sleep": false,
"look": function() { if (e_drunkguy.sleep) {
OutputText ("He is sleeping over the table.");
}
else {
OutputText ("He is so drunk that he barely can stand up.<br/>He wears a valuable ring in his right hand.");
} },
"speak": function() { if (e_drunkguy.sleep) {
OutputText ("Better leave him sleeping on his chair.");
}
else {
Ask ("<i>Would you buy me a cup of wine, noble sir?<i>", function (result) { if (result) {
set(e_purse, "coins", e_purse.coins-1);
SetObjectFlagOn (e_drunkguy, "sleep");
OutputText ("You spend 1 coin and gave the wine to the drunk fellow. He drank all at once, and fall asleep over the table.");
} });
} },
"_js_name": "e_drunkguy",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["drunkguy"] = e_drunkguy;
allObjects.push(e_drunkguy);
objectsNameMap["drunkguy"] = e_drunkguy;
e_drunkring = {
"elementtype": "object",
"name": "drunkring",
"parent": e_drunkguy,
"type": "object",
"alias": "ring",
"take": true,
"look": "A silver ring with a probably semi-precious stone. Nice, and with some value.",
"use": true,
"givesingle": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"_js_name": "e_drunkring",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["drunkring"] = e_drunkring;
allObjects.push(e_drunkring);
objectsNameMap["drunkring"] = e_drunkring;
e_wander_mage = {
"elementtype": "object",
"name": "wander_mage",
"parent": e_gray_tavern,
"type": "object",
"visible": false,
"alias": "Raffaella",
"usedefaultprefix": false,
"suffix": "the wandering wizard",
"look": "She is a tall woman with a dark brown hair and a somewhat tired looking. She wears a worn scarlet dress and is sitting alone.",
"intro": false,
"speak": function() { if (!(e_wander_mage.intro)) {
psay ("Hi, my name is Raffaella. I sense that you are a {command:ask Raffaella about magic:magic} student and that {command:ask Raffaella about Dashiel:Dashiel} is your teacher, alright? I was once his student too... but now I help him bringing information about the {command:ask Raffaella about enemy:enemy} forces.");
set(e_wander_mage, "intro", true);
}
else {
psay ("Hi "+e_player.playername+". How is your {ask:Raffaella:magic:magical trainig} with {ask:Raffaella:Dashiel} going? I'm still researching about the {ask:Raffaella:enemy} forces.");
} },
"ask": {"Dashiel": function() { psay ("Dashiel is a great master to introduce you to the magic arts, but it is really hard to make him teach anything more advanced. I guess that he doesn't want competition."); }, "magic magical training": function() { psay ("I'm a wizard, and yes, I know a few tricks. I'm very good with the {command:ask Raffaella about apportation:apportation} spell."); }, "enemy enemies": function() { psay ("I found out that there is a spy in the city. He calls himself White Wolf. I told Dashiel about him, but he is too lazy to get out that guild."); }, "apportation": function() { if (Got(e_apport_spell)) {
psay ("You already know about that...");
}
else {
psay ("Don't you know the {ask:Raffaella:apportation} spell? This spell lets you grab small objects from distance, and levitate towards you. You know what, I will teach it to you... IF you can bring me a sweet piece of pie. ");
} } },
"give": {"apple_pie": function() { OutputText ("<i>Great! that's exactly what I needed!</i>. After eating the pie, she teaches you how to perform the apportation spell.");
MoveObject (e_apport_spell, e_spell_book);
RemoveObject (e_apple_pie); } },
"_js_name": "e_wander_mage",
"_types": ["female", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["wander_mage"] = e_wander_mage;
allObjects.push(e_wander_mage);
objectsNameMap["wander_mage"] = e_wander_mage;
e_customers = {
"elementtype": "object",
"name": "customers",
"parent": e_gray_tavern,
"type": "object",
"coins": 2,
"usedefaultprefix": false,
"prefix": "a mob of",
"speak": "You're too busy to socialize right now.",
"alt": ["customer", "harlot", "harlots"],
"look": function() { if ((e_player.level==1 && e_player.class=="thief")) {
MakeObjectVisible (e_outlaw_thug);
OutputText ("Sitting in a far table you see the {object:outlaw_thug:thug} you are looking for. He wears a black hood to hide his identity.");

if (e_player.class=="thief") {
MakeObjectVisible (e_YellowWoman);
}
}
else {
OutputText ("You can't find anybody interesting. ");
} },
"_js_name": "e_customers",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["customers"] = e_customers;
allObjects.push(e_customers);
objectsNameMap["customers"] = e_customers;
e_k28 = {
"elementtype": "object",
"name": "k28",
"parent": e_gray_tavern,
"type": "command",
"anonymous": true,
"pattern": "^order (?<text>.*)$",
"unresolved": "order what?",
"script": function(parameters) { var text = parameters['text'];
if (text=="beer") {
OutputText ("This beer does not worth a coin.");
}
else if (text=="wine") {
OutputText ("This wine is bad for my stomach. However, it does goes well with a salad.");
}
else {
OutputText ("They don't have it here.");
} },
"_js_name": "e_k28",
"_types": ["defaultcommand"]
};
elementsNameMap["k28"] = e_k28;
allCommands.push(e_k28);
objectsNameMap["k28"] = e_k28;
e_courtyard1 = {
"elementtype": "object",
"name": "courtyard1",
"parent": e_The_hidden_city,
"type": "object",
"alias": "improvised courtyard",
"description": "The courtyard is a big and crowded area, surrounded by several buildings that now host what was left of the king's court. Several warriors are taking part in contests as part of the spring festival. All sorts of weapons and armor pieces are piled in a corner to be used in the contest.",
"_js_name": "e_courtyard1",
"_types": ["PublicRoom", "defaultobject"],
"public_level": 3,
"public_greeting": "An unknown passerby says <i>Hi {player.playername}! Good luck with your quest!</i>",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["courtyard1"] = e_courtyard1;
allObjects.push(e_courtyard1);
objectsNameMap["courtyard1"] = e_courtyard1;
e_k29 = {
"elementtype": "object",
"name": "k29",
"parent": e_courtyard1,
"type": "exit",
"alias": "south",
"to": e_main_square,
"_js_name": "e_k29",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k29"] = e_k29;
allExits.push(e_k29);
objectsNameMap["k29"] = e_k29;
e_contesters = {
"elementtype": "object",
"name": "contesters",
"parent": e_courtyard1,
"type": "object",
"alias": "contestants",
"look": "They all look tough and ready to kill.",
"usedefaultprefix": false,
"prefix": "the",
"suffix": " of the spring festival",
"speak": "<i>Get lost, peasant!</i>",
"alt": ["warriors"],
"_js_name": "e_contesters",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["contesters"] = e_contesters;
allObjects.push(e_contesters);
objectsNameMap["contesters"] = e_contesters;
e_weapons = {
"elementtype": "object",
"name": "weapons",
"parent": e_courtyard1,
"type": "object",
"scenery": true,
"look": "You see small swords, two handed swords, maces, shields, bucklers, spears, axes and a net. The weapons are of poor quality, the good stuff was already taken.",
"takemsg": "You can't take them... they are for the contest.",
"_js_name": "e_weapons",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["weapons"] = e_weapons;
allObjects.push(e_weapons);
objectsNameMap["weapons"] = e_weapons;
e_armor = {
"elementtype": "object",
"name": "armor",
"parent": e_courtyard1,
"type": "object",
"scenery": true,
"takemsg": "You can't take them... they are for the contest.",
"alt": ["armour"],
"look": function() { if (e_buckler.parent==e_armor && e_player.class=="warrior") {
OutputText ("You see breast plates, light jackets, chainmails , helmets, leather caps, gloves, and metal sleeves. All this equipment was heavily worn, broken, or does not fit your size. But you found a nice <b>buckler</b> that you decide to keep.");
MoveObject (e_buckler, e_player);
}
else if (e_player.class=="mage" && e_red_hat.visible==false) {
MakeObjectVisible (e_red_hat);
OutputText ("You found a nice {object:red_hat} among shields and breast plates.");
}
else {
OutputText ("You see breast plates, light jackets, chainmails , helmets, leather caps, gloves, and metal sleeves. All this equipment was heavily worn, broken, or does not fit your size.");
} },
"_js_name": "e_armor",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["armor"] = e_armor;
allObjects.push(e_armor);
objectsNameMap["armor"] = e_armor;
e_buckler = {
"elementtype": "object",
"name": "buckler",
"parent": e_armor,
"type": "object",
"alias": "small buckler",
"look": "An ordinary wooden buckler.",
"take": true,
"loc": "shield",
"inventoryverbs": ["Look at", "Drop"],
"_js_name": "e_buckler",
"_types": ["Armour", "defaultobject"],
"armour": 1,
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["buckler"] = e_buckler;
allObjects.push(e_buckler);
objectsNameMap["buckler"] = e_buckler;
e_referee = {
"elementtype": "object",
"name": "referee",
"parent": e_courtyard1,
"type": "object",
"alias": "referee",
"look": "He is an old veteran with old battle scars...",
"usedefaultprefix": false,
"prefix": "the",
"suffix": " of the contest",
"speak": function() { if (e_player.contest>1) {
psay ("The contest is over! you are the champion!");
}
else if (e_player.class=="warrior") {
psay ("The contest works as follows: each warrior will fight three times.<br/>The fee to participate is one coin. If you win three consecutive fights, you get the festival prize.");
if (e_player.level<2) {
psay ("Interested? the contest has not yet started... you will have a few hours to make up your mind!");
}
else if (e_player.contest==1) {
psay ("Go ahead, fight one of them!");
}
else if (e_purse.coins==0) {
psay ("No cash, no fights!");
}
else {
Ask ("<i>Do you want to fight now?</i>", function (result) { if (result) {
set(e_player, "contest", 1);
set(e_purse, "coins", e_purse.coins-1);
set(e_contester1, "visible", true);
set(e_contester2, "visible", true);
set(e_contester3, "visible", true);
psay ("You'll fight Arnold, James, and John! Good luck!");
} });
}
}
else {
OutputText ("This contest is only for warriors! but you can watch it, if it pleases you.");
} },
"_js_name": "e_referee",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["referee"] = e_referee;
allObjects.push(e_referee);
objectsNameMap["referee"] = e_referee;
e_k30 = {
"elementtype": "object",
"name": "k30",
"parent": e_courtyard1,
"type": "exit",
"alias": "north",
"runscript": true,
"script": function() { if (e_player.level>3 || (e_player.level==3 && e_barrier.visible==false)) {
MoveObject (e_player, e_throne);
}
else {
OutputText ("The King's herald blocks your way into the Throne Room: <i>Only nobles and subjects of great value or heroism can claim an audience with the King</i>.");
} },
"_js_name": "e_k30",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k30"] = e_k30;
objectReferences.push(["e_k30", "to", "e_throne"]);
allExits.push(e_k30);
objectsNameMap["k30"] = e_k30;
e_contester1 = {
"elementtype": "object",
"name": "contester1",
"parent": e_courtyard1,
"type": "object",
"alias": "Arnold",
"usedefaultprefix": false,
"suffix": ", the squire",
"visible": false,
"danger": "friend",
"exp": 1,
"look": "He is not that strong.",
"speak": "<i>I'm ready for you!</i>",
"_js_name": "e_contester1",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"ht": 10,
"armour": 0,
"aggressive": false,
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["contester1"] = e_contester1;
allObjects.push(e_contester1);
objectsNameMap["contester1"] = e_contester1;
e_contester2 = {
"elementtype": "object",
"name": "contester2",
"parent": e_courtyard1,
"type": "object",
"danger": "friend",
"ht": 12,
"exp": 2,
"armour": 1,
"visible": false,
"alias": "James",
"usedefaultprefix": false,
"suffix": ", the spearman",
"look": "He looks quite professional",
"speak": "<i>Ha! You are a joke!</i>",
"_js_name": "e_contester2",
"_types": ["male", "Enemy", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"enemy": "yes",
"aggressive": false,
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["contester2"] = e_contester2;
allObjects.push(e_contester2);
objectsNameMap["contester2"] = e_contester2;
e_contester3 = {
"elementtype": "object",
"name": "contester3",
"parent": e_courtyard1,
"type": "object",
"danger": "friend",
"ht": 12,
"exp": 2,
"armour": 2,
"visible": false,
"usedefaultprefix": false,
"alias": "John",
"suffix": ", the berserker",
"look": "If not the stronger, he is the meaner of the three.",
"speak": "<i>What kind of warrior uses this kind of gear? You look like a peasant!</i>",
"_js_name": "e_contester3",
"_types": ["male", "Enemy", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"enemy": "yes",
"aggressive": false,
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["contester3"] = e_contester3;
allObjects.push(e_contester3);
objectsNameMap["contester3"] = e_contester3;
e_board = {
"elementtype": "object",
"name": "board",
"parent": e_courtyard1,
"type": "object",
"alias": "bulletin board",
"look": "You see several notes, you can read them... if you know how to read.",
"displayverbs": ["Look at", "Read"],
"read_away": true,
"read": function() { if (e_player.class=="mage") {
if (e_player.level==2) {
OutputText ("You found an interesting note here: \"<i>Way up high in the tall tall trees <br/>The wind rushes by like a gentle breeze. <br/>Way up from everyone, from all the laughter <br/>and all the fun <br/>I sit as solemn as can be and wish that I <br/>were a tall, tall tree. <br/>In the hills, west of the wooden cabin - W.W.</i>\". ");
MakeObjectVisible (e_letter);
MakeObjectVisible (e_wander_mage);
}
else {
OutputText ("There are so many notes... what are you looking for?");
}
}
else {
OutputText ("Huh... I can't read");
} },
"_js_name": "e_board",
"_types": ["Readable", "defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["board"] = e_board;
allObjects.push(e_board);
objectsNameMap["board"] = e_board;
e_red_hat = {
"elementtype": "object",
"name": "red_hat",
"parent": e_courtyard1,
"type": "object",
"alias": "red hat",
"visible": false,
"take": true,
"look": "It is a small red hat.",
"inventoryverbs": ["Look at", "Drop", "Give"],
"feature_usegive": true,
"givesingle": true,
"_js_name": "e_red_hat",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"use": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["red_hat"] = e_red_hat;
allObjects.push(e_red_hat);
objectsNameMap["red_hat"] = e_red_hat;
e_mouse_house = {
"elementtype": "object",
"name": "mouse_house",
"parent": e_The_hidden_city,
"type": "object",
"alias": "hole in the wall",
"description": "You are now a small mouse. The way back to the guild of the mages is blocked by the huge Erasmus, the archmage's cat. You see another hole leading to northwest.",
"descprefix": "You are in",
"usedefaultprefix": true,
"onexit": function() { OutputText ("When you enter the lab, you regain your natural size. This room is probably spell-proof."); },
"_js_name": "e_mouse_house",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["mouse_house"] = e_mouse_house;
allObjects.push(e_mouse_house);
objectsNameMap["mouse_house"] = e_mouse_house;
e_k31 = {
"elementtype": "object",
"name": "k31",
"parent": e_mouse_house,
"type": "exit",
"alias": "northwest",
"_js_name": "e_k31",
"_types": ["northwestdirection", "defaultexit"],
"alt": ["nw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k31"] = e_k31;
objectReferences.push(["e_k31", "to", "e_mage_lab"]);
allExits.push(e_k31);
objectsNameMap["k31"] = e_k31;
e_mage_lab = {
"elementtype": "object",
"name": "mage_lab",
"parent": e_The_hidden_city,
"type": "object",
"alias": "magical lab",
"description": "The lab is a dim room, filled with magical symbols, potions, herbs, and all that wizard stuff. There is a round door leading south. ",
"onexit": function() { OutputText ("When you cross to the other side, the door behind you disappear. You can hear Dashiel laughing at you."); },
"_js_name": "e_mage_lab",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["mage_lab"] = e_mage_lab;
allObjects.push(e_mage_lab);
objectsNameMap["mage_lab"] = e_mage_lab;
e_desk = {
"elementtype": "object",
"name": "desk",
"parent": e_mage_lab,
"type": "object",
"look": "The desk is a mess of jars, scrolls, and many other magical stuff. You better not touch anything there, it is certainly magically protected.",
"takemsg": "It's too heavy... and I would not touch it anyway",
"alias": "desk",
"displayverbs": ["Look at"],
"alt": ["jars", "scrolls", "stuff"],
"_js_name": "e_desk",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["desk"] = e_desk;
allObjects.push(e_desk);
objectsNameMap["desk"] = e_desk;
e_painting = {
"elementtype": "object",
"name": "painting",
"parent": e_mage_lab,
"type": "object",
"look": "It is a full body portrait of the archmage. He follows you with his eyes... creepy!",
"takemsg": "I'd ratter leave this alone",
"alias": "large painting",
"_js_name": "e_painting",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["painting"] = e_painting;
allObjects.push(e_painting);
objectsNameMap["painting"] = e_painting;
e_rug = {
"elementtype": "object",
"name": "rug",
"parent": e_mage_lab,
"type": "object",
"look": "It is probably a flying carpet... not going to mess with this",
"takemsg": "Better not mess with this... ",
"alias": "Persian rug",
"_js_name": "e_rug",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["rug"] = e_rug;
allObjects.push(e_rug);
objectsNameMap["rug"] = e_rug;
e_wand = {
"elementtype": "object",
"name": "wand",
"parent": e_mage_lab,
"type": "object",
"look": "I'm sure it belongs to the archmage because it has his monogram. It is broken in two pieces, and hopefully does not work anymore as magical device.",
"visible": false,
"alias": "broken wand",
"take": true,
"takemsg": "I think it should be safe... after all it is broken",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_wand",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["wand"] = e_wand;
allObjects.push(e_wand);
objectsNameMap["wand"] = e_wand;
e_garbage = {
"elementtype": "object",
"name": "garbage",
"parent": e_mage_lab,
"type": "object",
"alias": "garbage can",
"displayverbs": ["Look at"],
"look": function() { if (!(e_wand.visible)) {
MakeObjectVisible (e_wand);
OutputText ("You found a {object:wand} in the garbage.");
}
else {
OutputText ("You see a lot of... garbage.");
} },
"_js_name": "e_garbage",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["garbage"] = e_garbage;
allObjects.push(e_garbage);
objectsNameMap["garbage"] = e_garbage;
e_k32 = {
"elementtype": "object",
"name": "k32",
"parent": e_mage_lab,
"type": "exit",
"alias": "south",
"to": e_guild_mages,
"_js_name": "e_k32",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k32"] = e_k32;
allExits.push(e_k32);
objectsNameMap["k32"] = e_k32;
e_ordinary_bag = {
"elementtype": "object",
"name": "ordinary bag",
"parent": e_mage_lab,
"type": "object",
"take": true,
"inventoryverbs": ["Look at", "Drop"],
"look": function() { OutputText ("It's empty, except for a few coins left in the bottom. You grab 4 coins and place them in your purse. ");
set(e_purse, "coins", e_purse.coins+4);
MakeObjectInvisible (e_ordinary_bag); },
"_js_name": "e_ordinary_bag",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ordinary bag"] = e_ordinary_bag;
allObjects.push(e_ordinary_bag);
objectsNameMap["ordinary bag"] = e_ordinary_bag;
e_warrior_room = {
"elementtype": "object",
"name": "warrior_room",
"parent": e_The_hidden_city,
"type": "object",
"alias": "weapons master private room",
"usedefaultprefix": false,
"prefix": "the",
"description": "This room is a large office/bedroom. You see a large bed, a desk, a couple chairs and a closet. ",
"beforeenter": function() { if (e_player.class=="thief" && e_player.level>=2) {
OutputText ("You use all your stealth to sneak into the room... and nobody notices.");
} },
"_js_name": "e_warrior_room",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["warrior_room"] = e_warrior_room;
allObjects.push(e_warrior_room);
objectsNameMap["warrior_room"] = e_warrior_room;
e_warrior_room_stuff = {
"elementtype": "object",
"name": "warrior_room_stuff",
"parent": e_warrior_room,
"type": "object",
"scenery": true,
"alias": "bed",
"alt": ["desk", "chairs", "closet. "],
"displayverbs": ["Look at"],
"look": "You can't find anything personal or interesting.",
"_js_name": "e_warrior_room_stuff",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["warrior_room_stuff"] = e_warrior_room_stuff;
allObjects.push(e_warrior_room_stuff);
objectsNameMap["warrior_room_stuff"] = e_warrior_room_stuff;
e_iron_safe = {
"elementtype": "object",
"name": "iron_safe",
"parent": e_warrior_room,
"type": "object",
"alias": "iron safe",
"visible": true,
"isopen": false,
"feature_container": true,
"keycount": 1,
"displayverbs": ["Look at", "Open", "Close"],
"useindividualverblist":false,
"usestandardverblist":true,
"look": function() { if (e_iron_safe.isopen) {
OutputText ("It is open.");
if (e_gold_dagger.parent==this) {
OutputText ("Strange... the base of the safe is loose inside the safe. It may have some sort of weight based mechanism.");
}
}
else {
OutputText ("It is a reinforced iron safe with a key lock. It is closed.");
} },
"picklock": function() { if (e_player.class=="thief") {
if (this.locked) {
OutputText ("It was not easy, but you managed to unlock the safe.");
set(this, "locked", false);
}
else {
OutputText ("It is already unlocked.");
}
}
else {
OutputText ("You do not know how to do this.");
} },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"key": e_null_key,
"_js_name": "e_iron_safe",
"_types": ["container_lockable", "container_open", "defaultobject"],
"locked": true,
"nokeymessage": "You do not have the key.",
"unlockmessage": "Unlocked.",
"lockmessage": "Locked.",
"canlockopen": false,
"autoopen": true,
"autounlock": true,
"openscript": function() { if (this.locked) {
if (this.autounlock && AllKeysAvailable(this)) {
runscriptattribute2 (this, "unlock");
if (!(this.isopen)) {
OpenObject (this);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
}
else {
OpenObject (this);
} },
"closescript": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
else {
CloseObject (this);
} },
"lock": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyLocked", this));
}
else if (this.isopen && !(this.canlockopen)) {
OutputText (overloadedFunctions.DynamicTemplate("CannotLockOpen", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.lockmessage);
set(this, "locked", true);
}
else {
OutputText (this.nokeymessage);
}
} },
"unlock": function() { if (!(this.locked)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyUnlocked", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.unlockmessage);
set(this, "locked", false);
if (this.autoopen && !(this.isopen)) {
TryOpenClose (true, this);
}
}
else {
OutputText (this.nokeymessage);
}
} },
"open": true,
"close": true,
"container": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["iron_safe"] = e_iron_safe;
allObjects.push(e_iron_safe);
objectsNameMap["iron_safe"] = e_iron_safe;
e_gold_dagger = {
"elementtype": "object",
"name": "gold_dagger",
"parent": e_iron_safe,
"type": "object",
"look": "It must belong to the Weapon's Master.",
"alias": "gold dagger",
"inventoryverbs": ["Look at", "Drop", "Give"],
"feature_usegive": true,
"givesingle": true,
"take": function() { get_gold_dagger (this); },
"useon": {"dagger": function() { OutputText ("You carefully replace the golden dagger with your own dagger.");
MoveObject (e_gold_dagger, e_player);
MoveObject (e_dagger, e_iron_safe); } },
"_js_name": "e_gold_dagger",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["gold_dagger"] = e_gold_dagger;
allObjects.push(e_gold_dagger);
objectsNameMap["gold_dagger"] = e_gold_dagger;
e_bag_master = {
"elementtype": "object",
"name": "bag_master",
"parent": e_iron_safe,
"type": "object",
"visible": false,
"alias": "bag",
"look": "It is not in the base of the safe, but glued behind the door.",
"take": function() { OutputText ("You recover your money.");
set(e_purse, "coins", e_purse.coins+e_bag_master.coins);
MakeObjectInvisible (e_bag_master); },
"_js_name": "e_bag_master",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bag_master"] = e_bag_master;
allObjects.push(e_bag_master);
objectsNameMap["bag_master"] = e_bag_master;
e_k33 = {
"elementtype": "object",
"name": "k33",
"parent": e_warrior_room,
"type": "exit",
"alias": "southwest",
"to": e_guild_warriors,
"_js_name": "e_k33",
"_types": ["southwestdirection", "defaultexit"],
"alt": ["sw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k33"] = e_k33;
allExits.push(e_k33);
objectsNameMap["k33"] = e_k33;
e_stable = {
"elementtype": "object",
"name": "stable",
"parent": e_The_hidden_city,
"type": "object",
"alias": "stable",
"description": "It is a clean and neat horse stable, filled with healthy looking horses.",
"firstenter": function() { OutputText ("Sheila looks very upset with something..."); },
"_js_name": "e_stable",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["stable"] = e_stable;
allObjects.push(e_stable);
objectsNameMap["stable"] = e_stable;
e_k34 = {
"elementtype": "object",
"name": "k34",
"parent": e_stable,
"type": "exit",
"alias": "north",
"to": e_main_street,
"_js_name": "e_k34",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k34"] = e_k34;
allExits.push(e_k34);
objectsNameMap["k34"] = e_k34;
e_stablemiss = {
"elementtype": "object",
"name": "stablemiss",
"parent": e_stable,
"type": "object",
"alias": "Sheila",
"look": "Sheila is a tall and strong girl with a curled blond hair and deep green eyes. You both know each other from childhood.",
"usedefaultprefix": false,
"suffix": ", the amazon",
"speak": function() { if (e_barrier.visible==true) {
psay ("Hey {player.playername}. Drat! The {command:ask Sheila about brigands:brigands} are ruining my {command:ask Sheila about business:business}! They blockaded the road and I can't rent out my {command:ask Sheila about horses:horses} anymore.");
}
else {
psay ("Thank you {player.playername}! Now you can take a horse any time you need it.");
} },
"askdefault": function() { askHelp(); },
"ask": {"brigands brigand": function() { psay ("With the war, brigands are not afraid of attacking travelers, even at day time. Their {command:ask Sheila about leader:leader} ordered that the King's road be blockaded, and is especially cruel with those still loyal to the King."); }, "leader": function() { psay ("The brigand leader is probably at the services of the dark mage."); }, "Vourtram": function() { psay ("We better not speak his name... the dark mage ruined my business."); }, "bucket": function() { if (e_bucket2.visible) {
psay ("I don't need this bucket anymore. You can have it.");
}
else {
psay ("The horse must eat all the hay in the bucket... but he kind of misses the {command:ask Sheila about carrots:carrots}</i>.");
} }, "carrot carrots": function() { psay ("<i>I used to gather carrots in the forest, but now it is too dangerous.</i>"); }, "horse horses": function() { if (e_barrier.visible) {
psay ("I can't rent out any horse with the brigand blockade. To make it worse, my best stallion refuses to eat the hay.");
}
else {
psay ("Thanks for finishing the blockade! You can take my best horse for free.");
} }, "business": function() { psay ("This war is bad for business."); } },
"_js_name": "e_stablemiss",
"_types": ["namedfemale", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["stablemiss"] = e_stablemiss;
allObjects.push(e_stablemiss);
objectsNameMap["stablemiss"] = e_stablemiss;
e_horse = {
"elementtype": "object",
"name": "horse",
"parent": e_stable,
"type": "object",
"alias": "horse",
"displayverbs": ["Look at", "Take", "Speak to"],
"speak": "You say <i>Good boy</i>. The horse looks at you and thinks... <i>What a loser...</i>",
"look": function() { OutputText ("It is a reliable model...");
if (e_bucket1.visible==false) {
OutputText ("He seems disgusted with this {object:bucket1:bucket} of hay.");
set(e_bucket1, "visible", true);
} },
"take": function() { if (e_barrier.visible==true) {
OutputText ("You would not be able to pass the brigands...");
}
else if (e_horse.parent==e_the_base) {
OutputText ("This fast stallion gallops the way to the hidden city in less than an hour.");
set(e_game, "turns", e_game.turns+25);
MoveObject (e_horse, e_stable);
MoveObject (e_player, e_stable);
}
else {
OutputText ("This fast stallion gallops the way to the castle in less than an hour.");
set(e_game, "turns", e_game.turns+25);
set(e_horse, "parent", e_the_base);
MoveObject (e_player, e_the_base);
} },
"give": {"carrots": function() { OutputText ("The horse loves carrots, but I need it to eat the hay."); } },
"_js_name": "e_horse",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["horse"] = e_horse;
allObjects.push(e_horse);
objectsNameMap["horse"] = e_horse;
e_bucket1 = {
"elementtype": "object",
"name": "bucket1",
"parent": e_stable,
"type": "object",
"take": false,
"takemsg": "Sheila stops you: <i>You can't take it. The horse must eat all the hay in the bucket first... it hasn't eaten for days.</i>.",
"visible": false,
"alias": "bucket",
"look": "It is full of hay.",
"_js_name": "e_bucket1",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bucket1"] = e_bucket1;
allObjects.push(e_bucket1);
objectsNameMap["bucket1"] = e_bucket1;
e_bucket2 = {
"elementtype": "object",
"name": "bucket2",
"parent": e_stable,
"type": "object",
"take": true,
"alias": "bucket",
"visible": false,
"fill": false,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"useCmds": ["fill", "pour"],
"look": function() { if (e_bucket2.fill) {
OutputText ("It is filled with cold water.");
}
else {
OutputText ("It is an empty bucket.");
} },
"selfuseon": {"rapids": function() { OutputText ("You fills the bucket with cold water.");
set(e_bucket2, "fill", true); }, "tied_brigand": function() { if (e_bucket2.fill) {
if (e_tied_brigand.sleep) {
set(e_tied_brigand, "sleep", false);
set(e_tied_brigand, "alias", "Elias");
OutputText ("You throw the water at the man and he wakes up. He says:<br/><i>'Thank you for freeing me, mighty adventurer. I'm {object:tied_brigand:Elias} the brigand... or perhaps the ex-brigand.'</i>");
set(e_bucket2, "fill", false);
}
else {
OutputText ("Why should I do that?");
}
}
else {
OutputText ("It is empty!");
} } },
"_js_name": "e_bucket2",
"_types": ["UseAltType", "defaultobject"],
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bucket2"] = e_bucket2;
allObjects.push(e_bucket2);
objectsNameMap["bucket2"] = e_bucket2;
e_throne = {
"elementtype": "object",
"name": "throne",
"parent": e_The_hidden_city,
"type": "object",
"alias": "Throne Room",
"usedefaultprefix": false,
"prefix": "the",
"description": "You are standing in an improvised throne room. Sitting in wooden throne is the King, performing his morning audiences to the public. Around the King you can see the few surviving counselors and royal guard. ",
"descprefix": "You are in",
"beforeenter": function() { var uplev = false;
if (e_player.level==3 && e_barrier.visible==false) {
set(e_player, "level", 4);
var uplev = true;
}
if (e_player.level<4) {
OutputText ("The King's herald blocks your way into the Throne Room: <i>Only nobles and subjects of great value or heroism can claim an audience with the King</i>.");
MoveObject (e_player, e_courtyard1);
}
else if (e_player.level>=4) {
var txmsg = "The King's herald announces your entrance: <i><br/>Mr. "+e_player.playername;
if (e_player.class=="thief") {
var txmsg = txmsg+"  the bounty hunter, the restorer of stolen artwork, the city liberator, proficient in the art of cunning, deception, and trickery;";
}
else if (e_player.class=="warrior") {
var txmsg = txmsg+" the wolf slayer, the bounty hunter, the winner of the spring warrior's contest, and the city liberator;";
}
else if (e_player.class=="mage") {
var txmsg = txmsg+" the werewolf banisher, the spy hunter, the city liberator, the wise, and proficient in the occult arts;";
}
if (uplev) {
OutputText (txmsg+"<BR><span style=\"color:blue\">"+e_player.playername+" is now declared a Hero of Gwalinad by our majesty</span>, King Alden IV, conqueror of Therandra, slayer of the giant snake, and master of Gwalinad.</i><br/>");
playsound ("fanfare10.wav", false, false);
clearPast(100);  //JS
}
else {
OutputText (txmsg+" begs an audience with your majesty, King Alden IV, conqueror of Therandra, slayer of the giant snake, master of Gwalinad.</i><br/>");
}
} },
"_js_name": "e_throne",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["throne"] = e_throne;
allObjects.push(e_throne);
objectsNameMap["throne"] = e_throne;
e_k35 = {
"elementtype": "object",
"name": "k35",
"parent": e_throne,
"type": "exit",
"alias": "south",
"to": e_courtyard1,
"_js_name": "e_k35",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k35"] = e_k35;
allExits.push(e_k35);
objectsNameMap["k35"] = e_k35;
e_king = {
"elementtype": "object",
"name": "king",
"parent": e_throne,
"type": "object",
"alias": "King Alden IV",
"usedefaultprefix": false,
"prefix": "the",
"look": "An old King with no hope and a sad look.",
"speak": "<i>My dear hero! How the king can help you against {command:ask king about Vourtram:Vourtram}, the evil sorcerer?</i>",
"suffix": ", sitting in his improvised throne",
"ask": {"Vourtram": function() { psay ("Vourtram was an apprentice of the former archmage, the master of Dashiel. He sold his {ask:king:soul} to the devil, raising an {ask:king:army} of darkness to conquer the kingdom."); }, "soul": function() { psay ("Vourtram's body has no soul. Because of this, he is immortal. Many tried to harm him, but no one ever was able to even scratch him."); }, "army": function() { psay ("Vourtram's army is formed by demons, traitors, and mercenaries. That's all we know for now."); } },
"_js_name": "e_king",
"_types": ["namedmale", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["king"] = e_king;
allObjects.push(e_king);
objectsNameMap["king"] = e_king;
e_king_minstrel = {
"elementtype": "object",
"name": "king_minstrel",
"parent": e_throne,
"type": "object",
"alias": "Amicia",
"look": "Amicia is grizzled middle aged minstrel, with an oblonged face and an easy smile.",
"usedefaultprefix": false,
"suffix": "the minstrel",
"alt": ["minstrel"],
"speak": "<i>Hi! I heard you are going to the {command:ask Amicia about castle:castle} of {command:ask Amicia about Vourtram:Vourtram}.</i>",
"feature_usegive": true,
"ask": {"castle": function() { psay ("The castle has changed a lot, but I hope they haven\u00b4t messed with the {command:ask Amicia about music hall:music hall}."); }, "music hall": function() { psay ("The music hall has the best {command:ask Amicia about instruments:instruments} of the kingdom."); }, "instruments": function() { psay ("There are the psaltery, the lute and the amazing {command:ask Amicia about harpsichord:harpsichord}."); }, "harpsichord": function() { psay ("I\u00b4d love to play the Pavane again on that harpsichord. It has an unbelievable sound.");
set(e_king_minstrel, "pavane", true); }, "Vourtram": function() { psay ("That monster knows nothing about music."); } },
"give": {"lute": function() { OutputText ("<i>What a beautiful instrument. Thanks {player.playername}.</i>");
MoveObject (e_lute, e_void); } },
"_js_name": "e_king_minstrel",
"_types": ["female", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["king_minstrel"] = e_king_minstrel;
allObjects.push(e_king_minstrel);
objectsNameMap["king_minstrel"] = e_king_minstrel;
e_Maze_Area = {
"elementtype": "object",
"name": "Maze_Area",
"type": "object",
"_js_name": "e_Maze_Area",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Maze_Area"] = e_Maze_Area;
allObjects.push(e_Maze_Area);
objectsNameMap["Maze_Area"] = e_Maze_Area;
e_Maze = {
"elementtype": "object",
"name": "Maze",
"parent": e_Maze_Area,
"type": "object",
"description": "The maze is a two mile wide series of confusing paths in the mountain connecting the valley of the hidden city to the old kingdom, now under the control of the evil wizard. There is small path to the northen hills, and the maze continues east towards the eastern road.",
"usedefaultprefix": false,
"alias": "maze to the hidden city",
"prefix": "the",
"enter": function() { if (e_player.level>0) {
UnlockExit (e_mazeToRoad);
}
if (Contains (e_Maze,e_outlaw_thug)) {
OutputText ("<b>The thug menaces you with his dagger</b>");
OutputText ("The Kobold arrives to help you. He utters some magical words and the outlaw is suddenly grounded and cannot move.<br/>A few moments later, a guard arrives and you receive a reward of 10 coins for his capture.<br/>The Kobold waves a goodbye and disappears in the shadows.");
MoveObject (e_outlaw_thug, e_void);
MoveObject (e_kobold, e_void);
set(e_player, "level", 2);
set(e_purse, "coins", e_purse.coins+10);
} },
"_js_name": "e_Maze",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Maze"] = e_Maze;
allObjects.push(e_Maze);
objectsNameMap["Maze"] = e_Maze;
e_k36 = {
"elementtype": "object",
"name": "k36",
"parent": e_Maze,
"type": "exit",
"alias": "west",
"to": e_city_exit,
"_js_name": "e_k36",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k36"] = e_k36;
allExits.push(e_k36);
objectsNameMap["k36"] = e_k36;
e_red_rock = {
"elementtype": "object",
"name": "red_rock",
"parent": e_Maze,
"type": "object",
"take": true,
"alias": "red rock",
"look": "It is a small red rock. It makes a loud noise when bashed to another rock.",
"inventoryverbs": ["Look at", "Use", "Drop", "Throw"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"useindividualverblist": false,
"usestandardverblist": true,
"throw": function() { if (e_red_rock.parent==e_player) {
OutputText ("You throw the rock and it makes a funny noise. You retrieve the rock, just in case it may be of some use in the future.");
}
else {
OutputText ("You don't have it.");
} },
"selfuseon": {"sewer_entrance": function() { OutputText ("After a few seconds the rock hits the bottom... it is a long way down.");
MoveObject (e_red_rock, e_sewer); } },
"_js_name": "e_red_rock",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["red_rock"] = e_red_rock;
allObjects.push(e_red_rock);
objectsNameMap["red_rock"] = e_red_rock;
e_k37 = {
"elementtype": "object",
"name": "k37",
"parent": e_Maze,
"type": "exit",
"alias": "north",
"_js_name": "e_k37",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k37"] = e_k37;
objectReferences.push(["e_k37", "to", "e_Forested_Hill_1"]);
allExits.push(e_k37);
objectsNameMap["k37"] = e_k37;
e_mazeToRoad = {
"elementtype": "object",
"name": "mazeToRoad",
"parent": e_Maze,
"type": "exit",
"alias": "east",
"locked": true,
"lockmessage": "You don't feel like you are ready to leave the protection of the maze yet...",
"_js_name": "e_mazeToRoad",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["mazeToRoad"] = e_mazeToRoad;
objectReferences.push(["e_mazeToRoad", "to", "e_road1"]);
allExits.push(e_mazeToRoad);
objectsNameMap["mazeToRoad"] = e_mazeToRoad;
e_Forested_Hill_1 = {
"elementtype": "object",
"name": "Forested Hill 1",
"parent": e_Maze_Area,
"type": "object",
"alias": "forested hill",
"description": "The terrain here is rocky and the path is covered with a thin and soft snow. You can climb the hills further north, or go east towards a glade.",
"onexit": function() { wolfFollow (this); },
"enter": function() { checkWolf (this); },
"_js_name": "e_Forested_Hill_1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Forested Hill 1"] = e_Forested_Hill_1;
allObjects.push(e_Forested_Hill_1);
objectsNameMap["Forested Hill 1"] = e_Forested_Hill_1;
e_k38 = {
"elementtype": "object",
"name": "k38",
"parent": e_Forested_Hill_1,
"type": "exit",
"alias": "south",
"to": e_Maze,
"_js_name": "e_k38",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k38"] = e_k38;
allExits.push(e_k38);
objectsNameMap["k38"] = e_k38;
e_k39 = {
"elementtype": "object",
"name": "k39",
"parent": e_Forested_Hill_1,
"type": "exit",
"alias": "north",
"_js_name": "e_k39",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k39"] = e_k39;
objectReferences.push(["e_k39", "to", "e_Forested_Hill_2"]);
allExits.push(e_k39);
objectsNameMap["k39"] = e_k39;
e_k40 = {
"elementtype": "object",
"name": "k40",
"parent": e_Forested_Hill_1,
"type": "exit",
"alias": "east",
"_js_name": "e_k40",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k40"] = e_k40;
objectReferences.push(["e_k40", "to", "e_WoodCabin"]);
allExits.push(e_k40);
objectsNameMap["k40"] = e_k40;
e_tall_tree = {
"elementtype": "object",
"name": "tall_tree",
"parent": e_Forested_Hill_1,
"type": "object",
"hidechildren": true,
"isopen": true,
"alias": "tall tree",
"open": false,
"close": false,
"transparent": true,
"look": "A tall and slim tree",
"listchildren": true,
"listchildrenprefix": "in the top of the tree you see",
"displayverbs": ["Look at"],
"_js_name": "e_tall_tree",
"_types": ["surface", "defaultobject"],
"contentsprefix": "on which there is",
"container": true,
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"scenery": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["tall_tree"] = e_tall_tree;
allObjects.push(e_tall_tree);
objectsNameMap["tall_tree"] = e_tall_tree;
e_letter = {
"elementtype": "object",
"name": "letter",
"parent": e_tall_tree,
"type": "object",
"visible": false,
"alias": "letter",
"usedefaultprefix": false,
"suffix": "",
"takemsg": "It is too high. I can't reach it.",
"take": false,
"drop": false,
"dropmsg": "You better not drop this letter now.",
"prefix": "a",
"inventoryverbs": ["Look at", "Drop", "Give", "Read"],
"feature_usegive": true,
"givesingle": true,
"usestandardverblist": true,
"read": function() { if (e_letter.parent == e_player) {
OutputText ("It contains detailed information about the king's troops. It is a letter from the spy to the enemy. <br/>Perhaps Dashiel can discover the author of the letter.");
}
else {
OutputText ("You don't have it.");
} },
"_js_name": "e_letter",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"use": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["letter"] = e_letter;
allObjects.push(e_letter);
objectsNameMap["letter"] = e_letter;
e_snow = {
"elementtype": "object",
"name": "snow",
"parent": e_Forested_Hill_1,
"type": "object",
"alt": ["ground", "path", "footprints"],
"scenery": true,
"look": "You can see some human footprints, and also a few large wolf footprints leading north. Too large to normal wolfs, I dare say.  ",
"_js_name": "e_snow",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["snow"] = e_snow;
allObjects.push(e_snow);
objectsNameMap["snow"] = e_snow;
e_Forested_Hill_2 = {
"elementtype": "object",
"name": "Forested Hill 2",
"parent": e_Maze_Area,
"type": "object",
"alias": "forested hill",
"description": "The terrain here is rocky and the path is covered with a thin and soft snow. You can go back south or follow a small trail to the west. All other directions are too difficult to walk without equipment.",
"onexit": function() { wolfFollow (this); },
"enter": function() { checkWolf (this); },
"_js_name": "e_Forested_Hill_2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Forested Hill 2"] = e_Forested_Hill_2;
allObjects.push(e_Forested_Hill_2);
objectsNameMap["Forested Hill 2"] = e_Forested_Hill_2;
e_k41 = {
"elementtype": "object",
"name": "k41",
"parent": e_Forested_Hill_2,
"type": "exit",
"alias": "south",
"to": e_Forested_Hill_1,
"_js_name": "e_k41",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k41"] = e_k41;
allExits.push(e_k41);
objectsNameMap["k41"] = e_k41;
e_k42 = {
"elementtype": "object",
"name": "k42",
"parent": e_Forested_Hill_2,
"type": "exit",
"alias": "west",
"_js_name": "e_k42",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k42"] = e_k42;
objectReferences.push(["e_k42", "to", "e_wolf_den"]);
allExits.push(e_k42);
objectsNameMap["k42"] = e_k42;
e_snow1 = {
"elementtype": "object",
"name": "snow1",
"parent": e_Forested_Hill_2,
"type": "object",
"alt": ["ground", "path", "footprints", "trail"],
"scenery": true,
"look": "You can see large wolf footprints leading west. They seem fresh.  ",
"_js_name": "e_snow1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["snow1"] = e_snow1;
allObjects.push(e_snow1);
objectsNameMap["snow1"] = e_snow1;
e_wolf_den = {
"elementtype": "object",
"name": "wolf_den",
"parent": e_Maze_Area,
"type": "object",
"usedefaultprefix": false,
"alias": "front of a huge wolf den",
"description": "Tall trees block the sun light here. This dark corner of the forest is surely scaring you. ",
"onexit": function() { wolfFollow (this);
DisableTurnScript (e_wolfTurn); },
"enter": function() { checkWolf (this);
if (!(GetBoolean(e_player, "wolf"))) {
if (e_player.class=="warrior" && e_smallsword.parent==e_player) {
MakeObjectVisible (e_RedGirl);
}
} },
"_js_name": "e_wolf_den",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["wolf_den"] = e_wolf_den;
allObjects.push(e_wolf_den);
objectsNameMap["wolf_den"] = e_wolf_den;
e_k43 = {
"elementtype": "object",
"name": "k43",
"parent": e_wolf_den,
"type": "exit",
"alias": "east",
"to": e_Forested_Hill_2,
"_js_name": "e_k43",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k43"] = e_k43;
allExits.push(e_k43);
objectsNameMap["k43"] = e_k43;
e_Wolf = {
"elementtype": "object",
"name": "Wolf",
"parent": e_wolf_den,
"type": "object",
"usedefaultprefix": false,
"prefix": "the",
"alias": "evil wolf",
"suffix": "",
"turns": 0,
"calm": 0,
"useindividualverblist": false,
"usestandardverblist": true,
"displayverbs": ["Look at"],
"look": function() { if (e_Wolf.calm>0) {
OutputText ("It is a huge dark wolf of unnatural proportions. It seems he is under the calm spell... ");
}
else {
OutputText ("It is a huge dark wolf of unnatural proportions. It seems it will attack at any moment.");
} },
"_js_name": "e_Wolf",
"_types": ["male", "defaultobject"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Wolf"] = e_Wolf;
allObjects.push(e_Wolf);
objectsNameMap["Wolf"] = e_Wolf;
e_wolf_lair = {
"elementtype": "object",
"name": "wolf_lair",
"parent": e_wolf_den,
"type": "object",
"close": false,
"open": false,
"hidechildren": true,
"usedefaultprefix": false,
"prefix": "",
"alias": "a lair",
"take": false,
"alt": ["den"],
"inventoryverbs": ["Look at", "Drop", "Close"],
"displayverbs": ["Look at"],
"look": function() { if (e_wolf_fur.visible) {
OutputText ("It is a nasty hole in the ground");
}
else {
OutputText ("It is a nasty hole in the ground. You can see wolf fur all around the place.");
MakeObjectVisible (e_wolf_fur);
} },
"_js_name": "e_wolf_lair",
"_types": ["container_open", "defaultobject"],
"isopen": true,
"container": true,
"visible": true,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["wolf_lair"] = e_wolf_lair;
allObjects.push(e_wolf_lair);
objectsNameMap["wolf_lair"] = e_wolf_lair;
e_wolf_fur = {
"elementtype": "object",
"name": "wolf_fur",
"parent": e_wolf_lair,
"type": "object",
"alias": "wolf's fur",
"visible": false,
"inventoryverbs": ["Look at", "Drop", "Give"],
"feature_usegive": true,
"givesingle": true,
"look": "It is a handful of animal hair.",
"usedefaultprefix": false,
"prefix": "a bunch of",
"alt": ["wolf fur"],
"take": function() { if (e_Wolf.parent==e_player.parent) {
OutputText ("There is no way I could get into the wolf's lair with this beast here.");
}
else {
AddToInventory (e_wolf_fur);
OutputText ("You pick it up.");
} },
"_js_name": "e_wolf_fur",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"use": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["wolf_fur"] = e_wolf_fur;
allObjects.push(e_wolf_fur);
objectsNameMap["wolf_fur"] = e_wolf_fur;
e_Hector = {
"elementtype": "object",
"name": "Hector",
"parent": e_wolf_den,
"type": "object",
"alias": "Hector",
"visible": false,
"look": "He still looks too hairy for a person ... ",
"usedefaultprefix": false,
"suffix": " the wizard",
"speak": "<i>Thank you! I think I will never eat meat again...</i>",
"_js_name": "e_Hector",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Hector"] = e_Hector;
allObjects.push(e_Hector);
objectsNameMap["Hector"] = e_Hector;
e_reveal_spell = {
"elementtype": "object",
"name": "reveal_spell",
"parent": e_Hector,
"type": "object",
"alias": "reveal spell",
"take": true,
"look": "The Reveal Spell detects magical spells working in the area or subject. It also reveals invisible objects.",
"listalias": "-- reveal spell",
"inventoryverbs": ["Look at", "Cast"],
"castonobject": false,
"_js_name": "e_reveal_spell",
"_types": ["Spell", "defaultobject"],
"castspell": true,
"drop": function() { OutputText ("You don't want to rip your book apart."); },
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"read_away": false,
"read": function() { doRead (this); },
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["reveal_spell"] = e_reveal_spell;
allObjects.push(e_reveal_spell);
objectsNameMap["reveal_spell"] = e_reveal_spell;
e_WoodCabin = {
"elementtype": "object",
"name": "WoodCabin",
"parent": e_Maze_Area,
"type": "object",
"alias": "front of a wooden cabin",
"description": "You can see an old lady sleeping inside the house. This small glade seems a pretty isolated, although beautiful, place to live.",
"descprefix": "You are in",
"usedefaultprefix": false,
"enter": function() { SetObjectFlagOn (e_player, "woodcabin");
checkWolf (this);
if (e_RedGirl.parent == e_Wolf.parent) {
OutputText ("When the werewolf sees the pure girl he <b>transforms back to the human form</b>. The now human werewolf menaces the girl! <br/>");
OutputText ("You attack him with all your strength. As a human, the beast is no match for you. <b>Finally you killed the monster</b>.");
MoveObject (e_Wolf, e_void);
DisableTurnScript (e_wolfTurn);
MakeObjectVisible (e_werewolf_corpse);
set(e_player, "fightexp", e_player.fightexp+5);
}
if (e_player.class=="mage" && e_RedGirl.parent==e_WoodCabin) {
OutputText ("You smell the sweet aroma of recently baked of apple pies...");
} },
"onexit": function() { wolfFollow (this); },
"_js_name": "e_WoodCabin",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["WoodCabin"] = e_WoodCabin;
allObjects.push(e_WoodCabin);
objectsNameMap["WoodCabin"] = e_WoodCabin;
e_oldlady = {
"elementtype": "object",
"name": "oldlady",
"parent": e_WoodCabin,
"type": "object",
"alias": "old lady",
"scenery": true,
"look": "She is asleep, better not disturb her...",
"displayverbs": ["Look at"],
"_js_name": "e_oldlady",
"_types": ["female", "defaultobject"],
"gender": "she",
"article": "her",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["oldlady"] = e_oldlady;
allObjects.push(e_oldlady);
objectsNameMap["oldlady"] = e_oldlady;
e_k44 = {
"elementtype": "object",
"name": "k44",
"parent": e_WoodCabin,
"type": "exit",
"alias": "west",
"to": e_Forested_Hill_1,
"_js_name": "e_k44",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k44"] = e_k44;
allExits.push(e_k44);
objectsNameMap["k44"] = e_k44;
e_werewolf_corpse = {
"elementtype": "object",
"name": "werewolf corpse",
"parent": e_WoodCabin,
"type": "object",
"take": true,
"look": "It turned back to wolf after death.",
"visible": false,
"inventoryverbs": ["Look at", "Drop", "Give"],
"feature_usegive": true,
"givesingle": true,
"_js_name": "e_werewolf_corpse",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"use": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["werewolf corpse"] = e_werewolf_corpse;
allObjects.push(e_werewolf_corpse);
objectsNameMap["werewolf corpse"] = e_werewolf_corpse;
e_sc_cabin = {
"elementtype": "object",
"name": "sc_cabin",
"parent": e_WoodCabin,
"type": "object",
"scenery": true,
"look": "It is a humble wooden cabin in the woods.",
"alt": ["cabin", "house"],
"_js_name": "e_sc_cabin",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sc_cabin"] = e_sc_cabin;
allObjects.push(e_sc_cabin);
objectsNameMap["sc_cabin"] = e_sc_cabin;
e_road1 = {
"elementtype": "object",
"name": "road1",
"parent": e_Maze_Area,
"type": "object",
"alias": "eastern road",
"description": "The road stretches along the west-east axis of the kingdom. To the north there are impassible mountains and to the south a dense forest. ",
"usedefaultprefix": false,
"prefix": "the",
"public_level": 5,
"_js_name": "e_road1",
"_types": ["PublicRoom", "defaultobject"],
"public_greeting": "An unknown passerby says <i>Hi {player.playername}! Good luck with your quest!</i>",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["road1"] = e_road1;
allObjects.push(e_road1);
objectsNameMap["road1"] = e_road1;
e_k45 = {
"elementtype": "object",
"name": "k45",
"parent": e_road1,
"type": "exit",
"alias": "west",
"to": e_Maze,
"_js_name": "e_k45",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k45"] = e_k45;
allExits.push(e_k45);
objectsNameMap["k45"] = e_k45;
e_k46 = {
"elementtype": "object",
"name": "k46",
"parent": e_road1,
"type": "exit",
"alias": "south",
"_js_name": "e_k46",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k46"] = e_k46;
objectReferences.push(["e_k46", "to", "e_forest1"]);
allExits.push(e_k46);
objectsNameMap["k46"] = e_k46;
e_road_exit2 = {
"elementtype": "object",
"name": "road_exit2",
"parent": e_road1,
"type": "exit",
"alias": "east",
"locked": true,
"lockmessage": "The road is blocked by brigands, armed with long bows... you better not get close.",
"_js_name": "e_road_exit2",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["road_exit2"] = e_road_exit2;
objectReferences.push(["e_road_exit2", "to", "e_road2"]);
allExits.push(e_road_exit2);
objectsNameMap["road_exit2"] = e_road_exit2;
e_barrier = {
"elementtype": "object",
"name": "barrier",
"parent": e_road1,
"type": "object",
"alias": "small camp and a barrier",
"look": "It must be the brigand blockage. They rip off anyone that gets close.",
"usedefaultprefix": false,
"prefix": "a",
"suffix": "just a few miles to the east",
"displayverbs": ["Look at"],
"_js_name": "e_barrier",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["barrier"] = e_barrier;
allObjects.push(e_barrier);
objectsNameMap["barrier"] = e_barrier;
e_road2 = {
"elementtype": "object",
"name": "road2",
"parent": e_Maze_Area,
"type": "object",
"alias": "eastern road",
"usedefaultprefix": false,
"prefix": "the",
"_js_name": "e_road2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["road2"] = e_road2;
allObjects.push(e_road2);
objectsNameMap["road2"] = e_road2;
e_k47 = {
"elementtype": "object",
"name": "k47",
"parent": e_road2,
"type": "exit",
"alias": "west",
"to": e_road1,
"_js_name": "e_k47",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k47"] = e_k47;
allExits.push(e_k47);
objectsNameMap["k47"] = e_k47;
e_dark_forest = {
"elementtype": "object",
"name": "dark_forest",
"type": "object",
"_js_name": "e_dark_forest",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dark_forest"] = e_dark_forest;
allObjects.push(e_dark_forest);
objectsNameMap["dark_forest"] = e_dark_forest;
e_forest1 = {
"elementtype": "object",
"name": "forest1",
"parent": e_dark_forest,
"type": "object",
"alias": "dark forest",
"turns": 0,
"description": "The path into the dense forest continues to the south, and you can see some light coming from the east.",
"beforeenter": function() { set(this, "turns", 0); },
"_js_name": "e_forest1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["forest1"] = e_forest1;
allObjects.push(e_forest1);
objectsNameMap["forest1"] = e_forest1;
e_k48 = {
"elementtype": "object",
"name": "k48",
"parent": e_forest1,
"type": "exit",
"alias": "north",
"to": e_road1,
"_js_name": "e_k48",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k48"] = e_k48;
allExits.push(e_k48);
objectsNameMap["k48"] = e_k48;
e_forest1_to_forest_house = {
"elementtype": "object",
"name": "forest1_to_forest_house",
"parent": e_forest1,
"type": "exit",
"alias": "east",
"locked": true,
"lockmessage": "The orc blocks your way.",
"_js_name": "e_forest1_to_forest_house",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["forest1_to_forest_house"] = e_forest1_to_forest_house;
objectReferences.push(["e_forest1_to_forest_house", "to", "e_forest_house"]);
allExits.push(e_forest1_to_forest_house);
objectsNameMap["forest1_to_forest_house"] = e_forest1_to_forest_house;
e_orc1 = {
"elementtype": "object",
"name": "orc1",
"parent": e_forest1,
"type": "object",
"alias": "orc",
"usedefaultprefix": false,
"prefix": "a filthy green",
"suffix": ", ready to attack",
"ht": 12,
"exp": 3,
"armour": 1,
"aggressive": true,
"stab_level": 2,
"affect_calm": true,
"coins": 1,
"rage": false,
"speak": "<i>GRRRRRRRRRR...</i>",
"_js_name": "e_orc1",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"danger": "death",
"block_flee": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["orc1"] = e_orc1;
allObjects.push(e_orc1);
objectsNameMap["orc1"] = e_orc1;
e_orcAttack = {
"elementtype": "object",
"name": "orcAttack",
"parent": e_forest1,
"type": "turnscript",
"enabled": false,
"script": function() { var room = this.parent;
set(room, "turns", room.turns+1);
if (e_orc1.parent==room && room.turns>=2) {
attack (room, e_orc1);
}
else if (e_orc1.parent==room && e_player.class=="thief") {
OutputText ("<i>You managed to hide yourself until now... </i>");
} },
"_js_name": "e_orcAttack",
"_types": []
};
elementsNameMap["orcAttack"] = e_orcAttack;
allTurnScripts.push(e_orcAttack);
objectsNameMap["orcAttack"] = e_orcAttack;
e_forest1_to_forest_current = {
"elementtype": "object",
"name": "forest1_to_forest_current",
"parent": e_forest1,
"type": "exit",
"alias": "south",
"locked": true,
"lockmessage": "The orc blocks your way.",
"_js_name": "e_forest1_to_forest_current",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["forest1_to_forest_current"] = e_forest1_to_forest_current;
objectReferences.push(["e_forest1_to_forest_current", "to", "e_forest_current"]);
allExits.push(e_forest1_to_forest_current);
objectsNameMap["forest1_to_forest_current"] = e_forest1_to_forest_current;
e_forest2 = {
"elementtype": "object",
"name": "forest2",
"parent": e_dark_forest,
"type": "object",
"alias": "dark forest",
"description": "The forest gets really dense here, and it is not possible to continue further.",
"enter": function() { if (e_tied_brigand.tied) {
psay ("Please help me! I'm tied up here.");
} },
"_js_name": "e_forest2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["forest2"] = e_forest2;
allObjects.push(e_forest2);
objectsNameMap["forest2"] = e_forest2;
e_tree_forest = {
"elementtype": "object",
"name": "tree_forest",
"parent": e_forest2,
"type": "object",
"look": "It is a somewhat high and slim dead tree.",
"alias": "dead tree",
"displayverbs": ["Look at"],
"useindividualverblist":false,
"usestandardverblist":true,
"climb": function() { if (e_player.class=="thief") {
if (e_tied_brigand.tied) {
OutputText ("You skillfully climb the tree, and cut the rope that ties the man.");
freeTiedMan();
}
else {
OutputText ("You skillfully climb the tree. Then you climbed down. You just lost time.");
}
}
else {
OutputText ("You are too clumsy and the tree is too fragile to climb.");
} },
"_js_name": "e_tree_forest",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["tree_forest"] = e_tree_forest;
allObjects.push(e_tree_forest);
objectsNameMap["tree_forest"] = e_tree_forest;
e_tied_brigand = {
"elementtype": "object",
"name": "tied_brigand",
"parent": e_forest2,
"type": "object",
"alias": "tied man",
"tied": true,
"sleep": false,
"usedefaultprefix": true,
"look": function() { if (this.tied) {
OutputText ("He is tied upside down, a few meters from the ground.");
}
else if (this.sleep) {
OutputText ("He is unconscious due to the fall, but you can't see any blood or severe injure.");
}
else {
OutputText ("He is a brigand that refused to follow Vourtram.");
} },
"speak": function() { if (this.tied) {
OutputText ("<i>The brigands tied me up here... please help me!</i>");
}
else if (this.sleep) {
OutputText ("He can't talk!");
}
else {
psay ("We {command:ask elias about brigand:brigands} were loyal to the king, you know. <br/>But something changed a few weeks ago. Our {command:ask elias about leader:leader} started acting strangely, supporting Vourtram's evil cause. I was already wary, but one day I saw him talking to one of those masked minions of Vourtram, and then I was sure that he is an impostor. Vourtram must have replaced our leader with a double. Unfortunately they caught me, and tied me to this tree to die as a traitor.<br/>If you want to get hid of the brigands, I suggest you find the phoney leader in the brigand's {command:ask elias about hideout:hideout}.");
} },
"ask": {"hideout hide": function() { psay ("The hideout is in the opposite margin of the river. Can't find it? Of course, they camouflaged the path with trees. Just go south and you will discover the path by the trees.");
if (e_sec_path.visible==false) {
MakeExitVisible (e_forest_current2_to_hide_entrance);
if (e_player.class=="warrior" && e_brigand1.parent == e_forest_current2) {
set(e_forest_current2_to_hide_entrance, "locked", true);
}
MakeObjectVisible (e_sec_path);
} }, "leader": function() { psay ("I don't know what happened with the true leader. But the current leader is a double for sure."); }, "brigand brigands": function() { psay ("We are loyal to the king... well, not all of us. But none of us fancy the evil wizard."); } },
"_js_name": "e_tied_brigand",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["tied_brigand"] = e_tied_brigand;
allObjects.push(e_tied_brigand);
objectsNameMap["tied_brigand"] = e_tied_brigand;
e_rope_tie = {
"elementtype": "object",
"name": "rope_tie",
"parent": e_forest2,
"type": "object",
"alias": "rope tying a man",
"cut": "You can't reach it",
"displayverbs": ["Look at"],
"_js_name": "e_rope_tie",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["rope_tie"] = e_rope_tie;
allObjects.push(e_rope_tie);
objectsNameMap["rope_tie"] = e_rope_tie;
e_rope = {
"elementtype": "object",
"name": "rope",
"parent": e_forest2,
"type": "object",
"alias": "long rope",
"take": true,
"visible": false,
"look": "A ten yard long naval rope.",
"feature_usegive": true,
"use": true,
"givesingle": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"useCmds": ["tie"],
"selfuseon": {"tree_river": function() { tie_rope (e_tree_river); } },
"_js_name": "e_rope",
"_types": ["UseAltType", "defaultobject"],
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["rope"] = e_rope;
allObjects.push(e_rope);
objectsNameMap["rope"] = e_rope;
e_k49 = {
"elementtype": "object",
"name": "k49",
"parent": e_forest2,
"type": "exit",
"alias": "east",
"_js_name": "e_k49",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k49"] = e_k49;
objectReferences.push(["e_k49", "to", "e_forest_current"]);
allExits.push(e_k49);
objectsNameMap["k49"] = e_k49;
e_forest_house = {
"elementtype": "object",
"name": "forest_house",
"parent": e_dark_forest,
"type": "object",
"alias": "front of an old tower",
"description": "The tower has {if in_forest_tower.locked:no doors nor windows, and you can't figure out how to get in.}{if not in_forest_tower.locked:an open magic door.}",
"usedefaultprefix": false,
"_js_name": "e_forest_house",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["forest_house"] = e_forest_house;
allObjects.push(e_forest_house);
objectsNameMap["forest_house"] = e_forest_house;
e_sc_tower = {
"elementtype": "object",
"name": "sc_tower",
"parent": e_forest_house,
"type": "object",
"scenery": true,
"alias": "tower",
"look": "The tower looks old and impregnable.",
"displayverbs": ["Look at"],
"_js_name": "e_sc_tower",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sc_tower"] = e_sc_tower;
allObjects.push(e_sc_tower);
objectsNameMap["sc_tower"] = e_sc_tower;
e_k50 = {
"elementtype": "object",
"name": "k50",
"parent": e_forest_house,
"type": "exit",
"alias": "west",
"to": e_forest1,
"_js_name": "e_k50",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k50"] = e_k50;
allExits.push(e_k50);
objectsNameMap["k50"] = e_k50;
e_lever1 = {
"elementtype": "object",
"name": "lever1",
"parent": e_forest_house,
"type": "object",
"visible": false,
"alias": "lever in the wall",
"look": "A magically concealed lever, but too high to reach.",
"displayverbs": ["Look at", "Push"],
"push": "It is too high to reach.",
"_js_name": "e_lever1",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lever1"] = e_lever1;
allObjects.push(e_lever1);
objectsNameMap["lever1"] = e_lever1;
e_in_forest_tower = {
"elementtype": "object",
"name": "in_forest_tower",
"parent": e_forest_house,
"type": "exit",
"alias": "in",
"locked": true,
"lockmessage": "You can't find a way in!",
"_js_name": "e_in_forest_tower",
"_types": ["indirection", "defaultexit"],
"alt": [""],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["in_forest_tower"] = e_in_forest_tower;
objectReferences.push(["e_in_forest_tower", "to", "e_forest_tower"]);
allExits.push(e_in_forest_tower);
objectsNameMap["in_forest_tower"] = e_in_forest_tower;
e_forest_tower = {
"elementtype": "object",
"name": "forest_tower",
"parent": e_dark_forest,
"type": "object",
"alias": "inside the tower",
"description": "The room is full of alchemical tools and ingredients. It has no windows, and all light comes from magical sources in the roof.",
"usedefaultprefix": false,
"descprefix": "You are",
"_js_name": "e_forest_tower",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["forest_tower"] = e_forest_tower;
allObjects.push(e_forest_tower);
objectsNameMap["forest_tower"] = e_forest_tower;
e_alchemist = {
"elementtype": "object",
"name": "alchemist",
"parent": e_forest_tower,
"type": "object",
"alias": "Pierre Flamel",
"usedefaultprefix": false,
"suffix": ", the alchemist",
"look": "Flamel is an old man wearing a pair of huge spectacles and a white smock.",
"speak": function() { psay ("{once:I'm Pierre Flamel, the alchemist.}{notfirst:Hello again {player.playername}.} I can help you with magical {command:ask Flamel about potions:potions}, {command:ask Flamel about monsters:monsters}, and {command:ask Flamel about music:music}.");
if (e_leader.parent==e_forest_tower) {
psay ("I've found a  {command:ask Flamel about man:man} in the forest, with no memory.");
} },
"ask": {"man": function() { psay ("I've found him in the forest, and brought him to my house. He has {ask:flamel:amnesia}."); }, "amnesia": function() { psay ("Amnesia may take weeks to be cured. Familiar people and personal objects may help the patient to recover his memory, but he was naked when I found him. With all those brigands, I could not search around for his friends or belongings."); }, "potions": function() { psay ("I make and sell potions, and I buy ingredients and magical items."); }, "monsters": function() { psay ("I study several monsters of this kingdom, such as {ask:flamel:orcs}, {ask:flamel:trolls}, {ask:flamel:trows}, {ask:flamel:dragons}, and the fearsome {ask:flamel:Medusa}."); }, "trows trow": function() { psay ("A trow is a powerful and mischievous troll like creature that inhabits dark caves and pits. There are accounts about an old and powerful trow in this region. Trows love {ask:flamel:music}, and apart from that their only interest is killing and eating anything they can lay hands on."); }, "trolls troll": function() { psay ("They are dumb but super strong creatures that can only be defeated by fire or the sun light. They eat anything, including stones."); }, "orcs orc": function() { psay ("They are a pest, evil and with a strong desire of harming anyone. They are not inteligent alone, but can be a real threat when organized by an evil power."); }, "dragon dragons": function() { psay ("Dragons are the most powerful creatures of nature. Even a baby dragon can kill a warrior, and they born as wise as the average man. The most powerful dragons don't mess with us, but some went crazy for gold and power... a crazy dragon can only be stoped by an army or a great hero."); }, "music": function() { psay ("I teach music, but that takes months to learn. If you don't have time to learn, I have a magical {ask:flamel:flute} for sale. "); }, "flute": function() { psay ("You only need to blow the magical flute and it will play a song for you. I will trade the flute for some {ask:flamel:dust:fairy dust}."); }, "fairy dust": function() { psay ("The fairies inhabit the dark corners of the forest. If you bring me some fairy dust I will give a magical {ask:flamel:flute} to you."); }, "medusa": function() { psay ("The Medusa was an ancient monster that could turn into stone anything with a stare. She was killed by Perseus, who chopped her head off. He placed the head inside a {ask:flamel:kibisis}, because even after dead, she could still turn anything alive into stone. There is a legend that her head is somewhere near here."); }, "kibisis": function() { psay ("It is a silvery knapsack, the only thing that can block the stare of Medusa."); } },
"give": {"fairy_dust": function() { psay ("Thank you. Here, take my flute as a reward.");
AddToInventory (e_flute);
RemoveObject (e_fairy_dust); }, "book_plants": function() { psay ("Great Stuff... Thank you! Let me see if I can find the spell on this book... yes, it is here.");
OutputText ("After a couple hours, Flamel writes down the spell at you spell book.");
psay ("This is the shape plant spell, that allows you to shape plants and trees to your will.");
RemoveObject (e_book_plants);
set(e_shape_spell, "parent", e_spell_book); } },
"_js_name": "e_alchemist",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["alchemist"] = e_alchemist;
allObjects.push(e_alchemist);
objectsNameMap["alchemist"] = e_alchemist;
e_flute = {
"elementtype": "object",
"name": "flute",
"parent": e_alchemist,
"type": "object",
"alias": "magical flute",
"look": "It plays a tune called \"Winyadepla\".",
"feature_usegive": true,
"use": true,
"givesingle": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"play": function() { play_flute(); },
"_js_name": "e_flute",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"take": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["flute"] = e_flute;
allObjects.push(e_flute);
objectsNameMap["flute"] = e_flute;
e_shape_spell = {
"elementtype": "object",
"name": "shape_spell",
"parent": e_alchemist,
"type": "object",
"alias": "shape plant spell",
"look": "This spell allows the caster to shape plants and bend trees to his will.",
"listalias": "-- shape plant spell",
"inventoryverbs": ["Look at", "Cast"],
"_js_name": "e_shape_spell",
"_types": ["Spell", "defaultobject"],
"castspell": true,
"castonobject": true,
"drop": function() { OutputText ("You don't want to rip your book apart."); },
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"read_away": false,
"read": function() { doRead (this); },
"visible": true,
"displayverbs": ["Look at", "Take"],
"take": false,
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["shape_spell"] = e_shape_spell;
allObjects.push(e_shape_spell);
objectsNameMap["shape_spell"] = e_shape_spell;
e_k51 = {
"elementtype": "object",
"name": "k51",
"parent": e_forest_tower,
"type": "exit",
"alias": "out",
"to": e_forest_house,
"_js_name": "e_k51",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k51"] = e_k51;
allExits.push(e_k51);
objectsNameMap["k51"] = e_k51;
e_leader = {
"elementtype": "object",
"name": "leader",
"parent": e_forest_tower,
"type": "object",
"alias": "man",
"memory": false,
"feature_usegive": true,
"speak": function() { if (e_leader.memory==false) {
psay ("I'm sorry sir, but I can't remember nothing from my past. Mr. Flamel found me in the forest a few weeks ago, naked and unconscious.");
} },
"askdefault": function() { psay ("I can't remember anything..."); },
"give": {"leader_sword": function() { OutputText ("The man grabs the sword and starts to shake it and cry as he remembers everything: ");
psay ("I remember now. I am Leonard, the true brigand leader. Vourtram sent an impostor to replace me and control our army. Thank you "+e_player.playername+", by helping me regain my memory. Now I should return to our hiding place and unmask the impostor");
OutputText ("You tell Leonard about Elias, and you three head to the hideout.<br/>Leonard kills the impostor, and promises to help you against Vourtram.");
finishBrigands();
RemoveObject (e_leader);
RemoveObject (e_leader_sword);
MoveObject (e_player, e_hide_entrance); } },
"_js_name": "e_leader",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["leader"] = e_leader;
allObjects.push(e_leader);
objectsNameMap["leader"] = e_leader;
e_ingredients1 = {
"elementtype": "object",
"name": "ingredients1",
"parent": e_forest_tower,
"type": "object",
"alias": "ingredients",
"alt": ["tools", "sources", "alchemical ingredients"],
"look": "They are magical items.",
"displayverbs": ["Look at"],
"usedefaultprefix": false,
"_js_name": "e_ingredients1",
"_types": ["plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ingredients1"] = e_ingredients1;
allObjects.push(e_ingredients1);
objectsNameMap["ingredients1"] = e_ingredients1;
e_forest3 = {
"elementtype": "object",
"name": "forest3",
"parent": e_dark_forest,
"type": "object",
"alias": "dark forest",
"description": "This maybe the darkest corner of this forest.",
"firstenter": function() { if (e_player.class=="mage") {
OutputText ("You feel a chill in the neck when entering this corner of the forest.");
} },
"_js_name": "e_forest3",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["forest3"] = e_forest3;
allObjects.push(e_forest3);
objectsNameMap["forest3"] = e_forest3;
e_k52 = {
"elementtype": "object",
"name": "k52",
"parent": e_forest3,
"type": "exit",
"alias": "west",
"_js_name": "e_k52",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k52"] = e_k52;
objectReferences.push(["e_k52", "to", "e_forest_current"]);
allExits.push(e_k52);
objectsNameMap["k52"] = e_k52;
e_green_fairy = {
"elementtype": "object",
"name": "green_fairy",
"parent": e_forest3,
"type": "object",
"alias": "green fairy",
"look": "A thumb sized fairy lying on a large leaf. She is glowing green.",
"visible": false,
"alt": ["voice"],
"riddle": 0,
"speak": function() { if (e_fairy_dust.parent==e_green_fairy) {
set(e_green_fairy, "riddle", 1);
psay ("Hi nosy noisy giant! Do you want some dust of mine? Only if you can answer ma riddle... <b>I fly, yet I have no wings. I cry, yet I have no eyes. Darkness follows me; lower light I never see.</b>");
getinput_async (function(result) { fairy_response (result); });
}
else {
set(e_green_fairy, "riddle", 2);
psay ("Here is the riddle: <b>What is a throw that catches you, but you can only catch it with a song?</b>");
getinput_async (function(result) { fairy_response (result); });
} },
"askdefault": function() { OutputText ("The fairy flies around you, laughing a lot..."); },
"_js_name": "e_green_fairy",
"_types": ["female", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["green_fairy"] = e_green_fairy;
allObjects.push(e_green_fairy);
objectsNameMap["green_fairy"] = e_green_fairy;
e_fairy_dust = {
"elementtype": "object",
"name": "fairy_dust",
"parent": e_green_fairy,
"type": "object",
"take": true,
"alias": "a bag of fairy dust",
"look": "It contains a handfull of green dust.",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_fairy_dust",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["fairy_dust"] = e_fairy_dust;
allObjects.push(e_fairy_dust);
objectsNameMap["fairy_dust"] = e_fairy_dust;
e_blind_spell = {
"elementtype": "object",
"name": "blind_spell",
"parent": e_green_fairy,
"type": "object",
"alias": "blind spell",
"take": true,
"drop": false,
"look": "The blind spell casts a strong light that will blind every creature with eyes for a few seconds.",
"listalias": "-- blind spell",
"inventoryverbs": ["Look at", "Cast"],
"_js_name": "e_blind_spell",
"_types": ["Spell", "defaultobject"],
"castspell": true,
"castonobject": true,
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"read_away": false,
"read": function() { doRead (this); },
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["blind_spell"] = e_blind_spell;
allObjects.push(e_blind_spell);
objectsNameMap["blind_spell"] = e_blind_spell;
e_forest_current = {
"elementtype": "object",
"name": "forest_current",
"parent": e_dark_forest,
"type": "object",
"alias": "dense forest that stops at some violent rapids on a wide river",
"turns": 0,
"_js_name": "e_forest_current",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["forest_current"] = e_forest_current;
allObjects.push(e_forest_current);
objectsNameMap["forest_current"] = e_forest_current;
e_rapids = {
"elementtype": "object",
"name": "rapids",
"parent": e_forest_current,
"type": "object",
"alias": "violent rapids",
"usedefaultprefix": false,
"displayverbs": ["Look at"],
"look": "It is impossible to cross this river by swimming.",
"useon": {"pot_helmet": function() { OutputText ("It won't work. The pot has a hole in the bottom."); }, "pot": function() { OutputText ("It is full. And I would not waste food."); } },
"_js_name": "e_rapids",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["rapids"] = e_rapids;
allObjects.push(e_rapids);
objectsNameMap["rapids"] = e_rapids;
e_tree_river = {
"elementtype": "object",
"name": "tree_river",
"parent": e_forest_current,
"type": "object",
"alias": "strong trees",
"look": "They are old and strongly rooted to the riverside.",
"usedefaultprefix": false,
"prefix": "some",
"suffix": "",
"displayverbs": ["Look at"],
"useCmds": ["tie"],
"selfuseon": {"rope": function() { tie_rope (e_tree_river); } },
"_js_name": "e_tree_river",
"_types": ["UseAltType", "plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["tree_river"] = e_tree_river;
allObjects.push(e_tree_river);
objectsNameMap["tree_river"] = e_tree_river;
e_forest_current_to_forest1 = {
"elementtype": "object",
"name": "forest_current_to_forest1",
"parent": e_forest_current,
"type": "exit",
"alias": "north",
"lockmessage": "The Orc blocks your way.",
"to": e_forest1,
"_js_name": "e_forest_current_to_forest1",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["forest_current_to_forest1"] = e_forest_current_to_forest1;
allExits.push(e_forest_current_to_forest1);
objectsNameMap["forest_current_to_forest1"] = e_forest_current_to_forest1;
e_k53 = {
"elementtype": "object",
"name": "k53",
"parent": e_forest_current,
"type": "exit",
"alias": "west",
"to": e_forest2,
"_js_name": "e_k53",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k53"] = e_k53;
allExits.push(e_k53);
objectsNameMap["k53"] = e_k53;
e_k54 = {
"elementtype": "object",
"name": "k54",
"parent": e_forest_current,
"type": "exit",
"alias": "east",
"to": e_forest3,
"_js_name": "e_k54",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k54"] = e_k54;
allExits.push(e_k54);
objectsNameMap["k54"] = e_k54;
e_rapids_exit = {
"elementtype": "object",
"name": "rapids_exit",
"parent": e_forest_current,
"type": "exit",
"alias": "south",
"locked": true,
"lockmessage": "You can't cross the violent rapids.",
"_js_name": "e_rapids_exit",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["rapids_exit"] = e_rapids_exit;
objectReferences.push(["e_rapids_exit", "to", "e_forest_current2"]);
allExits.push(e_rapids_exit);
objectsNameMap["rapids_exit"] = e_rapids_exit;
e_swim = {
"elementtype": "object",
"name": "swim",
"parent": e_forest_current,
"type": "command",
"pattern": "^swim$",
"script": function(parameters) { OutputText ("Are you kidding?"); },
"_js_name": "e_swim",
"_types": ["defaultcommand"]
};
elementsNameMap["swim"] = e_swim;
allCommands.push(e_swim);
objectsNameMap["swim"] = e_swim;
e_forest_current2 = {
"elementtype": "object",
"name": "forest_current2",
"parent": e_dark_forest,
"type": "object",
"alias": "opposite riverside",
"description": "The forest seems to block your way to any other direction but the river. To the north you can cross the river back to the northern forest.",
"usedefaultprefix": false,
"prefix": "the",
"beforeenter": function() { set(this, "turns", 0); },
"_js_name": "e_forest_current2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["forest_current2"] = e_forest_current2;
allObjects.push(e_forest_current2);
objectsNameMap["forest_current2"] = e_forest_current2;
e_k55 = {
"elementtype": "object",
"name": "k55",
"parent": e_forest_current2,
"type": "exit",
"alias": "north",
"to": e_forest_current,
"_js_name": "e_k55",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k55"] = e_k55;
allExits.push(e_k55);
objectsNameMap["k55"] = e_k55;
e_carrots = {
"elementtype": "object",
"name": "carrots",
"parent": e_forest_current2,
"type": "object",
"alias": "wild carrots",
"look": "These are delicious.",
"take": true,
"usedefaultprefix": false,
"prefix": "some",
"eat": "You are not hungry.",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"useCmds": ["put"],
"selfuseon": {"bucket1": function() { 
RemoveObject (e_bucket1);
SetObjectFlagOn (e_bucket2, "visible");
OutputText ("The horse is crazy about these carrots! It eats all the hay. Sheila says <i>Thank you! You can now have the {object:bucket2} if you want.</i>");
RemoveObject (e_carrots); }, "horse": function() { OutputText ("The horse loves carrots, but I would not have nothing to gain..."); } },
"giveto": {"stablemiss": function() { OutputText ("That would not make the horse eat the hay in the bucket ..."); } },
"_js_name": "e_carrots",
"_types": ["UseAltType", "plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["carrots"] = e_carrots;
allObjects.push(e_carrots);
objectsNameMap["carrots"] = e_carrots;
e_sec_path = {
"elementtype": "object",
"name": "sec_path",
"parent": e_forest_current2,
"type": "object",
"visible": false,
"alias": "secret path leading south",
"look": "This path was concealed, but Elias told you the way.",
"_js_name": "e_sec_path",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sec_path"] = e_sec_path;
allObjects.push(e_sec_path);
objectsNameMap["sec_path"] = e_sec_path;
e_forest_current2_to_hide_entrance = {
"elementtype": "object",
"name": "forest_current2_to_hide_entrance",
"parent": e_forest_current2,
"type": "exit",
"alias": "south",
"visible": false,
"locked": false,
"lockmessage": "the brigand blocks your way.",
"_js_name": "e_forest_current2_to_hide_entrance",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["forest_current2_to_hide_entrance"] = e_forest_current2_to_hide_entrance;
objectReferences.push(["e_forest_current2_to_hide_entrance", "to", "e_hide_entrance"]);
allExits.push(e_forest_current2_to_hide_entrance);
objectsNameMap["forest_current2_to_hide_entrance"] = e_forest_current2_to_hide_entrance;
e_trees = {
"elementtype": "object",
"name": "trees",
"parent": e_forest_current2,
"type": "object",
"scenery": true,
"look": "You see nothing special.",
"alt": ["forest", "river"],
"displayverbs": ["Look at"],
"_js_name": "e_trees",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["trees"] = e_trees;
allObjects.push(e_trees);
objectsNameMap["trees"] = e_trees;
e_hide_entrance = {
"elementtype": "object",
"name": "hide_entrance",
"parent": e_dark_forest,
"type": "object",
"alias": "hillside",
"description": "You are at the western side of a rocky hill. There is a cave in the hill and a path leading to the west.  There is also a narrow path leading back to the river in the north. A dense forest blocks the way to the south. ",
"_js_name": "e_hide_entrance",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["hide_entrance"] = e_hide_entrance;
allObjects.push(e_hide_entrance);
objectsNameMap["hide_entrance"] = e_hide_entrance;
e_k56 = {
"elementtype": "object",
"name": "k56",
"parent": e_hide_entrance,
"type": "exit",
"alias": "north",
"to": e_forest_current2,
"_js_name": "e_k56",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k56"] = e_k56;
allExits.push(e_k56);
objectsNameMap["k56"] = e_k56;
e_boulder = {
"elementtype": "object",
"name": "boulder",
"parent": e_hide_entrance,
"type": "object",
"alias": "large boulder",
"heard": false,
"displayverbs": ["Look at"],
"push": function() { if (e_player.class=="warrior") {
OutputText ("You push the boulder just enough to enter the cave.");
UnlockExit (e_hide_boulder);
}
else {
OutputText ("It is too heavy for you.");
} },
"_js_name": "e_boulder",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["boulder"] = e_boulder;
allObjects.push(e_boulder);
objectsNameMap["boulder"] = e_boulder;
e_hide_boulder = {
"elementtype": "object",
"name": "hide_boulder",
"parent": e_hide_entrance,
"type": "exit",
"alias": "in",
"locked": true,
"lockmessage": "The boulder blocks your way.",
"_js_name": "e_hide_boulder",
"_types": ["indirection", "defaultexit"],
"alt": [""],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["hide_boulder"] = e_hide_boulder;
objectReferences.push(["e_hide_boulder", "to", "e_hide1"]);
allExits.push(e_hide_boulder);
objectsNameMap["hide_boulder"] = e_hide_boulder;
e_say = {
"elementtype": "object",
"name": "say",
"parent": e_hide_entrance,
"type": "command",
"pattern": "^say (?<text>.*)$",
"script": function(parameters) { var text = parameters['text'];
if (e_player.class=="thief") {
if (text=="iftah ya simsim") {
UnlockExit (e_hide_boulder);
OutputText ("The boulder moves revealing the entrance to the cave.");
}
else if (e_boulder.heard) {
OutputText ("Nothing happens. Perhaps you should try \"say iftah ya simsim\".");
}
else {
OutputText ("Nothing happens.");
}
}
else {
if (text=="iftah ya simsim") {
OutputText ("You tries to say "+text+", but you just can't get the right pronunciation.");
}
else {
OutputText ("You say <i>"+text+"</i>. Nothing happens.");
}
} },
"_js_name": "e_say",
"_types": ["defaultcommand"]
};
elementsNameMap["say"] = e_say;
allCommands.push(e_say);
objectsNameMap["say"] = e_say;
e_bushes = {
"elementtype": "object",
"name": "bushes",
"parent": e_hide_entrance,
"type": "object",
"alias": "bushes",
"look": "The bushes are large and thick, you examine with caution hoping to not find a snake or a bear hiding behind the foliage.",
"usestandardverblist": true,
"displayverbs": ["Look at"],
"hide": function() { if (e_player.class=="thief") {
if (e_boulder.heard) {
OutputText ("You hide but nothing happens.");
}
else {
OutputText ("You hide behind the bushes for a while. Suddenly, a masked man approaches the boulder and says <i>iftah ya simsim</i>. The boulder magically opens and he enters the cave. After a while, the boulder moves and closes the entrance again.");
set(e_boulder, "heard", true);
}
}
else {
OutputText ("what?");
} },
"_js_name": "e_bushes",
"_types": ["plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bushes"] = e_bushes;
allObjects.push(e_bushes);
objectsNameMap["bushes"] = e_bushes;
e_k57 = {
"elementtype": "object",
"name": "k57",
"parent": e_hide_entrance,
"type": "exit",
"alias": "west",
"_js_name": "e_k57",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k57"] = e_k57;
objectReferences.push(["e_k57", "to", "e_midgard"]);
allExits.push(e_k57);
objectsNameMap["k57"] = e_k57;
e_iftah = {
"elementtype": "object",
"name": "iftah",
"parent": e_hide_entrance,
"type": "command",
"pattern": "^iftah ya simsim$",
"script": function(parameters) { OutputText ("I can't recognize this command. Try to <b>say iftah ya simsim</b>"); },
"_js_name": "e_iftah",
"_types": ["defaultcommand"]
};
elementsNameMap["iftah"] = e_iftah;
allCommands.push(e_iftah);
objectsNameMap["iftah"] = e_iftah;
e_hide1 = {
"elementtype": "object",
"name": "hide1",
"parent": e_dark_forest,
"type": "object",
"alias": "brigand's hideout entrance",
"description": "The cave entrance has a high ceiling, and turns to the right{if impostor.parent=hide_hall:, from where you hear voices}. The cave has only the dim light from oil lamps.{if hide1.climbed: You are balancing on a pallet near the ceiling.}",
"climbed": false,
"usedefaultprefix": false,
"prefix": "the",
"onexit": function() { set(e_hide1, "climbed", false); },
"_js_name": "e_hide1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["hide1"] = e_hide1;
allObjects.push(e_hide1);
objectsNameMap["hide1"] = e_hide1;
e_k58 = {
"elementtype": "object",
"name": "k58",
"parent": e_hide1,
"type": "exit",
"alias": "out",
"to": e_hide_entrance,
"_js_name": "e_k58",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k58"] = e_k58;
allExits.push(e_k58);
objectsNameMap["k58"] = e_k58;
e_ceiling = {
"elementtype": "object",
"name": "ceiling",
"parent": e_hide1,
"type": "object",
"visible": true,
"scenery": true,
"alt": ["roof", "pallet", "pole","poles"],
"look": "In the ceiling you see a pallet supported by poles shored at the walls. Connected to the pallet there are oil lamps that provide a dim light to the room.",
"hidechildren": true,
"displayverbs": ["Look at"],
"_js_name": "e_ceiling",
"_types": ["surface", "defaultobject"],
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"open": false,
"close": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ceiling"] = e_ceiling;
allObjects.push(e_ceiling);
objectsNameMap["ceiling"] = e_ceiling;
e_lamps = {
"elementtype": "object",
"name": "lamps",
"parent": e_ceiling,
"type": "object",
"displayverbs": ["Look at"],
"alt": ["lamp"],
"turnoff": function() { if (e_hide1.climbed==true) {
OutputText ("You silently put down some lamps.");
UnlockExit (e_hide_hall_exit);
}
else {
OutputText ("The lamps are too high.");
} },
"_js_name": "e_lamps",
"_types": ["plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lamps"] = e_lamps;
allObjects.push(e_lamps);
objectsNameMap["lamps"] = e_lamps;
e_k59 = {
"elementtype": "object",
"name": "k59",
"parent": e_hide1,
"type": "command",
"anonymous": true,
"pattern": "^climb (?<text>.*)$",
"unresolved": "climb where?",
"script": function(parameters) { var text = parameters['text'];
if (text=="pole" || text=="pallet") {
if (e_player.class=="thief") {
OutputText ("You climb by the pole to the pallet.");
set(e_hide_hall_exit, "lockmessage", "You can walk by the pallet, but there is too much light, they would notice you.");
set(e_hide1, "climbed", true);
}
else {
OutputText ("I'm not very good in climbing, I risk breaking my neck.");
}
}
else {
OutputText ("How can I climb this?");
} },
"_js_name": "e_k59",
"_types": ["defaultcommand"]
};
elementsNameMap["k59"] = e_k59;
allCommands.push(e_k59);
objectsNameMap["k59"] = e_k59;
e_hide_hall_exit = {
"elementtype": "object",
"name": "hide_hall_exit",
"parent": e_hide1,
"type": "exit",
"alias": "north",
"locked": true,
"lockmessage": "You don't think it is a good idea to face those brigands directly.",
"_js_name": "e_hide_hall_exit",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["hide_hall_exit"] = e_hide_hall_exit;
objectReferences.push(["e_hide_hall_exit", "to", "e_hide_hall"]);
allExits.push(e_hide_hall_exit);
objectsNameMap["hide_hall_exit"] = e_hide_hall_exit;
e_k60 = {
"elementtype": "object",
"name": "k60",
"parent": e_hide1,
"type": "command",
"anonymous": true,
"pattern": "^hear$",
"script": function(parameters) { OutputText ("They talk too low."); },
"_js_name": "e_k60",
"_types": ["defaultcommand"]
};
elementsNameMap["k60"] = e_k60;
allCommands.push(e_k60);
objectsNameMap["k60"] = e_k60;
e_midgard = {
"elementtype": "object",
"name": "midgard",
"parent": e_dark_forest,
"type": "object",
"alias": "ruins of an old city",
"description": "This must be ruins of the old city of Midgard. You think you are standing in a kind of temple. The only way out is east. You can also go down, entering the pit.",
"usedefaultprefix": false,
"prefix": "the",
"_js_name": "e_midgard",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["midgard"] = e_midgard;
allObjects.push(e_midgard);
objectsNameMap["midgard"] = e_midgard;
e_bones = {
"elementtype": "object",
"name": "bones",
"parent": e_midgard,
"type": "object",
"alias": "bones",
"look": "You see several bones from animals... and men.",
"usedefaultprefix": false,
"takemsg": "No thanks!",
"displayverbs": ["Look at"],
"_js_name": "e_bones",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bones"] = e_bones;
allObjects.push(e_bones);
objectsNameMap["bones"] = e_bones;
e_pit = {
"elementtype": "object",
"name": "pit",
"parent": e_midgard,
"type": "object",
"alias": "dark pit",
"look": "It is dark and has a foul smell.",
"displayverbs": ["Look at"],
"beforeenter": function() { set(this, "turns", 0); },
"_js_name": "e_pit",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["pit"] = e_pit;
allObjects.push(e_pit);
objectsNameMap["pit"] = e_pit;
e_Trow = {
"elementtype": "object",
"name": "Trow",
"parent": e_pit,
"type": "object",
"look": "A small but monstrously strong spirit that inhabits dark places.",
"ht": 50,
"exp": 20,
"armour": 20,
"aggressive": true,
"alias": "Trow",
"usedefaultprefix": false,
"prefix": "a monstrously strong",
"speak": "He doesn't understand you.",
"give": {"flute": function() { if (e_Trow.aggressive) {
OutputText ("He doesn't seem interested on the flute ... yet");
}
else {
OutputText ("He takes the flute with a big smile. Then, he searches a bag and takes a fine sword. He gives the sword to you in pay to the flute.");
AddToInventory (e_leader_sword);
RemoveObject (e_flute);
} } },
"_js_name": "e_Trow",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"danger": "death",
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Trow"] = e_Trow;
allObjects.push(e_Trow);
objectsNameMap["Trow"] = e_Trow;
e_leader_sword = {
"elementtype": "object",
"name": "leader_sword",
"parent": e_Trow,
"type": "object",
"alias": "fine sword",
"look": "It has an unknown emblem with a big L.",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_leader_sword",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"take": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["leader_sword"] = e_leader_sword;
allObjects.push(e_leader_sword);
objectsNameMap["leader_sword"] = e_leader_sword;
e_k61 = {
"elementtype": "object",
"name": "k61",
"parent": e_pit,
"type": "exit",
"alias": "up",
"to": e_midgard,
"_js_name": "e_k61",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k61"] = e_k61;
allExits.push(e_k61);
objectsNameMap["k61"] = e_k61;
e_k62 = {
"elementtype": "object",
"name": "k62",
"parent": e_midgard,
"type": "exit",
"alias": "east",
"to": e_hide_entrance,
"_js_name": "e_k62",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k62"] = e_k62;
allExits.push(e_k62);
objectsNameMap["k62"] = e_k62;
e_k63 = {
"elementtype": "object",
"name": "k63",
"parent": e_midgard,
"type": "exit",
"alias": "down",
"to": e_pit,
"_js_name": "e_k63",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k63"] = e_k63;
allExits.push(e_k63);
objectsNameMap["k63"] = e_k63;
e_hide_hall = {
"elementtype": "object",
"name": "hide_hall",
"parent": e_dark_forest,
"type": "object",
"alias": "wide chamber inside the brigand's cave",
"description": "The cave ends in a large hall where the brigands live. Among the stalagmites, you see several crates with the result of their thefts.",
"firstenter": function() { if (e_player.class=="thief") {
OutputText ("You silently enter the room walking by the pallet. You see the impostor leader speaking with a masked figure in a dark robe:<br/><i>You are doing an excellent job Ahriman! Master Vourtram prepared more of the disguise potion, you should drink it as soon as the spell begins to diminish. This should happen this afternoon.</i><br/>The impostor puts the potion in a chest, and leaves the hideout with the other man. The room is empty, and you climb down.<br/>");
MoveObject (e_impostor, e_void);
}
else if (e_impostor.parent == e_hide_hall) {
psay ("Hey, you should not be here!");
set(e_hide_hall, "visited", true);
attack (e_hide_hall, e_impostor);
} },
"beforeenter": function() { set(this, "turns", 0); },
"_js_name": "e_hide_hall",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["hide_hall"] = e_hide_hall;
allObjects.push(e_hide_hall);
objectsNameMap["hide_hall"] = e_hide_hall;
e_k64 = {
"elementtype": "object",
"name": "k64",
"parent": e_hide_hall,
"type": "exit",
"alias": "south",
"to": e_hide1,
"_js_name": "e_k64",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k64"] = e_k64;
allExits.push(e_k64);
objectsNameMap["k64"] = e_k64;
e_chest1 = {
"elementtype": "object",
"name": "chest1",
"parent": e_hide_hall,
"type": "object",
"alias": "chest",
"feature_container": true,
"keycount": 1,
"hidechildren": false,
"displayverbs": ["Look at", "Open","Close"],
"useindividualverblist":false,
"usestandardverblist":true,
"picklock": function() { if (e_player.class=="thief") {
if (e_chest1.locked) {
OutputText ("Piece of cake. You found a bottle and 25 coins in the chest.");
set(e_chest1, "locked", false);
HelperOpenObject (e_chest1);
set(e_purse, "coins", e_purse.coins+25);
}
else {
OutputText ("It is open!");
}
}
else {
OutputText ("You don't know how!");
} },
"onclose": function() { if (e_disguise_potion.parent==e_chest1 && !(e_disguise_potion.potion)) {
MoveObject (e_disguise_potion, e_void);
OutputText ("Fine, the impostor is returning. You climb the pallet and wait for him to drink the<i> fake</i> potion.<br/>After a while, several other brigands return to the hideout bringing Elias as a prisoner... and suddenly the impostor screams and changes back to his original form, fleeing the room.<br/>You reveal yourself and says:<br/><i>He is an impostor, not the real leader. I found Elias and decided to investigate what happened. Vourtram used witchcraft to make you believe in a false leader, making you help him with his domination plans. But I replaced the real disguise potion with water... </i>");
OutputText ("A brigand asked:");
psay ("What happened with the real leader?");
OutputText ("<br/>And then Elias says:<br/><i>I discovered where Leonard, our leader, is. Vourtram's minions tried to kill him near the river, and he felt down the rapids. They thought he was dead, but he was only hurt. He will arrive at any moment.</i><br/>And so Leonard came back, and promised to help you against Vourtram.");
finishBrigands();
} },
"look": function() { if (e_chest1.isopen) {
OutputText ("You better left the chest closed after you end with it.");
}
else {
OutputText ("It is a sturdy chest.");
} },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"key": e_null_key,
"_js_name": "e_chest1",
"_types": ["container_lockable", "container_closed", "defaultobject"],
"locked": true,
"nokeymessage": "You do not have the key.",
"unlockmessage": "Unlocked.",
"lockmessage": "Locked.",
"canlockopen": false,
"autoopen": true,
"autounlock": true,
"openscript": function() { if (this.locked) {
if (this.autounlock && AllKeysAvailable(this)) {
runscriptattribute2 (this, "unlock");
if (!(this.isopen)) {
OpenObject (this);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
}
else {
OpenObject (this);
} },
"closescript": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
else {
CloseObject (this);
} },
"lock": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyLocked", this));
}
else if (this.isopen && !(this.canlockopen)) {
OutputText (overloadedFunctions.DynamicTemplate("CannotLockOpen", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.lockmessage);
set(this, "locked", true);
}
else {
OutputText (this.nokeymessage);
}
} },
"unlock": function() { if (!(this.locked)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyUnlocked", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.unlockmessage);
set(this, "locked", false);
if (this.autoopen && !(this.isopen)) {
TryOpenClose (true, this);
}
}
else {
OutputText (this.nokeymessage);
}
} },
"open": true,
"close": true,
"container": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["chest1"] = e_chest1;
allObjects.push(e_chest1);
objectsNameMap["chest1"] = e_chest1;
e_disguise_potion = {
"elementtype": "object",
"name": "disguise_potion",
"parent": e_chest1,
"type": "object",
"alias": "bottle",
"potion": true,
"look": "It is a bottle filled with a purple liquid. It should be the disguise potion.",
"take": true,
"feature_usegive": true,
"use": true,
"drink": "I don't want to risk any side effect of drinking unknown stuff. Besides, I only drink after 5 PM...",
"useCmds": ["fill", "pour"],
"selfuseon": {"bucket2": function() { if (e_bucket2.fill == true) {
OutputText ("You pour away the potion and fills the bottle with water.");
set(e_disguise_potion, "potion", false);
set(e_disguise_potion, "look", "It is full of water");
}
else {
OutputText ("the bucket is empty.");
} }, "rapids": function() { if (e_disguise_potion.potion == true) {
OutputText ("You pour away the potion and fills the bottle with water.");
set(e_disguise_potion, "potion", false);
set(e_disguise_potion, "look", "It is full of water");
}
else {
OutputText ("the bottle is already filled with water.");
} }, "chest1": function() { if (e_chest1.locked) {
OutputText ("The chest is locked.");
}
else if (!(e_chest1.isopen)) {
OutputText (overloadedFunctions.DynamicTemplate("ObjectNotOpen", e_chest1));
}
else {
MoveObject (e_disguise_potion, e_chest1);
OutputText (Template("Done"));
} } },
"_js_name": "e_disguise_potion",
"_types": ["UseAltType", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["disguise_potion"] = e_disguise_potion;
allObjects.push(e_disguise_potion);
objectsNameMap["disguise_potion"] = e_disguise_potion;
e_impostor = {
"elementtype": "object",
"name": "impostor",
"parent": e_hide_hall,
"type": "object",
"alias": "impostor leader",
"usedefaultprefix": false,
"prefix": "the",
"exp": 6,
"armour": 4,
"aggressive": true,
"bolt": false,
"speak": "You have nothing to talk with him.",
"_js_name": "e_impostor",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"danger": "death",
"ht": 10,
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["impostor"] = e_impostor;
allObjects.push(e_impostor);
objectsNameMap["impostor"] = e_impostor;
e_brigands = {
"elementtype": "object",
"name": "brigands",
"parent": e_hide_hall,
"type": "object",
"visible": false,
"alias": "brigands",
"look": "Leonard, Elias, and many other brigands that will help you against Vourtram.",
"speak": "Leonard says: <i>Meet me at the castle's gate in two days.</i>",
"_js_name": "e_brigands",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["brigands"] = e_brigands;
allObjects.push(e_brigands);
objectsNameMap["brigands"] = e_brigands;
e_crates = {
"elementtype": "object",
"name": "crates",
"parent": e_hide_hall,
"type": "object",
"alt": ["crate"],
"scenery": true,
"look": "The crates are full of crops. No gold or jewelry.",
"displayverbs": ["Look at"],
"_js_name": "e_crates",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["crates"] = e_crates;
allObjects.push(e_crates);
objectsNameMap["crates"] = e_crates;
e_the_castle = {
"elementtype": "object",
"name": "the_castle",
"type": "object",
"_js_name": "e_the_castle",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["the_castle"] = e_the_castle;
allObjects.push(e_the_castle);
objectsNameMap["the_castle"] = e_the_castle;
e_the_gate = {
"elementtype": "object",
"name": "the_gate",
"parent": e_the_castle,
"type": "object",
"usedefaultprefix": false,
"prefix": "the",
"alias": "gates to the castle",
"description": "{img:castle.png}<br/>You are in front of the Castle of Vourtram. The Castle gates are to the north, and paths leads to the eastern and western sides of the castle. To the south there is the huge King's Square leading to the streets of the great city of Linwynne.  Guards are inspecting everyone wanting to enter the castle.",
"descprefix": "You are at",
"_js_name": "e_the_gate",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["the_gate"] = e_the_gate;
allObjects.push(e_the_gate);
objectsNameMap["the_gate"] = e_the_gate;
e_castle = {
"elementtype": "object",
"name": "castle",
"parent": e_the_gate,
"type": "object",
"alias": "Castle of Vourtram",
"look": "The castle is located in the edge of a deep cliff. A dark shadow covers the area since Vourtram moved his court of demons here. The only visible entrance is the south gates. ",
"usedefaultprefix": false,
"prefix": "the",
"displayverbs": ["Look at"],
"_js_name": "e_castle",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["castle"] = e_castle;
allObjects.push(e_castle);
objectsNameMap["castle"] = e_castle;
e_k65 = {
"elementtype": "object",
"name": "k65",
"parent": e_the_gate,
"type": "exit",
"alias": "northwest",
"_js_name": "e_k65",
"_types": ["northwestdirection", "defaultexit"],
"alt": ["nw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k65"] = e_k65;
objectReferences.push(["e_k65", "to", "e_west_wall"]);
allExits.push(e_k65);
objectsNameMap["k65"] = e_k65;
e_k66 = {
"elementtype": "object",
"name": "k66",
"parent": e_the_gate,
"type": "exit",
"alias": "northeast",
"_js_name": "e_k66",
"_types": ["northeastdirection", "defaultexit"],
"alt": ["ne"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k66"] = e_k66;
objectReferences.push(["e_k66", "to", "e_east_wall"]);
allExits.push(e_k66);
objectsNameMap["k66"] = e_k66;
e_k67 = {
"elementtype": "object",
"name": "k67",
"parent": e_the_gate,
"type": "exit",
"alias": "down",
"_js_name": "e_k67",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k67"] = e_k67;
objectReferences.push(["e_k67", "to", "e_kings_square"]);
allExits.push(e_k67);
objectsNameMap["k67"] = e_k67;
e_gate_lock = {
"elementtype": "object",
"name": "gate_lock",
"parent": e_the_gate,
"type": "exit",
"alias": "north",
"locked": true,
"lockmessage": "They would not let you in.",
"_js_name": "e_gate_lock",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["gate_lock"] = e_gate_lock;
objectReferences.push(["e_gate_lock", "to", "e_lobby"]);
allExits.push(e_gate_lock);
objectsNameMap["gate_lock"] = e_gate_lock;
e_guards = {
"elementtype": "object",
"name": "guards",
"parent": e_the_gate,
"type": "object",
"alias": "half a dozen guards",
"scenery": true,
"prefix": "",
"suffix": "",
"look": "You can see half a dozen fully armored guards. They carefully select who can enter the castle, always looking for spies. ",
"speak": "You better not talk to them.",
"_js_name": "e_guards",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guards"] = e_guards;
allObjects.push(e_guards);
objectsNameMap["guards"] = e_guards;
e_the_base = {
"elementtype": "object",
"name": "the_base",
"parent": e_the_castle,
"type": "object",
"usedefaultprefix": false,
"prefix": "the",
"alias": "Happy Boar Inn",
"descprefix": "You are in front of",
"description": "This traditional inn serves as a rendezvous point for the loyalists. ",
"enter": function() { if (e_inn_keeper.in_castle) {
if (!(e_old_sage.visible)) {
MakeObjectVisible (e_old_sage);
OutputText ("an old man enters the room and stares at you.");
}
} },
"_js_name": "e_the_base",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["the_base"] = e_the_base;
allObjects.push(e_the_base);
objectsNameMap["the_base"] = e_the_base;
e_k68 = {
"elementtype": "object",
"name": "k68",
"parent": e_the_base,
"type": "exit",
"alias": "east",
"_js_name": "e_k68",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k68"] = e_k68;
objectReferences.push(["e_k68", "to", "e_kings_square"]);
allExits.push(e_k68);
objectsNameMap["k68"] = e_k68;
e_inn_keeper = {
"elementtype": "object",
"name": "inn_keeper",
"parent": e_the_base,
"type": "object",
"alias": "Bernard",
"suffix": "the inn keeper",
"feature_usegive": true,
"in_castle": false,
"look": "Bernard looks like a somewhat fat bourgeois, but in fact is an important supporter of the King.",
"useindividualverblist": false,
"usestandardverblist": true,
"speak": function() { psay ("{once:Welcome {player.playername}! }Leonard will arrive tomorrow with the few warriors still loyal to the king. Meanwhile, go to the castle and try to discover more {ask:Bernard:information} about Vourtram and the hostage princess. When you think you are ready, return here and ask to {command:stay:stay} the night."); },
"staythenight": function() { stayNight(); },
"give": {"gold_chest": function() { OutputText ("You tell Bernard about the mercenary, and gives the gold chest to turn them against Vourtram.");
MoveObject (e_gold_chest, e_void);
if (e_medallion.parent==e_void) {
OutputText ("Bernard says: <i>Great! with the medallion and the mercenaries I think you are ready to strike!</i>");
}
else {
OutputText ("Bernard says: <i>Alright, but without the medallion Vourtram can order Fafnir to attack the mercenaries. They will just flee. We have to prevent this from happening.</i>");
} }, "medallion": function() { OutputText ("Great! with this medallion Vourtram could no longer control the dragons! ");
if (e_player.isThief) {
if (e_gold_chest.parent==e_void) {
OutputText ("We are ready to take the castle!");
}
else {
OutputText ("But we are outnumbered. We need reinforcements to defeat the demons under the control of Vourtram.");
}
}
MoveObject (e_medallion, e_void); } },
"ask": {"information": function() { if (e_inn_keeper.in_castle) {
OutputText ("<i>You managed to enter the castle.</i>");
}
else {
OutputText ("<i>The first thing we must figure out is a way to enter the castle.</i>");
}
if (e_princess.parent==e_void) {
OutputText ("<i>The princess is safe, meaning that Vourtram could no longer use her as a hostage.</i>");
}
else {
OutputText ("<i>We have to bring the princess to safety before the assault, or she will be used as a hostage.</i>");
}
if (e_medallion.parent==e_void) {
OutputText ("<i>Vourtram lost his medallion, and he can no longer use Fafnir to attack us.</i>");
}
else {
OutputText ("<i>Our sources indicate that Vourtram has a secret weapon for an assault against Chuma Huppic. We must take measures to disable this weapon.</i>");
}
if (e_elven_sword.parent==e_player) {
OutputText ("<i>The magic of the Demon Slayer sword should protect us from the demons.</i>");
}
else if (e_banish_spell.parent==e_spell_book) {
OutputText ("<i>Your banish spell should be enough to eliminate the demons.</i>");
}
else if (e_gold_chest.parent==e_void) {
OutputText ("<i>The mercenaries you hired will help us defeating the demons.</i>");
}
else {
OutputText ("<i>And we must take care of the demons summoned by Vourtram.</i>");
OutputText ("<i>We would need a reinforcement of soldiers or some way to neutralize these demons.</i>");
}
if (e_player.isMage && e_diary_vourtram.parent==e_archmage) {
psay ("With the aid of the diary, Dashiel and the others can destroy Vourtram.");
}
else if (e_soul_jar.parent==e_player) {
psay ("With the soul jar we can eliminate Vourtram forever.");
}
else {
psay ("You have to figure out a way to kill Vourtram, or he will come back.");
} } },
"_js_name": "e_inn_keeper",
"_types": ["namedmale", "defaultobject"],
"usedefaultprefix": false,
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["inn_keeper"] = e_inn_keeper;
allObjects.push(e_inn_keeper);
objectsNameMap["inn_keeper"] = e_inn_keeper;
e_old_sage = {
"elementtype": "object",
"name": "old_sage",
"parent": e_the_base,
"type": "object",
"look": "Despite the poor clothes, this old man has an imposing presence.",
"alias": "sage",
"deliver": false,
"visible": false,
"speak": function() { 
if (e_player.level<=3) {
  psay("I need the help of an hero. Do you know someone with this title?")
} else if (e_old_sage.deliver) {
psay ("When you unroll the carpet, a magical portal will appear. You must enter the portal and defeat the {ask:sage:guardian} to free the {ask:sage:prisoners}.");
}
else {
set(e_old_sage, "deliver", true);
MoveObject (e_temple_entrance, e_player);
psay ("Young hero, please help me. All children of my village were kidnapped by Vourtram's demons. They were imprisoned in this magical carpet.");
psay ("When you unroll the carpet, a magical portal will appear. You must enter the portal and defeat the guardian to free the prisoners.");
} },
"ask": {"guardian statue": function() { psay ("The guardian is a dangerous monster, a forgotten god! It feeds on young human blood."); }, "prisoners": function() { psay ("All children of my village were kidnapped by Vourtram's demons. People says that he sometimes send his men to capture young men and woman for an unknown evil purpose."); } },
"_js_name": "e_old_sage",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["old_sage"] = e_old_sage;
allObjects.push(e_old_sage);
objectsNameMap["old_sage"] = e_old_sage;
e_east_wall = {
"elementtype": "object",
"name": "east_wall",
"parent": e_the_castle,
"type": "object",
"alias": "the eastern side of the castle\u00b4s walls",
"usedefaultprefix": false,
"_js_name": "e_east_wall",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["east_wall"] = e_east_wall;
allObjects.push(e_east_wall);
objectsNameMap["east_wall"] = e_east_wall;
e_k69 = {
"elementtype": "object",
"name": "k69",
"parent": e_east_wall,
"type": "exit",
"alias": "southwest",
"to": e_the_gate,
"_js_name": "e_k69",
"_types": ["southwestdirection", "defaultexit"],
"alt": ["sw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k69"] = e_k69;
allExits.push(e_k69);
objectsNameMap["k69"] = e_k69;
e_a_narrow_path_down_the_cliff = {
"elementtype": "object",
"name": "a narrow path down the cliff",
"parent": e_east_wall,
"type": "exit",
"alias": "down",
"_js_name": "e_a_narrow_path_down_the_cliff",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["a narrow path down the cliff"] = e_a_narrow_path_down_the_cliff;
objectReferences.push(["e_a_narrow_path_down_the_cliff", "to", "e_river"]);
allExits.push(e_a_narrow_path_down_the_cliff);
objectsNameMap["a narrow path down the cliff"] = e_a_narrow_path_down_the_cliff;
e_castle_guard = {
"elementtype": "object",
"name": "castle_guard",
"parent": e_east_wall,
"type": "object",
"alias": "guard",
"look": "He is about your height and weight.",
"danger": "friend",
"exp": 6,
"armour": 4,
"ht": 12,
"block_flee": true,
"stance": "none",
"speak": function() { psay ("Keep walking, peasant!"); },
"_js_name": "e_castle_guard",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"aggressive": false,
"stab_level": 0,
"affect_calm": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["castle_guard"] = e_castle_guard;
allObjects.push(e_castle_guard);
objectsNameMap["castle_guard"] = e_castle_guard;
e_guard_helmet = {
"elementtype": "object",
"name": "guard_helmet",
"parent": e_castle_guard,
"type": "object",
"armour": 2,
"loc": "head",
"take": true,
"alias": "iron helmet",
"look": "It is an iron helmet with the insignia of Vourtram. It fits perfectly on your head.",
"drop": false,
"inventoryverbs": ["Look at", "Drop"],
"ontake": function() { if (e_pot_helmet.parent==e_player) {
OutputText ("You toss away the makeshift helmet. It is ruined after so many blows.");
MoveObject (e_pot_helmet, e_void);
} },
"_js_name": "e_guard_helmet",
"_types": ["Armour", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guard_helmet"] = e_guard_helmet;
allObjects.push(e_guard_helmet);
objectsNameMap["guard_helmet"] = e_guard_helmet;
e_river = {
"elementtype": "object",
"name": "river",
"parent": e_the_castle,
"type": "object",
"alias": "margin of a wide river",
"usedefaultprefix": false,
"prefix": "at the",
"description": "The river is a natural protection for the castle. You can only go up from here.",
"descprefix": "You are",
"_js_name": "e_river",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["river"] = e_river;
allObjects.push(e_river);
objectsNameMap["river"] = e_river;
e_up_the_cliff = {
"elementtype": "object",
"name": "up the cliff",
"parent": e_river,
"type": "exit",
"alias": "up",
"to": e_east_wall,
"_js_name": "e_up_the_cliff",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["up the cliff"] = e_up_the_cliff;
allExits.push(e_up_the_cliff);
objectsNameMap["up the cliff"] = e_up_the_cliff;
e_river1 = {
"elementtype": "object",
"name": "river1",
"parent": e_river,
"type": "object",
"alias": "river",
"look": "The river is deep and cold.",
"displayverbs": ["Look at"],
"_js_name": "e_river1",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["river1"] = e_river1;
allObjects.push(e_river1);
objectsNameMap["river1"] = e_river1;
e_swim_river = {
"elementtype": "object",
"name": "swim_river",
"parent": e_river,
"type": "command",
"pattern": "^swim$",
"script": function(parameters) { OutputText ("You see no reason to swim."); },
"_js_name": "e_swim_river",
"_types": ["defaultcommand"]
};
elementsNameMap["swim_river"] = e_swim_river;
allCommands.push(e_swim_river);
objectsNameMap["swim_river"] = e_swim_river;
e_west_wall = {
"elementtype": "object",
"name": "west_wall",
"parent": e_the_castle,
"type": "object",
"alias": "the western side of the castle\u00b4s walls",
"usedefaultprefix": false,
"_js_name": "e_west_wall",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["west_wall"] = e_west_wall;
allObjects.push(e_west_wall);
objectsNameMap["west_wall"] = e_west_wall;
e_k70 = {
"elementtype": "object",
"name": "k70",
"parent": e_west_wall,
"type": "exit",
"alias": "southeast",
"to": e_the_gate,
"_js_name": "e_k70",
"_types": ["southeastdirection", "defaultexit"],
"alt": ["se"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k70"] = e_k70;
allExits.push(e_k70);
objectsNameMap["k70"] = e_k70;
e_sewer_entrance = {
"elementtype": "object",
"name": "sewer_entrance",
"parent": e_west_wall,
"type": "object",
"alias": "sewers",
"feature_usegive": false,
"displayverbs": ["Look at"],
"usestandardverblist": true,
"usedefaultprefix": false,
"prefix": "the",
"suffix": "entrance",
"look": function() { OutputText ("The entrance to the sewer system is a small hole in the walls, leading to a deep and dark tunnel connected to the castle\u00b4s draining system.");
if (e_player.class=="thief") {
set(e_sewer_entrance, "displayverbs", Split("Look at;Climb", ";"));
} },
"climb": function() { if (e_player.class=="thief") {
OutputText ("You carefully descend the slippery walls into the dark.");
MoveObject (e_player, e_sewer);
}
else {
OutputText ("I would probably break my neck.");
} },
"useon": {"__dummyKey": function() {  } },
"_js_name": "e_sewer_entrance",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sewer_entrance"] = e_sewer_entrance;
allObjects.push(e_sewer_entrance);
objectsNameMap["sewer_entrance"] = e_sewer_entrance;
e_kings_square = {
"elementtype": "object",
"name": "kings_square",
"parent": e_the_castle,
"type": "object",
"usedefaultprefix": false,
"prefix": "the",
"alias": "King's Square",
"description": "The main square leads to several streets of Linwynne. To the east you see the Happy Boar Inn, where the last friends to the king meet. Huge marble staircases go up to the castle gates.",
"firstenter": function() { psay ("Good day sir! My name is Eva, what do you want for today? pears, cherries or perhaps fresh oranges? "); },
"_js_name": "e_kings_square",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["kings_square"] = e_kings_square;
allObjects.push(e_kings_square);
objectsNameMap["kings_square"] = e_kings_square;
e_k71 = {
"elementtype": "object",
"name": "k71",
"parent": e_kings_square,
"type": "exit",
"alias": "west",
"to": e_the_base,
"_js_name": "e_k71",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k71"] = e_k71;
allExits.push(e_k71);
objectsNameMap["k71"] = e_k71;
e_statue = {
"elementtype": "object",
"name": "statue",
"parent": e_kings_square,
"type": "object",
"alias": "beautiful statue",
"look": "It is a statue of princess Grardobeth, with a lot of creative liberty. You can also notice a missing statue, probably of the King.",
"visible": true,
"displayverbs": ["Look at"],
"_js_name": "e_statue",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["statue"] = e_statue;
allObjects.push(e_statue);
objectsNameMap["statue"] = e_statue;
e_k72 = {
"elementtype": "object",
"name": "k72",
"parent": e_kings_square,
"type": "exit",
"alias": "up",
"to": e_the_gate,
"_js_name": "e_k72",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k72"] = e_k72;
allExits.push(e_k72);
objectsNameMap["k72"] = e_k72;
e_fruit_stand = {
"elementtype": "object",
"name": "fruit_stand",
"parent": e_kings_square,
"type": "object",
"look": "You see several fruits for sale, but the apples are the most beautiful you ever saw.",
"alias": "stand",
"listalias": "fruit stand",
"displayverbs": ["Look at"],
"_js_name": "e_fruit_stand",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["fruit_stand"] = e_fruit_stand;
allObjects.push(e_fruit_stand);
objectsNameMap["fruit_stand"] = e_fruit_stand;
e_fruit_dealer = {
"elementtype": "object",
"name": "fruit_dealer",
"parent": e_kings_square,
"type": "object",
"alias": "Eva",
"suffix": "the fruit dealer",
"blind": 0,
"look": "She is a pretty lower class girl.",
"speak": function() { psay ("Do you want pears, cherries or perhaps fresh oranges? All {ask:eva:fruits} for a reasonable price."); },
"ask": {"apple apples": function() { psay ("I'm sorry sir, but all apples are reserved to the castle {ask:eva:staff}. They are coming to get the fruits at any moment."); }, "fruits fruit": function() { psay ("A pear is one coin. Half a dozen oranges for a coin. A dozen cherries also for one coin. {ask:eva:apple:Apples} are not for sale."); }, "staff": function() { psay ("The cook of the castle required all apples for the dessert."); } },
"useon": {"purse": function() { OutputText ("You don't want to buy any fruit... perhaps the apples, but they aren't for sale."); } },
"_js_name": "e_fruit_dealer",
"_types": ["namedfemale", "defaultobject"],
"usedefaultprefix": false,
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["fruit_dealer"] = e_fruit_dealer;
allObjects.push(e_fruit_dealer);
objectsNameMap["fruit_dealer"] = e_fruit_dealer;
e_blind_dealer = {
"elementtype": "object",
"name": "blind_dealer",
"parent": e_kings_square,
"type": "turnscript",
"enabled": true,
"script": function() { if (e_fruit_dealer.blind>0 && e_fruit_dealer.parent==e_kings_square) {
DecreaseObjectCounter (e_fruit_dealer, "blind");
if (e_fruit_dealer.blind>0) {
OutputText ("The fruit dealer is under the effect of the blind spell.");
}
} },
"_js_name": "e_blind_dealer",
"_types": []
};
elementsNameMap["blind_dealer"] = e_blind_dealer;
allTurnScripts.push(e_blind_dealer);
objectsNameMap["blind_dealer"] = e_blind_dealer;
e_sc_apple = {
"elementtype": "object",
"name": "sc_apple",
"parent": e_kings_square,
"type": "object",
"alias": "apple",
"scenery": true,
"look": "They look great.",
"takemsg": "You don\u00b4t need any fruits right now.",
"alt": ["apples", "oranges", "cherries", "pears"],
"_js_name": "e_sc_apple",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sc_apple"] = e_sc_apple;
allObjects.push(e_sc_apple);
objectsNameMap["sc_apple"] = e_sc_apple;
e_k73 = {
"elementtype": "object",
"name": "k73",
"parent": e_kings_square,
"type": "command",
"anonymous": true,
"pattern": "^buy (?<text>.*)$",
"script": function(parameters) { var text = parameters['text'];
OutputText ("I don't need to buy anything right now."); },
"_js_name": "e_k73",
"_types": ["defaultcommand"]
};
elementsNameMap["k73"] = e_k73;
allCommands.push(e_k73);
objectsNameMap["k73"] = e_k73;
e_dragon_lair = {
"elementtype": "object",
"name": "dragon_lair",
"parent": e_the_castle,
"type": "object",
"alias": "huge cave",
"description": "The cave is a dungeon built to imprison a huge dragon. The head of the dragon is stuck inside a hole in the ceiling. There is a river running from the southeast to a steep ramp at the northeast.",
"firstenter": function() { OutputText ("The dragon mentally tells you: <i>Puny mortal! come close to my breath or my claws and I will show what will soon happen to Vourtram and this kingdom!</i>. You reply to the dragon <i>I\u00b4m no Vourtram\u00b4s minions. I\u00b4m "+e_player.playername+", and my mission is to defeat that devil wizard!</i>");
if (e_player.class=="mage") {
OutputText ("However, the Dragon is not convinced: <i>I could not trust a wizard such as you! You are all the same.</i>");
} },
"_js_name": "e_dragon_lair",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dragon_lair"] = e_dragon_lair;
allObjects.push(e_dragon_lair);
objectsNameMap["dragon_lair"] = e_dragon_lair;
e_dragon_sewer_exit = {
"elementtype": "object",
"name": "dragon_sewer_exit",
"parent": e_dragon_lair,
"type": "exit",
"alias": "southwest",
"locked": true,
"lockmessage": "The passage is too narrow for me.",
"_js_name": "e_dragon_sewer_exit",
"_types": ["southwestdirection", "defaultexit"],
"alt": ["sw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["dragon_sewer_exit"] = e_dragon_sewer_exit;
objectReferences.push(["e_dragon_sewer_exit", "to", "e_sewer"]);
allExits.push(e_dragon_sewer_exit);
objectsNameMap["dragon_sewer_exit"] = e_dragon_sewer_exit;
e_dragon = {
"elementtype": "object",
"name": "dragon",
"parent": e_dragon_lair,
"type": "object",
"alias": "chained dragon",
"look": "{if chains.parent=dragon_lair:The huge creature is chained to the cave wall. Its neck is attached into a hole in the ceiling, so that you can\u00b4t see his head.}{if chains.parent=void:The huge creature is pretending to be chained here.}",
"alt": ["Fafnir"],
"unchain": "The chains are too strong. You could try to unlock it.",
"usedefaultprefix": false,
"prefix": "a",
"speak": function() { psay ("{once:Greetings adventurer, I\u00b4m Fafnir, prisoner of the evil }{notfirst:Greetings to you, and death to evil }{ask:fafnir:Vourtram}.");
if (e_player.isMage && e_chains.parent==e_dragon_lair) {
psay ("Or perhaps you are just another {ask:fafnir:wizard:treacherous wizard} deserving only my rage?");
} },
"ask": {"vourtram": function() { psay ("Vourtram is a powerful wizard. He managed to stole the dragon\u00b4s heart {ask:fafnir:gem}."); }, "gem heart": function() { psay ("The wizard that possesses this magical gem gains control over the dragons. If you could find and break this gem, I could help you vanquishing Vourtram. The gem is somewhere in this castle."); }, "wizard wizards treachery": function() { if (e_chains.parent==e_dragon_lair) {
psay ("All wizards are treacherous snakes!");
if (e_player.isMage) {
psay ("You say that you are an enemy of Vourtram. I say that you should prove it!");
}
}
else {
psay ("You unchained me, so I trust you, despite you being a wizard...");
} } },
"_js_name": "e_dragon",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dragon"] = e_dragon;
allObjects.push(e_dragon);
objectsNameMap["dragon"] = e_dragon;
e_lair_to_river = {
"elementtype": "object",
"name": "lair_to_river",
"parent": e_dragon_lair,
"type": "exit",
"alias": "southeast",
"lockmessage": "The dragon yells <i>Get closer to my claws and I will smash you little wizard</i>",
"_js_name": "e_lair_to_river",
"_types": ["southeastdirection", "defaultexit"],
"alt": ["se"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["lair_to_river"] = e_lair_to_river;
objectReferences.push(["e_lair_to_river", "to", "e_sub_river"]);
allExits.push(e_lair_to_river);
objectsNameMap["lair_to_river"] = e_lair_to_river;
e_river_ramp = {
"elementtype": "object",
"name": "river_ramp",
"parent": e_dragon_lair,
"type": "object",
"look": "The ramp leads outside the castle, to the river. It looks safe, but it is impossible to climb back.",
"alias": "ramp",
"usedefaultprefix": false,
"prefix": "a steep",
"suffix": "to the river",
"alt": ["ramp"],
"feature_usegive": true,
"displayverbs": ["Look at", "Use"],
"use": function() { if (e_player.class=="mage" && e_chains.parent==e_dragon_lair) {
OutputText ("The dragon yells <i>Get closer to my claws and I will smash you little wizard</i>. It is not safe to use the ramp.");
}
else if (e_teleport_orb.parent==e_player) {
OutputText ("It is unwise to exit the castle without levaing the teleport orb here. You would not be able to return.");
}
else if (e_princess.parent==e_player.parent) {
OutputText ("You grab the princess...");
psay ("What are you doing? I don't want to get wet! stop!");
OutputText ("You push her into the ramp, and you both emerge at the river.");
savePrincess();
}
else {
OutputText ("Wheeeeeeeeeee! ");
MoveObject (e_player, e_river);
} },
"_js_name": "e_river_ramp",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["river_ramp"] = e_river_ramp;
allObjects.push(e_river_ramp);
objectsNameMap["river_ramp"] = e_river_ramp;
e_chains = {
"elementtype": "object",
"name": "chains",
"parent": e_dragon_lair,
"type": "object",
"alias": "chains",
"look": "the chains are strong, and have a brass lock.",
"feature_container": true,
"close": false,
"picklock": "This looks magical",
"keycount": 1,
"autounlock": true,
"open": true,
"usedefaultprefix": false,
"displayverbs": ["Look at", "Open"],
"openscript": function() { if (this.locked) {
if (this.autounlock && AllKeysAvailable(this)) {
runscriptattribute2 (this, "unlock");
if (!(this.isopen)) {
OpenObject (this);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
}
else {
OpenObject (this);
}
if (this.isopen && e_chains.parent==e_dragon_lair) {
OutputText ("The dragon says <i>I'm free! Thank you, I misjudged you!</i>");
OutputText ("You say <i>Vourtram was not yet defeated. You better pretend to be a prisoner here for a while.</i>.");
MoveObject (e_brass_key, e_void);
MoveObject (e_chains, e_void);
set(e_dragon, "alias", "Fafnir");
set(e_dragon, "prefix", "");
set(e_dragon, "suffix", "the great");
} },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_chains",
"_types": ["openable", "container_lockable", "plural", "defaultobject"],
"locked": true,
"nokeymessage": "You do not have the key.",
"unlockmessage": "Unlocked.",
"lockmessage": "Locked.",
"canlockopen": false,
"autoopen": true,
"closescript": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
else {
CloseObject (this);
} },
"lock": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyLocked", this));
}
else if (this.isopen && !(this.canlockopen)) {
OutputText (overloadedFunctions.DynamicTemplate("CannotLockOpen", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.lockmessage);
set(this, "locked", true);
}
else {
OutputText (this.nokeymessage);
}
} },
"unlock": function() { if (!(this.locked)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyUnlocked", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.unlockmessage);
set(this, "locked", false);
if (this.autoopen && !(this.isopen)) {
TryOpenClose (true, this);
}
}
else {
OutputText (this.nokeymessage);
}
} },
"gender": "they",
"article": "them",
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["chains"] = e_chains;
objectReferences.push(["e_chains", "key", "e_brass_key"]);
allObjects.push(e_chains);
objectsNameMap["chains"] = e_chains;
e_sewer = {
"elementtype": "object",
"name": "sewer",
"parent": e_the_castle,
"type": "object",
"alias": "sewers",
"description": "You are in a dark tunnel system with low roof and an awful smell.  You can only crawl inside. There is a light to the northeast.  You can't reach the exit from here, you must find another way out.",
"usedefaultprefix": false,
"prefix": "the",
"_js_name": "e_sewer",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sewer"] = e_sewer;
allObjects.push(e_sewer);
objectsNameMap["sewer"] = e_sewer;
e_k74 = {
"elementtype": "object",
"name": "k74",
"parent": e_sewer,
"type": "exit",
"alias": "northeast",
"to": e_dragon_lair,
"_js_name": "e_k74",
"_types": ["northeastdirection", "defaultexit"],
"alt": ["ne"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k74"] = e_k74;
allExits.push(e_k74);
objectsNameMap["k74"] = e_k74;
e_sub_river = {
"elementtype": "object",
"name": "sub_river",
"parent": e_the_castle,
"type": "object",
"alias": "subterranean stream",
"description": "The stream ends in a large cave with a profound and clear lake. You can see the light coming from a small hole a few meters above.",
"onexit": function() { if (e_player.class=="mage" && e_player.parent==e_courtyard2) {
OutputText ("you levitate to the hole in the ceiling.");
} },
"_js_name": "e_sub_river",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sub_river"] = e_sub_river;
allObjects.push(e_sub_river);
objectsNameMap["sub_river"] = e_sub_river;
e_k75 = {
"elementtype": "object",
"name": "k75",
"parent": e_sub_river,
"type": "exit",
"alias": "northwest",
"to": e_dragon_lair,
"_js_name": "e_k75",
"_types": ["northwestdirection", "defaultexit"],
"alt": ["nw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k75"] = e_k75;
allExits.push(e_k75);
objectsNameMap["k75"] = e_k75;
e_k76 = {
"elementtype": "object",
"name": "k76",
"parent": e_sub_river,
"type": "exit",
"alias": "up",
"_js_name": "e_k76",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k76"] = e_k76;
objectReferences.push(["e_k76", "to", "e_courtyard2"]);
allExits.push(e_k76);
objectsNameMap["k76"] = e_k76;
e_key_book = {
"elementtype": "object",
"name": "key_book",
"parent": e_sub_river,
"type": "object",
"look": "It is a book with a golden decorated hardcover.<br/>{if player.isMage:The book is The Lesser Key of Solomon. You've read this book when studying magic, it is nothing special.}",
"alias": "golden book",
"visible": false,
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"read": "I'm not going to read it again.",
"_js_name": "e_key_book",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["key_book"] = e_key_book;
allObjects.push(e_key_book);
objectsNameMap["key_book"] = e_key_book;
e_walls = {
"elementtype": "object",
"name": "walls",
"parent": e_sub_river,
"type": "object",
"alias": "glowing walls",
"displayverbs": ["Look at"],
"look": function() { OutputText ("The cave walls contains several small soft light sources. You also find that some of the walls were sculpted, with unknown runes.");
MakeObjectVisible (e_rune_wall); },
"_js_name": "e_walls",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["walls"] = e_walls;
allObjects.push(e_walls);
objectsNameMap["walls"] = e_walls;
e_rune_wall = {
"elementtype": "object",
"name": "rune_wall",
"parent": e_sub_river,
"type": "object",
"alias": "smooth wall with runes",
"look": "You cannot figure out the symbols.",
"visible": false,
"alt": ["wall", "runes", "rune", "symbols"],
"useindividualverblist": false,
"usestandardverblist": true,
"displayverbs": ["Look at"],
"read_away": true,
"push": function() { OutputText ("When you push the wall, it reveals a secret compartment.");
MakeObjectVisible (e_key_book); },
"_js_name": "e_rune_wall",
"_types": ["Readable", "defaultobject"],
"read": function() { doRead (this); },
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["rune_wall"] = e_rune_wall;
allObjects.push(e_rune_wall);
objectsNameMap["rune_wall"] = e_rune_wall;
e_lake = {
"elementtype": "object",
"name": "lake",
"parent": e_sub_river,
"type": "object",
"visible": true,
"scenery": true,
"look": "You see nothing special about it.",
"alt": ["cave", "hole"],
"_js_name": "e_lake",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lake"] = e_lake;
allObjects.push(e_lake);
objectsNameMap["lake"] = e_lake;
e_lib_entrance = {
"elementtype": "object",
"name": "lib_entrance",
"parent": e_the_castle,
"type": "object",
"alias": "entrance to the western tower",
"description": "The corridor ends in a dark lobby to the western tower. The west wall is made of dark marble, and the rest of the room is made of stone. The light comes from torches in the wall.",
"usedefaultprefix": false,
"prefix": "the",
"_js_name": "e_lib_entrance",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lib_entrance"] = e_lib_entrance;
allObjects.push(e_lib_entrance);
objectsNameMap["lib_entrance"] = e_lib_entrance;
e_lib_door = {
"elementtype": "object",
"name": "lib_door",
"parent": e_lib_entrance,
"type": "exit",
"alias": "in",
"locked": true,
"lockmessage": "You can\u00b4t enter while the Medusa head stares at you.",
"_js_name": "e_lib_door",
"_types": ["indirection", "defaultexit"],
"alt": [""],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["lib_door"] = e_lib_door;
objectReferences.push(["e_lib_door", "to", "e_lib1"]);
allExits.push(e_lib_door);
objectsNameMap["lib_door"] = e_lib_door;
e_medusa = {
"elementtype": "object",
"name": "medusa",
"parent": e_lib_entrance,
"type": "object",
"alias": "Medusa head",
"speak": "<i>Come closer so that I can SEE YOU BETTER!</i>",
"drop": false,
"blind": 0,
"feature_usegive": true,
"look": function() { if (e_medusa.parent==e_lib_entrance) {
if (e_medusa.blind>0) {
OutputText ("The Medusa head is still blinded.");
}
else {
OutputText ("The Medusa head is over a pedestal guarding the door. You can\u00b4t get closer.");
}
}
else {
OutputText ("Better leave it alone.");
} },
"take": function() { OutputText ("With your bare hands? these snakes may be poisonous."); },
"_js_name": "e_medusa",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"use": false,
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["medusa"] = e_medusa;
allObjects.push(e_medusa);
objectsNameMap["medusa"] = e_medusa;
e_statues = {
"elementtype": "object",
"name": "statues",
"parent": e_lib_entrance,
"type": "object",
"alias": "statues",
"listalias": "",
"look": "They seem so real, as if someone was turned into stone. Creepy...",
"feature_container": true,
"hidechildren": true,
"listchildren": true,
"listchildrenprefix": "behind the statues, there is",
"displayverbs": ["Look at"],
"_js_name": "e_statues",
"_types": ["surface", "plural", "defaultobject"],
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true,
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"open": false,
"close": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"scenery": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["statues"] = e_statues;
allObjects.push(e_statues);
objectsNameMap["statues"] = e_statues;
e_kibisis = {
"elementtype": "object",
"name": "kibisis",
"parent": e_statues,
"type": "object",
"alt": ["bag", "knapsack", "sack"],
"alias": "silvery knapsack",
"look": "It is a silvery knapsack with bright tassels of gold.",
"feature_container": false,
"open": false,
"close": false,
"feature_usegive": true,
"displayverbs": ["Look at", "Take"],
"medusa": false,
"drop": false,
"dropmsg": "You don't want to lose this.",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"use": true,
"givesingle": true,
"useCmds": [],
"useindividualverblist": false,
"usestandardverblist": true,
"take": function() { if (e_kibisis.parent==e_statues) {
if (e_medusa.blind>0) {
AddToInventory (e_kibisis);
OutputText ("While Medusa is blind, you get the knapsack.");
}
else {
OutputText ("You can't get close to the statues with the Medusa head staring at you.");
}
}
else {
AddToInventory (e_kibisis);
OutputText ("You got it.");
} },
"selfuseanything": function(params) { //JS error! missing parameter
object = params.object;
if (e_kibisis.medusa) { 
if (HasAttribute(object,"enemy")) {
OutputText ("It may look a good idea to use Medusa to defeat every foe, but it is better not risk get bitten by the venomous snakes in her head.");
}
else {
OutputText ("I don't see how the Medusa head will help you now");
}
}
else {
OutputText ("I don't see how this will work.");
} },
"show": function() { if (e_kibisis.medusa) {
OutputText ("You better 'use Kibisis with someone'. This is too dangerous to show around.");
}
else {
OutputText ("Why?");
} },
"selfuseon": {"medusa": function() { if (e_medusa.blind>0) {
OutputText ("You quickly place the head inside the Kibisis, where it is harmless.");
MoveObject (e_medusa, e_void);
UnlockExit (e_lib_door);
SetObjectFlagOn (e_kibisis, "medusa");
set(e_kibisis, "alias", "Medusa inside a knapsack");
set(e_kibisis, "look", "The knapsack cointains the head of Medusa. You better be careful with it.");
}
else {
OutputText ("You can't get the head, it may turn you into stone.");
} }, "vourtram": function() { OutputText ("That would not defeat Vourtram right now. He is too powerful."); }, "vourtram2": function() { OutputText ("Not yet!"); }, "monster": function() { OutputText ("You quickly remembers the Medusa head, and shows it to the monster that turns into stone!");
OutputText ("<b>Victory! VOURTRAM IS DEAD!</b>");
endGameFinish(); } },
"_js_name": "e_kibisis",
"_types": ["container_open", "defaultobject"],
"isopen": true,
"container": true,
"visible": true,
"gender": "it",
"article": "it",
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["kibisis"] = e_kibisis;
allObjects.push(e_kibisis);
objectsNameMap["kibisis"] = e_kibisis;
e_k77 = {
"elementtype": "object",
"name": "k77",
"parent": e_lib_entrance,
"type": "exit",
"alias": "south",
"_js_name": "e_k77",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k77"] = e_k77;
objectReferences.push(["e_k77", "to", "e_corridor1"]);
allExits.push(e_k77);
objectsNameMap["k77"] = e_k77;
e_blindMedusa = {
"elementtype": "object",
"name": "blindMedusa",
"parent": e_lib_entrance,
"type": "turnscript",
"enabled": true,
"script": function() { if (e_medusa.blind>0 && e_medusa.parent==e_lib_entrance) {
DecreaseObjectCounter (e_medusa, "blind");
if (e_medusa.blind==0) {
OutputText ("Medusa opened her eyes, be careful");
}
} },
"_js_name": "e_blindMedusa",
"_types": []
};
elementsNameMap["blindMedusa"] = e_blindMedusa;
allTurnScripts.push(e_blindMedusa);
objectsNameMap["blindMedusa"] = e_blindMedusa;
e_lib2 = {
"elementtype": "object",
"name": "lib2",
"parent": e_the_castle,
"type": "object",
"alias": "library",
"secret": 1,
"description": "The library is full of books and magical equipments.",
"_js_name": "e_lib2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lib2"] = e_lib2;
allObjects.push(e_lib2);
objectsNameMap["lib2"] = e_lib2;
e_k78 = {
"elementtype": "object",
"name": "k78",
"parent": e_lib2,
"type": "exit",
"alias": "out",
"to": e_lib_entrance,
"_js_name": "e_k78",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k78"] = e_k78;
allExits.push(e_k78);
objectsNameMap["k78"] = e_k78;
e_firewall = {
"elementtype": "object",
"name": "firewall",
"parent": e_lib2,
"type": "object",
"alias": "fire wall",
"look": "It's a fierce fire barrier with a magical nature.",
"feature_usegive": true,
"usedefaultprefix": false,
"prefix": "a",
"suffix": "blocking your way into the library",
"displayverbs": ["Look at"],
"useon": {"bucket1": function() { OutputText ("It won't work."); }, "bucket2": function() { OutputText ("It won't work."); } },
"_js_name": "e_firewall",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["firewall"] = e_firewall;
allObjects.push(e_firewall);
objectsNameMap["firewall"] = e_firewall;
e_levitation_spell = {
"elementtype": "object",
"name": "levitation_spell",
"parent": e_lib2,
"type": "object",
"alias": "parchment",
"drop": false,
"takemsg": "You can\u00b4t reach it.",
"visible": false,
"look": "It is a magical parchment.",
"inventoryverbs": ["Look at", "Cast"],
"alt": ["levitate", "float"],
"usedefaultprefix": false,
"prefix": "a",
"suffix": "floating near the ceiling",
"castonobject": false,
"_js_name": "e_levitation_spell",
"_types": ["Spell", "defaultobject"],
"castspell": true,
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"read_away": false,
"read": function() { doRead (this); },
"displayverbs": ["Look at", "Take"],
"take": false,
"givesingle": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["levitation_spell"] = e_levitation_spell;
allObjects.push(e_levitation_spell);
objectsNameMap["levitation_spell"] = e_levitation_spell;
e_bookcase = {
"elementtype": "object",
"name": "bookcase",
"parent": e_lib2,
"type": "object",
"alias": "book case",
"look": "You feel strange goose bumps when you look at the book case. You see hundreds of books on various subjects: <br/>{command:x history:history}<br/>{command:x geography:geography}<br/>{command:x accounting:accounting}<br/>{command:x programming:programming}<br/>{if magical_books.visible:{command:x magic:magic}}",
"feature_usegive": true,
"alt": ["bookcase", "case"],
"visible": false,
"displayverbs": ["Look at"],
"read": "The entire collection? ",
"read_away": true,
"useon": {"key_book": function() { OutputText ("When you place the book in the bookshelf, a section of magical books appears.");
MoveObject (e_key_book, e_void);
MakeObjectVisible (e_magical_books); } },
"_js_name": "e_bookcase",
"_types": ["Readable", "defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bookcase"] = e_bookcase;
allObjects.push(e_bookcase);
objectsNameMap["bookcase"] = e_bookcase;
e_history_books = {
"elementtype": "object",
"name": "history_books",
"parent": e_lib2,
"type": "object",
"scenery": true,
"alias": "history",
"alt": ["historical", "books"],
"visible": false,
"look": "Tens of books about the history of the kings and their feats. Boring.",
"displayverbs": ["Look at"],
"read": "ALL of them?",
"read_away": true,
"_js_name": "e_history_books",
"_types": ["Readable", "plural", "defaultobject"],
"gender": "they",
"article": "them",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["history_books"] = e_history_books;
allObjects.push(e_history_books);
objectsNameMap["history_books"] = e_history_books;
e_magical_books = {
"elementtype": "object",
"name": "magical_books",
"parent": e_lib2,
"type": "object",
"visible": false,
"scenery": true,
"alias": "magical books",
"alt": ["magic", "books"],
"feature_container": true,
"hidechildren": true,
"listchildren": true,
"look": "Most of the books are very theoretical for your taste.",
"displayverbs": ["Look at"],
"read": "ALL of them?",
"read_away": true,
"_js_name": "e_magical_books",
"_types": ["Readable", "plural", "surface", "defaultobject"],
"gender": "they",
"article": "them",
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"open": false,
"close": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["magical_books"] = e_magical_books;
allObjects.push(e_magical_books);
objectsNameMap["magical_books"] = e_magical_books;
e_immortality_book = {
"elementtype": "object",
"name": "immortality_book",
"parent": e_magical_books,
"type": "object",
"alias": "blue book",
"look": "{if immortality_book.parent=player:The immortality recipe is too complicated, but what calls your attention is the undesired side effects:<br/><br/>\"Using incorrect ingredients may cause several side-effects, such as: nausea, dizziness, fluorescent urine, chocolate crave, death, and turning into a cat. If any of this occurs (except for death), we recommend the following recipe as an antidote:<br/><br/>- a handful of ashes from an oak burned by blind a dragon<br/>- a vial of dragon blood<br/>- a clove of garlic<br/>- a pinch of cheese<br/>- a bottle of coconut water<br/><br/>boil everything in a standard witch cauldron. You can garnish with spider webs.}{if immortality_book.parent<>player:You must hold the book in order to read it.}<br/>",
"take": true,
"usedefaultprefix": false,
"prefix": "a",
"suffix": "entitled how to make the immortality potion",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_immortality_book",
"_types": ["Readable", "defaultobject"],
"read_away": false,
"read": function() { doRead (this); },
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["immortality_book"] = e_immortality_book;
allObjects.push(e_immortality_book);
objectsNameMap["immortality_book"] = e_immortality_book;
e_diary_vourtram = {
"elementtype": "object",
"name": "diary_vourtram",
"parent": e_magical_books,
"type": "object",
"alias": "diary",
"look": "This is the wizard's diary of Vourtram. It has details about the spells he researched to obtain his dark powers.<br/>Perhaps Dashiel could figure out an strategy against Vourtram.",
"take": true,
"feature_usegive": true,
"givesingle": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"use": function() { OutputText ("It is black magic, better not use it."); },
"giveto": {"archmage": function() { OutputText ("<i>This is a great finding indeed. We could remove the powers of Vourtram by joining the power of four wizards.</i> ");
if (e_erasmus.visible) {
OutputText ("<i>Erasmus, Raffaella, Hector, and me are the four wizards. I will keep the diary, and wait for the final showdown</i>");
MoveObject (e_diary_vourtram, e_archmage);
}
else {
psay ("Raffaella, Hector, and me are three wizards, we need another wizard to perform the ritual.");
} }, "erasmus": function() { OutputText ("<i>I think Dashiel is more indicated to have this book</i> "); } },
"_js_name": "e_diary_vourtram",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["diary_vourtram"] = e_diary_vourtram;
allObjects.push(e_diary_vourtram);
objectsNameMap["diary_vourtram"] = e_diary_vourtram;
e_cauldron = {
"elementtype": "object",
"name": "cauldron",
"parent": e_lib2,
"type": "object",
"alias": "cauldron",
"look": "a standard size witch cauldron kit, with firewood and matches. {if cauldron.switchedon: The fire under the cauldron is lit.}<br/>It contains:<br/>{if oak_shield.parent=cauldron:oak ashes<br/>}{if dragon_blood.parent=cauldron:dragon blood<br/>}{if garlic.parent=cauldron:garlic<br/>}{if cauldron.cheese:a pinch of cheese<br/>}{if coconut_water.parent=cauldron:coconut water}",
"feature_usegive": true,
"feature_switchable": true,
"switchonmsg": "You use a match to turn the fire on.",
"switchoffmsg": "You put the fire off.",
"cheese": false,
"displayverbs": ["Look at", "Switch on", "Switch off"],
"alt": ["matches", "pot", "firewood"],
"useon": {"dragon_blood": function() { add_cauldron (e_dragon_blood); }, "coconut_water": function() { add_cauldron (e_coconut_water); }, "oak_shield": function() { add_cauldron (e_oak_shield); }, "cheese": function() { add_cauldron (e_cheese); }, "garlic": function() { add_cauldron (e_garlic); } },
"inventoryverbs": ["Look at", "Use", "Drop", "Switch on", "Switch off"],
"_js_name": "e_cauldron",
"_types": ["switchable", "defaultobject"],
"switchedon": false,
"turnon": function() { if (ListContains(ScopeReachable(), this)) {
if (this.switchedon) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadySwitchedOn", this));
}
else {
if (HasString(this, "switchonmsg")) {
OutputText (this.switchonmsg);
}
else {
OutputText (overloadedFunctions.DynamicTemplate("SwitchedOn", this));
}
set(this, "switchedon", true);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("DefaultTurnOn", this));
} },
"turnoff": function() { if (ListContains(ScopeReachable(), this)) {
if (!(this.switchedon)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadySwitchedOff", this));
}
else {
if (HasString(this, "switchoffmsg")) {
OutputText (this.switchoffmsg);
}
else {
OutputText (overloadedFunctions.DynamicTemplate("SwitchedOff", this));
}
set(this, "switchedon", false);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("DefaultTurnOff", this));
} },
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["cauldron"] = e_cauldron;
allObjects.push(e_cauldron);
objectsNameMap["cauldron"] = e_cauldron;
e_revert_potion = {
"elementtype": "object",
"name": "revert_potion",
"parent": e_cauldron,
"type": "object",
"look": "It is a revert potion for the side-effects of a bad immortality potion.",
"take": true,
"alias": "revert potion",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_revert_potion",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["revert_potion"] = e_revert_potion;
allObjects.push(e_revert_potion);
objectsNameMap["revert_potion"] = e_revert_potion;
e_ingredients = {
"elementtype": "object",
"name": "ingredients",
"parent": e_lib2,
"type": "object",
"look": "Various magical ingredients",
"feature_container": true,
"hidechildren": true,
"listchildren": true,
"listchildrenprefix": "You may be interested in:",
"displayverbs": ["Look at"],
"usedefaultprefix": false,
"_js_name": "e_ingredients",
"_types": ["plural", "surface", "defaultobject"],
"gender": "they",
"article": "them",
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true,
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"open": false,
"close": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"scenery": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ingredients"] = e_ingredients;
allObjects.push(e_ingredients);
objectsNameMap["ingredients"] = e_ingredients;
e_dragon_blood = {
"elementtype": "object",
"name": "dragon_blood",
"parent": e_ingredients,
"type": "object",
"alias": "dragon blood",
"look": "Looks red.",
"usedefaultprefix": false,
"prefix": "a vial of ",
"alt": ["vial"],
"take": true,
"feature_usegive": true,
"use": true,
"_js_name": "e_dragon_blood",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dragon_blood"] = e_dragon_blood;
allObjects.push(e_dragon_blood);
objectsNameMap["dragon_blood"] = e_dragon_blood;
e_coconut_water = {
"elementtype": "object",
"name": "coconut_water",
"parent": e_ingredients,
"type": "object",
"alias": "coconut water",
"look": "Brought to you by trained european's swallows.",
"usedefaultprefix": false,
"prefix": "a bottle of ",
"take": true,
"feature_usegive": true,
"use": true,
"_js_name": "e_coconut_water",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["coconut_water"] = e_coconut_water;
allObjects.push(e_coconut_water);
objectsNameMap["coconut_water"] = e_coconut_water;
e_geo_books = {
"elementtype": "object",
"name": "geo_books",
"parent": e_lib2,
"type": "object",
"scenery": true,
"alias": "geography",
"alt": ["books"],
"visible": false,
"look": "There are a dozen books with maps from all over the world. Pretty useless, right now.",
"displayverbs": ["Look at"],
"read": "ALL of them?",
"read_away": true,
"_js_name": "e_geo_books",
"_types": ["Readable", "plural", "defaultobject"],
"gender": "they",
"article": "them",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["geo_books"] = e_geo_books;
allObjects.push(e_geo_books);
objectsNameMap["geo_books"] = e_geo_books;
e_accounting_books = {
"elementtype": "object",
"name": "accounting_books",
"parent": e_lib2,
"type": "object",
"scenery": true,
"alias": "accounting",
"alt": ["historical", "books"],
"visible": false,
"look": "Tens of books about the accounting of the kings. Beyond boring.",
"displayverbs": ["Look at"],
"read": "ALL of them?",
"read_away": true,
"_js_name": "e_accounting_books",
"_types": ["Readable", "plural", "defaultobject"],
"gender": "they",
"article": "them",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["accounting_books"] = e_accounting_books;
allObjects.push(e_accounting_books);
objectsNameMap["accounting_books"] = e_accounting_books;
e_computer_books = {
"elementtype": "object",
"name": "computer_books",
"parent": e_lib2,
"type": "object",
"scenery": true,
"alias": "programming",
"alt": ["historical", "books"],
"visible": false,
"look": "A few books about programming languages. What type of witchcraft is programming?",
"displayverbs": ["Look at"],
"read": "ALL of them?",
"read_away": true,
"_js_name": "e_computer_books",
"_types": ["Readable", "plural", "defaultobject"],
"gender": "they",
"article": "them",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["computer_books"] = e_computer_books;
allObjects.push(e_computer_books);
objectsNameMap["computer_books"] = e_computer_books;
e_lib1 = {
"elementtype": "object",
"name": "lib1",
"parent": e_the_castle,
"type": "object",
"alias": "dark and void room",
"_js_name": "e_lib1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lib1"] = e_lib1;
allObjects.push(e_lib1);
objectsNameMap["lib1"] = e_lib1;
e_k79 = {
"elementtype": "object",
"name": "k79",
"parent": e_lib1,
"type": "exit",
"alias": "north",
"_js_name": "e_k79",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k79"] = e_k79;
objectReferences.push(["e_k79", "to", "e_lib12"]);
allExits.push(e_k79);
objectsNameMap["k79"] = e_k79;
e_k80 = {
"elementtype": "object",
"name": "k80",
"parent": e_lib1,
"type": "exit",
"alias": "south",
"_js_name": "e_k80",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k80"] = e_k80;
objectReferences.push(["e_k80", "to", "e_lib12"]);
allExits.push(e_k80);
objectsNameMap["k80"] = e_k80;
e_k81 = {
"elementtype": "object",
"name": "k81",
"parent": e_lib1,
"type": "exit",
"alias": "east",
"_js_name": "e_k81",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k81"] = e_k81;
objectReferences.push(["e_k81", "to", "e_lib12"]);
allExits.push(e_k81);
objectsNameMap["k81"] = e_k81;
e_k82 = {
"elementtype": "object",
"name": "k82",
"parent": e_lib1,
"type": "exit",
"alias": "west",
"_js_name": "e_k82",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k82"] = e_k82;
objectReferences.push(["e_k82", "to", "e_lib12"]);
allExits.push(e_k82);
objectsNameMap["k82"] = e_k82;
e_k83 = {
"elementtype": "object",
"name": "k83",
"parent": e_lib1,
"type": "exit",
"alias": "northeast",
"_js_name": "e_k83",
"_types": ["northeastdirection", "defaultexit"],
"alt": ["ne"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k83"] = e_k83;
objectReferences.push(["e_k83", "to", "e_lib12"]);
allExits.push(e_k83);
objectsNameMap["k83"] = e_k83;
e_k84 = {
"elementtype": "object",
"name": "k84",
"parent": e_lib1,
"type": "exit",
"alias": "southwest",
"_js_name": "e_k84",
"_types": ["southwestdirection", "defaultexit"],
"alt": ["sw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k84"] = e_k84;
objectReferences.push(["e_k84", "to", "e_lib12"]);
allExits.push(e_k84);
objectsNameMap["k84"] = e_k84;
e_k85 = {
"elementtype": "object",
"name": "k85",
"parent": e_lib1,
"type": "exit",
"alias": "southeast",
"_js_name": "e_k85",
"_types": ["southeastdirection", "defaultexit"],
"alt": ["se"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k85"] = e_k85;
objectReferences.push(["e_k85", "to", "e_lib12"]);
allExits.push(e_k85);
objectsNameMap["k85"] = e_k85;
e_k86 = {
"elementtype": "object",
"name": "k86",
"parent": e_lib1,
"type": "exit",
"alias": "northwest",
"_js_name": "e_k86",
"_types": ["northwestdirection", "defaultexit"],
"alt": ["nw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k86"] = e_k86;
objectReferences.push(["e_k86", "to", "e_lib12"]);
allExits.push(e_k86);
objectsNameMap["k86"] = e_k86;
e_libTurn = {
"elementtype": "object",
"name": "libTurn",
"parent": e_lib1,
"type": "turnscript",
"enabled": true,
"script": function() { doLibTurn(); },
"_js_name": "e_libTurn",
"_types": []
};
elementsNameMap["libTurn"] = e_libTurn;
allTurnScripts.push(e_libTurn);
objectsNameMap["libTurn"] = e_libTurn;
e_lib12 = {
"elementtype": "object",
"name": "lib12",
"parent": e_the_castle,
"type": "object",
"alias": "dark and void room",
"_js_name": "e_lib12",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lib12"] = e_lib12;
allObjects.push(e_lib12);
objectsNameMap["lib12"] = e_lib12;
e_k87 = {
"elementtype": "object",
"name": "k87",
"parent": e_lib12,
"type": "exit",
"alias": "south",
"to": e_lib1,
"_js_name": "e_k87",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k87"] = e_k87;
allExits.push(e_k87);
objectsNameMap["k87"] = e_k87;
e_k88 = {
"elementtype": "object",
"name": "k88",
"parent": e_lib12,
"type": "exit",
"alias": "north",
"to": e_lib1,
"_js_name": "e_k88",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k88"] = e_k88;
allExits.push(e_k88);
objectsNameMap["k88"] = e_k88;
e_k89 = {
"elementtype": "object",
"name": "k89",
"parent": e_lib12,
"type": "exit",
"alias": "west",
"to": e_lib1,
"_js_name": "e_k89",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k89"] = e_k89;
allExits.push(e_k89);
objectsNameMap["k89"] = e_k89;
e_k90 = {
"elementtype": "object",
"name": "k90",
"parent": e_lib12,
"type": "exit",
"alias": "east",
"to": e_lib1,
"_js_name": "e_k90",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k90"] = e_k90;
allExits.push(e_k90);
objectsNameMap["k90"] = e_k90;
e_k91 = {
"elementtype": "object",
"name": "k91",
"parent": e_lib12,
"type": "exit",
"alias": "southwest",
"to": e_lib1,
"_js_name": "e_k91",
"_types": ["southwestdirection", "defaultexit"],
"alt": ["sw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k91"] = e_k91;
allExits.push(e_k91);
objectsNameMap["k91"] = e_k91;
e_k92 = {
"elementtype": "object",
"name": "k92",
"parent": e_lib12,
"type": "exit",
"alias": "northeast",
"to": e_lib1,
"_js_name": "e_k92",
"_types": ["northeastdirection", "defaultexit"],
"alt": ["ne"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k92"] = e_k92;
allExits.push(e_k92);
objectsNameMap["k92"] = e_k92;
e_k93 = {
"elementtype": "object",
"name": "k93",
"parent": e_lib12,
"type": "exit",
"alias": "northwest",
"to": e_lib1,
"_js_name": "e_k93",
"_types": ["northwestdirection", "defaultexit"],
"alt": ["nw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k93"] = e_k93;
allExits.push(e_k93);
objectsNameMap["k93"] = e_k93;
e_k94 = {
"elementtype": "object",
"name": "k94",
"parent": e_lib12,
"type": "exit",
"alias": "southeast",
"to": e_lib1,
"_js_name": "e_k94",
"_types": ["southeastdirection", "defaultexit"],
"alt": ["se"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k94"] = e_k94;
allExits.push(e_k94);
objectsNameMap["k94"] = e_k94;
e_libTurn12 = {
"elementtype": "object",
"name": "libTurn12",
"parent": e_lib12,
"type": "turnscript",
"script": function() { doLibTurn(); },
"_js_name": "e_libTurn12",
"_types": []
};
elementsNameMap["libTurn12"] = e_libTurn12;
allTurnScripts.push(e_libTurn12);
objectsNameMap["libTurn12"] = e_libTurn12;
e_pantry = {
"elementtype": "object",
"name": "pantry",
"parent": e_the_castle,
"type": "object",
"alias": "large pantry",
"description": "The room is cool and the air filled with the smell of fresh food. Countless shelves hold supplies for a long siege. Several barrels stores various types of flour. The walls, the floor, and the ceiling are of ancient stones.",
"enter": function() { if (e_cook.parent == e_pantry) {
OutputText ("The cook is drinking from a bottle of wine. You decide to hide outside, watching where the cook hides the bottle.");
MoveObject (e_wine, e_pantry);
OutputText ("He tries to hide the {object:wine} inside a barrel of rye flour, and leaves the room smiling at you.");
MoveObject (e_cook, e_kitchen);
set(e_cook, "drinking", 0);
} },
"_js_name": "e_pantry",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["pantry"] = e_pantry;
allObjects.push(e_pantry);
objectsNameMap["pantry"] = e_pantry;
e_k95 = {
"elementtype": "object",
"name": "k95",
"parent": e_pantry,
"type": "exit",
"alias": "north",
"_js_name": "e_k95",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k95"] = e_k95;
objectReferences.push(["e_k95", "to", "e_corridor1"]);
allExits.push(e_k95);
objectsNameMap["k95"] = e_k95;
e_ptry_shelves = {
"elementtype": "object",
"name": "ptry_shelves",
"parent": e_pantry,
"type": "object",
"scenery": true,
"look": "They are full of goods.",
"alias": "shelves",
"_js_name": "e_ptry_shelves",
"_types": ["plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ptry_shelves"] = e_ptry_shelves;
allObjects.push(e_ptry_shelves);
objectsNameMap["ptry_shelves"] = e_ptry_shelves;
e_ptry_barrels = {
"elementtype": "object",
"name": "ptry_barrels",
"parent": e_pantry,
"type": "object",
"look": "They are full or many different flour types.",
"scenery": true,
"alias": "barrels",
"_js_name": "e_ptry_barrels",
"_types": ["plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ptry_barrels"] = e_ptry_barrels;
allObjects.push(e_ptry_barrels);
objectsNameMap["ptry_barrels"] = e_ptry_barrels;
e_ptry_food = {
"elementtype": "object",
"name": "ptry_food",
"parent": e_pantry,
"type": "object",
"scenery": true,
"alias": "food",
"look": "There are plenty of food here. However, your are not hungry.",
"_js_name": "e_ptry_food",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ptry_food"] = e_ptry_food;
allObjects.push(e_ptry_food);
objectsNameMap["ptry_food"] = e_ptry_food;
e_ptry_flour = {
"elementtype": "object",
"name": "ptry_flour",
"parent": e_pantry,
"type": "object",
"scenery": true,
"alias": "flour",
"look": "It is just flour.",
"_js_name": "e_ptry_flour",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ptry_flour"] = e_ptry_flour;
allObjects.push(e_ptry_flour);
objectsNameMap["ptry_flour"] = e_ptry_flour;
e_box = {
"elementtype": "object",
"name": "box",
"parent": e_pantry,
"type": "object",
"alias": "box",
"feature_container": true,
"hidechildren": false,
"look": "Something smells fishy here.",
"displayverbs": ["Look at", "Open"],
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_box",
"_types": ["container_closed", "defaultobject"],
"open": true,
"close": true,
"container": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"listchildren": true,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["box"] = e_box;
allObjects.push(e_box);
objectsNameMap["box"] = e_box;
e_red_herring = {
"elementtype": "object",
"name": "red_herring",
"parent": e_box,
"type": "object",
"alias": "red herring",
"look": "A smelly dried smoked herring.",
"take": true,
"feature_usegive": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"use": true,
"givesingle": true,
"useCmds": ["put"],
"selfuseon": {"vent": function() { OutputText ("You put the herring on the vent, and hears the hound approaching. The dog tries to grab the herring, but did not reach it. The jailer went down the stairs, complaining ...");
psay ("C'mon Shorty! It is not time to play, we have to watch the princess...");
MoveObject (e_jailer, e_void);
MoveObject (e_red_herring, e_void); }, "grate_dungeon": function() { OutputText ("When you approach the red herring to the door, the dog goes crazy. You think it is not advisable to call the attention of the jailer to your presence."); } },
"_js_name": "e_red_herring",
"_types": ["UseAltType", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["red_herring"] = e_red_herring;
allObjects.push(e_red_herring);
objectsNameMap["red_herring"] = e_red_herring;
e_garlic = {
"elementtype": "object",
"name": "garlic",
"parent": e_pantry,
"type": "object",
"alias": "clove of garlic",
"take": true,
"feature_usegive": true,
"use": true,
"givesingle": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"_js_name": "e_garlic",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["garlic"] = e_garlic;
allObjects.push(e_garlic);
objectsNameMap["garlic"] = e_garlic;
e_corridor1 = {
"elementtype": "object",
"name": "corridor1",
"parent": e_the_castle,
"type": "object",
"alias": "wide corridor",
"description": "A wide corridor made of ancient stone. To the north is the entrance to western tower, to the east is the kitchen, and to the south is the pantry.",
"_js_name": "e_corridor1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["corridor1"] = e_corridor1;
allObjects.push(e_corridor1);
objectsNameMap["corridor1"] = e_corridor1;
e_k96 = {
"elementtype": "object",
"name": "k96",
"parent": e_corridor1,
"type": "exit",
"alias": "south",
"to": e_pantry,
"_js_name": "e_k96",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k96"] = e_k96;
allExits.push(e_k96);
objectsNameMap["k96"] = e_k96;
e_k97 = {
"elementtype": "object",
"name": "k97",
"parent": e_corridor1,
"type": "exit",
"alias": "north",
"to": e_lib_entrance,
"_js_name": "e_k97",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k97"] = e_k97;
allExits.push(e_k97);
objectsNameMap["k97"] = e_k97;
e_k98 = {
"elementtype": "object",
"name": "k98",
"parent": e_corridor1,
"type": "exit",
"alias": "east",
"_js_name": "e_k98",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k98"] = e_k98;
objectReferences.push(["e_k98", "to", "e_kitchen"]);
allExits.push(e_k98);
objectsNameMap["k98"] = e_k98;
e_kitchen = {
"elementtype": "object",
"name": "kitchen",
"parent": e_the_castle,
"type": "object",
"usedefaultprefix": false,
"prefix": "the",
"alias": "kitchen",
"description": "The room is large and bright, with a large cabinet separating the room in two. The large stove is in the western side, and  the eastern side leads to the dining room. ",
"_js_name": "e_kitchen",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["kitchen"] = e_kitchen;
allObjects.push(e_kitchen);
objectsNameMap["kitchen"] = e_kitchen;
e_k99 = {
"elementtype": "object",
"name": "k99",
"parent": e_kitchen,
"type": "exit",
"alias": "west",
"to": e_corridor1,
"_js_name": "e_k99",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k99"] = e_k99;
allExits.push(e_k99);
objectsNameMap["k99"] = e_k99;
e_exit_dining = {
"elementtype": "object",
"name": "exit_dining",
"parent": e_kitchen,
"type": "exit",
"alias": "east",
"locked": true,
"lockmessage": "There is a guard blocking this way.",
"_js_name": "e_exit_dining",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["exit_dining"] = e_exit_dining;
objectReferences.push(["e_exit_dining", "to", "e_dining_room"]);
allExits.push(e_exit_dining);
objectsNameMap["exit_dining"] = e_exit_dining;
e_k100 = {
"elementtype": "object",
"name": "k100",
"parent": e_kitchen,
"type": "exit",
"alias": "south",
"_js_name": "e_k100",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k100"] = e_k100;
objectReferences.push(["e_k100", "to", "e_courtyard2"]);
allExits.push(e_k100);
objectsNameMap["k100"] = e_k100;
e_cook = {
"elementtype": "object",
"name": "cook",
"parent": e_kitchen,
"type": "object",
"alias": "cook",
"look": "A shorty and chubby guy, wearing cook\u00b4s uniform and a dirty apron. He looks very busy, but is a good person.",
"drinking": 0,
"feature_usegive": true,
"coins": 2,
"speak": function() { psay ("What? I\u00b4m busy... have to {ask:cook:cooking:cook} for hundreds of {ask:cook:soldiers} and thousands of {ask:cook:rats}."); },
"ask": {"rats": function() { psay ("This place is full of rats! And who knows where is the {ask:cook:exterminator} guy ... "); }, "exterminator": function() { psay ("We are paying a coin for five captured rats. Are you interested? Bring me a rat and I will give you the job."); }, "soldiers": function() { psay ("All they do are eating....day and night."); }, "food": function() { psay ("Wait with the others! food, food, food... and {ask:cook:rats}!"); }, "cook cooking": function() { psay ("Cooking all day... gosh! I need supplies! Can you watch this pot for a few moments, please?");
OutputText ("The cooks leaves the kitchen to the pantry.");
MoveObject (e_cook, e_pantry);
set(e_cook, "drinking", 5);
SetObjectFlagOff (e_kit_cabinet, "locked"); } },
"give": {"mouse": function() { psay ("Ok! you did it! The job is yours. Go to the music hall and fetch the rats there.");
OutputText ("The cook talks to the guard, that let you enter the dining room.");
UnlockExit (e_exit_dining);
MoveObject (e_mouse, e_void); } },
"_js_name": "e_cook",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["cook"] = e_cook;
allObjects.push(e_cook);
objectsNameMap["cook"] = e_cook;
e_wine = {
"elementtype": "object",
"name": "wine",
"parent": e_cook,
"type": "object",
"alias": "bottle of wine",
"look": "A cheap wine.",
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_wine",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["wine"] = e_wine;
allObjects.push(e_wine);
objectsNameMap["wine"] = e_wine;
e_sugar = {
"elementtype": "object",
"name": "sugar",
"parent": e_cook,
"type": "object",
"usedefaultprefix": false,
"prefix": "a handful of",
"alias": "sugar cubes",
"eat": "You don't like sweeties.",
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_sugar",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sugar"] = e_sugar;
allObjects.push(e_sugar);
objectsNameMap["sugar"] = e_sugar;
e_kit_cabinet = {
"elementtype": "object",
"name": "kit_cabinet",
"parent": e_kitchen,
"type": "object",
"feature_container": true,
"keycount": 1,
"nokeymessage": "The cook stops you: <i>Hey, don\u00b4t touch my equipment.</i>",
"alias": "cabinet",
"look": "An ordinary wooden cabinet.",
"lockmessage": "The cook stops you: <i>Hey, don\u00b4t touch my equipment.</i>",
"listchildren": true,
"openscript": function() { if (this.locked) {
if (this.autounlock && AllKeysAvailable(this)) {
runscriptattribute2 (this, "unlock");
if (!(this.isopen)) {
OpenObject (this);
}
}
else {
OutputText ("The cook stops you: <i>Hey, don\u00b4t touch my equipment.</i>.");
}
}
else {
OpenObject (this);
} },
"displayverbs": ["Look at", "Open", "Close"],
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"useindividualverblist":false,
"usestandardverblist":true,
"key": e_null_key,
"_js_name": "e_kit_cabinet",
"_types": ["container_lockable", "container_closed", "defaultobject"],
"locked": true,
"unlockmessage": "Unlocked.",
"canlockopen": false,
"autoopen": true,
"autounlock": true,
"closescript": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
else {
CloseObject (this);
} },
"lock": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyLocked", this));
}
else if (this.isopen && !(this.canlockopen)) {
OutputText (overloadedFunctions.DynamicTemplate("CannotLockOpen", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.lockmessage);
set(this, "locked", true);
}
else {
OutputText (this.nokeymessage);
}
} },
"unlock": function() { if (!(this.locked)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyUnlocked", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.unlockmessage);
set(this, "locked", false);
if (this.autoopen && !(this.isopen)) {
TryOpenClose (true, this);
}
}
else {
OutputText (this.nokeymessage);
}
} },
"open": true,
"close": true,
"container": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["kit_cabinet"] = e_kit_cabinet;
allObjects.push(e_kit_cabinet);
objectsNameMap["kit_cabinet"] = e_kit_cabinet;
e_mouse_trap = {
"elementtype": "object",
"name": "mouse_trap",
"parent": e_kit_cabinet,
"type": "object",
"alias": "mouse trap",
"take": true,
"feature_usegive": true,
"cheese": false,
"look": "An ordinary medieval mouse trap.{if not mouse_trap.cheese: It needs a bait to work.}",
"useCmds": ["put"],
"use": function() { if (e_mouse_trap.cheese==true) {
if (e_mouse.parent==e_player.parent) {
OutputText ("You got a fat rat.");
set(e_mouse, "visible", true);
MoveObject (e_mouse, e_player);
}
else {
OutputText ("You got nothing.");
}
}
else {
OutputText ("Without a bait?");
} },
"useon": {"cheese": function() { set_mouse_trap(); } },
"selfuseon": {"cheese": function() { set_mouse_trap(); } },
"_js_name": "e_mouse_trap",
"_types": ["UseAltType", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["mouse_trap"] = e_mouse_trap;
allObjects.push(e_mouse_trap);
objectsNameMap["mouse_trap"] = e_mouse_trap;
e_kit_stuff = {
"elementtype": "object",
"name": "kit_stuff",
"parent": e_kit_cabinet,
"type": "object",
"look": "Several utilities for cooking ... for  a battalion.",
"alias": "kitchen equipment",
"scenery": true,
"_js_name": "e_kit_stuff",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["kit_stuff"] = e_kit_stuff;
allObjects.push(e_kit_stuff);
objectsNameMap["kit_stuff"] = e_kit_stuff;
e_courtyard2 = {
"elementtype": "object",
"name": "courtyard2",
"parent": e_the_castle,
"type": "object",
"alias": "courtyard",
"description": "The courtyard is large area occupied by the barracks of the Vourtram\u00b4s armies. You are near a large well, in the front of the kitchen. To the south, passing some guards, you can hear the sounds of a forgery. To the east lays many tents and numerous soldiers.",
"usedefaultprefix": false,
"prefix": "the",
"firstenter": function() { if (e_player.class=="thief") {
set(e_well, "displayverbs", Split("Look at;Climb", ";"));
} },
"_js_name": "e_courtyard2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["courtyard2"] = e_courtyard2;
allObjects.push(e_courtyard2);
objectsNameMap["courtyard2"] = e_courtyard2;
e_k101 = {
"elementtype": "object",
"name": "k101",
"parent": e_courtyard2,
"type": "exit",
"alias": "north",
"to": e_kitchen,
"_js_name": "e_k101",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k101"] = e_k101;
allExits.push(e_k101);
objectsNameMap["k101"] = e_k101;
e_well = {
"elementtype": "object",
"name": "well",
"parent": e_courtyard2,
"type": "object",
"scenery": false,
"look": "It is a dark climb down. You can hear the sound of a subterranean river.",
"usestandardverblist": true,
"displayverbs": ["Look at"],
"climb": function() { if (e_player.class=="thief") {
OutputText ("You carefully descend the slippery walls into the dark.");
MoveObject (e_player, e_sub_river);
}
else {
OutputText ("I would probably break my neck.");
} },
"_js_name": "e_well",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["well"] = e_well;
allObjects.push(e_well);
objectsNameMap["well"] = e_well;
e_well_exit = {
"elementtype": "object",
"name": "well_exit",
"parent": e_courtyard2,
"type": "exit",
"alias": "well",
"prefix": "",
"locked": true,
"lockmessage": "It is too slippery to climb down.",
"look": "it is a dark climb down.",
"visible": true,
"scenery": true,
"to": e_sub_river,
"_js_name": "e_well_exit",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"suffix": "",
"displayverbs": ["Go"],
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["well_exit"] = e_well_exit;
allExits.push(e_well_exit);
objectsNameMap["well_exit"] = e_well_exit;
e_barracks = {
"elementtype": "object",
"name": "barracks",
"parent": e_courtyard2,
"type": "exit",
"alias": "in",
"lookonly": true,
"look": "You can hear several voices coming from the tents. Looks like they are eating.",
"to": e_courtyard2,
"_js_name": "e_barracks",
"_types": ["indirection", "defaultexit"],
"alt": [""],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["barracks"] = e_barracks;
allExits.push(e_barracks);
objectsNameMap["barracks"] = e_barracks;
e_lobby_exit = {
"elementtype": "object",
"name": "lobby_exit",
"parent": e_courtyard2,
"type": "exit",
"alias": "east",
"locked": true,
"lockmessage": "You cannot pass the barracks without being noticed.",
"_js_name": "e_lobby_exit",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["lobby_exit"] = e_lobby_exit;
objectReferences.push(["e_lobby_exit", "to", "e_lobby"]);
allExits.push(e_lobby_exit);
objectsNameMap["lobby_exit"] = e_lobby_exit;
e_sigrun = {
"elementtype": "object",
"name": "sigrun",
"parent": e_courtyard2,
"type": "object",
"visible": false,
"alias": "Sigrun",
"suffix": "the Valkyrie",
"look": "She is a tall and strong woman with a long red braid. She wears a shining full armor suite, and has no weapons.",
"danger": "friend",
"exp": 8,
"armour": 5,
"stance": "none",
"displayverbs": ["Look at", "Speak to", "Fight"],
"damage": 1,
"speak": function() { psay ("{once:My name is Sigrun, and I'm here to train you to became real warriors. }Let me see how good {ask:sigrun:fighter} are you! Do you want to fight with me, soldier?"); },
"ask": {"fighter fight war warrior": function() { psay ("I'm a mercenary {ask:sigrun:Valkyrie} warrior! I'm here to train the {ask:sigrun:troops} of {ask:sigrun:Vourtram}."); }, "Vourtram": function() { psay ("Never saw him nor his {ask:sigrun:demons}. I'm here for the payment, and for the fun of kicking some lazy butts."); }, "troops troop": function() { psay ("This army is in a pitiful condition. The only real fighter is the {ask:sigrun:captain}."); }, "captain": function() { psay ("Such a wasted talent on bureaucratic service."); }, "Valkyrie": function() { psay ("We are a breed of superior warriors. For training, we usually fight barehanded. You can bring your best weapons, if you like."); }, "demons": function() { psay ("I don't spar with them. They don't play fair... witchcraft is dishonorable."); } },
"_js_name": "e_sigrun",
"_types": ["Enemy", "namedfemale", "defaultobject"],
"enemy": "yes",
"ht": 10,
"aggressive": false,
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"usedefaultprefix": false,
"gender": "she",
"article": "her",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sigrun"] = e_sigrun;
allObjects.push(e_sigrun);
objectsNameMap["sigrun"] = e_sigrun;
e_exterminator = {
"elementtype": "object",
"name": "exterminator",
"parent": e_courtyard2,
"type": "object",
"alias": "man",
"look": "He is eating cheese and looks a bit drunk. ",
"feature_usegive": true,
"coins": 1,
"usedefaultprefix": false,
"prefix": "a dirty looking",
"alt": ["man", "exterminator"],
"speak": function() { psay ("Hey pal! Don't you have some {ask:man:wine}? I will give you some {ask:man:cheese} if you bring me some wine."); },
"ask": {"wine": function() { psay ("Nobody can drink anymore at the castle. Master's orders."); }, "cheese": function() { psay ("It should be for rat catching... I'm the exterminator, ya know?");
set(e_exterminator, "alias", "exterminator"); } },
"give": {"wine": function() { psay ("Thank you! here, you can have all the cheese.");
OutputText ("The man drinks the wine and leaves.");
MoveObject (e_cheese, e_player);
MoveObject (e_exterminator, e_void);
MoveObject (e_wine, e_void); } },
"_js_name": "e_exterminator",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["exterminator"] = e_exterminator;
allObjects.push(e_exterminator);
objectsNameMap["exterminator"] = e_exterminator;
e_cheese = {
"elementtype": "object",
"name": "cheese",
"parent": e_exterminator,
"type": "object",
"look": "Smelly cheese.",
"alias": "cheese",
"take": true,
"feature_usegive": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"use": true,
"givesingle": true,
"useCmds": ["put"],
"selfuseon": {"mouse_trap": function() { set_mouse_trap(); } },
"useon": {"mouse_trap": function() { set_mouse_trap(); }, "cauldron": function() { add_cauldron (e_cheese); } },
"_js_name": "e_cheese",
"_types": ["UseAltType", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["cheese"] = e_cheese;
allObjects.push(e_cheese);
objectsNameMap["cheese"] = e_cheese;
e_mouse = {
"elementtype": "object",
"name": "mouse",
"parent": e_courtyard2,
"type": "object",
"look": "A dead rat.",
"alias": "rat",
"visible": false,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_mouse",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"take": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["mouse"] = e_mouse;
allObjects.push(e_mouse);
objectsNameMap["mouse"] = e_mouse;
e_exit_to_forge = {
"elementtype": "object",
"name": "exit_to_forge",
"parent": e_courtyard2,
"type": "exit",
"alias": "south",
"locked": true,
"lockmessage": "You cannot pass the barracks without being noticed.",
"_js_name": "e_exit_to_forge",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["exit_to_forge"] = e_exit_to_forge;
objectReferences.push(["e_exit_to_forge", "to", "e_forge"]);
allExits.push(e_exit_to_forge);
objectsNameMap["exit_to_forge"] = e_exit_to_forge;
e_sturdy_tree = {
"elementtype": "object",
"name": "sturdy_tree",
"parent": e_courtyard2,
"type": "object",
"alias": "tree",
"look": "It looks sturdy and shady. Someone could climb this tree without being noticed.",
"displayverbs": ["Look at"],
"useindividualverblist":false,
"usestandardverblist":true,
"climb": function() { if (e_player.isThief) {
if (e_window_court.isopen) {
OutputText ("You climb the tree and enter the bedroom by the open window.");
MoveObject (e_player, e_bedroom3);
}
else {
OutputText ("You climb the tree, but the only window at your reach is closed by the inside. You decide it would draw too much attention to try to open this.");
}
}
else {
OutputText ("You are too clumsy to climb this tree.");
} },
"_js_name": "e_sturdy_tree",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["sturdy_tree"] = e_sturdy_tree;
allObjects.push(e_sturdy_tree);
objectsNameMap["sturdy_tree"] = e_sturdy_tree;
e_guard_on_leave = {
"elementtype": "object",
"name": "guard_on_leave",
"parent": e_courtyard2,
"type": "object",
"visible": false,
"alias": "guard",
"usedefaultprefix": false,
"prefix": "a",
"suffix": "sitting in the shadow",
"look": "He seems relaxed. {if leave_order.parent=guard_on_leave: You can see a roll of paper in his pocket}.",
"feature_usegive": true,
"fed": false,
"speak": function() { if (e_guard_on_leave.fed) {
OutputText ("You don't want to make him alert right now.");
}
else {
psay ("I\u00b4m very happy! It is my {ask:guard:leave:day off}!");
} },
"giveanything": function() { OutputText ("No thanks. I would really like some elven mead right now."); },
"give": {"mead": function() { OutputText ("<i>This is great stuff, thanks very much.</i>. The guard seems to be a little dizzy. While distracted you manage to steal his orders.");
set(e_guard_on_leave, "fed", true);
MoveObject (e_mead, e_void);
MoveObject (e_leave_order, e_player);
MoveObject (e_paper_roll, e_void); } },
"ask": {"day off leave": function() { if (e_guard_on_leave.fed) {
OutputText ("You don't want to make him alert right now.");
}
else {
psay ("I got a leave permission for a day off duty.");
} } },
"_js_name": "e_guard_on_leave",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guard_on_leave"] = e_guard_on_leave;
allObjects.push(e_guard_on_leave);
objectsNameMap["guard_on_leave"] = e_guard_on_leave;
e_leave_order = {
"elementtype": "object",
"name": "leave_order",
"parent": e_guard_on_leave,
"type": "object",
"alias": "leave order",
"look": "It is a leave order, but you just can't read what is in there. Neither can the guard ... illiteracy is the norm at this era.",
"take": true,
"inventoryverbs": ["Look at", "Drop", "Give"],
"alt": ["orders"],
"feature_usegive": true,
"givesingle": true,
"_js_name": "e_leave_order",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["leave_order"] = e_leave_order;
allObjects.push(e_leave_order);
objectsNameMap["leave_order"] = e_leave_order;
e_paper_roll = {
"elementtype": "object",
"name": "paper_roll",
"parent": e_courtyard2,
"type": "object",
"visible": false,
"scenery": true,
"alias": "paper",
"look": "It is some kind of official document or order, but you can't see it properly.",
"displayverbs": ["Look at"],
"take": true,
"_js_name": "e_paper_roll",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["paper_roll"] = e_paper_roll;
allObjects.push(e_paper_roll);
objectsNameMap["paper_roll"] = e_paper_roll;
e_forge = {
"elementtype": "object",
"name": "forge",
"parent": e_the_castle,
"type": "object",
"alias": "forge",
"description": "You are in a smoky and hot room where is the kingdom's forge.",
"beforeenter": function() { if (e_player.isThief) {
OutputText ("You barely managed to sneak yourself by the courtyard to the forge.");
} },
"_js_name": "e_forge",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["forge"] = e_forge;
allObjects.push(e_forge);
objectsNameMap["forge"] = e_forge;
e_k102 = {
"elementtype": "object",
"name": "k102",
"parent": e_forge,
"type": "exit",
"alias": "north",
"to": e_courtyard2,
"_js_name": "e_k102",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k102"] = e_k102;
allExits.push(e_k102);
objectsNameMap["k102"] = e_k102;
e_elf_smith = {
"elementtype": "object",
"name": "elf_smith",
"parent": e_forge,
"type": "object",
"alias": "elven blacksmith",
"look": "The elf looks battered and tired, and his right ankle is tied to the ground by a strong chain.",
"feature_usegive": true,
"alt": ["elf", "smith"],
"friend": false,
"speak": function() { if (e_elf_smith.friend) {
OutputText ("<i>Help me and I will help you. Defeat the captain. Bring back my ring.</i>");
}
else {
OutputText ("<i>I'm too busy to chat right now.</i>");
} },
"give": {"elven_ring": function() { if (e_player.isWarrior) {
OutputText ("The elf wears the magical ring and grins merrily to you. The chain disappears, and the elf says <i>Thank you my friend. Take this magical sword, the demon slayer, to fight the demons of Vourtram!</i>");
AddToInventory (e_elven_sword);
MoveObject (e_elf_smith, e_void);
MoveObject (e_elven_ring, e_void);
MoveObject (e_mead, e_void);
DisableTurnScript (e_forge_turn);
}
else {
OutputText ("I'm not going to give this expensive ring to this elf.");
} } },
"_js_name": "e_elf_smith",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["elf_smith"] = e_elf_smith;
allObjects.push(e_elf_smith);
objectsNameMap["elf_smith"] = e_elf_smith;
e_elven_sword = {
"elementtype": "object",
"name": "elven_sword",
"parent": e_elf_smith,
"type": "object",
"take": true,
"alias": "demon's slayer sword",
"look": "The demon slayer is a long and slim sword with a faint greenish glow and several unknown inscriptions. ",
"damage": 6,
"usedefaultprefix": false,
"prefix": "the",
"suffix": true,
"feature_usegive": true,
"use": false,
"inventoryverbs": ["Look at", "Drop"],
"selfuseon": {"demons": function() { OutputText ("You wield the demon's slayer, and the demons tremble and flee in despair.");
endGame2(); } },
"_js_name": "e_elven_sword",
"_types": ["Weapon", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["elven_sword"] = e_elven_sword;
allObjects.push(e_elven_sword);
objectsNameMap["elven_sword"] = e_elven_sword;
e_forge_turn = {
"elementtype": "object",
"name": "forge_turn",
"parent": e_forge,
"type": "turnscript",
"enabled": true,
"script": function() { if (e_elf_smith.parent==e_forge) {
if ((e_game.turns % 3)==0) {
OutputText ("The smith slammers his hammer into some piece of metal over the anvil, making a loud sound.");
}
else if ((e_game.turns % 3)==1) {
OutputText ("The smith puts a hot piece of metal in the water, making a hissing noise.");
}
else if ((e_game.turns % 3)==2) {
OutputText ("The smith removes a piece of metal from the furnace.");
}
} },
"_js_name": "e_forge_turn",
"_types": []
};
elementsNameMap["forge_turn"] = e_forge_turn;
allTurnScripts.push(e_forge_turn);
objectsNameMap["forge_turn"] = e_forge_turn;
e_chain = {
"elementtype": "object",
"name": "chain",
"parent": e_forge,
"type": "object",
"scenery": true,
"look": "The chains are really strong.",
"alt": ["chains"],
"pull": "The chains are too stong to the pulled.",
"displayverbs": ["Look at"],
"_js_name": "e_chain",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["chain"] = e_chain;
allObjects.push(e_chain);
objectsNameMap["chain"] = e_chain;
e_mead = {
"elementtype": "object",
"name": "mead",
"parent": e_forge,
"type": "object",
"alias": "mead",
"usedefaultprefix": false,
"prefix": "a bottle of",
"look": "Elven mead, the best there is.",
"feature_usegive": true,
"use": true,
"givesingle": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"take": function() { if (e_player.isThief) {
takeMead();
}
else {
OutputText ("I'm not a thief. Well, sometimes I get stuff, but the owner is not near, so... I think it is ok!");
} },
"giveto": {"elf_smith": function() { OutputText ("I don't think it is a good idea."); } },
"_js_name": "e_mead",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["mead"] = e_mead;
allObjects.push(e_mead);
objectsNameMap["mead"] = e_mead;
e_dining_room = {
"elementtype": "object",
"name": "dining_room",
"parent": e_the_castle,
"type": "object",
"usedefaultprefix": false,
"prefix": "the",
"alias": "castle\u00b4s dining room",
"description": "A large and dimly lit room with a large square table in the center. The wide windows are covered by heavy curtains with the monogram of Vourtram. To the north is the old throne room, and to the south is the gatehouse. The eastern door is guarded by soldiers.",
"firstenter": function() { set(e_inn_keeper, "in_castle", true); },
"_js_name": "e_dining_room",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dining_room"] = e_dining_room;
allObjects.push(e_dining_room);
objectsNameMap["dining_room"] = e_dining_room;
e_k103 = {
"elementtype": "object",
"name": "k103",
"parent": e_dining_room,
"type": "exit",
"alias": "west",
"to": e_kitchen,
"_js_name": "e_k103",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k103"] = e_k103;
allExits.push(e_k103);
objectsNameMap["k103"] = e_k103;
e_k104 = {
"elementtype": "object",
"name": "k104",
"parent": e_dining_room,
"type": "exit",
"alias": "south",
"_js_name": "e_k104",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k104"] = e_k104;
objectReferences.push(["e_k104", "to", "e_lobby"]);
allExits.push(e_k104);
objectsNameMap["k104"] = e_k104;
e_officers = {
"elementtype": "object",
"name": "officers",
"parent": e_dining_room,
"type": "object",
"look": "A dozen strong men wearing armored suits, eating and talking about war. You better not attract attention to you.",
"speak": "I don't think it is a good idea... you are in disguise.",
"usedefaultprefix": false,
"prefix": "the",
"_js_name": "e_officers",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["officers"] = e_officers;
allObjects.push(e_officers);
objectsNameMap["officers"] = e_officers;
e_dining_tower_lock = {
"elementtype": "object",
"name": "dining_tower_lock",
"parent": e_dining_room,
"type": "exit",
"alias": "east",
"locked": true,
"lockmessage": "This way is well guarded. The princess must be in the east tower, behind the eastern door.",
"_js_name": "e_dining_tower_lock",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["dining_tower_lock"] = e_dining_tower_lock;
objectReferences.push(["e_dining_tower_lock", "to", "e_east_tower"]);
allExits.push(e_dining_tower_lock);
objectsNameMap["dining_tower_lock"] = e_dining_tower_lock;
e_k105 = {
"elementtype": "object",
"name": "k105",
"parent": e_dining_room,
"type": "exit",
"alias": "north",
"_js_name": "e_k105",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k105"] = e_k105;
objectReferences.push(["e_k105", "to", "e_throne_room"]);
allExits.push(e_k105);
objectsNameMap["k105"] = e_k105;
e_curtains1 = {
"elementtype": "object",
"name": "curtains1",
"parent": e_dining_room,
"type": "object",
"alias": "curtains",
"scenery": false,
"look": "They are large and heavy, covering from near the ceiling to the ground. Looks like the devil prefers the dark. ",
"usestandardverblist": true,
"displayverbs": ["Look at"],
"usedefaultprefix": false,
"prefix": "the",
"hide": function() { if (e_player.class=="thief") {
if (HasAttribute(e_player,"curtains")) {
OutputText ("You do not hear anything interesting this time.");
}
else {
set(e_mercenary_leader, "parent", e_trophy_room);
OutputText ("You hide yourself behind the curtains, hearing the commanders. There sits the general, the capitain of guard, the mercenary leader and a couple of other officers");
OutputText ("The general says <i>The time has come to attack the hidden city of Chuma Huppic. We must gather all of our forces here in the next days</i>");
OutputText ("The mercenary leader says <i>How we will reach the city if the magic maze is always changing the path to the city?</i>");
OutputText ("The general says <i>We have a secret weapon: Vourtram now controls a powerful dragon, that will find and attack the city by air. All we have to do is wait for the fleeing enemy outside of the maze.</i>");
OutputText ("The mercenary leader says <i>Very well. I have another... delicate issue... to discuss. Our payment is overdue, and my man are becoming upset.</i>");
OutputText ("The captain says <i>The brigands are disrupting our shipments of gold. We are already working out a solution for this problem.</i>");
OutputText ("The general says <i>Vourtram is in his quarters. If you want to discuss this issue with him... it\u00b4s your decision.</i>");
OutputText ("The mercenary leader faltering says <i>No... that would not be necessary.</i>");
OutputText ("The captain says <i>...nor advisable.</i>");
OutputText ("The captain and the mercenary leader leaves the room");
set(e_player, "curtains", 1);
MakeObjectVisible (e_guard_on_leave);
MakeObjectVisible (e_paper_roll);
}
}
else {
OutputText ("I'm too clumsy to hide myself.");
} },
"_js_name": "e_curtains1",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["curtains1"] = e_curtains1;
allObjects.push(e_curtains1);
objectsNameMap["curtains1"] = e_curtains1;
e_stuff = {
"elementtype": "object",
"name": "stuff",
"parent": e_dining_room,
"type": "object",
"alt": ["table", "window", "monogram"],
"visible": true,
"scenery": true,
"displayverbs": ["Look at"],
"_js_name": "e_stuff",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["stuff"] = e_stuff;
allObjects.push(e_stuff);
objectsNameMap["stuff"] = e_stuff;
e_east_tower = {
"elementtype": "object",
"name": "east_tower",
"parent": e_the_castle,
"type": "object",
"_js_name": "e_east_tower",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["east_tower"] = e_east_tower;
allObjects.push(e_east_tower);
objectsNameMap["east_tower"] = e_east_tower;
e_lobby = {
"elementtype": "object",
"name": "lobby",
"parent": e_the_castle,
"type": "object",
"usedefaultprefix": false,
"prefix": "the",
"alias": "gatehouse",
"description": "The Gatehouse is a complex of towers, bridges, and barriers built to protect the main entrance of a castle. To the north is the dining room, to the west is a courtyard filled with soldiers and tents, and to the south is the way back to the city.",
"_js_name": "e_lobby",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lobby"] = e_lobby;
allObjects.push(e_lobby);
objectsNameMap["lobby"] = e_lobby;
e_k106 = {
"elementtype": "object",
"name": "k106",
"parent": e_lobby,
"type": "exit",
"alias": "west",
"to": e_courtyard2,
"_js_name": "e_k106",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k106"] = e_k106;
allExits.push(e_k106);
objectsNameMap["k106"] = e_k106;
e_lobby_dining_lock = {
"elementtype": "object",
"name": "lobby_dining_lock",
"parent": e_lobby,
"type": "exit",
"alias": "north",
"locked": true,
"lockmessage": "A guard blocks your way: 'Only officers are allowed, sir'",
"to": e_dining_room,
"_js_name": "e_lobby_dining_lock",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["lobby_dining_lock"] = e_lobby_dining_lock;
allExits.push(e_lobby_dining_lock);
objectsNameMap["lobby_dining_lock"] = e_lobby_dining_lock;
e_k107 = {
"elementtype": "object",
"name": "k107",
"parent": e_lobby,
"type": "exit",
"alias": "south",
"to": e_the_gate,
"_js_name": "e_k107",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k107"] = e_k107;
allExits.push(e_k107);
objectsNameMap["k107"] = e_k107;
e_cook_drinks = {
"elementtype": "object",
"name": "cook_drinks",
"parent": e_the_castle,
"type": "turnscript",
"enabled": true,
"script": function() { if (e_cook.drinking>0) {
DecreaseObjectCounter (e_cook, "drinking");
if (e_cook.drinking==0) {
MoveObject (e_cook, e_kitchen);
SetObjectFlagOn (e_kit_cabinet, "locked");
if (e_player.parent == e_kitchen) {
if (e_wine.parent==e_cook) {
OutputText ("The cook returns with a happier face, but you don't see he carrying any supplies.");
}
else {
OutputText ("The cook returns with a sad face.");
}
}
}
} },
"_js_name": "e_cook_drinks",
"_types": []
};
elementsNameMap["cook_drinks"] = e_cook_drinks;
allTurnScripts.push(e_cook_drinks);
objectsNameMap["cook_drinks"] = e_cook_drinks;
e_portal = {
"elementtype": "object",
"name": "portal",
"parent": e_the_castle,
"type": "object",
"alias": "portal",
"player_float": false,
"_js_name": "e_portal",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["portal"] = e_portal;
allObjects.push(e_portal);
objectsNameMap["portal"] = e_portal;
e_no_drop_portal = {
"elementtype": "object",
"name": "no_drop_portal",
"parent": e_portal,
"type": "command",
"pattern": "^drop (?<object_drop>.*)$",
"script": function(parameters) { var object_drop = parameters['object_drop'];
OutputText ("you cannot drop nothing now."); },
"_js_name": "e_no_drop_portal",
"_types": ["defaultcommand"]
};
elementsNameMap["no_drop_portal"] = e_no_drop_portal;
allCommands.push(e_no_drop_portal);
objectsNameMap["no_drop_portal"] = e_no_drop_portal;
e_brass_key = {
"elementtype": "object",
"name": "brass_key",
"parent": e_portal,
"type": "object",
"alias": "brass key",
"take": true,
"look": "A small brass key.",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"ontake": function() { if (e_player.parent==e_portal) {
MoveObject (e_floating_portal, e_void);
if (e_teleport_orb.parent==e_portal) {
OutputText ("You grabbed the orb when the portal faded away.");
}
MoveObject (e_teleport_orb, e_player);
MoveObject (e_player, e_throne_room);
} },
"_js_name": "e_brass_key",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["brass_key"] = e_brass_key;
allObjects.push(e_brass_key);
objectsNameMap["brass_key"] = e_brass_key;
e_throne_room = {
"elementtype": "object",
"name": "throne_room",
"parent": e_the_castle,
"type": "object",
"alias": "great hall",
"description": "The great hall is a continuation of the dining room, where the king used to sit in his throne and receive the subjects for audience. Over the throne you noticed a banner with strange signs. Up the stairs you can reach the music hall, and to the south is the dining room. A wide window provides a nice view of the cliffs.",
"enter": function() { if (e_bard.visible && !(e_bard.playing)) {
executeJS ("playMusic;2");
set(e_bard, "playing", true);
} },
"onexit": function() { if (!(e_player.parent == e_music_room)) {
executeJS ("playMusic;0");
set(e_bard, "playing", false);
set(e_bard, "playing_pavane", false);
} },
"_js_name": "e_throne_room",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["throne_room"] = e_throne_room;
allObjects.push(e_throne_room);
objectsNameMap["throne_room"] = e_throne_room;
e_k108 = {
"elementtype": "object",
"name": "k108",
"parent": e_throne_room,
"type": "exit",
"alias": "south",
"to": e_dining_room,
"_js_name": "e_k108",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k108"] = e_k108;
allExits.push(e_k108);
objectsNameMap["k108"] = e_k108;
e_k109 = {
"elementtype": "object",
"name": "k109",
"parent": e_throne_room,
"type": "exit",
"alias": "up",
"_js_name": "e_k109",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k109"] = e_k109;
objectReferences.push(["e_k109", "to", "e_music_room"]);
allExits.push(e_k109);
objectsNameMap["k109"] = e_k109;
e_floating_portal = {
"elementtype": "object",
"name": "floating_portal",
"parent": e_throne_room,
"type": "object",
"alias": "portal",
"look": "The magical portal is large enough to put your hand, but too small to put your head. You can't see nothing in the other side, but darkness.",
"take": false,
"visible": false,
"usedefaultprefix": false,
"prefix": "tiny magical",
"suffix": "floating in the air",
"feature_usegive": true,
"displayverbs": ["Look at"],
"useon": {"teleport_orb": function() { if (e_portal.player_float) {
OutputText ("You levitates towards the floating portal, and place the orb inside.");
MoveObject (e_teleport_orb, e_portal);
}
else {
OutputText ("You cannot reach the portal.");
} } },
"_js_name": "e_floating_portal",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["floating_portal"] = e_floating_portal;
allObjects.push(e_floating_portal);
objectsNameMap["floating_portal"] = e_floating_portal;
e_party = {
"elementtype": "object",
"name": "party",
"parent": e_throne_room,
"type": "object",
"visible": false,
"alias": "dancing couples",
"usedefaultprefix": false,
"prefix": "a dozen",
"look": "Looks like the bard started a small celebreation. You see several young couples dancing, all from rich families of Vourtram's collaborators.",
"_js_name": "e_party",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["party"] = e_party;
allObjects.push(e_party);
objectsNameMap["party"] = e_party;
e_bracelet = {
"elementtype": "object",
"name": "bracelet",
"parent": e_party,
"type": "object",
"alias": "golden bracelet",
"look": "It is a golden bracelet inlaid with diamonds. It should worth a lot.",
"take": true,
"worth": 50,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_bracelet",
"_types": ["Treasure", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bracelet"] = e_bracelet;
allObjects.push(e_bracelet);
objectsNameMap["bracelet"] = e_bracelet;
e_guards3 = {
"elementtype": "object",
"name": "guards3",
"parent": e_throne_room,
"type": "object",
"alias": "guards",
"visible": false,
"look": "A bunch of guards are here, looking for the princess...",
"speak": "I don't want to draw attention do me.",
"_js_name": "e_guards3",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guards3"] = e_guards3;
allObjects.push(e_guards3);
objectsNameMap["guards3"] = e_guards3;
e_banner = {
"elementtype": "object",
"name": "banner",
"parent": e_throne_room,
"type": "object",
"look": "The black banner is the only new thing about the old throne room.{if player.isMage: Those symbols seems to express some kind of dark magic.}",
"scenery": true,
"alt": ["throne", "symbols"],
"takemsg": "No, it may be cursed...",
"displayverbs": ["Look at"],
"read_away": true,
"read": function() { OutputText ("You do not understand very well, but it has something to do with chains"); },
"_js_name": "e_banner",
"_types": ["Readable", "defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["banner"] = e_banner;
allObjects.push(e_banner);
objectsNameMap["banner"] = e_banner;
e_mirror = {
"elementtype": "object",
"name": "mirror",
"parent": e_throne_room,
"type": "object",
"look": "You see yourself.",
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_mirror",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["mirror"] = e_mirror;
allObjects.push(e_mirror);
objectsNameMap["mirror"] = e_mirror;
e_window3 = {
"elementtype": "object",
"name": "window3",
"parent": e_throne_room,
"type": "object",
"alias": "window",
"scenery": true,
"look": "A large window facing the cliffs. You can see the large river flowing below.",
"_js_name": "e_window3",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["window3"] = e_window3;
allObjects.push(e_window3);
objectsNameMap["window3"] = e_window3;
e_music_room = {
"elementtype": "object",
"name": "music_room",
"parent": e_the_castle,
"type": "object",
"alias": "music hall",
"description": "The music hall is a raised gallery overlooking the great hall.<br/>To the west there is a large room and there is a hallway leading to the south.<br/>{if secret_exit.visible:There is a secret passage leading up eastwards.}",
"firstenter": function() { OutputText ("You hear the harpsichord playing a few notes, but nobody is playing!");
SetObjectFlagOff (e_bard, "playing");
SetObjectFlagOff (e_bard, "playing_pavane"); },
"onexit": function() { if (!(e_player.parent == e_throne_room)) {
set(e_bard, "playing", false);
set(e_bard, "playing_pavane", false);
executeJS ("playMusic;0");

} },
"enter": function() { if (e_bard.visible && !(e_bard.playing)) {
set(e_bard, "playing", true);
executeJS ("playMusic;2");
} },
"_js_name": "e_music_room",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["music_room"] = e_music_room;
allObjects.push(e_music_room);
objectsNameMap["music_room"] = e_music_room;
e_k110 = {
"elementtype": "object",
"name": "k110",
"parent": e_music_room,
"type": "exit",
"alias": "down",
"to": e_throne_room,
"_js_name": "e_k110",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k110"] = e_k110;
allExits.push(e_k110);
objectsNameMap["k110"] = e_k110;
e_k111 = {
"elementtype": "object",
"name": "k111",
"parent": e_music_room,
"type": "exit",
"alias": "west",
"_js_name": "e_k111",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k111"] = e_k111;
objectReferences.push(["e_k111", "to", "e_trophy_room"]);
allExits.push(e_k111);
objectsNameMap["k111"] = e_k111;
e_k112 = {
"elementtype": "object",
"name": "k112",
"parent": e_music_room,
"type": "exit",
"alias": "south",
"_js_name": "e_k112",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k112"] = e_k112;
objectReferences.push(["e_k112", "to", "e_hallway"]);
allExits.push(e_k112);
objectsNameMap["k112"] = e_k112;
e_harpsichord = {
"elementtype": "object",
"name": "harpsichord",
"parent": e_music_room,
"type": "object",
"look": "A harpsichord is a musical instrument played by means of a keyboard. It produces sound by plucking a string when a key is pressed.",
"feature_container": true,
"rats": "yes",
"displayverbs": ["Look at", "Open", "Close"],
"play": function() { OutputText ("You play a few random keys...");
if (e_bard.visible==false) {
OutputText ("A men enters the room, a bit annoyed, and yells:<br> <i>Oh my! Please, stop this noise</i>.<br> He has an extremely high pitched voice!");
SetObjectFlagOn (e_bard, "visible");
set(e_bard, "playing", true);
set(e_party, "visible", true);
executeJS ("playMusic;2");
} },
"openscript": function() { OpenObject (e_harpsichord);
if (e_harpsichord.rats=="yes") {
set(e_harpsichord, "rats", "no");
OutputText ("When you open the lid, a large rat jumps from the instrument and runs to a hole in fresco.");
MakeObjectVisible (e_hole_wall);
} },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_harpsichord",
"_types": ["openable", "defaultobject"],
"open": true,
"close": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["harpsichord"] = e_harpsichord;
allObjects.push(e_harpsichord);
objectsNameMap["harpsichord"] = e_harpsichord;
e_psaltery = {
"elementtype": "object",
"name": "psaltery",
"parent": e_music_room,
"type": "object",
"alias": "psaltery",
"look": "It is a harp-like instrument.",
"play": "You don\u00b4t know how to play this instrument.",
"displayverbs": ["Look at"],
"_js_name": "e_psaltery",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["psaltery"] = e_psaltery;
allObjects.push(e_psaltery);
objectsNameMap["psaltery"] = e_psaltery;
e_fresco = {
"elementtype": "object",
"name": "fresco",
"parent": e_music_room,
"type": "object",
"scenery": false,
"alias": "colorful fresco",
"look": "It is a colorful fresco in the wall, depicting demons playing musical instruments to an audience of angels.",
"lock": "yes",
"alt": ["wall"],
"displayverbs": ["Look at", "Push"],
"useindividualverblist": false,
"usestandardverblist": true,
"push": function() { if (e_fresco.lock=="yes") {
OutputText ("It won't move");
}
else {
OutputText ("Hey, there is a secret passage here.");
MakeExitVisible (e_secret_exit);
UnlockExit (e_secret_exit);
} },
"_js_name": "e_fresco",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["fresco"] = e_fresco;
allObjects.push(e_fresco);
objectsNameMap["fresco"] = e_fresco;
e_bard = {
"elementtype": "object",
"name": "bard",
"parent": e_music_room,
"type": "object",
"visible": false,
"look": "The bard wears a green gipon, a green skirt, and a red cape. He looks jovial and is ready to execute your requests.",
"playing": false,
"playing_pavane": false,
"speak": function() { var menulist = NewStringList();
listadd (menulist, "Starboy, Daft Punk");
listadd (menulist, "Macarena, Los Del R\u00edo");
listadd (menulist, "Physical, Olivia Newton-John");
listadd (menulist, "Le Freak, Chic");
listadd (menulist, "Hey Jude, The Beatles");
listadd (menulist, "Don Giovanni, Mozart");
if (HasAttribute(e_king_minstrel,"pavane")) {
listadd (menulist, "Pavane, unknown author");
}
ShowMenu ("<i>What song do you want me to play?</i>", menulist, false, function (result) { var result = LCase(result);
if (StartsWith(result,"pavan")) {
set(e_bard, "playing", true);
set(e_bard, "playing_pavane", true);
OutputText ("Ok.");
if (e_fresco.lock=="yes") {
OutputText ("You hear a click coming from the fresco in the wall.");
set(e_fresco, "lock", "no");
}
executeJS ("playMusic;1");
}
else {
psay ("I don't know this song.");
} }); },
"ask": {"__dummyKey": function() {  } },
"_js_name": "e_bard",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bard"] = e_bard;
allObjects.push(e_bard);
objectsNameMap["bard"] = e_bard;
e_hole_wall = {
"elementtype": "object",
"name": "hole_wall",
"parent": e_music_room,
"type": "object",
"alias": "hole",
"visible": false,
"scenery": true,
"look": "Looks like a mouse hole. You can feel an air current coming from the outside.",
"alt": ["hole"],
"displayverbs": ["Look at"],
"_js_name": "e_hole_wall",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["hole_wall"] = e_hole_wall;
allObjects.push(e_hole_wall);
objectsNameMap["hole_wall"] = e_hole_wall;
e_lute = {
"elementtype": "object",
"name": "lute",
"parent": e_music_room,
"type": "object",
"look": "It is a kind of medieval guitar.",
"alias": "lute",
"play": "You don\u00b4t know how to play this instrument.",
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_lute",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lute"] = e_lute;
allObjects.push(e_lute);
objectsNameMap["lute"] = e_lute;
e_secret_exit = {
"elementtype": "object",
"name": "secret_exit",
"parent": e_music_room,
"type": "exit",
"alias": "up",
"locked": true,
"visible": false,
"_js_name": "e_secret_exit",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"scenery": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["secret_exit"] = e_secret_exit;
objectReferences.push(["e_secret_exit", "to", "e_secret_pass"]);
allExits.push(e_secret_exit);
objectsNameMap["secret_exit"] = e_secret_exit;
e_bard_plays = {
"elementtype": "object",
"name": "bard_plays",
"parent": e_music_room,
"type": "turnscript",
"enabled": true,
"script": function() { if (e_bard.visible) {
if (GetBoolean(e_bard, "playing_pavane")) {
OutputText ("The bard is playing the Pavane on the harpsichord.");
}
else {
OutputText ("The {object:bard} plays some tune in the harpsichord.");
}
} },
"_js_name": "e_bard_plays",
"_types": []
};
elementsNameMap["bard_plays"] = e_bard_plays;
allTurnScripts.push(e_bard_plays);
objectsNameMap["bard_plays"] = e_bard_plays;
e_great_hall_view = {
"elementtype": "object",
"name": "great_hall_view",
"parent": e_music_room,
"type": "object",
"look": "From the music hall you can see the ceiling of the great hall{if chandelier.parent=great_hall_view:, with a large candle chandelier}.",
"alias": "great hall",
"feature_container": true,
"hidechildren": true,
"displayverbs": ["Look at"],
"_js_name": "e_great_hall_view",
"_types": ["surface", "defaultobject"],
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true,
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"open": false,
"close": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"scenery": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["great_hall_view"] = e_great_hall_view;
allObjects.push(e_great_hall_view);
objectsNameMap["great_hall_view"] = e_great_hall_view;
e_chandelier = {
"elementtype": "object",
"name": "chandelier",
"parent": e_great_hall_view,
"type": "object",
"look": "A large brass chandelier. It must have more than a hundred candles.",
"displayverbs": ["Look at"],
"_js_name": "e_chandelier",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["chandelier"] = e_chandelier;
allObjects.push(e_chandelier);
objectsNameMap["chandelier"] = e_chandelier;
e_ropes = {
"elementtype": "object",
"name": "ropes",
"parent": e_great_hall_view,
"type": "object",
"look": "The ropes are supporting the chandelier.",
"alias": "ropes",
"usedefaultprefix": false,
"suffix": "",
"feature_usegive": true,
"pull": "You can't move the ropes, the chandelier is too heavy.",
"displayverbs": ["Look at"],
"useindividualverblist":false,
"usestandardverblist":true,
"prefix":"",
"cut": function() { cutRopes(); },
"useon": {"dagger": function() { cutRopes(); }, "smallsword": function() { cutRopes(); }, "elven_sword": function() { cutRopes(); } },
"_js_name": "e_ropes",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["ropes"] = e_ropes;
allObjects.push(e_ropes);
objectsNameMap["ropes"] = e_ropes;
e_secret_pass = {
"elementtype": "object",
"name": "secret_pass",
"parent": e_the_castle,
"type": "object",
"alias": "secret passage",
"description": "You follow the passage up until you see a small light coming from the wall. The passage continues up.",
"_js_name": "e_secret_pass",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["secret_pass"] = e_secret_pass;
allObjects.push(e_secret_pass);
objectsNameMap["secret_pass"] = e_secret_pass;
e_k113 = {
"elementtype": "object",
"name": "k113",
"parent": e_secret_pass,
"type": "exit",
"alias": "down",
"to": e_music_room,
"_js_name": "e_k113",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k113"] = e_k113;
allExits.push(e_k113);
objectsNameMap["k113"] = e_k113;
e_vent = {
"elementtype": "object",
"name": "vent",
"parent": e_secret_pass,
"type": "object",
"alias": "vent",
"look": "The vent is a strongly barred opening to the eastern tower. You can see, through the opening, the doors to various cells. {if jailer.parent=void: You can hear the hound jumping in the wall while the jailer tries to control the dog}",
"usedefaultprefix": false,
"prefix": "a small",
"suffix": "on the eastern wall",
"displayverbs": ["Look at"],
"_js_name": "e_vent",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["vent"] = e_vent;
allObjects.push(e_vent);
objectsNameMap["vent"] = e_vent;
e_k114 = {
"elementtype": "object",
"name": "k114",
"parent": e_secret_pass,
"type": "exit",
"alias": "up",
"_js_name": "e_k114",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k114"] = e_k114;
objectReferences.push(["e_k114", "to", "e_secret_pass2"]);
allExits.push(e_k114);
objectsNameMap["k114"] = e_k114;
e_cells = {
"elementtype": "object",
"name": "cells",
"parent": e_secret_pass,
"type": "object",
"alias": "cells",
"scenery": true,
"look": "There are some prisoners, but you cannot find the princess.",
"displayverbs": ["Look at"],
"_js_name": "e_cells",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["cells"] = e_cells;
allObjects.push(e_cells);
objectsNameMap["cells"] = e_cells;
e_secret_pass2 = {
"elementtype": "object",
"name": "secret_pass2",
"parent": e_the_castle,
"type": "object",
"alias": "secret passage",
"_js_name": "e_secret_pass2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["secret_pass2"] = e_secret_pass2;
allObjects.push(e_secret_pass2);
objectsNameMap["secret_pass2"] = e_secret_pass2;
e_k115 = {
"elementtype": "object",
"name": "k115",
"parent": e_secret_pass2,
"type": "exit",
"alias": "down",
"to": e_secret_pass,
"_js_name": "e_k115",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k115"] = e_k115;
allExits.push(e_k115);
objectsNameMap["k115"] = e_k115;
e_secret_pass2_to_dungeon = {
"elementtype": "object",
"name": "secret_pass2_to_dungeon",
"parent": e_secret_pass2,
"type": "exit",
"alias": "up",
"locked": true,
"lockmessage": "The small door is blocked by iron bars.",
"_js_name": "e_secret_pass2_to_dungeon",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["secret_pass2_to_dungeon"] = e_secret_pass2_to_dungeon;
objectReferences.push(["e_secret_pass2_to_dungeon", "to", "e_dungeon"]);
allExits.push(e_secret_pass2_to_dungeon);
objectsNameMap["secret_pass2_to_dungeon"] = e_secret_pass2_to_dungeon;
e_grate_dungeon = {
"elementtype": "object",
"name": "grate_dungeon",
"parent": e_secret_pass2,
"type": "object",
"feature_container": false,
"usedefaultprefix": false,
"alias": "door",
"look": "You can see the top of the tower, where the most important prisoners are kept. <br/>{if secret_pass2_to_dungeon.locked: The door is blocked by iron bars, but they don\u00b4t seem very firmly attached}<br/>{if jailer.parent=dungeon:You can see a jailer and his hound guarding the cell<br/>{if red_herring.parent=player:The dog approaches the door and starts to sniff it, wagging his tail}}",
"alt": ["bars", "door"],
"feature_usegive": true,
"prefix": "small iron barred",
"displayverbs": ["Look at"],
"pull": function() { if (e_secret_pass2_to_dungeon.locked) {
if (e_player.class=="warrior") {
if (e_jailer.parent == e_dungeon) {
OutputText ("If you pull the bars now, the jailer will see you and sound the alarm.");
}
else {
OutputText ("You managed to pull the bars, accessing the tower.");
UnlockExit (e_secret_pass2_to_dungeon);
}
}
else {
OutputText ("The bars are a bit loose, but you need some lever to remove them.");
}
}
else {
OutputText ("The bars were removed");
} },
"useanything": function() { OutputText ("This won\u00b4t work and/or will break your thing "); },
"useon": {"tusk": function() { if (e_secret_pass2_to_dungeon.locked) {
if (e_jailer.parent == e_dungeon) {
OutputText ("It is a good idea to use the tusk as a lever, but if you remove the bars now, the jailer will see you and sound the alarm.");
}
else {
OutputText ("You managed to remove the bars, accessing the tower");
UnlockExit (e_secret_pass2_to_dungeon);
}
}
else {
OutputText ("The bars were removed");
} }, "red_herring": function() { OutputText ("When you approach the red herring to the door, the dog goes crazy. You think it is not a good idea to call the attention of the jailer to your presence."); } },
"_js_name": "e_grate_dungeon",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["grate_dungeon"] = e_grate_dungeon;
allObjects.push(e_grate_dungeon);
objectsNameMap["grate_dungeon"] = e_grate_dungeon;
e_dungeon = {
"elementtype": "object",
"name": "dungeon",
"parent": e_the_castle,
"type": "object",
"alias": "end of the dungeon",
"description": "The top of the prison tower is a small room where the important prisoners are kept. You can here the sounds of the jailer and his hound blocking the way down. There is a small door leading back to the secret passage to the north.",
"usedefaultprefix": false,
"prefix": "the",
"_js_name": "e_dungeon",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dungeon"] = e_dungeon;
allObjects.push(e_dungeon);
objectsNameMap["dungeon"] = e_dungeon;
e_cell = {
"elementtype": "object",
"name": "cell",
"parent": e_dungeon,
"type": "object",
"feature_container": true,
"isopen": false,
"transparent": true,
"look": "The cell is a sturdy door with a small barred window. It can be opened only by the outside.",
"displayverbs": ["Look at", "Open", "Close"],
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_cell",
"_types": ["container_open", "defaultobject"],
"open": true,
"close": true,
"container": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["cell"] = e_cell;
allObjects.push(e_cell);
objectsNameMap["cell"] = e_cell;
e_princess = {
"elementtype": "object",
"name": "princess",
"parent": e_cell,
"type": "object",
"alias": "Beth",
"alt": ["beth", "princess", "Grardobeth"],
"usedefaultprefix": false,
"suffix": ", the princess",
"look": "The princess is young and beautiful, despite the fact that she is a prisoner.",
"follow": false,
"speak": function() { if (e_princess.parent==e_cell && e_cell.isopen) {
MoveObject (e_princess, e_player.parent);
OutputText ("You tell the princess about your mission, and the princess smiles saying:");
if (e_player.isWarrior) {
OutputText ("<i>Really? I expected someone more charming...</i>");
}
else if (e_player.isThief) {
OutputText ("<i>Really? I expected someone more noble...</i>");
}
else if (e_player.isMage) {
OutputText ("<i>Really? I expected someone more athletic...</i>");
}
OutputText ("<i>Nevertheless, get me out of here!</i>");
OutputText ("The princess is now following you");
set(e_princess, "follow", true);
EnableTurnScript (e_princessFollow);
set(e_guards3, "visible", true);
}
else {
OutputText ("<i>I sincerely hope that you have planned a WAY out of this castle...</i>");
} },
"_js_name": "e_princess",
"_types": ["namedfemale", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["princess"] = e_princess;
allObjects.push(e_princess);
objectsNameMap["princess"] = e_princess;
e_k116 = {
"elementtype": "object",
"name": "k116",
"parent": e_dungeon,
"type": "exit",
"alias": "north",
"to": e_secret_pass2,
"_js_name": "e_k116",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k116"] = e_k116;
allExits.push(e_k116);
objectsNameMap["k116"] = e_k116;
e_jailer = {
"elementtype": "object",
"name": "jailer",
"parent": e_dungeon,
"type": "object",
"alias": "jailer",
"usedefaultprefix": false,
"prefix": "a",
"suffix": "and his hound.",
"_js_name": "e_jailer",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["jailer"] = e_jailer;
allObjects.push(e_jailer);
objectsNameMap["jailer"] = e_jailer;
e_trophy_room = {
"elementtype": "object",
"name": "trophy_room",
"parent": e_the_castle,
"type": "object",
"usedefaultprefix": false,
"prefix": "the",
"alias": "trophy room",
"description": "This large room contains several hunt trophies. To the west is the kingdom's treasury, and to the east is the music hall.",
"_js_name": "e_trophy_room",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["trophy_room"] = e_trophy_room;
allObjects.push(e_trophy_room);
objectsNameMap["trophy_room"] = e_trophy_room;
e_k117 = {
"elementtype": "object",
"name": "k117",
"parent": e_trophy_room,
"type": "exit",
"alias": "east",
"to": e_music_room,
"_js_name": "e_k117",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k117"] = e_k117;
allExits.push(e_k117);
objectsNameMap["k117"] = e_k117;
e_armour_suit = {
"elementtype": "object",
"name": "armour_suit",
"parent": e_trophy_room,
"type": "object",
"look": "The iron armor is old and has several fire burns. ",
"alias": "an old suit of armor",
"feature_container": true,
"hidechildren": true,
"takemsg": "It is too heavy to carry around.",
"displayverbs": ["Look at"],
"alt": ["armour"],
"_js_name": "e_armour_suit",
"_types": ["surface", "defaultobject"],
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true,
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"open": false,
"close": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"scenery": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["armour_suit"] = e_armour_suit;
allObjects.push(e_armour_suit);
objectsNameMap["armour_suit"] = e_armour_suit;
e_oak_shield = {
"elementtype": "object",
"name": "oak_shield",
"parent": e_armour_suit,
"type": "object",
"look": "It was an wooden shield with silvery reinforcements. It was heavily burned and broken in three pieces.",
"alias": "pieces of a shield",
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_oak_shield",
"_types": ["plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["oak_shield"] = e_oak_shield;
allObjects.push(e_oak_shield);
objectsNameMap["oak_shield"] = e_oak_shield;
e_armour_book = {
"elementtype": "object",
"name": "armour_book",
"parent": e_armour_suit,
"type": "object",
"alias": "small book",
"feature_usegive": true,
"givesingle": true,
"use": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"take": true,
"look": function() { if (e_player.class=="mage") {
OutputText ("It is a thin book with simple calligraphy. You can also {command:read small book:read} it.");
}
else {
OutputText ("It looks something interesting, but you can\u00b4t read.");
} },
"read": function() { OutputText ("The book is about a wizard prince named Pierre Lecomb that faced Fafnir the dragon with this suit of armor, a spear and an oak shield. He first waited the dragon to exit the lair to hunt. Then, he entered the dragon\u00b4s lair to pursue scales, but the dragon returned early, and he had to run for his life. First he cast a blind spell, making the dragon temporarely blind. Nervertheless, <br/>Fafnir spat his fire-breath, and Perre blocked the fire with his shield. Pierre was able to escape with a few burns, and is the only known man that survived an encounter with Fafnir the great.");
set(e_oak_shield, "alias", "oak shield pieces"); },
"_js_name": "e_armour_book",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["armour_book"] = e_armour_book;
allObjects.push(e_armour_book);
objectsNameMap["armour_book"] = e_armour_book;
e_tusk = {
"elementtype": "object",
"name": "tusk",
"parent": e_trophy_room,
"type": "object",
"alias": "small tusk",
"look": "A scratchy ornated elephant tusk. It is sharp and strong.",
"take": true,
"feature_usegive": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"use": true,
"givesingle": true,
"_js_name": "e_tusk",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["tusk"] = e_tusk;
allObjects.push(e_tusk);
objectsNameMap["tusk"] = e_tusk;
e_elephant = {
"elementtype": "object",
"name": "elephant",
"parent": e_trophy_room,
"type": "object",
"usedefaultprefix": false,
"prefix": "a stuffed young",
"alias": "elephant",
"look": "It is not as big as an adult elephant. Its tusks were removed.",
"feature_usegive": true,
"use": true,
"givesingle": true,
"displayverbs": ["Look at"],
"_js_name": "e_elephant",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["elephant"] = e_elephant;
allObjects.push(e_elephant);
objectsNameMap["elephant"] = e_elephant;
e_bear = {
"elementtype": "object",
"name": "bear",
"parent": e_trophy_room,
"type": "object",
"alias": "bear",
"usedefaultprefix": false,
"prefix": "a stuffed",
"look": "It is big and looks menacing. But it is dead.",
"displayverbs": ["Look at"],
"_js_name": "e_bear",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bear"] = e_bear;
allObjects.push(e_bear);
objectsNameMap["bear"] = e_bear;
e_head_collection = {
"elementtype": "object",
"name": "head_collection",
"parent": e_trophy_room,
"type": "object",
"alias": "head collection",
"usedefaultprefix": false,
"prefix": "a stuffed",
"look": "Several heads of various animals ornate the northen wall.",
"displayverbs": ["Look at"],
"_js_name": "e_head_collection",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["head_collection"] = e_head_collection;
allObjects.push(e_head_collection);
objectsNameMap["head_collection"] = e_head_collection;
e_throphy_room_to_treasury = {
"elementtype": "object",
"name": "throphy_room_to_treasury",
"parent": e_trophy_room,
"type": "exit",
"alias": "west",
"locked": true,
"lockmessage": "Three strong guards are watching this door.",
"_js_name": "e_throphy_room_to_treasury",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["throphy_room_to_treasury"] = e_throphy_room_to_treasury;
objectReferences.push(["e_throphy_room_to_treasury", "to", "e_treasury"]);
allExits.push(e_throphy_room_to_treasury);
objectsNameMap["throphy_room_to_treasury"] = e_throphy_room_to_treasury;
e_guards2 = {
"elementtype": "object",
"name": "guards2",
"parent": e_trophy_room,
"type": "object",
"alias": "guards",
"look": "Three alert guards are guarding the way to the treasury.",
"speak": "One of the guards says: <i>We cannot speak while in duty. Seek the captain.</i>",
"usedefaultprefix": false,
"prefix": "some",
"_js_name": "e_guards2",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["guards2"] = e_guards2;
allObjects.push(e_guards2);
objectsNameMap["guards2"] = e_guards2;
e_treasury = {
"elementtype": "object",
"name": "treasury",
"parent": e_the_castle,
"type": "object",
"alias": "Treasury room",
"description": "The room is small and windowless. You barely can see what is inside.<br/>A barred wall is the last protection for the treasure of Vourtram. Did you bring the key?",
"descprefix": "You are invisible in",
"onexit": function() { OutputText ("The invisibility potion effect is over."); },
"_js_name": "e_treasury",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["treasury"] = e_treasury;
allObjects.push(e_treasury);
objectsNameMap["treasury"] = e_treasury;
e_treasury_to_trophy_room = {
"elementtype": "object",
"name": "treasury_to_trophy_room",
"parent": e_treasury,
"type": "exit",
"alias": "east",
"locked": false,
"lockmessage": "You leave until you grab enough treasure.",
"to": e_trophy_room,
"_js_name": "e_treasury_to_trophy_room",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["treasury_to_trophy_room"] = e_treasury_to_trophy_room;
allExits.push(e_treasury_to_trophy_room);
objectsNameMap["treasury_to_trophy_room"] = e_treasury_to_trophy_room;
e_treasury_door = {
"elementtype": "object",
"name": "treasury_door",
"parent": e_treasury,
"type": "object",
"alias": "barred door",
"look": "It is a barred door where the treasury is kept. It has a cooper key lock.",
"feature_container": true,
"transparent": true,
"isopen": false,
"keycount": 1,
"displayverbs": ["Look at", "Open", "Close"],
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_treasury_door",
"_types": ["container_lockable", "container_open", "defaultobject"],
"locked": true,
"nokeymessage": "You do not have the key.",
"unlockmessage": "Unlocked.",
"lockmessage": "Locked.",
"canlockopen": false,
"autoopen": true,
"autounlock": true,
"openscript": function() { if (this.locked) {
if (this.autounlock && AllKeysAvailable(this)) {
runscriptattribute2 (this, "unlock");
if (!(this.isopen)) {
OpenObject (this);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
}
else {
OpenObject (this);
} },
"closescript": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
else {
CloseObject (this);
} },
"lock": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyLocked", this));
}
else if (this.isopen && !(this.canlockopen)) {
OutputText (overloadedFunctions.DynamicTemplate("CannotLockOpen", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.lockmessage);
set(this, "locked", true);
}
else {
OutputText (this.nokeymessage);
}
} },
"unlock": function() { if (!(this.locked)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyUnlocked", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.unlockmessage);
set(this, "locked", false);
if (this.autoopen && !(this.isopen)) {
TryOpenClose (true, this);
}
}
else {
OutputText (this.nokeymessage);
}
} },
"open": true,
"close": true,
"container": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["treasury_door"] = e_treasury_door;
objectReferences.push(["e_treasury_door", "key", "e_cooper_key"]);
allObjects.push(e_treasury_door);
objectsNameMap["treasury_door"] = e_treasury_door;
e_artwork = {
"elementtype": "object",
"name": "artwork",
"parent": e_treasury_door,
"type": "object",
"look": "Paintings, crowns, jewellery, sculptures on priceless materials... too bad you can't carry all this with you.",
"alias": "objects of art",
"take": function() { OutputText ("You'd better pick only money, since you can't carry that much stuff."); },
"_js_name": "e_artwork",
"_types": ["plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["artwork"] = e_artwork;
allObjects.push(e_artwork);
objectsNameMap["artwork"] = e_artwork;
e_gold_chest = {
"elementtype": "object",
"name": "gold_chest",
"parent": e_treasury_door,
"type": "object",
"alias": "chest",
"usedefaultprefix": false,
"suffix": "full of gold",
"look": "A chest full of golden crowns. It should worth a million of coins.",
"take": true,
"drop": false,
"dropmsg": "You better keep this gold with you.",
"feature_usegive": true,
"takemsg": "You manage to conceal the chest in your cape, in a way that only thieves are able to.",
"alt": ["gold", "gold chest"],
"inventoryverbs": ["Look at", "Drop", "Give"],
"givesingle": true,
"ontake": function() { LockExit (e_throphy_room_to_treasury);
UnlockExit (e_treasury_to_trophy_room); },
"giveto": {"Lareak": function() { OutputText ("You give the chest to Lareak");
set(e_gold_chest, "parent", e_void); } },
"_js_name": "e_gold_chest",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["gold_chest"] = e_gold_chest;
allObjects.push(e_gold_chest);
objectsNameMap["gold_chest"] = e_gold_chest;
e_hallway = {
"elementtype": "object",
"name": "hallway",
"parent": e_the_castle,
"type": "object",
"turns": 0,
"description": "The hallway has a set of archways, receiving light from small windows from the eastern wall. It continues to the western side of the castle. To the south a door leads to the captain's office.",
"firstenter": function() { if (e_player.isWarrior) {
MakeObjectVisible (e_sigrun);
} },
"_js_name": "e_hallway",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["hallway"] = e_hallway;
allObjects.push(e_hallway);
objectsNameMap["hallway"] = e_hallway;
e_k118 = {
"elementtype": "object",
"name": "k118",
"parent": e_hallway,
"type": "exit",
"alias": "north",
"to": e_music_room,
"_js_name": "e_k118",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k118"] = e_k118;
allExits.push(e_k118);
objectsNameMap["k118"] = e_k118;
e_hall_guard = {
"elementtype": "object",
"name": "hall_guard",
"parent": e_hallway,
"type": "object",
"alias": "guard",
"look": "He is a strong and well equipped guard.{if hall_guard.blind=0:He looks fully alert.}{if hall_guard.blind>0: The guard walks groping the walls in despair. He is completely blind.}",
"danger": "death",
"exp": 6,
"armour": 4,
"ht": 12,
"block_flee": true,
"no_steal": true,
"stance": "none",
"blind": 0,
"feature_usegive": true,
"speak": function() { if (e_player.class=="warrior") {
psay ("I'm sorry but I cannot talk to anybody while I am at duty. Nobody could pass.");
}
else {
psay ("You better get away from here, rat killer.");
} },
"tell": {"__dummyKey": function() {  } },
"ask": {"appointment": function() { psay ("The captain will not receive anyone today."); }, "leave": function() { psay ("I'm guarding this hallway without a leave for two months!"); } },
"give": {"leave_order": function() { 
OutputText ("With some cunning, you convince the guard that an officer asked you to deliver this leave order to him.");
psay ("It should be my lucky day! Please, wait here until a new guard arrives.");
OutputText ("The Guard quickly leaves the room");
removeEnemy (e_hall_guard);
MoveObject (e_leave_order, e_void); } },
"_js_name": "e_hall_guard",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"aggressive": false,
"stab_level": 0,
"affect_calm": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["hall_guard"] = e_hall_guard;
allObjects.push(e_hall_guard);
objectsNameMap["hall_guard"] = e_hall_guard;
e_exit_to_captain_office = {
"elementtype": "object",
"name": "exit_to_captain_office",
"parent": e_hallway,
"type": "exit",
"alias": "south",
"locked": true,
"lockmessage": "That way is blocked by the guard.",
"_js_name": "e_exit_to_captain_office",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["exit_to_captain_office"] = e_exit_to_captain_office;
objectReferences.push(["e_exit_to_captain_office", "to", "e_Captain_Office"]);
allExits.push(e_exit_to_captain_office);
objectsNameMap["exit_to_captain_office"] = e_exit_to_captain_office;
e_hallway_to_hallway2 = {
"elementtype": "object",
"name": "hallway_to_hallway2",
"parent": e_hallway,
"type": "exit",
"alias": "west",
"locked": true,
"lockmessage": "That way is blocked by the guard.",
"_js_name": "e_hallway_to_hallway2",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["hallway_to_hallway2"] = e_hallway_to_hallway2;
objectReferences.push(["e_hallway_to_hallway2", "to", "e_hallway2"]);
allExits.push(e_hallway_to_hallway2);
objectsNameMap["hallway_to_hallway2"] = e_hallway_to_hallway2;
e_archway1 = {
"elementtype": "object",
"name": "archway1",
"parent": e_hallway,
"type": "object",
"scenery": true,
"look": "Each archway has a two feet large shaded gap.",
"alias": "archways",
"alt": ["archway"],
"hide": "It is a nice spot to hide, but you don\u00b4t really feel it is necessary right now",
"displayverbs": ["Look at"],
"_js_name": "e_archway1",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["archway1"] = e_archway1;
allObjects.push(e_archway1);
objectsNameMap["archway1"] = e_archway1;
e_window = {
"elementtype": "object",
"name": "window",
"parent": e_hallway,
"type": "object",
"look": "The window looks to the eastern side of the castle. You can see several vines in the outside.",
"displayverbs": ["Look at"],
"useindividualverblist":false,
"usestandardverblist":true,
"climb": function() { if (e_player.class=="thief") {
if (e_hall_guard.parent == e_hallway) {
OutputText ("The guard would not like to see you climbing this window");
}
else {
OutputText ("You climb the window and grab in the vines, managing to move to next room.");
MoveObject (e_player, e_Captain_Office1);
}
}
else {
OutputText ("You don\u00b4t have the hability to climb it");
} },
"_js_name": "e_window",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["window"] = e_window;
allObjects.push(e_window);
objectsNameMap["window"] = e_window;
e_vines2 = {
"elementtype": "object",
"name": "vines2",
"parent": e_window,
"type": "object",
"visible": false,
"alias": "vines",
"usedefaultprefix": false,
"prefix": "some",
"suffix": "coming from the window",
"look": "The vines come from the window to the walls of the room.",
"displayverbs": ["Look at"],
"_js_name": "e_vines2",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["vines2"] = e_vines2;
allObjects.push(e_vines2);
objectsNameMap["vines2"] = e_vines2;
e_vines1 = {
"elementtype": "object",
"name": "vines1",
"parent": e_hallway,
"type": "object",
"scenery": true,
"alias": "vines",
"visible": true,
"alt": ["vine"],
"displayverbs": ["Look at"],
"look": function() { set(e_vines1, "scenery", false);
OutputText ("The vines are outside the window."); },
"pull": function() { OutputText ("You pull the vines from outside to the hallway");
MakeObjectVisible (e_vines2);
MoveObject (e_vines1, e_void);
MoveObject (e_vines2, e_hallway); },
"_js_name": "e_vines1",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["vines1"] = e_vines1;
allObjects.push(e_vines1);
objectsNameMap["vines1"] = e_vines1;
e_hallway2 = {
"elementtype": "object",
"name": "hallway2",
"parent": e_the_castle,
"type": "object",
"turns": 0,
"alias": "a hallway to the west",
"description": "The hallway has a set of archways, receiving light from small windows from the southern wall. It connects the eastern and the western side of the castle.",
"onexit": function() { if (e_player.class=="thief") {
set(e_hallway2, "turns", 0);
} },
"_js_name": "e_hallway2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["hallway2"] = e_hallway2;
allObjects.push(e_hallway2);
objectsNameMap["hallway2"] = e_hallway2;
e_demon_guard1 = {
"elementtype": "object",
"name": "demon_guard1",
"parent": e_hallway2,
"type": "object",
"alias": "demon",
"look": "The demon has red skin, horns, hoofs and a long tail.",
"danger": "death",
"exp": 7,
"armour": 7,
"ht": 15,
"block_flee": false,
"no_steal": true,
"aggressive": true,
"damage": 5,
"stance": "none",
"demon": true,
"usedefaultprefix": false,
"prefix": "an almost seven feet",
"suffix": "guarding the hallway",
"speak": "I don't think it is a good idea.",
"_js_name": "e_demon_guard1",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"stab_level": 0,
"affect_calm": false,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["demon_guard1"] = e_demon_guard1;
allObjects.push(e_demon_guard1);
objectsNameMap["demon_guard1"] = e_demon_guard1;
e_hallway2_to_hallway = {
"elementtype": "object",
"name": "hallway2_to_hallway",
"parent": e_hallway2,
"type": "exit",
"alias": "east",
"lockmessage": "The demon blocks your way.",
"to": e_hallway,
"_js_name": "e_hallway2_to_hallway",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["hallway2_to_hallway"] = e_hallway2_to_hallway;
allExits.push(e_hallway2_to_hallway);
objectsNameMap["hallway2_to_hallway"] = e_hallway2_to_hallway;
e_archway = {
"elementtype": "object",
"name": "archway",
"parent": e_hallway2,
"type": "object",
"scenery": true,
"description": "You are hidden at the archway",
"displayverbs": ["Look at"],
"alias": "archways",
"alt": ["archway"],
"useindividualverblist": false,
"usestandardverblist": true,
"look": function() { set(e_archway, "displayverbs", Split("Look at;Hide at", ";"));
OutputText ("Each {object:archway:archway} has a two feet large shaded gap.");
set(e_archway, "scenery", false); },
"hide": function() { if (e_player.class=="thief") {
MoveObject (e_player, e_archway);
}
else {
OutputText ("You don\u00b4t know how to hide yourself very well.");
} },
"onexit": function() { if (e_player.class=="thief") {
set(e_hallway2, "turns", 0);
} },
"_js_name": "e_archway",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "they",
"article": "them",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": false,
"prefix":"",
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["archway"] = e_archway;
allObjects.push(e_archway);
objectsNameMap["archway"] = e_archway;
e_k119 = {
"elementtype": "object",
"name": "k119",
"parent": e_archway,
"type": "exit",
"alias": "out",
"to": e_hallway2,
"_js_name": "e_k119",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k119"] = e_k119;
allExits.push(e_k119);
objectsNameMap["k119"] = e_k119;
e_throw_rock = {
"elementtype": "object",
"name": "throw_rock",
"parent": e_archway,
"type": "command",
"pattern": "^throw (?<object>.*)$",
"script": function(parameters) { var object = parameters['object'];
if (object == e_red_rock) {
OutputText ("You throw the rock to the east, and the demon walks to check the noise. You quickly moves out of the hallway while the demon is not looking");
MoveObject (e_red_rock, e_hallway);
MoveObject (e_player, e_corridor2);
LockExit (e_hallway2_to_hallway);
}
else {
OutputText ("Why should I throw that?");
} },
"_js_name": "e_throw_rock",
"_types": ["defaultcommand"]
};
elementsNameMap["throw_rock"] = e_throw_rock;
allCommands.push(e_throw_rock);
objectsNameMap["throw_rock"] = e_throw_rock;
e_hallway2_to_corridor = {
"elementtype": "object",
"name": "hallway2_to_corridor",
"parent": e_hallway2,
"type": "exit",
"alias": "northwest",
"locked": true,
"lockmessage": "The demon blocks your way.",
"_js_name": "e_hallway2_to_corridor",
"_types": ["northwestdirection", "defaultexit"],
"alt": ["nw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["hallway2_to_corridor"] = e_hallway2_to_corridor;
objectReferences.push(["e_hallway2_to_corridor", "to", "e_corridor2"]);
allExits.push(e_hallway2_to_corridor);
objectsNameMap["hallway2_to_corridor"] = e_hallway2_to_corridor;
e_Captain_Office = {
"elementtype": "object",
"name": "Captain_Office",
"parent": e_the_castle,
"type": "object",
"alias": "Captain's Office",
"description": "The captain's office is a small room with a large open window. ",
"usedefaultprefix": false,
"prefix": "the",
"enter": function() { if (e_captain.parent==e_Captain_Office) {
OutputText ("The Captain says: <i>I'm a very busy man. If you need to talk to me, ask the guard for an appointment.</i>");
MoveObject (e_player, e_hallway);
} },
"_js_name": "e_Captain_Office",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Captain_Office"] = e_Captain_Office;
allObjects.push(e_Captain_Office);
objectsNameMap["Captain_Office"] = e_Captain_Office;
e_k120 = {
"elementtype": "object",
"name": "k120",
"parent": e_Captain_Office,
"type": "exit",
"alias": "north",
"to": e_hallway,
"_js_name": "e_k120",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k120"] = e_k120;
allExits.push(e_k120);
objectsNameMap["k120"] = e_k120;
e_captain = {
"elementtype": "object",
"name": "captain",
"parent": e_Captain_Office,
"type": "object",
"alias": "captain",
"look": "The traitor was a lieutenant of the king. Now he is the captain of Vourtram.",
"danger": "death",
"exp": 7,
"armour": 5,
"ht": 14,
"block_flee": true,
"no_steal": true,
"damage": 2,
"stance": "none",
"usedefaultprefix": false,
"suffix": " of Vourtram's guard",
"prefix": "the",
"_js_name": "e_captain",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"aggressive": false,
"stab_level": 0,
"affect_calm": false,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["captain"] = e_captain;
allObjects.push(e_captain);
objectsNameMap["captain"] = e_captain;
e_elven_ring = {
"elementtype": "object",
"name": "elven_ring",
"parent": e_captain,
"type": "object",
"feature_usegive": true,
"take": true,
"alias": "emerald ring",
"worth": 80,
"look": "A gold ring with a huge emerald.",
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"use": true,
"givesingle": true,
"_js_name": "e_elven_ring",
"_types": ["Treasure", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["elven_ring"] = e_elven_ring;
allObjects.push(e_elven_ring);
objectsNameMap["elven_ring"] = e_elven_ring;
e_desk1 = {
"elementtype": "object",
"name": "desk1",
"parent": e_Captain_Office,
"type": "object",
"alias": "desk",
"look": "The desk has one drawer.",
"alt": ["drawer"],
"feature_container": true,
"keycount": 1,
"picklock": function() { if (e_player.class=="thief") {
if (e_desk1.locked) {
OutputText ("Piece of cake. You found some {object:candies} and 25 coins. You take the coins.");
set(e_purse, "coins", e_purse.coins+25);
SetObjectFlagOff (e_desk1, "locked");
HelperOpenObject (e_desk1);
}
else {
OutputText ("It is already open.");
}
}
else {
OutputText ("You don't know how!");
} },
"displayverbs": ["Look at", "Open"],
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"useindividualverblist":false,
"usestandardverblist":true,
"key": e_null_key,
"_js_name": "e_desk1",
"_types": ["container_lockable", "container_closed", "defaultobject"],
"locked": true,
"nokeymessage": "You do not have the key.",
"unlockmessage": "Unlocked.",
"lockmessage": "Locked.",
"canlockopen": false,
"autoopen": true,
"autounlock": true,
"openscript": function() { if (this.locked) {
if (this.autounlock && AllKeysAvailable(this)) {
runscriptattribute2 (this, "unlock");
if (!(this.isopen)) {
OpenObject (this);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
}
else {
OpenObject (this);
} },
"closescript": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
else {
CloseObject (this);
} },
"lock": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyLocked", this));
}
else if (this.isopen && !(this.canlockopen)) {
OutputText (overloadedFunctions.DynamicTemplate("CannotLockOpen", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.lockmessage);
set(this, "locked", true);
}
else {
OutputText (this.nokeymessage);
}
} },
"unlock": function() { if (!(this.locked)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyUnlocked", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.unlockmessage);
set(this, "locked", false);
if (this.autoopen && !(this.isopen)) {
TryOpenClose (true, this);
}
}
else {
OutputText (this.nokeymessage);
}
} },
"open": true,
"close": true,
"container": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["desk1"] = e_desk1;
allObjects.push(e_desk1);
objectsNameMap["desk1"] = e_desk1;
e_candies = {
"elementtype": "object",
"name": "candies",
"parent": e_desk1,
"type": "object",
"alias": "candies",
"look": "a handful of colorful candies.",
"feature_edible": false,
"eat": "You don't like sweeties.",
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"_js_name": "e_candies",
"_types": ["defaultobject"],
"alt": ["candy"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"use": false,
"givesingle": true,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": false,
"prefix": "some",
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["candies"] = e_candies;
allObjects.push(e_candies);
objectsNameMap["candies"] = e_candies;
e_cupboard = {
"elementtype": "object",
"name": "cupboard",
"parent": e_Captain_Office,
"type": "object",
"look": "It is an sturdy cupboard.{if player.isThief: You can notice a few scratchs in the floor. Perhaps someone has moved the cupboard.}{if player.isMage: You can notice a few scratchs in the floor. Perhaps someone has moved the cupboard.}",
"feature_container": true,
"moved": false,
"displayverbs": ["Look at", "Open"],
"useindividualverblist": false,
"usestandardverblist": true,
"listchildren": true,
"isopen": false,
"push": function() { if (e_cupboard.moved) {
OutputText ("You already moved the cupboard.");
}
else {
if (e_player.isMage) {
OutputText ("You are not strong enough to move this cupboard.");
}
else {
MakeObjectVisible (e_cooper_key);
OutputText ("You move the cupboard and find a hole in the floor. Inside the hole you see a {object:cooper_key}.");
SetObjectFlagOn (e_cupboard, "moved");
}
} },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_cupboard",
"_types": ["container_open", "defaultobject"],
"open": true,
"close": true,
"container": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["cupboard"] = e_cupboard;
allObjects.push(e_cupboard);
objectsNameMap["cupboard"] = e_cupboard;
e_iron_key = {
"elementtype": "object",
"name": "iron_key",
"parent": e_cupboard,
"type": "object",
"alias": "iron key",
"take": true,
"feature_usegive": true,
"use": true,
"look": "It is an ordinary iron key.",
"inventoryverbs": ["Look at", "Drop"],
"_js_name": "e_iron_key",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["iron_key"] = e_iron_key;
allObjects.push(e_iron_key);
objectsNameMap["iron_key"] = e_iron_key;
e_cooper_key = {
"elementtype": "object",
"name": "cooper_key",
"parent": e_Captain_Office,
"type": "object",
"alias": "cooper key",
"look": "It is a big cooper key {if player.isThief:with the treasury insignia}.",
"visible": false,
"take": true,
"inventoryverbs": ["Look at", "Drop"],
"_js_name": "e_cooper_key",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["cooper_key"] = e_cooper_key;
allObjects.push(e_cooper_key);
objectsNameMap["cooper_key"] = e_cooper_key;
e_window2 = {
"elementtype": "object",
"name": "window2",
"parent": e_Captain_Office,
"type": "object",
"alias": "window",
"scenery": true,
"look": "It is an ordinary open window.",
"displayverbs": ["Look at"],
"_js_name": "e_window2",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["window2"] = e_window2;
allObjects.push(e_window2);
objectsNameMap["window2"] = e_window2;
e_Captain_Office1 = {
"elementtype": "object",
"name": "Captain_Office1",
"parent": e_the_castle,
"type": "object",
"alias": "outside the captain's office",
"description": "You are hanging on vines at a window directly to the captain office. {if captain.parent=Captain_Office:You can see the back of the captain while he reads some random document.  }You can head northeast, back to the hallway window.{if captain.parent=void: Or you can go inside the office.}",
"descprefix": "You are",
"usedefaultprefix": false,
"_js_name": "e_Captain_Office1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Captain_Office1"] = e_Captain_Office1;
allObjects.push(e_Captain_Office1);
objectsNameMap["Captain_Office1"] = e_Captain_Office1;
e_captain1 = {
"elementtype": "object",
"name": "captain1",
"parent": e_Captain_Office1,
"type": "object",
"alias": "captain",
"look": "The traitor was a lieutenant of the king. Now he is the captain of Vourtram.",
"danger": "death",
"exp": 7,
"armour": 5,
"ht": 14,
"block_flee": true,
"no_steal": true,
"damage": 3,
"stance": "none",
"stab_level": 1,
"coins": 10,
"usedefaultprefix": false,
"prefix": "the",
"suffix": " of Vourtram's guard",
"speak": "You don\u00b4t want him to see you.",
"_js_name": "e_captain1",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"aggressive": false,
"affect_calm": false,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["captain1"] = e_captain1;
allObjects.push(e_captain1);
objectsNameMap["captain1"] = e_captain1;
e_outside_to_captain_office = {
"elementtype": "object",
"name": "outside_to_captain_office",
"parent": e_Captain_Office1,
"type": "exit",
"alias": "in",
"locked": true,
"lockmessage": "You cannot enter the office. The captain is there.",
"to": e_Captain_Office,
"_js_name": "e_outside_to_captain_office",
"_types": ["indirection", "defaultexit"],
"alt": [""],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["outside_to_captain_office"] = e_outside_to_captain_office;
allExits.push(e_outside_to_captain_office);
objectsNameMap["outside_to_captain_office"] = e_outside_to_captain_office;
e_k121 = {
"elementtype": "object",
"name": "k121",
"parent": e_Captain_Office1,
"type": "exit",
"alias": "northeast",
"to": e_hallway,
"_js_name": "e_k121",
"_types": ["northeastdirection", "defaultexit"],
"alt": ["ne"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k121"] = e_k121;
allExits.push(e_k121);
objectsNameMap["k121"] = e_k121;
e_corridor2 = {
"elementtype": "object",
"name": "corridor2",
"parent": e_the_castle,
"type": "object",
"alias": "inner corridor",
"description": "This dim corridor stretches from south to north, with several doors leading to guest rooms. To the north is a big door leading to the main bedroom.",
"turns": 0,
"usedefaultprefix": false,
"prefix": "the",
"_js_name": "e_corridor2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["corridor2"] = e_corridor2;
allObjects.push(e_corridor2);
objectsNameMap["corridor2"] = e_corridor2;
e_k122 = {
"elementtype": "object",
"name": "k122",
"parent": e_corridor2,
"type": "exit",
"alias": "southeast",
"to": e_hallway2,
"_js_name": "e_k122",
"_types": ["southeastdirection", "defaultexit"],
"alt": ["se"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k122"] = e_k122;
allExits.push(e_k122);
objectsNameMap["k122"] = e_k122;
e_bedroom1 = {
"elementtype": "object",
"name": "bedroom1",
"parent": e_corridor2,
"type": "object",
"alias": "door to south",
"feature_container": false,
"lockname": "corridor_to_room1",
"description": "The bedroom is small and dark, you barely can see what is inside. You can also hear a soft snore.",
"open_name": "southern bedroom",
"turns": 0,
"usedefaultprefix": false,
"prefix": "the",
"displayverbs": ["Look at", "Open"],
"useindividualverblist":false,
"usestandardverblist":true,
"onexit": function() { if (e_woman.out) {
OutputText ("You manage to hide yourself while the woman returns to her bedroom");
set(e_woman, "visible", true);
}
set(e_woman, "out", false);
set(e_woman, "awake", false);
set(e_bedroom1, "turns", 0);
if (e_headband.parent==e_small_bed1) {
set(e_headband, "visible", false);
}
HelperCloseObject (e_chest); },
"enter": function() { OutputText ("You sneak into the room."); },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_bedroom1",
"_types": ["LockedRoom", "openable", "defaultobject"],
"picklock": function() { do_picklock (this); },
"unlock": function() { OutputText (Template("NoKey")); },
"open": true,
"close": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bedroom1"] = e_bedroom1;
allObjects.push(e_bedroom1);
objectsNameMap["bedroom1"] = e_bedroom1;
e_k123 = {
"elementtype": "object",
"name": "k123",
"parent": e_bedroom1,
"type": "exit",
"alias": "out",
"to": e_corridor2,
"_js_name": "e_k123",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k123"] = e_k123;
allExits.push(e_k123);
objectsNameMap["k123"] = e_k123;
e_small_bed1 = {
"elementtype": "object",
"name": "small_bed1",
"parent": e_bedroom1,
"type": "object",
"look": "It is a small divan bed.{if not woman.out: You barely can see a woman in this bed.}",
"feature_container": true,
"hidechildren": true,
"alias": "bed",
"hide": "It is a divan bed, you can't hide under it.",
"listchildren": true,
"listchildrenprefix": "You see on the bed:",
"usestandardverblist": true,
"displayverbs": ["Look at"],
"_js_name": "e_small_bed1",
"_types": ["surface", "defaultobject"],
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true,
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"open": false,
"close": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"scenery": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["small_bed1"] = e_small_bed1;
allObjects.push(e_small_bed1);
objectsNameMap["small_bed1"] = e_small_bed1;
e_woman = {
"elementtype": "object",
"name": "woman",
"parent": e_small_bed1,
"type": "object",
"visible": true,
"feature_container": false,
"hidechildren": false,
"look": "You barely can see her. {if woman.awake:She is awake}{if not woman.awake:She is asleep}.",
"awake": false,
"out": false,
"_js_name": "e_woman",
"_types": ["female", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["woman"] = e_woman;
allObjects.push(e_woman);
objectsNameMap["woman"] = e_woman;
e_headband = {
"elementtype": "object",
"name": "headband",
"parent": e_small_bed1,
"type": "object",
"take": true,
"worth": 120,
"visible": false,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"look": function() { if (e_player.parent==e_bedroom1) {
OutputText ("It is difficult to see in here");
}
else {
OutputText ("It is a golden headband with big diamonds.");
} },
"_js_name": "e_headband",
"_types": ["Treasure", "defaultobject"],
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["headband"] = e_headband;
allObjects.push(e_headband);
objectsNameMap["headband"] = e_headband;
e_chest = {
"elementtype": "object",
"name": "chest",
"parent": e_bedroom1,
"type": "object",
"feature_container": true,
"close": false,
"hidechildren": true,
"look": "It is a large wooden chest.",
"listchildren": true,
"useindividualverblist": false,
"usestandardverblist": true,
"alias": "chest",
"displayverbs": ["Look at", "Open"],
"onopen": function() { OutputText ("You open the chest, but it makes too much noise. The woman is awake. ");
set(e_woman, "awake", true);
set(e_chest, "hidechildren", true); },
"hide": function() { Log ("hide:"+e_chest.hidechildren);
if (e_player.parent!=e_bedroom1) {
OutputText ("When the idea occurred to you, you have already left the room.");
}
else if (!(e_woman.awake )|| e_woman.out) {
OutputText ("I don't see why you should hide there.");
}
else {
OutputText ("You manage to hide inside the chest. After a while, the woman exits the room.");
MakeObjectInvisible (e_woman);
set(e_woman, "awake", false);
set(e_woman, "out", true);
set(e_bedroom1, "turns", 0);
set(e_small_bed1, "hidechildren", true);
MakeObjectVisible (e_headband);
} },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_chest",
"_types": ["container_closed", "defaultobject"],
"open": true,
"container": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["chest"] = e_chest;
allObjects.push(e_chest);
objectsNameMap["chest"] = e_chest;
e_opal = {
"elementtype": "object",
"name": "opal",
"parent": e_chest,
"type": "object",
"worth": 40,
"look": "A small opal stone.",
"take": true,
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_opal",
"_types": ["Treasure", "defaultobject"],
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["opal"] = e_opal;
allObjects.push(e_opal);
objectsNameMap["opal"] = e_opal;
e_underwear = {
"elementtype": "object",
"name": "underwear",
"parent": e_chest,
"type": "object",
"alias": "pieces of underwear",
"look": "Many pieces of woman's underwear. They don't smell very well.",
"takemsg": "You are not sure if they are clean.",
"usedefaultprefix": false,
"prefix": "various",
"feature_usegive": false,
"use": false,
"givesingle": false,
"inventoryverbs": ["Look at", "Use", "Drop"],
"_js_name": "e_underwear",
"_types": ["plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"displayverbs": ["Look at", "Take"],
"take": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["underwear"] = e_underwear;
allObjects.push(e_underwear);
objectsNameMap["underwear"] = e_underwear;
e_dress = {
"elementtype": "object",
"name": "dress",
"parent": e_chest,
"type": "object",
"look": "It is a fine woman's dress. Probably made of linen.",
"take": true,
"feature_usegive": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"useindividualverblist":false,
"usestandardverblist":true,
"givesingle": true,
"wear": function() { invoke(e_dress.use);
},
"use": function() { if (e_player.dress) {
OutputText ("You are already using it");
}
else if (e_player.parent==e_bedroom4 && e_room4_to_corridor2.locked) {
OutputText ("You put the dress, picking a shaded area of the room, and tries your best...: <i>come in... it's open.</i>");
OutputText ("A bulky figure enters the room.");
psay ("You should keep the door locked, my baby. These demons can be very nasty sometimes.");
set(e_player, "dress", true);
set(e_husband, "visible", true);
}
else {
OutputText ("Why should you wear a dress right now? wait for the end of this adventure before doing that.");
} },
"_js_name": "e_dress",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["dress"] = e_dress;
allObjects.push(e_dress);
objectsNameMap["dress"] = e_dress;
e_bed1_turn = {
"elementtype": "object",
"name": "bed1_turn",
"parent": e_bedroom1,
"type": "turnscript",
"enabled": true,
"script": function() { Log ("turn script");
if (e_woman.awake) {
if (e_bedroom1.turns>1) {
set(e_bedroom1, "turns", 0);
OutputText ("You leave the room before the woman is able to see you.");
set(e_game, "turns", e_game.turns+4);
MoveObject (e_player, e_corridor2);
set(e_woman, "awake", false);
set(e_woman, "visible", true);
HelperCloseObject (e_chest);
}
else {
if (e_bedroom1.turns==1) {
psay ("Is anybody here?");
}
set(e_bedroom1, "turns", e_bedroom1.turns+1);
}
}
else if (e_woman.out) {
if (e_bedroom1.turns>4) {
set(e_woman, "awake", false);
set(e_woman, "out", false);
set(e_woman, "visible", true);
HelperCloseObject (e_chest);
if (e_headband.parent==e_small_bed1) {
set(e_headband, "visible", false);
}
OutputText ("you hear the woman returns, and quickly hide yourself at the chest. You wait until she sleeps again and leaves the room");
set(e_game, "turns", e_game.turns+5);
MoveObject (e_player, e_corridor2);
set(e_bedroom1, "turns", 0);
}
else {
set(e_bedroom1, "turns", e_bedroom1.turns+1);
}
} },
"_js_name": "e_bed1_turn",
"_types": []
};
elementsNameMap["bed1_turn"] = e_bed1_turn;
allTurnScripts.push(e_bed1_turn);
objectsNameMap["bed1_turn"] = e_bed1_turn;
e_bedroom2 = {
"elementtype": "object",
"name": "bedroom2",
"parent": e_corridor2,
"type": "object",
"lockname": "corridor_to_room2",
"alias": "door to southwest",
"open_name": "southwestern bedroom",
"description": "You are in a small room. Some light comes from a small opening in the wall. You feel the smell of  incense.",
"usedefaultprefix": false,
"prefix": "the",
"displayverbs": ["Look at", "Open","Unlock"],
"useindividualverblist":false,
"usestandardverblist":true,
"unlock": function() { if (e_iron_key.parent==e_player) {
var lexit = GetObject(this.lockname);
if (lexit.locked) {
OutputText ("You unlocked and opened the door.");
UnlockExit (lexit);
if (HasAttribute(this,"open_name")) {
set(this, "alias", this.open_name);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyOpen",this));
}
}
else {
OutputText (Template("NoKey"));
} },
"_js_name": "e_bedroom2",
"_types": ["LockedRoom", "defaultobject"],
"picklock": function() { do_picklock (this); },
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bedroom2"] = e_bedroom2;
allObjects.push(e_bedroom2);
objectsNameMap["bedroom2"] = e_bedroom2;
e_k124 = {
"elementtype": "object",
"name": "k124",
"parent": e_bedroom2,
"type": "exit",
"alias": "out",
"to": e_corridor2,
"_js_name": "e_k124",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k124"] = e_k124;
allExits.push(e_k124);
objectsNameMap["k124"] = e_k124;
e_opening = {
"elementtype": "object",
"name": "opening",
"parent": e_bedroom2,
"type": "object",
"look": "It is just a small window facing the western side of the castle. A ray of light projects onto the opposite wall.",
"scenery": true,
"feature_usegive": true,
"displayverbs": ["Look at"],
"alt": ["ray", "light"],
"useon": {"mirror": function() { OutputText ("You reflect the sunlight onto the painting, revealing something hidden by the paint.");
MakeObjectVisible (e_jade_key); } },
"_js_name": "e_opening",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["opening"] = e_opening;
allObjects.push(e_opening);
objectsNameMap["opening"] = e_opening;
e_painting1 = {
"elementtype": "object",
"name": "painting1",
"parent": e_bedroom2,
"type": "object",
"alias": "painting",
"look": "It is a disturbing painting with wizards in dark robes siting around a pentagram with a boy and a girl in the middle. The teenagers are bleeding to death.",
"feature_container": true,
"takemsg": "It is painted on the wall.",
"displayverbs": ["Look at"],
"_js_name": "e_painting1",
"_types": ["surface", "defaultobject"],
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true,
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"open": false,
"close": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": true,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["painting1"] = e_painting1;
allObjects.push(e_painting1);
objectsNameMap["painting1"] = e_painting1;
e_jade_key = {
"elementtype": "object",
"name": "jade_key",
"parent": e_painting1,
"type": "object",
"take": true,
"alias": "jade key",
"look": "It is a jade key with an intricate design.",
"visible": false,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_jade_key",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["jade_key"] = e_jade_key;
allObjects.push(e_jade_key);
objectsNameMap["jade_key"] = e_jade_key;
e_rug1 = {
"elementtype": "object",
"name": "rug1",
"parent": e_bedroom2,
"type": "object",
"alias": "rug",
"look": "It is an exquisite rug.",
"worth": 20,
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_rug1",
"_types": ["Treasure", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["rug1"] = e_rug1;
allObjects.push(e_rug1);
objectsNameMap["rug1"] = e_rug1;
e_bedroom3 = {
"elementtype": "object",
"name": "bedroom3",
"parent": e_corridor2,
"type": "object",
"lockname": "corridor_to_room3",
"alias": "door to east",
"open_name": "eastern bedroom",
"description": "This is an ordinary small guest room.",
"usedefaultprefix": false,
"prefix": "the",
"displayverbs": ["Look at", "Open"],
"useindividualverblist":false,
"usestandardverblist":true,
"_js_name": "e_bedroom3",
"_types": ["LockedRoom", "defaultobject"],
"picklock": function() { do_picklock (this); },
"unlock": function() { OutputText (Template("NoKey")); },
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bedroom3"] = e_bedroom3;
allObjects.push(e_bedroom3);
objectsNameMap["bedroom3"] = e_bedroom3;
e_k125 = {
"elementtype": "object",
"name": "k125",
"parent": e_bedroom3,
"type": "exit",
"alias": "out",
"to": e_corridor2,
"_js_name": "e_k125",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k125"] = e_k125;
allExits.push(e_k125);
objectsNameMap["k125"] = e_k125;
e_window_court = {
"elementtype": "object",
"name": "window_court",
"parent": e_bedroom3,
"type": "object",
"alias": "window",
"look": "{if window_court.isopen:An ordinary window facing a sturdy tree in the courtyard.}{if not window_court.isopen:A closed window.}",
"alt": ["tree"],
"useindividualverblist":false,
"usestandardverblist":true,
"feature_container": true,
"displayverbs": ["Look at", "Open", "Close"],
"climb": function() { if (e_player.isThief) {
if (e_window_court.isopen) {
OutputText ("With some difficulty you climb the window using the tree, without anybody noticing.");
MoveObject (e_player, e_courtyard2);
}
else {
OutputText ("Perhaps you should first open the window.");
}
}
else {
OutputText ("You are too clumsy to climb that.");
} },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_window_court",
"_types": ["openable", "defaultobject"],
"open": true,
"close": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["window_court"] = e_window_court;
allObjects.push(e_window_court);
objectsNameMap["window_court"] = e_window_court;
e_small_bed3 = {
"elementtype": "object",
"name": "small_bed3",
"parent": e_bedroom3,
"type": "object",
"look": "It is a small bed.",
"alias": "bed",
"pushed": false,
"displayverbs": ["Look at"],
"useindividualverblist":false,
"usestandardverblist":true,
"push": function() { if (e_small_bed3.pushed) {
OutputText ("You don't see the point of pushing it any more.");
}
else {
OutputText ("You push the bed and find a purse containing 40 coins.");
set(e_purse, "coins", e_purse.coins+40);
set(e_small_bed3, "pushed", true);
} },
"pull": function() { if (e_small_bed3.pushed) {
OutputText ("You don't see the point of pulling it any more.");
}
else {
OutputText ("You pull the bed and find a purse containing 40 coins.");
set(e_purse, "coins", e_purse.coins+40);
set(e_small_bed3, "pushed", true);
} },
"_js_name": "e_small_bed3",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["small_bed3"] = e_small_bed3;
allObjects.push(e_small_bed3);
objectsNameMap["small_bed3"] = e_small_bed3;
e_bedroom4 = {
"elementtype": "object",
"name": "bedroom4",
"parent": e_corridor2,
"type": "object",
"lockname": "corridor_to_room4",
"alias": "door to west",
"open_name": "western bedroom",
"description": "The bedroom is dark, you barely can see what is inside. ",
"turns": 0,
"usedefaultprefix": false,
"prefix": "the",
"displayverbs": ["Look at", "Open"],
"useindividualverblist":false,
"usestandardverblist":true,
"enter": function() { OutputText ("You sneak into the room, closing the door."); },
"beforeenter": function() { set(e_bedroom4, "turns", 0); },
"_js_name": "e_bedroom4",
"_types": ["LockedRoom", "defaultobject"],
"picklock": function() { do_picklock (this); },
"unlock": function() { OutputText (Template("NoKey")); },
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bedroom4"] = e_bedroom4;
allObjects.push(e_bedroom4);
objectsNameMap["bedroom4"] = e_bedroom4;
e_room4_to_corridor2 = {
"elementtype": "object",
"name": "room4_to_corridor2",
"parent": e_bedroom4,
"type": "exit",
"alias": "out",
"lockmessage": "You can't go out now.",
"to": e_corridor2,
"_js_name": "e_room4_to_corridor2",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["room4_to_corridor2"] = e_room4_to_corridor2;
allExits.push(e_room4_to_corridor2);
objectsNameMap["room4_to_corridor2"] = e_room4_to_corridor2;
e_large_bed2 = {
"elementtype": "object",
"name": "large_bed2",
"parent": e_bedroom4,
"type": "object",
"look": "It is a large divan bed.",
"alias": "large bed",
"displayverbs": ["Look at"],
"_js_name": "e_large_bed2",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["large_bed2"] = e_large_bed2;
allObjects.push(e_large_bed2);
objectsNameMap["large_bed2"] = e_large_bed2;
e_bed4_turn = {
"elementtype": "object",
"name": "bed4_turn",
"parent": e_bedroom4,
"type": "turnscript",
"enabled": true,
"script": function() { Log ("bed4 turns "+e_bedroom4.turns);
if (!(e_husband.visible )&& e_husband.parent==e_bedroom4) {
if (e_bedroom4.turns==1) {
LockExit (e_room4_to_corridor2);
OutputText ("someone knocks at the door.");
}
else if (e_bedroom4.turns==2) {
OutputText ("You hear a man talking:");
psay ("Hey darling, are you in there?");
}
else if (e_bedroom4.turns==3) {
OutputText ("the man continues to knock at the door.");
}
else if (e_bedroom4.turns>3) {
OutputText ("the man enters the room...");
if (!(e_player.dress)) {
UnlockExit (e_room4_to_corridor2);
if (e_husband.angry) {
OutputText ("The man opens the door and shouts:");
psay ("You AGAIN!?");
OutputText ("He attacks...");
death (e_player.parent);
}
else {
set(e_husband, "angry", true);
OutputText ("The man opens the door");
psay ("Who are you? Where is my wife?");
OutputText ("After many questions you manage to leave the room, thanks to your cunning .");
MoveObject (e_player, e_corridor2);
LockExit (e_corridor_to_room4);
}
}
}
set(e_bedroom4, "turns", e_bedroom4.turns+1);
} },
"_js_name": "e_bed4_turn",
"_types": []
};
elementsNameMap["bed4_turn"] = e_bed4_turn;
allTurnScripts.push(e_bed4_turn);
objectsNameMap["bed4_turn"] = e_bed4_turn;
e_husband = {
"elementtype": "object",
"name": "husband",
"parent": e_bedroom4,
"type": "object",
"visible": false,
"look": "He is a bulky figure.",
"alias": "man",
"speak": "You better not talk too much.",
"angry": false,
"_js_name": "e_husband",
"_types": ["male", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["husband"] = e_husband;
allObjects.push(e_husband);
objectsNameMap["husband"] = e_husband;
e_belt = {
"elementtype": "object",
"name": "belt",
"parent": e_husband,
"type": "object",
"alias": "jeweled belt",
"look": "It is a jeweled belt with precious stones.",
"worth": 90,
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"feature_usegive": true,
"use": true,
"givesingle": true,
"_js_name": "e_belt",
"_types": ["Treasure", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["belt"] = e_belt;
allObjects.push(e_belt);
objectsNameMap["belt"] = e_belt;
e_bedroom5 = {
"elementtype": "object",
"name": "bedroom5",
"parent": e_corridor2,
"type": "object",
"lockname": "corridor_to_room5",
"alias": "door to northeast",
"open_name": "northeastern bedroom",
"description": "This is a comfy guest room.",
"usedefaultprefix": false,
"prefix": "the",
"displayverbs": ["Look at", "Open"],
"useindividualverblist":false,
"usestandardverblist":true,
"firstenter": function() { DisableTurnScript (e_mistress_call); },
"enter": function() { if (e_player.isThief) {
psay ("Get out of my room or I will call the guards!");
OutputText ("With this clear warning, you decide that it is best to leave the madam alone.");
MoveObject (e_player, e_corridor2);
} },
"_js_name": "e_bedroom5",
"_types": ["LockedRoom", "defaultobject"],
"picklock": function() { do_picklock (this); },
"unlock": function() { OutputText (Template("NoKey")); },
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["bedroom5"] = e_bedroom5;
allObjects.push(e_bedroom5);
objectsNameMap["bedroom5"] = e_bedroom5;
e_k126 = {
"elementtype": "object",
"name": "k126",
"parent": e_bedroom5,
"type": "exit",
"alias": "out",
"to": e_corridor2,
"_js_name": "e_k126",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k126"] = e_k126;
allExits.push(e_k126);
objectsNameMap["k126"] = e_k126;
e_mistress = {
"elementtype": "object",
"name": "mistress",
"parent": e_bedroom5,
"type": "object",
"alias": "woman",
"suffix": "",
"prefix": "a",
"look": "She is a beautiful woman wearing a scarlet long dress with an impressive cleavage and a black hennin.",
"alt": ["woman"],
"speak": function() { if (e_mistress.alias=="woman") {
set(e_mistress, "alias", "Acardosa");
set(e_mistress, "prefix", "");
OutputText ("You introduce yourself to the woman.");
psay ("My name is Acardosa, and I'm the mistress of Vourtram.");
}
if (e_player.isWarrior) {
psay ("I heard the fight and saw you killing that demon. I think I can help you with your {ask:Acardosa:quest}, "+e_player.playername+".");
}
if (e_wyvern.parent!=e_antechamber) {
mistress_get();
} },
"ask": {"quest": function() { psay ("I'm loyal to the King, despite my disguise as Vourtram's mistress.");
psay ("{ask:woman:Vourtram} has a powerful gem, a medallion that he uses to control the dragons.");
psay ("He has a powerful dragon named Fafnir under his control in this castle. With its power, he will order the dragons to raze the hidden city and subjugate the king.");
if (e_wyvern.parent==e_antechamber) {
psay ("I could enter Vourtram's chamber and get the medallion for you, but you need to get rid of that {ask:Acardosa:Wyvern} first.");
}
else {
mistress_get();
} }, "resistence": function() { psay ("In order to win this war you have to find a way to {ask:woman:defeat:defeat Vourtram}."); }, "defeat vourtram": function() { psay ("Vourtram is virtually immortal. I saw a man cut his throat with a sword, and the wizard just laughed.");
psay ("It is said that Vourtram placed his soul in a magical {ask:woman:jar}, thus making him immortal."); }, "jar immortality": function() { psay ("The only way to break the immortality spell is to find the soul jar. Only when Vourtram faces his own soul the spell will break."); }, "wyvern": function() { psay ("It is a young Wyvern, his pet monster. If you get close, no matter how strong you are, he will kill you."); } },
"_js_name": "e_mistress",
"_types": ["namedfemale", "defaultobject"],
"usedefaultprefix": false,
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["mistress"] = e_mistress;
allObjects.push(e_mistress);
objectsNameMap["mistress"] = e_mistress;
e_large_bed1 = {
"elementtype": "object",
"name": "large_bed1",
"parent": e_bedroom5,
"type": "object",
"alias": "large bed",
"look": "It is a large divan bed.",
"displayverbs": ["Look at"],
"_js_name": "e_large_bed1",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["large_bed1"] = e_large_bed1;
allObjects.push(e_large_bed1);
objectsNameMap["large_bed1"] = e_large_bed1;
e_corridor_to_room1 = {
"elementtype": "object",
"name": "corridor_to_room1",
"parent": e_corridor2,
"type": "exit",
"alias": "south",
"locked": true,
"to": e_bedroom1,
"_js_name": "e_corridor_to_room1",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["corridor_to_room1"] = e_corridor_to_room1;
allExits.push(e_corridor_to_room1);
objectsNameMap["corridor_to_room1"] = e_corridor_to_room1;
e_corridor_to_room2 = {
"elementtype": "object",
"name": "corridor_to_room2",
"parent": e_corridor2,
"type": "exit",
"alias": "southwest",
"locked": true,
"to": e_bedroom2,
"_js_name": "e_corridor_to_room2",
"_types": ["southwestdirection", "defaultexit"],
"alt": ["sw"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["corridor_to_room2"] = e_corridor_to_room2;
allExits.push(e_corridor_to_room2);
objectsNameMap["corridor_to_room2"] = e_corridor_to_room2;
e_corridor_to_room4 = {
"elementtype": "object",
"name": "corridor_to_room4",
"parent": e_corridor2,
"type": "exit",
"alias": "west",
"locked": true,
"to": e_bedroom4,
"_js_name": "e_corridor_to_room4",
"_types": ["westdirection", "defaultexit"],
"alt": ["w"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["corridor_to_room4"] = e_corridor_to_room4;
allExits.push(e_corridor_to_room4);
objectsNameMap["corridor_to_room4"] = e_corridor_to_room4;
e_corridor_to_room3 = {
"elementtype": "object",
"name": "corridor_to_room3",
"parent": e_corridor2,
"type": "exit",
"alias": "east",
"locked": true,
"to": e_bedroom3,
"_js_name": "e_corridor_to_room3",
"_types": ["eastdirection", "defaultexit"],
"alt": ["e"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["corridor_to_room3"] = e_corridor_to_room3;
allExits.push(e_corridor_to_room3);
objectsNameMap["corridor_to_room3"] = e_corridor_to_room3;
e_corridor_to_room5 = {
"elementtype": "object",
"name": "corridor_to_room5",
"parent": e_corridor2,
"type": "exit",
"alias": "northeast",
"locked": true,
"to": e_bedroom5,
"_js_name": "e_corridor_to_room5",
"_types": ["northeastdirection", "defaultexit"],
"alt": ["ne"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["corridor_to_room5"] = e_corridor_to_room5;
allExits.push(e_corridor_to_room5);
objectsNameMap["corridor_to_room5"] = e_corridor_to_room5;
e_corridor2_to_antechamber = {
"elementtype": "object",
"name": "corridor2_to_antechamber",
"parent": e_corridor2,
"type": "exit",
"alias": "north",
"lockmessage": "The demon blocks your way.",
"locked": true,
"_js_name": "e_corridor2_to_antechamber",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["corridor2_to_antechamber"] = e_corridor2_to_antechamber;
objectReferences.push(["e_corridor2_to_antechamber", "to", "e_antechamber"]);
allExits.push(e_corridor2_to_antechamber);
objectsNameMap["corridor2_to_antechamber"] = e_corridor2_to_antechamber;
e_demon_guard2 = {
"elementtype": "object",
"name": "demon_guard2",
"parent": e_corridor2,
"type": "object",
"alias": "demon",
"look": "The demon has red skin, horns, hoofs and a long tail.",
"danger": "death",
"exp": 7,
"armour": 7,
"ht": 15,
"block_flee": false,
"no_steal": true,
"aggressive": true,
"damage": 5,
"stance": "none",
"demon": true,
"usedefaultprefix": false,
"prefix": "an almost seven feet",
"suffix": "guarding the hallway",
"speak": "I don't think it is a good idea.",
"_js_name": "e_demon_guard2",
"_types": ["Enemy", "male", "defaultobject"],
"enemy": "yes",
"stab_level": 0,
"affect_calm": false,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["demon_guard2"] = e_demon_guard2;
allObjects.push(e_demon_guard2);
objectsNameMap["demon_guard2"] = e_demon_guard2;
e_horn = {
"elementtype": "object",
"name": "horn",
"parent": e_demon_guard2,
"type": "object",
"look": "The pointed horn is one feet long and extremely  sharp.",
"feature_usegive": true,
"take": true,
"inventoryverbs": ["Look at", "Use", "Drop", "Give"],
"use": true,
"givesingle": true,
"useCmds": ["put"],
"selfuseon": {"wooden_spear": function() { OutputText ("You manages to tie the horn at your spear. Looks like it can now penetrate stone like butter.");
set(e_wooden_spear, "horned", true);
set(e_wooden_spear, "suffix", "with a demon's horn in the tip");
MoveObject (e_horn, e_void); } },
"_js_name": "e_horn",
"_types": ["UseAltType", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["horn"] = e_horn;
allObjects.push(e_horn);
objectsNameMap["horn"] = e_horn;
e_mistress_call = {
"elementtype": "object",
"name": "mistress_call",
"parent": e_corridor2,
"type": "turnscript",
"enabled": true,
"script": function() { if (e_player.isWarrior && e_player.parent == e_corridor2 && e_demon_guard2.parent==e_void) {
OutputText ("The door to northeast opens and a feminine voice calls for you...");
if (e_corridor_to_room5.locked) {
UnlockExit (e_corridor_to_room5);
set(e_bedroom5, "alias", e_bedroom5.open_name);
}
} },
"_js_name": "e_mistress_call",
"_types": []
};
elementsNameMap["mistress_call"] = e_mistress_call;
allTurnScripts.push(e_mistress_call);
objectsNameMap["mistress_call"] = e_mistress_call;
e_antechamber = {
"elementtype": "object",
"name": "antechamber",
"parent": e_the_castle,
"type": "object",
"description": "This open area is where the Vourtram's pet wyvern lives. To the north is the Vourtram's quarters.",
"_js_name": "e_antechamber",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["antechamber"] = e_antechamber;
allObjects.push(e_antechamber);
objectsNameMap["antechamber"] = e_antechamber;
e_wyvern = {
"elementtype": "object",
"name": "wyvern",
"parent": e_antechamber,
"type": "object",
"look": "This young monster is ten feet long and six feet tall with a long and poisonous tail. {if wyvern.calm:It seems docile to you.}{if not wyvern.calm:It looks upset with your presence.}",
"usedefaultprefix": false,
"prefix": "a young chained",
"suffix": "",
"calm": false,
"feature_usegive": true,
"displayverbs": ["Look at"],
"give": {"sugar": function() { OutputText ("The wyvern licks all sugar.");
MoveObject (e_sugar, e_void);
if (e_sugar.parent==e_void && e_candies.parent==e_void) {
OutputText ("The wyvern seems friendly.");
set(e_wyvern, "calm", true);
UnlockExit (e_exit_to_master_room);
}
else {
OutputText ("The wyvern waves his head. He wants more.");
} }, "candies": function() { OutputText ("The wyvern eats all candies.");
MoveObject (e_candies, e_void);
if (e_sugar.parent==e_void && e_candies.parent==e_void) {
OutputText ("The wyvern seems friendly.");
set(e_wyvern, "calm", true);
UnlockExit (e_exit_to_master_room);
}
else {
OutputText ("The wyvern waves his head. He wants more.");
} } },
"_js_name": "e_wyvern",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["wyvern"] = e_wyvern;
allObjects.push(e_wyvern);
objectsNameMap["wyvern"] = e_wyvern;
e_exit_to_master_room = {
"elementtype": "object",
"name": "exit_to_master_room",
"parent": e_antechamber,
"type": "exit",
"alias": "north",
"locked": true,
"lockmessage": "The wyvern blocks your way",
"_js_name": "e_exit_to_master_room",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["exit_to_master_room"] = e_exit_to_master_room;
objectReferences.push(["e_exit_to_master_room", "to", "e_master_room"]);
allExits.push(e_exit_to_master_room);
objectsNameMap["exit_to_master_room"] = e_exit_to_master_room;
e_k127 = {
"elementtype": "object",
"name": "k127",
"parent": e_antechamber,
"type": "exit",
"alias": "south",
"to": e_corridor2,
"_js_name": "e_k127",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k127"] = e_k127;
allExits.push(e_k127);
objectsNameMap["k127"] = e_k127;
e_master_room = {
"elementtype": "object",
"name": "master_room",
"parent": e_the_castle,
"type": "object",
"alias": "private chambers of Vourtram",
"usedefaultprefix": false,
"prefix": "the",
"description": "The room is filled with various tapestries and magical symbols. There is no bed, but a large pentagram in the middle of the room. The only window is in the southern part to the room. At this moment you briefly thinks if you just should <b>surrender</b>.",
"beforeenter": function() { if (e_teleport_orb.parent==e_player) {
OutputText ("You leave the orb in the antechamber, just in case you need a way out");
set(e_teleport_orb, "parent", e_antechamber);
} },
"_js_name": "e_master_room",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["master_room"] = e_master_room;
allObjects.push(e_master_room);
objectsNameMap["master_room"] = e_master_room;
e_master_to_antechamber = {
"elementtype": "object",
"name": "master_to_antechamber",
"parent": e_master_room,
"type": "exit",
"alias": "south",
"lockmessage": "You can hear a bunch of guards behind this door.",
"to": e_antechamber,
"_js_name": "e_master_to_antechamber",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["master_to_antechamber"] = e_master_to_antechamber;
allExits.push(e_master_to_antechamber);
objectsNameMap["master_to_antechamber"] = e_master_to_antechamber;
e_no_drop_master_room = {
"elementtype": "object",
"name": "no_drop_master_room",
"parent": e_master_room,
"type": "command",
"pattern": "^drop (?<object_drop>.*)$",
"script": function(parameters) { var object_drop = parameters['object_drop'];
OutputText ("you cannot drop nothing now."); },
"_js_name": "e_no_drop_master_room",
"_types": ["defaultcommand"]
};
elementsNameMap["no_drop_master_room"] = e_no_drop_master_room;
allCommands.push(e_no_drop_master_room);
objectsNameMap["no_drop_master_room"] = e_no_drop_master_room;
e_vourtram = {
"elementtype": "object",
"name": "vourtram",
"parent": e_master_room,
"type": "object",
"alias": "Vourtram",
"suffix": "sitting here, with eyes wide shut",
"look": "The wizard wears a red robe and a black fez. <br/>He's sitting  inside a pentagram, with his eyes wide open, but you can only see the white of his eyes.<br/>He seems to be into some kind of trance, and unaware of your presence. ",
"ht": 100,
"exp": 30,
"armour": 100,
"stab_level": 100,
"damage": 50,
"speak": "You have nothing to speak to him.",
"_js_name": "e_vourtram",
"_types": ["Enemy", "namedmale", "defaultobject"],
"enemy": "yes",
"danger": "death",
"aggressive": false,
"affect_calm": false,
"block_flee": false,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"usedefaultprefix": false,
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["vourtram"] = e_vourtram;
allObjects.push(e_vourtram);
objectsNameMap["vourtram"] = e_vourtram;
e_medallion = {
"elementtype": "object",
"name": "medallion",
"parent": e_master_room,
"type": "object",
"alias": "medallion",
"look": "It has a huge ruby. {if player.isThief:Looks like the lendary dragon's heart.}{if player.isMage:It is the lendary dragon's heart}",
"usedefaultprefix": false,
"suffix": ", over a small table",
"alt": ["ruby", "gem", "heart"],
"feature_usegive": true,
"drop": false,
"dropmsg": "This is too important to be droped.",
"prefix": "a",
"inventoryverbs": ["Look at", "Use", "Give"],
"givesingle": true,
"take": function() { if (e_player.isThief) {
if (e_player.parent==e_master_room) {
OutputText ("You use your stealth to approach the medallion. As you get the medallion, Vourtram wakes and yells! You are in trouble! Guards are coming! Do something! Save!");
grabMedallion();
}
}
else {
OutputText ("It is too close of Vourtram, he would notice you.");
} },
"use": function() { if (e_player.parent==e_floating_sphere) {
OutputText ("You hold the medallion with all your faith and despair and a dragon comes from nowhere and rescues you!");
MoveObject (e_player, e_the_base);
OutputText ("The dragon takes you back to inn and says goodbye. You are SO alive!");
}
else {
OutputText ("You don't really know how this works.");
} },
"break": function() { Ask ("This is one possible way to end this game. Are you sure?", function (result) { if (result) {
OutputText ("When you smash the medallion, you feel like an earthquake was happening.");
OutputText ("Fafnir breaks loose from his dungeon, and spread fire and destruction over all the kingdom.");
OutputText ("It was only after a few days that Fafnir got satisfied and left the kingdom. The castle was completely destroyed. All of the cities were ruined.");
OutputText ("Some people say that the dragon killed Vourtram, some people think that the evil mage managed to flee.");
if (e_princess.parent==e_void) {
OutputText ("You managed to save the princess. She eventually was married to a foreign rich prince, in order to strengthen the kingdom economy.");
}
else {
OutputText ("The princess died at the attack. You failed your quest.");
}
OutputText ("You survived, but your career as a hero has ended. After so much destruction, you decided to retire and became a simple farmer");
finishTheGame();
} }); },
"_js_name": "e_medallion",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["medallion"] = e_medallion;
allObjects.push(e_medallion);
objectsNameMap["medallion"] = e_medallion;
e_window1 = {
"elementtype": "object",
"name": "window1",
"parent": e_master_room,
"type": "object",
"alias": "window",
"look": "It is a long fall to the river... river? what am I thinking? it is a long fall to SOLID ROCK.",
"displayverbs": ["Look at"],
"useindividualverblist":false,
"usestandardverblist":true,
"climb": function() { if (e_player.isThief && e_medallion.parent==e_player) {
OutputText ("In desperation you throw yourself on the window, hoping to grab in some vine, but there is no vine... and you <br/>F<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>a<br/>l");
OutputText ("Until you see yourself imprisoned by an energy sphere. Looks like Vourtram is not done with you.");
MoveObject (e_player, e_floating_sphere);
}
else {
OutputText ("Why should you try to kill yourself?");
} },
"_js_name": "e_window1",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["window1"] = e_window1;
allObjects.push(e_window1);
objectsNameMap["window1"] = e_window1;
e_tapestry = {
"elementtype": "object",
"name": "tapestry",
"parent": e_master_room,
"type": "object",
"scenery": true,
"alt": ["pentagram", "symbol", "symbols"],
"look": "Evil stuff.",
"displayverbs": ["Look at"],
"_js_name": "e_tapestry",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["tapestry"] = e_tapestry;
allObjects.push(e_tapestry);
objectsNameMap["tapestry"] = e_tapestry;
e_table1 = {
"elementtype": "object",
"name": "table1",
"parent": e_master_room,
"type": "object",
"scenery": true,
"look": "It is a small table near the pentagram.",
"displayverbs": ["Look at"],
"_js_name": "e_table1",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["table1"] = e_table1;
allObjects.push(e_table1);
objectsNameMap["table1"] = e_table1;
e_floating_sphere = {
"elementtype": "object",
"name": "floating_sphere",
"parent": e_the_castle,
"type": "object",
"alias": "Floating Sphere",
"description": "You are floating in a magical sphere towards the grasp of Vourtram!",
"_js_name": "e_floating_sphere",
"_types": ["NoDrop", "defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["floating_sphere"] = e_floating_sphere;
allObjects.push(e_floating_sphere);
objectsNameMap["floating_sphere"] = e_floating_sphere;
e_no_drop_floating_sphere = {
"elementtype": "object",
"name": "no_drop_floating_sphere",
"parent": e_floating_sphere,
"type": "command",
"pattern": "^drop (?<object_drop>.*)$",
"script": function(parameters) { var object_drop = parameters['object_drop'];
OutputText ("you cannot drop nothing now."); },
"_js_name": "e_no_drop_floating_sphere",
"_types": ["defaultcommand"]
};
elementsNameMap["no_drop_floating_sphere"] = e_no_drop_floating_sphere;
allCommands.push(e_no_drop_floating_sphere);
objectsNameMap["no_drop_floating_sphere"] = e_no_drop_floating_sphere;
e_temple_entrance = {
"elementtype": "object",
"name": "temple_entrance",
"type": "object",
"alias": "portable portal",
"description": "You are standing in front of an old temple in ruins. The temple is a two story building made of stone and gray marble, supported by beautiful marble columns, despite its lack of conservation. Magical symbols are drawn in the floor and walls, and a dozen of strange statues are placed in the entrance. You can feel that something evil is inside this temple. You can go out, back to the portal, or enter the building.",
"take": true,
"look": "When rolled up, it looks like a man sized rug. When unrolled, it looks like a door to another place.",
"feature_usegive": true,
"inventoryverbs": ["Look at", "Drop"],
"displayverbs": ["Look at", "Take", "Use"],
"descprefix": "You are at",
"usedefaultprefix": false,
"prefix": "the",
"use": function() { if (e_temple_entrance.parent==e_player) {
OutputText ("You have to drop the portal in order to use it.");
}
else {
set(e_magical_portal_exit, "to", e_temple_entrance.parent);
set(e_temple_entrance, "prefix", "the");
set(e_temple_entrance, "alias", "entrance of the temple");
MoveObject (e_player, e_temple_entrance);
} },
"onexit": function() { if (!(e_player.parent==e_temple1 )&& !(e_player.parent==e_temple3)) {
set(e_temple_entrance, "alias", "portable portal");
} },
"_js_name": "e_temple_entrance",
"_types": ["defaultobject"],
"visible": true,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["temple_entrance"] = e_temple_entrance;
allObjects.push(e_temple_entrance);
objectsNameMap["temple_entrance"] = e_temple_entrance;
e_magical_portal_exit = {
"elementtype": "object",
"name": "magical_portal_exit",
"parent": e_temple_entrance,
"type": "exit",
"alias": "out",
"to": e_the_base,
"_js_name": "e_magical_portal_exit",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["magical_portal_exit"] = e_magical_portal_exit;
allExits.push(e_magical_portal_exit);
objectsNameMap["magical_portal_exit"] = e_magical_portal_exit;
e_temple1 = {
"elementtype": "object",
"name": "temple1",
"parent": e_temple_entrance,
"type": "object",
"alias": "temple",
"description": "You are in a dim sacrifice altar. In the ground you can see a large pentagram drawn in blood. You can see a narrow tunnel leading down.",
"look": "The temple was built in the hillside, almost embedded in mountain rock. The strong columns still supports the structure, but most of the roof collapsed with the passage of time.{if stone_god.parent=temple1: When you peek inside the temple you can see a huge statue of an unnamed god. It looks so alive that it is almost as it is watching you.}",
"turns": 0,
"displayverbs": ["Look at"],
"alt": ["entrance", "floor", "walls"],
"climb": "The walls are too slippery to climb.",
"feature_usegive": true,
"use": true,
"onexit": function() { set(e_stone_god, "aggressive", true); },
"useon": {"rope1": function() { OutputText ("I can't find a place to tie this rope."); } },
"_js_name": "e_temple1",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["temple1"] = e_temple1;
allObjects.push(e_temple1);
objectsNameMap["temple1"] = e_temple1;
e_temple1_to_temple_entrance = {
"elementtype": "object",
"name": "temple1_to_temple_entrance",
"parent": e_temple1,
"type": "exit",
"alias": "out",
"lockmessage": "",
"locked": false,
"to": e_temple_entrance,
"_js_name": "e_temple1_to_temple_entrance",
"_types": ["outdirection", "defaultexit"],
"alt": ["o"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["temple1_to_temple_entrance"] = e_temple1_to_temple_entrance;
allExits.push(e_temple1_to_temple_entrance);
objectsNameMap["temple1_to_temple_entrance"] = e_temple1_to_temple_entrance;
e_temple1_to_temple2 = {
"elementtype": "object",
"name": "temple1_to_temple2",
"parent": e_temple1,
"type": "exit",
"alias": "north",
"lockmessage": "The statue will not let you pass.",
"locked": true,
"visible": false,
"_js_name": "e_temple1_to_temple2",
"_types": ["northdirection", "defaultexit"],
"alt": ["n"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["temple1_to_temple2"] = e_temple1_to_temple2;
objectReferences.push(["e_temple1_to_temple2", "to", "e_temple2"]);
allExits.push(e_temple1_to_temple2);
objectsNameMap["temple1_to_temple2"] = e_temple1_to_temple2;
e_stone_god = {
"elementtype": "object",
"name": "stone_god",
"parent": e_temple1,
"type": "object",
"look": "The statue is nine feet high, made of jade stone. It has the head of a lion with an elephant trunk, six arms, two legs and a pair of wings. It is not fast, but is coming to kill you.",
"ht": 1000,
"exp": 6,
"armour": 1000,
"aggressive": true,
"damage": 2,
"alias": "stone god",
"displayverbs": ["Look at"],
"useindividualverblist": false,
"usestandardverblist": true,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You already did it.");
}
else {
OutputText ("You push the statue and it goes down, cracking his body into various parts.");
set(e_combat, "en_dam", 1);
set(e_combat, "en_ht", 0);
set(e_combat, "en_exp", 1);
set(e_combat, "en_red", 10);
set(e_combat, "pushed", true);
set(e_stone_god, "armour", 0);
set(e_stone_god, "alias", "stone god (fallen)");
set(e_stone_god, "look", "The nine feet stone god now lies in the ground, his body cracked, but still trying to hit you.");
}
}
else {
if (e_player.isWarrior) {
OutputText ("You push the statue and it goes down, breaking in various pieces.");
MoveObject (e_stone_god, e_void);
removeEnemy (e_stone_god);
}
else {
OutputText ("It dodged you.");
}
} },
"_js_name": "e_stone_god",
"_types": ["Enemy", "defaultobject"],
"enemy": "yes",
"danger": "death",
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["stone_god"] = e_stone_god;
allObjects.push(e_stone_god);
objectsNameMap["stone_god"] = e_stone_god;
e_pentagram = {
"elementtype": "object",
"name": "pentagram",
"parent": e_temple1,
"type": "object",
"alias": "pentagram",
"look": "It is a large pentagram drawn with blood. In the center you can see a drawing depicting a throne, a medallion, a key, and a dark banner. {if pentagram1.visible:You wonder if this is human blood.}{if not pentagram1.visible:The bloody lines were washed by the clean water.}",
"displayverbs": ["Look at"],
"feature_usegive": true,
"alt": ["altar"],
"useon": {"bucket2": function() { if (e_stone_god.parent==e_temple1 && e_bucket2.fill) {
OutputText ("The monster hits you before you can pour the bucket in the pentagram, spilling all water in the ground.");
set(e_bucket2, "fill", false);
}
else {
OutputText ("Nothing happens.");
} } },
"_js_name": "e_pentagram",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["pentagram"] = e_pentagram;
allObjects.push(e_pentagram);
objectsNameMap["pentagram"] = e_pentagram;
e_temple1_to_cage = {
"elementtype": "object",
"name": "temple1_to_cage",
"parent": e_temple1,
"type": "exit",
"alias": "down",
"lockmessage": "The statue will not let you pass.",
"locked": true,
"_js_name": "e_temple1_to_cage",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["temple1_to_cage"] = e_temple1_to_cage;
objectReferences.push(["e_temple1_to_cage", "to", "e_temple_cage"]);
allExits.push(e_temple1_to_cage);
objectsNameMap["temple1_to_cage"] = e_temple1_to_cage;
e_keyhole = {
"elementtype": "object",
"name": "keyhole",
"parent": e_temple1,
"type": "object",
"alias": "keyhole",
"look": "It is a jade keyhole. It is in the northern wall, but you can't see no door.",
"displayverbs": ["Look at","Unlock"],
"useindividualverblist":false,
"usestandardverblist":true,
"unlock": function() { if (e_jade_key.parent==e_player) {
MakeObjectInvisible (e_keyhole);
MakeExitVisible (e_temple1_to_temple2);
MoveObject (e_jade_key, e_void);
OutputText ("A passage opens in the northern wall.");
}
else {
OutputText ("You don't have the right key.");
} },
"picklock": function() { if (e_player.isThief) {
OutputText ("There is no way you can pick this lock.");
}
else {
OutputText ("I don't know how.");
} },
"_js_name": "e_keyhole",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["keyhole"] = e_keyhole;
allObjects.push(e_keyhole);
objectsNameMap["keyhole"] = e_keyhole;
e_temple2 = {
"elementtype": "object",
"name": "temple2",
"parent": e_temple_entrance,
"type": "object",
"alias": "obsidian chamber",
"visible": false,
"description": "This dark room pulsates with some kind of dark light. In the center you can see images of the {temple2.portal_pointer}.",
"portal_pointer": "",
"beforeenter": function() { if (e_temple_entrance.parent==e_throne_room) {
MakeObjectVisible (e_soul_jar);
}
else {
MakeObjectInvisible (e_soul_jar);
}
set(e_temple2, "portal_pointer", GetDisplayAlias(e_temple_entrance.parent)); },
"_js_name": "e_temple2",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["temple2"] = e_temple2;
allObjects.push(e_temple2);
objectsNameMap["temple2"] = e_temple2;
e_k128 = {
"elementtype": "object",
"name": "k128",
"parent": e_temple2,
"type": "exit",
"alias": "south",
"to": e_temple1,
"_js_name": "e_k128",
"_types": ["southdirection", "defaultexit"],
"alt": ["s"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k128"] = e_k128;
allExits.push(e_k128);
objectsNameMap["k128"] = e_k128;
e_soul_jar = {
"elementtype": "object",
"name": "soul_jar",
"parent": e_temple2,
"type": "object",
"alias": "obsidian jar",
"look": "It is unnaturally cold. It gives you goosebumps.",
"take": true,
"drop": false,
"feature_usegive": true,
"inventoryverbs": ["Look at", "Use", "Give"],
"use": true,
"givesingle": true,
"selfuseon": {"vourtram": function() { Ask ("This is one way to end this game. Are you sure?", function (result) { if (result) {
OutputText ("For a second, Vourtram suffer in intense pain, but he quickly recovers. Uttering strange words, he throws a gargantuan fire ball at you.");
OutputText ("So, you died. Nevertheless, Vourtram lost his immortality, and was eventually defeated and slain by another hero, that married the princess.");
finishTheGame();
}
else {
OutputText ("You decide not to use it right now");
} }); }, "vourtram2": function() { OutputText ("You grab the soul jar, showing it to Vourtram, that loses his strength for a second. You smash the jar, and the spell is broken.");
endGame3(); } },
"_js_name": "e_soul_jar",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["soul_jar"] = e_soul_jar;
allObjects.push(e_soul_jar);
objectsNameMap["soul_jar"] = e_soul_jar;
e_k129 = {
"elementtype": "object",
"name": "k129",
"parent": e_temple_entrance,
"type": "exit",
"alias": "in",
"to": e_temple1,
"_js_name": "e_k129",
"_types": ["indirection", "defaultexit"],
"alt": [""],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k129"] = e_k129;
allExits.push(e_k129);
objectsNameMap["k129"] = e_k129;
e_symbols1 = {
"elementtype": "object",
"name": "symbols1",
"parent": e_temple_entrance,
"type": "object",
"alias": "symbols",
"look": "You never saw such symbols before.",
"scenery": true,
"displayverbs": ["Look at"],
"read_away": true,
"_js_name": "e_symbols1",
"_types": ["Readable", "defaultobject"],
"read": function() { doRead (this); },
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["symbols1"] = e_symbols1;
allObjects.push(e_symbols1);
objectsNameMap["symbols1"] = e_symbols1;
e_columns = {
"elementtype": "object",
"name": "columns",
"parent": e_temple_entrance,
"type": "object",
"scenery": true,
"feature_usegive": true,
"displayverbs": ["Look at"],
"alias": "columns",
"usedefaultprefix": false,
"prefix": "eight",
"alt": ["marble"],
"look": function() { OutputText ("Corinthian columns, covered by slippery moss. These ancient columns support the temple.");
set(e_columns, "scenery", false); },
"climb": function() { OutputText ("The columns are too slippery to climb."); },
"useon": {"rope1": function() { if (e_player.isThief) {
OutputText ("You manage to climb the columns by bracing them with the rope.");
MoveObject (e_player, e_temple3);
}
else {
OutputText ("I'm too clumsy to climb this, even with a rope.");
} } },
"_js_name": "e_columns",
"_types": ["plural", "defaultobject"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["columns"] = e_columns;
allObjects.push(e_columns);
objectsNameMap["columns"] = e_columns;
e_statues1 = {
"elementtype": "object",
"name": "statues1",
"parent": e_temple_entrance,
"type": "object",
"alias": "statues",
"look": "There are a dozen of statues of bizarre zoomorphic gods.  They look ancient and evil.{once: You found an old piece of {object:rope1} behind the statues.}",
"feature_container": true,
"hidechildren": true,
"displayverbs": ["Look at"],
"usedefaultprefix": false,
"prefix": "a dozen",
"_js_name": "e_statues1",
"_types": ["plural", "surface", "defaultobject"],
"gender": "they",
"article": "them",
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true,
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"open": false,
"close": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"scenery": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["statues1"] = e_statues1;
allObjects.push(e_statues1);
objectsNameMap["statues1"] = e_statues1;
e_rope1 = {
"elementtype": "object",
"name": "rope1",
"parent": e_statues1,
"type": "object",
"alias": "rope",
"look": "a piece of rope.",
"take": true,
"feature_usegive": true,
"use": true,
"_js_name": "e_rope1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["rope1"] = e_rope1;
allObjects.push(e_rope1);
objectsNameMap["rope1"] = e_rope1;
e_temple_trap = {
"elementtype": "object",
"name": "temple_trap",
"parent": e_temple_entrance,
"type": "object",
"alias": "somewhere",
"description": "You are swimming, fighting against strong currents.",
"visible": false,
"level": 0,
"usedefaultprefix": false,
"descprefix": "You are ",
"_js_name": "e_temple_trap",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["temple_trap"] = e_temple_trap;
allObjects.push(e_temple_trap);
objectsNameMap["temple_trap"] = e_temple_trap;
e_fern = {
"elementtype": "object",
"name": "fern",
"parent": e_temple_trap,
"type": "object",
"alias": "floating fern",
"visible": false,
"look": "Floating fern.",
"displayverbs": ["Look at"],
"_js_name": "e_fern",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["fern"] = e_fern;
allObjects.push(e_fern);
objectsNameMap["fern"] = e_fern;
e_water = {
"elementtype": "object",
"name": "water",
"parent": e_temple_trap,
"type": "object",
"visible": true,
"scenery": true,
"alt": ["current", "currents"],
"look": "It is wet!",
"displayverbs": ["Look at"],
"_js_name": "e_water",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["water"] = e_water;
allObjects.push(e_water);
objectsNameMap["water"] = e_water;
e_wall = {
"elementtype": "object",
"name": "wall",
"parent": e_temple_trap,
"type": "object",
"visible": false,
"displayverbs": ["Look at"],
"look": function() { OutputText ("The wall is as high as the sky. You find a small grate in the wall.");
set(e_grate, "visible", true); },
"_js_name": "e_wall",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["wall"] = e_wall;
allObjects.push(e_wall);
objectsNameMap["wall"] = e_wall;
e_grate = {
"elementtype": "object",
"name": "grate",
"parent": e_temple_trap,
"type": "object",
"visible": false,
"displayverbs": ["Look at"],
"look": function() { OutputText ("You can see a small lever inside.");
MakeObjectVisible (e_lever); },
"_js_name": "e_grate",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["grate"] = e_grate;
allObjects.push(e_grate);
objectsNameMap["grate"] = e_grate;
e_lever = {
"elementtype": "object",
"name": "lever",
"parent": e_temple_trap,
"type": "object",
"visible": false,
"look": "It is a small lever.",
"displayverbs": ["Look at"],
"push": "You can't reach it.",
"_js_name": "e_lever",
"_types": ["defaultobject"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["lever"] = e_lever;
allObjects.push(e_lever);
objectsNameMap["lever"] = e_lever;
e_swim_trap = {
"elementtype": "object",
"name": "swim_trap",
"parent": e_temple_trap,
"type": "command",
"pattern": "^swim$",
"script": function(parameters) { OutputText ("You are trying..."); },
"_js_name": "e_swim_trap",
"_types": ["defaultcommand"]
};
elementsNameMap["swim_trap"] = e_swim_trap;
allCommands.push(e_swim_trap);
objectsNameMap["swim_trap"] = e_swim_trap;
e_temple3 = {
"elementtype": "object",
"name": "temple3",
"parent": e_temple_entrance,
"type": "object",
"alias": "collapsed temple's roof",
"description": "You are standing in the stone beams of the temple's collapsed roof. From here you can see the temple's interior area:<br/>You see a kind of dim altar, with blood stains. In the ground you can see a large pentagram drawn with blood.{if stone_god.parent=temple1: You can also see a large and menacing stone statue inside the pentagram.} From here you can climb further to reach the hillside, or go back to the entrance.",
"visible": false,
"usedefaultprefix": false,
"descprefix": "You are over",
"prefix": "the",
"_js_name": "e_temple3",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["temple3"] = e_temple3;
allObjects.push(e_temple3);
objectsNameMap["temple3"] = e_temple3;
e_pentagram1 = {
"elementtype": "object",
"name": "pentagram1",
"parent": e_temple3,
"type": "object",
"alias": "pentagram",
"look": "It is a large pentagram drawn with blood. In the center you can see a drawing depicting a throne, a medallion, a key, and a dark banner.",
"feature_usegive": true,
"displayverbs": ["Look at"],
"alt": ["altar"],
"useon": {"bucket2": function() { if (e_bucket2.fill) {
OutputText ("You throw the water over the pentagram lines, and the statue dissolves into nothing.");
MoveObject (e_stone_god, e_void);
set(e_pentagram1, "visible", false);
removeEnemy (e_stone_god);
if (e_player.isThief) {
OutputText ("You climb down to the temple.");
MoveObject (e_player, e_temple_entrance);
}
else {
OutputText ("Suddenly you are engulfed by a light and falls in the water...");
MoveObject (e_player, e_temple_trap);
}
}
else {
OutputText ("The bucket is empty.");
} } },
"_js_name": "e_pentagram1",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["pentagram1"] = e_pentagram1;
allObjects.push(e_pentagram1);
objectsNameMap["pentagram1"] = e_pentagram1;
e_k130 = {
"elementtype": "object",
"name": "k130",
"parent": e_temple3,
"type": "exit",
"alias": "down",
"to": e_temple_entrance,
"_js_name": "e_k130",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k130"] = e_k130;
allExits.push(e_k130);
objectsNameMap["k130"] = e_k130;
e_k131 = {
"elementtype": "object",
"name": "k131",
"parent": e_temple3,
"type": "exit",
"alias": "up",
"_js_name": "e_k131",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k131"] = e_k131;
objectReferences.push(["e_k131", "to", "e_temple_roof"]);
allExits.push(e_k131);
objectsNameMap["k131"] = e_k131;
e_stone_god2 = {
"elementtype": "object",
"name": "stone_god2",
"parent": e_temple3,
"type": "object",
"scenery": true,
"alias": "statue",
"look": "The statue is nine feet high, made of jade stone. It has the head of a lion with an elephant trunk, six arms, two legs and a pair of wings. It looks so alive!",
"_js_name": "e_stone_god2",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["stone_god2"] = e_stone_god2;
allObjects.push(e_stone_god2);
objectsNameMap["stone_god2"] = e_stone_god2;
e_temple_roof = {
"elementtype": "object",
"name": "temple_roof",
"parent": e_temple_entrance,
"type": "object",
"alias": "mountainside, over the temple",
"visible": false,
"description": "You are standing in a stone platform over the temple. From here you can reach the solid rock of the mountain behind the temple.",
"usedefaultprefix": false,
"prefix": "the",
"descprefix": "You are by",
"_js_name": "e_temple_roof",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["temple_roof"] = e_temple_roof;
allObjects.push(e_temple_roof);
objectsNameMap["temple_roof"] = e_temple_roof;
e_k132 = {
"elementtype": "object",
"name": "k132",
"parent": e_temple_roof,
"type": "exit",
"alias": "down",
"to": e_temple3,
"_js_name": "e_k132",
"_types": ["downdirection", "defaultexit"],
"alt": ["d"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k132"] = e_k132;
allExits.push(e_k132);
objectsNameMap["k132"] = e_k132;
e_fountain = {
"elementtype": "object",
"name": "fountain",
"parent": e_temple_roof,
"type": "object",
"look": "A small and clear waterfall.",
"feature_usegive": true,
"alias": "fall",
"displayverbs": ["Look at"],
"drink": "So clean and refreshing.{once: You never tasted anything so clean and pure before.}",
"use": false,
"useon": {"bucket2": function() { OutputText ("You fill the bucket with the clear water");
set(e_bucket2, "fill", true); } },
"_js_name": "e_fountain",
"_types": ["defaultobject"],
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["fountain"] = e_fountain;
allObjects.push(e_fountain);
objectsNameMap["fountain"] = e_fountain;
e_rock = {
"elementtype": "object",
"name": "rock",
"parent": e_temple_roof,
"type": "object",
"alias": "rock",
"visible": true,
"scenery": true,
"look": "It seens to be just the natural cold rock.",
"alt": ["mountain"],
"_js_name": "e_rock",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["rock"] = e_rock;
allObjects.push(e_rock);
objectsNameMap["rock"] = e_rock;
e_temple_cage = {
"elementtype": "object",
"name": "temple_cage",
"parent": e_temple_entrance,
"type": "object",
"visible": false,
"alias": "dungeon",
"description": "The tunnel leads you inside a huge dungeon. A big barred door leads to a huge cell. {if not cell_door.isopen: You can hear many young voices claiming for help inside this dungeon.}",
"_js_name": "e_temple_cage",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["temple_cage"] = e_temple_cage;
allObjects.push(e_temple_cage);
objectsNameMap["temple_cage"] = e_temple_cage;
e_k133 = {
"elementtype": "object",
"name": "k133",
"parent": e_temple_cage,
"type": "exit",
"alias": "up",
"to": e_temple1,
"_js_name": "e_k133",
"_types": ["updirection", "defaultexit"],
"alt": ["u"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0
};
elementsNameMap["k133"] = e_k133;
allExits.push(e_k133);
objectsNameMap["k133"] = e_k133;
e_cell_door = {
"elementtype": "object",
"name": "cell_door",
"parent": e_temple_cage,
"type": "object",
"alias": "barred door",
"look": "The barred door is a eight feet long entrance to the prison.{if not cell_door.isopen: You can see dozens of young prisoners claiming for help inside this dungeon.}",
"feature_container": true,
"close": false,
"isopen": false,
"displayverbs": ["Look at", "Open"],
"openscript": function() { if (!(e_cell_door.isopen)) {
OutputText ("You open the cell and free the young prisoners. Hundreds of young man and woman were kept in this dungeon for some horrendous sacrifice ritual.");
set(e_old_sage, "parent", e_void);
set(e_player, "level", e_player.level+1);
HelperOpenObject (e_cell_door);
} },
"inventoryverbs": ["Look at", "Use", "Drop", "Open", "Close"],
"_js_name": "e_cell_door",
"_types": ["openable", "defaultobject"],
"open": true,
"visible": true,
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["cell_door"] = e_cell_door;
allObjects.push(e_cell_door);
objectsNameMap["cell_door"] = e_cell_door;
e_portal1 = {
"elementtype": "object",
"name": "portal1",
"parent": e_temple_entrance,
"type": "object",
"alias": "portal",
"scenery": true,
"look": "The portal is a door sized rectangle made of white light.",
"_js_name": "e_portal1",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["portal1"] = e_portal1;
allObjects.push(e_portal1);
objectsNameMap["portal1"] = e_portal1;
e_k134 = {
"elementtype": "object",
"name": "k134",
"type": "command",
"anonymous": true,
"property": "add",
"isverb": true,
"pattern": "^add (?<object>.*)$",
"defaultexpression": "\"You can't add \" + object.article + \".\"",
"_js_name": "e_k134",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["k134"] = e_k134;
allCommands.push(e_k134);
objectsNameMap["k134"] = e_k134;
e_k135 = {
"elementtype": "object",
"name": "k135",
"type": "command",
"anonymous": true,
"property": "put",
"isverb": true,
"pattern": "^put (?<object>.*)$",
"defaultexpression": "\"You can't put \" + object.article + \".\"",
"_js_name": "e_k135",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["k135"] = e_k135;
allCommands.push(e_k135);
objectsNameMap["k135"] = e_k135;
e_wolfTurn = {
"elementtype": "object",
"name": "wolfTurn",
"type": "turnscript",
"script": function() { if (e_Wolf.calm>0) {
if (e_player.parent==e_Maze) {
set(e_Wolf, "calm", 0);
set(e_Wolf, "turns", 0);
DisableTurnScript (e_wolfTurn);
}
else {
set(e_Wolf, "calm", e_Wolf.calm-1);
}
if (e_Wolf.calm == 0) {
set(e_Wolf, "turns", 0);
if (e_player.parent==e_Wolf.parent) {
OutputText ("The Wolf is wild again!");
}
else if (e_Wolf.parent!=e_wolf_den) {
set(e_Wolf, "parent", e_wolf_den);
if (e_player.parent==e_Wolf.parent) {
OutputText ("The wolf is back to his lair... and he does not seem to be happy");
}
}
}
}
else {
set(e_Wolf, "turns", e_Wolf.turns+1);
if (e_player.parent!=e_Maze && e_player.parent==e_Wolf.parent) {
if (e_Wolf.turns>3) {
DisableTurnScript (e_wolfTurn);
OutputText ("The wolf attacks! He bites your throat, you can't breath... ");
death (e_player.parent);
}
else if (e_Wolf.turns>1) {
OutputText ("<b>The wolf growls and slowly approaches you</b>");
}
}
} },
"_js_name": "e_wolfTurn",
"_types": []
};
elementsNameMap["wolfTurn"] = e_wolfTurn;
allTurnScripts.push(e_wolfTurn);
objectsNameMap["wolfTurn"] = e_wolfTurn;
e_stab = {
"elementtype": "object",
"name": "stab",
"type": "command",
"pattern": "^stab (?<object_enemy>.*)$",
"script": function(parameters) { var object_enemy = parameters['object_enemy'];
if (e_player.class=="thief") {
if (object_enemy==e_outlaw_thug) {
if (Contains (e_gray_tavern,e_YellowWoman)) {
OutputText ("You wait for the best moment... he is distracted and you can easily surprise him from behind.");
var menulist = NewStringList();
listadd (menulist, "Cut his throat! He deserves this");
listadd (menulist, "Deliver him to the authorities");
ShowMenu ("Choose your action", menulist, true, function (result) { if (result=="Cut his throat! He deserves this") {
OutputText ("You cut his throat, spilling blood all over the place. Between screams and confusion, you manage to escape to the temple.<br/>");
set(e_player, "level", 2);
MakeObjectInvisible (e_outlaw_thug);
MoveObject (e_player, e_temple_phoenix);
}
else if (result=="Deliver him to the authorities") {
OutputText ("You immobilize the thug, and deliver him to the justice. The thug is hanged in the main square, and you receive a reward for his capture: 10 coins.<br/>");
set(e_purse, "coins", e_purse.coins+10);
set(e_player, "level", 2);
MakeObjectInvisible (e_outlaw_thug);
MoveObject (e_player, e_main_square);
} });
}
else {
OutputText ("I think he would notice me and flee.");
}
}
else if (object_enemy==e_monster) {
if (e_monster.ride) {
OutputText ("You cut the monster's jugular!");
OutputText ("The beast falls, you falls, darkness");
OutputText ("After a while, you wake up with the cheers of the crowd.");
OutputText ("<b>Victory! VOURTRAM IS DEAD!</b>");
endGameFinish();
}
else {
OutputText ("You can't reach it!");
}
}
else if (object_enemy==e_vourtram || object_enemy==e_vourtram2 || object_enemy==e_wyvern || object_enemy==e_dragon) {
OutputText ("You must be kidding! This won't work.");
}
else if (object_enemy==e_husband) {
OutputText ("You say to the man: <i>darling, I think there is a rat under the bed</i>");
OutputText ("The man bends to look for the rat: <i>How can a rat be under a divan be...AAAAGHH</i>");
OutputText ("You stab the man right at his heart. You search the body and find ten coins and a jeweled belt. You take all and remove the dress.");
MoveObject (e_belt, e_player);
set(e_purse, "coins", e_purse.coins+10);
MoveObject (e_husband, e_void);
set(e_player, "dress", false);
UnlockExit (e_room4_to_corridor2);
}
else if (HasAttribute(object_enemy,"stab_level")) {
if (object_enemy.stab_level==0) {
OutputText ("You don't think you should do that.");
}
else if (object_enemy.stab_level>e_player.level) {
OutputText ("You tries to hit your foe, but misses. You are not that good yet!");
if (object_enemy.danger=="death") {
OutputText (object_enemy.alias+" attacks you!");
death (e_player.parent);
}
}
else {
OutputText ("You successfully sneaks behind your target and stabs "+hisHer(object_enemy)+" heart.");
removeEnemy (object_enemy);
kill_monster (object_enemy);
}
}
else {
OutputText ("Violence is not the answer here.");
}
}
else {
OutputText ("I'm not a thief");
} },
"_js_name": "e_stab",
"_types": ["defaultcommand"]
};
elementsNameMap["stab"] = e_stab;
allCommands.push(e_stab);
objectsNameMap["stab"] = e_stab;
e_k136 = {
"elementtype": "object",
"name": "k136",
"type": "command",
"anonymous": true,
"property": "cut",
"isverb": true,
"pattern": "^cut (?<object>.*)$",
"defaultexpression": "\"You can't cut \" + object.article + \".\"",
"_js_name": "e_k136",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["k136"] = e_k136;
allCommands.push(e_k136);
objectsNameMap["k136"] = e_k136;
e_k137 = {
"elementtype": "object",
"name": "k137",
"type": "command",
"anonymous": true,
"property": "tieto",
"isverb": true,
"pattern": "^___tie_invalid to (?<object>.*)$",
"defaultexpression": "\"You can't tie to #object# \" + object.article + \".\"",
"_js_name": "e_k137",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["k137"] = e_k137;
allCommands.push(e_k137);
objectsNameMap["k137"] = e_k137;
e_k138 = {
"elementtype": "object",
"name": "k138",
"type": "command",
"anonymous": true,
"property": "play",
"isverb": true,
"pattern": "^play (?<object>.*)$|^blow (?<g2_map_object>.*)$",
"defaultexpression": "\"You can't play; blow \" + object.article + \".\"",
"_js_name": "e_k138",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["k138"] = e_k138;
allCommands.push(e_k138);
objectsNameMap["k138"] = e_k138;
e_put_spell_book = {
"elementtype": "object",
"name": "put_spell_book",
"type": "command",
"pattern": "^put (?<object1>.*) on (?<object2>.*)$|^put (?<g3_map_object1>.*) in (?<g4_map_object2>.*)$",
"script": function(parameters) { var object1 = parameters['object1'];
var object2 = parameters['object2'];
var go = true;
if (HasAttribute(object1,"useCmds")) {
if (ListContains( object1.useCmds,"put")) {
useAlt ("put", object1, object2);
var go = false;
}
}
if (go) {
if (HasAttribute(object2, "no_remove")) {
OutputText (Template("CannotDoThat"));
}
else if (object1.parent == object2) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyThere", object1));
}
else if (!(ListContains(ScopeInventory(), object1))) {
OutputText (overloadedFunctions.DynamicTemplate("NotCarrying", object1));
}
else if (!(ListContains(ScopeReachable(), object1))) {
OutputText (overloadedFunctions.DynamicTemplate("ObjectNotOpen", GetBlockingObject(object1)));
}
else if (!(ListContains(ScopeReachable(), object2))) {
OutputText (overloadedFunctions.DynamicTemplate("ObjectNotOpen", GetBlockingObject(object2)));
}
else if (!(object2.container)) {
OutputText (Template("CannotDoThat"));
}
else if (!(object2.isopen)) {
OutputText (overloadedFunctions.DynamicTemplate("ObjectNotOpen", object2));
}
else {
if (GetBoolean(object2, "hidechildren")) {
set(object2, "hidechildren", false);
}
if (HasDelegateImplementation(object2, "addscript")) {
rundelegate (object2, "addscript", object1);
}
else {
set(object1, "parent", object2);
OutputText (Template("Done"));
}
}
} },
"_js_name": "e_put_spell_book",
"_types": ["defaultcommand"]
};
elementsNameMap["put_spell_book"] = e_put_spell_book;
allCommands.push(e_put_spell_book);
objectsNameMap["put_spell_book"] = e_put_spell_book;
e_removeSpell = {
"elementtype": "object",
"name": "removeSpell",
"type": "command",
"pattern": "^remove (?<object1>.*) from (?<object2>.*)$",
"script": function(parameters) { var object1 = parameters['object1'];
var object2 = parameters['object2'];
if (HasAttribute(object2, "no_remove")) {
OutputText (object2.no_remove_msg);
}
else {
DoTake (object1, false);
} },
"_js_name": "e_removeSpell",
"_types": ["defaultcommand"]
};
elementsNameMap["removeSpell"] = e_removeSpell;
allCommands.push(e_removeSpell);
objectsNameMap["removeSpell"] = e_removeSpell;
e_castOn = {
"elementtype": "object",
"name": "castOn",
"type": "command",
"pattern": "^cast (?<object_spell>.*) on (?<object_target>.*)$|^cast (?<g3_map_object_spell>.*) at (?<g4_map_object_target>.*)$",
"script": function(parameters) { var object_spell = parameters['object_spell'];
var object_target = parameters['object_target'];
if (e_player.class == "mage") {
if (object_target==null) {
OutputText ("null target");
}
if (object_spell==null) {
OutputText ("cast what spell?");
}
else if (GetBoolean(object_spell,"castspell")) {
doCastOn (object_spell, object_target);
}
else {
OutputText ("It is not a spell");
}
}
else {
OutputText ("What?!");
} },
"_js_name": "e_castOn",
"_types": ["defaultcommand"]
};
elementsNameMap["castOn"] = e_castOn;
allCommands.push(e_castOn);
objectsNameMap["castOn"] = e_castOn;
e_hide_command = {
"elementtype": "object",
"name": "hide_command",
"type": "command",
"property": "hide",
"isverb": true,
"pattern": "^hide under (?<object>.*)$|^hide behind (?<g2_map_object>.*)$|^hide at (?<g3_map_object>.*)$|^hide in (?<g4_map_object>.*)$|^hide inside (?<g5_map_object>.*)$|^hide (?<g6_map_object>.*)$",
"defaultexpression": "\"You can't hide in \" + object.article + \".\"",
"separator": "under;on;behind;at;in;inside",
"_js_name": "e_hide_command",
"_types": ["defaultverb", "defaultcommand"],
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["hide_command"] = e_hide_command;
allCommands.push(e_hide_command);
objectsNameMap["hide_command"] = e_hide_command;
e_GameTurn = {
"elementtype": "object",
"name": "GameTurn",
"type": "turnscript",
"enabled": true,
"script": function() { if (HasAttribute(e_player.parent,"public_level")) {
var room = e_player.parent;
var lev = GetInt(e_player,"level") - GetInt(room,"public_level");
var rnd = 10;
if (lev==0) {
var rnd = GetRandomInt(0,11);
}
else if (lev==1) {
var rnd = GetRandomInt(0,8);
}
else if (lev==2) {
var rnd = GetRandomInt(0,6);
}
else if (lev>=3) {
var rnd = GetRandomInt(0,3);
}
if (rnd==0) {
OutputText (e_player.parent.public_greeting);
}
}
if (e_player.parent!=e_player.bak_room) {
set(e_player, "last_room", e_player.bak_room);
set(e_player, "bak_room", e_player.parent);
}
var maxTurns = 2;
if (e_player.class=="thief") {
var maxTurns = 3;
}
var first = true;
if (e_player.parent!=e_combat_room) {
var list_item = GetDirectChildren(e_player.parent);
var list_item_isarray = (Object.prototype.toString.call(list_item) === '[object Array]');
for (var iterator_item in list_item) {
var item = list_item_isarray ? list_item[iterator_item] : iterator_item;
if (list_item_isarray || iterator_item!="__dummyKey") { if (HasAttribute(item,"aggressive")) {
if (item.aggressive==true) {
var room = e_player.parent;
if (first) {
set(room, "turns", room.turns+1);
var first = false;
if (item.parent==room && room.turns>=maxTurns) {
attack (room, item);
}
else if (item.parent==room && e_player.class=="thief") {
OutputText ("<b>You managed to hide yourself until now... </b>");
}
}
}
} }
}
}
set(e_game, "turns", e_game.turns+1);
if (e_player.parent!=e_start) {
var req = "setTurnLabel;"+e_game.turns;
executeJS (req);
} },
"_js_name": "e_GameTurn",
"_types": []
};
elementsNameMap["GameTurn"] = e_GameTurn;
allTurnScripts.push(e_GameTurn);
objectsNameMap["GameTurn"] = e_GameTurn;
e_score = {
"elementtype": "object",
"name": "score",
"type": "command",
"pattern": "^score$",
"script": function(parameters) { printScore(); },
"_js_name": "e_score",
"_types": ["defaultcommand"]
};
elementsNameMap["score"] = e_score;
allCommands.push(e_score);
objectsNameMap["score"] = e_score;
e_cast = {
"elementtype": "object",
"name": "cast",
"type": "command",
"pattern": "^cast (?<object_spell>.*)$",
"script": function(parameters) { var object_spell = parameters['object_spell'];
if (e_player.class == "mage") {
var menucaption = "On which object?";
var levitate = object_spell==e_levitation_spell && e_player.parent==e_courtyard2;
if (levitate) {
var menucaption = "You could float up, but the guards would see you. However, you could cast levitation on ... ";
}
if (object_spell==null) {
OutputText ("cast what spell?");
}
else if (GetBoolean(object_spell,"castonobject") || levitate) {
var insidePortal = isInArea(e_temple_entrance);
if (insidePortal) {
OutputText ("You are disoriantated... You have to figure out on which object you are going to cast your spell.");
}
else {
var menu = NewStringDictionary();
var objectlist = NewObjectList();
var objectlist = ScopeReachableInventory();
var objectlist = ListCombine (objectlist, ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object_spell);
var candidates = NewObjectList();
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (Template("NoObjectsAvailable"));
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "usemenuobject", object_spell);
ShowMenu (menucaption, menu, true, function (result) { if (result != null) {
doCastOn (e_game.pov.usemenuobject, GetObject(result));
set(e_game.pov, "usemenuobject", null);
} });
}
}
}
else {
doCast (object_spell);
}
}
else {
OutputText ("What?!");
} },
"_js_name": "e_cast",
"_types": ["defaultcommand"]
};
elementsNameMap["cast"] = e_cast;
allCommands.push(e_cast);
objectsNameMap["cast"] = e_cast;
e_consider = {
"elementtype": "object",
"name": "consider",
"type": "command",
"pattern": "^consider (?<object_enemy>.*)$",
"script": function(parameters) { var object_enemy = parameters['object_enemy'];
if (e_player.class=="warrior") {
if (object_enemy.enemy=="yes") {
var val = 0 + Math.floor(e_player.fightexp/10);
var val = object_enemy.exp - val;
if (val<=-2) {
OutputText ("An easy fight");
}
else if (val==-1) {
OutputText ("A fairly easy fight");
}
else if (val==0) {
OutputText ("An even match, depending on the equipment");
}
else if (val==1) {
OutputText ("A difficult match, you better have a good equipment");
}
else if (val>=2 && val<4) {
OutputText ("A difficult match, even with a better equipment");
}
else if (val>=4) {
OutputText ("Are you Mad!?");
}
if (e_player.parent == e_combat_room) {
var health = 100*e_combat.en_ht / object_enemy.ht;
debmsg ("h="+health+","+e_combat.pl_ht+","+(10+e_combat.pl_exp));
if (health>90) {
OutputText ("He is perfectly healthy");
}
else if (health>70) {
OutputText ("He has a few bruises");
}
else if (health>50) {
OutputText ("He has some bruises and is a bit tired");
}
else if (health>25) {
OutputText ("He has a lot of bruises and is tired");
}
else if (health>10) {
OutputText ("he is wounded");
}
else {
OutputText ("He is wounded and near defeat");
}
}
}
else if (object_enemy==e_wyvern) {
OutputText ("You are mad! Even in chains this beast is too much for you.");
}
else {
OutputText ("You don't think that violence will solve anything here.");
}
}
else {
if (object_enemy.enemy=="yes") {
OutputText ("You are not the fighting type. And will probably loose anyway...");
}
else {
OutputText ("You don't think that violence will solve anything here.");
}
} },
"_js_name": "e_consider",
"_types": ["defaultcommand"]
};
elementsNameMap["consider"] = e_consider;
allCommands.push(e_consider);
objectsNameMap["consider"] = e_consider;
e_win666mode = {
"elementtype": "object",
"name": "win666mode",
"type": "command",
"pattern": "^win666mode (?<text>.*)$",
"script": function(parameters) { var text = parameters['text'];
if (e_game.debug) {
OutputText ("set exp to "+text);
set(e_player, "fightexp", ToInt(text)); 
} else {
	OutputText ("No Cheats.");
}
},
"_js_name": "e_win666mode",
"_types": ["defaultcommand"]
};
elementsNameMap["win666mode"] = e_win666mode;
allCommands.push(e_win666mode);
objectsNameMap["win666mode"] = e_win666mode;
e_help_v = {
"elementtype": "object",
"name": "help_v",
"type": "command",
"pattern": "^help$",
"script": function(parameters) { OutputText (Template("DefaultHelp"));
OutputText ("<br/><u>Vourtram specifics</u>");
OutputText ("You can <b>save</b> up to ten games. You can choose a game to load in the start page, or load another game with the command {command:load}. You can also remove a game with the {command:erase} command.");
OutputText ("All commands and verbs used in this game are listed by {command:help commands}.");
OutputText ("During a conversation (initiated by SPEAK TO character or ASK character ABOUT xxx) the link-words are new conversation topics. You can use the ASK ABOUT <i>TOPIC</i> command to start a conversation about certain topic. Eventually you may need to guess a topic, but you will have some clue about it. ASK ABOUT is important to advance in the game, so ask about everything you can. By clicking hyperlinks in the conversation you automatically triggers ASK ABOUT commands.");
OutputText ("<br/>The {command:score} command gives you information about your reputation and class specific status.");
OutputText ("<br/>Few objects are hidden in the room description, but there are a few key items that may be. Watch for the clues. Generally, hidden objects are related to characters and other listed objects. LOOK AT or EXAMINE (X) a lot.</br>");
if (e_player.class=="thief") {
OutputText ("<u>You are a {command:help thief:THIEF}:</u>");
}
else if (e_player.class=="warrior") {
OutputText ("<u>You are a {command:help warrior:WARRIOR}:</u>");
}
else if (e_player.class=="mage") {
OutputText ("<u>You are a {command:help mage:MAGIC USER}:</u>");
}
else {
OutputText ("<b>You don't have a {command:help class:CLASS} yet. Seek a guild master and speak to him.</b>");
}
OutputText ("<br/>If you get yourself stuck, use the {command:clues} command that contains the solution for the major puzzles in the game.");
OutputText ("Please read the {command:credits} at least once."); },
"_js_name": "e_help_v",
"_types": ["defaultcommand"]
};
elementsNameMap["help_v"] = e_help_v;
allCommands.push(e_help_v);
objectsNameMap["help_v"] = e_help_v;
e_help_par = {
"elementtype": "object",
"name": "help_par",
"type": "command",
"pattern": "^help (?<text>.*)$",
"script": function(parameters) { var text = parameters['text'];
if (text=="thief") {
OutputText ("The thief is one of the three possible {command:help class:classes}.");
OutputText (Template("HelpThief"));
}
else if (text=="warrior") {
OutputText ("The warrior is one of the three possible {command:help class:classes}.");
OutputText (Template("HelpWarrior"));
}
else if (text=="mage" || text=="wizard") {
OutputText ("The wizard is one of the three possible {command:help class:classes}.");
OutputText (Template("HelpMage"));
}
else if (text=="commands") {
OutputText ("These are the commands and verbs accepted by the game:");
OutputText ("Help, Use, Look At/Examine, Take, Drop, Put, Remove, Open, Close, Lock, Unlock, Add, Cut, Tie, Play, Stay, Say, Unchain, Break, Hide, Turn Off, Picklock, Stab, Cast, Score, Consider, Steal, Throw, Fight, Flee, Combat, Stance,  Save, Load, Erase, Surrender, Credits, Music.");
}
else if (text=="class" || text=="classes") {
OutputText ("<br/>Each class has a distinct way to solve problems. In fact, each class will have different problems to solve:");
OutputText ("The {command:help warrior:WARRIOR} player must pay attention to equipment, fighting experience and fighting opportunities to improve the skills.");
OutputText ("The {command:help wizard:WIZARD} player should be aware of his spells and actively use them in the search of clues. Wizards must learn spells and search for magical items.");
OutputText ("The {command:help thief:THIEF} player don't evolve during the game, but starts with some unique abilities that will make him enter exclusive rooms to find treasure. Use these special abilities to advance in the game, where others will use magic or brute force.<br/>");
}
else {
OutputText (Template("DefaultHelp"));
} },
"_js_name": "e_help_par",
"_types": ["defaultcommand"]
};
elementsNameMap["help_par"] = e_help_par;
allCommands.push(e_help_par);
objectsNameMap["help_par"] = e_help_par;
e_k139 = {
"elementtype": "object",
"name": "k139",
"type": "command",
"anonymous": true,
"property": "staythenight",
"isverb": true,
"pattern": "^stay the night (?<object>.*)$|^stay (?<g2_map_object>.*)$",
"defaultexpression": "\"You can't stay the night \" + object.article + \".\"",
"_js_name": "e_k139",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["k139"] = e_k139;
allCommands.push(e_k139);
objectsNameMap["k139"] = e_k139;
e_k140 = {
"elementtype": "object",
"name": "k140",
"type": "command",
"anonymous": true,
"property": "unchain",
"isverb": true,
"pattern": "^unchain (?<object>.*)$",
"defaultexpression": "\"You can't unchain \" + object.article + \".\"",
"_js_name": "e_k140",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["k140"] = e_k140;
allCommands.push(e_k140);
objectsNameMap["k140"] = e_k140;
e_xyzzy_ = {
"elementtype": "object",
"name": "xyzzy_",
"type": "command",
"pattern": "^xyzzy$",
"script": function(parameters) { OutputText ("Due to previous abuses, this magic word is now punished with a red tail growing in your character."); },
"_js_name": "e_xyzzy_",
"_types": ["defaultcommand"]
};
elementsNameMap["xyzzy_"] = e_xyzzy_;
allCommands.push(e_xyzzy_);
objectsNameMap["xyzzy_"] = e_xyzzy_;
e_display = {
"elementtype": "object",
"name": "display",
"type": "command",
"pattern": "^display (?<text>.*)$",
"script": function(parameters) { var text = parameters['text'];
if (e_game.debug) {
if (text=="on") {
eval ("$('#gameBorder').css('display', 'block');")
}
else if (text == "off") {
eval ("$('#gameBorder').css('display', 'none');")
}
OutputText ("ok");
}
else {
OutputText ("You try to display some courage, but nobody seems to care.");
} },
"_js_name": "e_display",
"_types": ["defaultcommand"]
};
elementsNameMap["display"] = e_display;
allCommands.push(e_display);
objectsNameMap["display"] = e_display;
e_steal = {
"elementtype": "object",
"name": "steal",
"type": "command",
"pattern": "^steal (?<object_person>.*)$",
"script": function(parameters) { var object_person = parameters['object_person'];
if (e_player.class=="thief") {
if (object_person==e_drunkguy) {
if (e_drunkguy.sleep) {
if (e_drunkring.parent==e_drunkguy) {
OutputText ("Easy... you got the ring.");
AddToInventory (e_drunkring);
}
else {
OutputText ("He has nothing in is his pockets.");
}
}
else {
OutputText ("He has nothing in his pockets ... and you can't get the ring, he will notice it.");
}
}
else if (object_person==e_guard_on_leave  ) {
	if (e_leave_order.parent == e_guard_on_leave)
		OutputText ("He is too alert to get the roll of paper.");
	else
		OutputText ("He hasn't anything of value.");
}
else if (object_person==e_party  ) {
if (e_bracelet.parent==e_party) {
OutputText ("You managed to steal a golden bracelet and twenty five coins.");
set(e_purse, "coins", e_purse.coins+25);
set(e_bracelet, "parent", e_player);
}
else {
OutputText ("I think it would call much attention to steal the same people twice");
}
}
else if (object_person==e_elder_thief) {
OutputText ("The elder thief slaps your face and says: <i>You are not THAT good!</i>.");
}
else if (object_person==e_houses1) {
if (e_golden_statue.parent == e_houses1) {
OutputText ("You managed to burgle a rich house. You found a golden statue and ten coins.");
set(e_purse, "coins", e_purse.coins+10);
set(e_golden_statue, "parent", e_player);
}
else {
OutputText ("You'd better don't push your luck.");
}
}
else if (object_person==e_houses2) {
OutputText ("These houses are too poor to rob.");
}
else if (object_person==e_houses3) {
OutputText ("The houses are too close to the guards.");
}
else if (object_person==e_archmage) {
OutputText ("The archmage shouts <i>Another little rat trying to steal from me?</i>. He utters strange words and you are transformed into a <b>MOUSE!</b><br/><i>Get him Erasmus!</i><br/>You lucked out by finding a small hole in the wall to hide from the monstrous cat!");
MoveObject (e_player, e_mouse_house);
}
else if (object_person==e_Baker) {
OutputText ("The Baker is too smart and don't let you get near his money. Forget about it.");
}
else if (HasAttribute(object_person,"no_steal")) {
OutputText ("This person is too alert to be stolen");
}
else if (object_person==e_cook && e_sugar.parent==e_cook) {
OutputText ("You place your hand in his apron's pocket and pickup a handful of sugar cubes.");
set(e_sugar, "parent", e_player);
}
else if (object_person==e_mead) {
takeMead();
}
else if (HasAttribute(object_person,"coins")) {
if (object_person.coins>0) {
OutputText ("You managed to steal "+object_person.coins+" coin(s).");
set(e_purse, "coins", e_purse.coins+object_person.coins);
set(object_person, "coins", 0);
}
else {
OutputText ("You can't find nothing in "+hisHer(object_person)+" pockets.");
}
}
else if (object_person==e_bucket1) {
OutputText ("You can't steal the bucket. Sheila would notice.");
}
else if (object_person==e_bucket2) {
OutputText ("Just get it...");
}
else {
if (object_person.gender=="she") {
OutputText ("You can't find nothing in her pockets.");
}
else if (object_person.gender=="he") {
OutputText ("You can't find nothing in his pockets.");
}
else {
OutputText ("You can't steal it.");
}
}
}
else {
OutputText ("Your are NOT a thief!");
} },
"_js_name": "e_steal",
"_types": ["defaultcommand"]
};
elementsNameMap["steal"] = e_steal;
allCommands.push(e_steal);
objectsNameMap["steal"] = e_steal;
e_k141 = {
"elementtype": "object",
"name": "k141",
"type": "command",
"anonymous": true,
"property": "picklock",
"isverb": true,
"pattern": "^picklock (?<object>.*)$|^pick (?<g2_map_object>.*)$",
"defaultexpression": "\"You can't pick the lock of \" + object.article + \".\"",
"_js_name": "e_k141",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["k141"] = e_k141;
allCommands.push(e_k141);
objectsNameMap["k141"] = e_k141;
e_throwCommand = {
"elementtype": "object",
"name": "throwCommand",
"type": "command",
"pattern": "^throw (?<object_weapon>.*) at (?<object_target>.*)$",
"unresolved": "You have to throw something at somewhere.",
"script": function(parameters) { var object_weapon = parameters['object_weapon'];
var object_target = parameters['object_target'];
doThrow (object_weapon, object_target); },
"_js_name": "e_throwCommand",
"_types": ["defaultcommand"]
};
elementsNameMap["throwCommand"] = e_throwCommand;
allCommands.push(e_throwCommand);
objectsNameMap["throwCommand"] = e_throwCommand;
e_fight = {
"elementtype": "object",
"name": "fight",
"type": "command",
"pattern": "^fight (?<object_enemy>.*)$|^kill (?<g2_map_object_enemy>.*)$",
"script": function(parameters) { var object_enemy = parameters['object_enemy'];
if (object_enemy==e_fido) {
OutputText ("You <b>kick</b> the beastly fido very hard!<br/>An old lady screams: <i>My little baby! HELP! Stop it, monster!</i><br/>");
OutputText ("The old lady starts to beat you with her stick. Suddenly, a mob of angry citizens starts to fight you screaming in anger.<br/>Before they decide to hang you, you mange to <b>escape to the temple</b>.<br/>");
MoveObject (e_player, e_temple_phoenix);
}
else {
if (e_player.class=="warrior") {
if (object_enemy==e_sparring ) {
if (e_player.fightexp>=20 && e_sparring.armour==0) {
OutputText ("Rodney says <i>you are getting better, I will wear a better armour to keep up. You better have some protection too.</i>");
set(e_sparring, "armour", 2);
}
if (e_player.fightexp>=30) {
if (!(HasAttribute(e_sparring,"stance"))) {
OutputText ("Rodney says <i>you are getting better, I will now try some fighting stances.</i>. He also draws a menacing long sword.");
set(e_sparring, "damage", 4);
}
set(e_sparring, "stance", "none");
}
if (e_player.level<=2 && e_player.fightexp>=35) {
OutputText ("Rodney says <i>I think that after this fight you are ready for the spring festival.</i>.");
}
}
if (object_enemy==e_outlaw_thug && e_outlaw_thug.parent==e_player.parent) {
OutputText ("He is too fast, when you approached him, he fled away... you think it is better try another approach.");
set(object_enemy, "parent", e_main_street);
}
else if (object_enemy==e_Wolf && e_Wolf.parent == e_player.parent) {
OutputText ("Are you mad!?");
}
else if (object_enemy==e_wyvern) {
OutputText ("You try to hit the monster, but he punches you so hard that you pass out for a few minutes");
set(e_game, "turns", e_game.turns+5);
}
else if (object_enemy==e_castle_guard) {
OutputText ("Killing this guard NOW is not the best way to enter the castle.");
}
else if (object_enemy==e_vourtram) {
OutputText ("It is impossible to defeat Vourtram now.");
}
else if (object_enemy.enemy=="yes") {
fightEnemy (object_enemy);
}
else {
OutputText ("I don't want to fight "+GetDisplayName(object_enemy));
}
}
else {
OutputText ("I'm not the warrior type...");
}
} },
"_js_name": "e_fight",
"_types": ["defaultcommand"]
};
elementsNameMap["fight"] = e_fight;
allCommands.push(e_fight);
objectsNameMap["fight"] = e_fight;
e_spell_book = {
"elementtype": "object",
"name": "spell_book",
"type": "object",
"look": "In fact it is kit with a book, a pen, and some ink. Here you make annotations about known spells and magical recipes.",
"drop": false,
"dropmsg": "You would never risk loosing this precious book.",
"listchildren": true,
"displayverbs": ["Look at", "Take"],
"take": true,
"hidechildren": false,
"alias": "spell book",
"feature_container": true,
"open": false,
"close": false,
"isopen": true,
"transparent": true,
"no_remove_msg": "You don't want to rip your book apart.",
"inventoryverbs": ["Look at"],
"read": function() { OutputText (e_spell_book.look);
ListObjectContents (e_spell_book); },
"_js_name": "e_spell_book",
"_types": ["spell_book_type", "defaultobject"],
"no_remove": true,
"contentsprefix": "on which there is",
"container": true,
"visible": true,
"use": false,
"givesingle": false,
"gender": "it",
"article": "it",
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"description": "",
"scenery": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["spell_book"] = e_spell_book;
allObjects.push(e_spell_book);
objectsNameMap["spell_book"] = e_spell_book;
e_k142 = {
"elementtype": "object",
"name": "k142",
"type": "command",
"anonymous": true,
"property": "break",
"isverb": true,
"pattern": "^break (?<object>.*)$",
"defaultexpression": "\"You can't break \" + object.article + \".\"",
"_js_name": "e_k142",
"_types": ["defaultverb", "defaultcommand"],
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function(parameters) { var object = parameters['object'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} }
};
elementsNameMap["k142"] = e_k142;
allCommands.push(e_k142);
objectsNameMap["k142"] = e_k142;
e_princessFollow = {
"elementtype": "object",
"name": "princessFollow",
"type": "turnscript",
"script": function() { if (e_princess.follow) {
if (e_player.parent==e_trophy_room || e_player.parent==e_throne_room || e_player.parent==e_hallway) {
OutputText ("The princess says <i>I'd better stay hidden in the secret passage until you figure out a way to leave the castle</i>.");
set(e_princess, "follow", false);
MoveObject (e_princess, e_secret_pass);
}
else if (e_princess.parent!=e_player.parent) {
OutputText ("The {object:princess:princess} follows you");
set(e_princess, "parent", e_player.parent);
}
}
else {
if (e_princess.parent==e_player.parent) {
OutputText ("The princess is following you again.");
set(e_princess, "follow", true);
}
} },
"_js_name": "e_princessFollow",
"_types": []
};
elementsNameMap["princessFollow"] = e_princessFollow;
allTurnScripts.push(e_princessFollow);
objectsNameMap["princessFollow"] = e_princessFollow;
e_go_to = {
"elementtype": "object",
"name": "go_to",
"type": "command",
"pattern": "^go_to (?<text>.*)$",
"script": function(parameters) { var text = parameters['text'];
if (e_game.debug) {
var room = getObject(text);
MoveObject (e_player, room);
}
else {
OutputText ("go to what?");
} },
"_js_name": "e_go_to",
"_types": ["defaultcommand"]
};
elementsNameMap["go_to"] = e_go_to;
allCommands.push(e_go_to);
objectsNameMap["go_to"] = e_go_to;
e_surrender = {
"elementtype": "object",
"name": "surrender",
"type": "command",
"pattern": "^surrender$|^forfeit$",
"script": function(parameters) { Ask ("Are you sure you want to surrender? This will end the game", function (result) { if (result) {
if (e_player.parent==e_master_room) {
OutputText ("Standing in front of Vourtram, you decide it is the best moment to surrender.");
OutputText ("The wizard saw potential on you as his prime minister, someone the people could trust, a puppet for him. In exchange for this power, you betrayed the King and your friends.");
OutputText ("For some years your life was full of pleasure and richness. However, it was a short life, as poisoned food ended it.");
}
else if (e_horse.parent==e_the_base) {
OutputText ("You surrender, and quickly became a prisoner of Vourtram. After days of torture, Vourtram decided to turn you into his pet zombie.");
}
else if (e_horse.parent==e_battle) {
OutputText ("You surrender, but the enemy has no mercy during battle. You died.");
}
else {
OutputText ("You decide to flee this kingdom, and after a while nobody remembered you anymore. You ended as a simple peasant.");
}
finishTheGame();
}
else {
OutputText ("NEVER SURRENDER!");
} }); },
"_js_name": "e_surrender",
"_types": ["defaultcommand"]
};
elementsNameMap["surrender"] = e_surrender;
allCommands.push(e_surrender);
objectsNameMap["surrender"] = e_surrender;
e_battle = {
"elementtype": "object",
"name": "battle",
"type": "object",
"alias": "battlefield",
"description": "The castle's courtyard is now a bloody battlefield. There is a huge hole at the eastern wall, and the loyal forces are entering the castle by this point. You barely can focus with so many fights happening around you.{if monster.ride: You are riding the back of the dragon-wizard.}",
"_js_name": "e_battle",
"_types": ["defaultobject"],
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["battle"] = e_battle;
allObjects.push(e_battle);
objectsNameMap["battle"] = e_battle;
e_demons = {
"elementtype": "object",
"name": "demons",
"parent": e_battle,
"type": "object",
"look": "Dozens of demons are flying from the windows, attacking the soldiers.",
"usedefaultprefix": false,
"prefix": "a horde of",
"_js_name": "e_demons",
"_types": ["maleplural", "defaultobject"],
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"visible": true,
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["demons"] = e_demons;
allObjects.push(e_demons);
objectsNameMap["demons"] = e_demons;
e_vourtram2 = {
"elementtype": "object",
"name": "vourtram2",
"parent": e_battle,
"type": "object",
"look": "The wizard wears a red robe and a black fez. He wields a dark sword.<br/>",
"alias": "Vourtram",
"visible": false,
"alt": ["wizard"],
"_js_name": "e_vourtram2",
"_types": ["namedmale", "defaultobject"],
"usedefaultprefix": false,
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["vourtram2"] = e_vourtram2;
allObjects.push(e_vourtram2);
objectsNameMap["vourtram2"] = e_vourtram2;
e_monster = {
"elementtype": "object",
"name": "monster",
"parent": e_battle,
"type": "object",
"look": "It is a huge dragon with the face of Vourtram.",
"alias": "dragon wizard",
"visible": false,
"ride": false,
"alt": ["vourtram", "wizard", "dragon", "beast"],
"_js_name": "e_monster",
"_types": ["namedmale", "defaultobject"],
"usedefaultprefix": false,
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["monster"] = e_monster;
allObjects.push(e_monster);
objectsNameMap["monster"] = e_monster;
e_spear = {
"elementtype": "object",
"name": "spear",
"parent": e_battle,
"type": "object",
"look": "It is standard guard spear.",
"take": true,
"visible": false,
"inventoryverbs": ["Look at", "Drop"],
"_js_name": "e_spear",
"_types": ["defaultobject"],
"displayverbs": ["Look at", "Take"],
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["spear"] = e_spear;
allObjects.push(e_spear);
objectsNameMap["spear"] = e_spear;
e_debris = {
"elementtype": "object",
"name": "debris",
"parent": e_battle,
"type": "object",
"alias": "tall pile of debris",
"look": "It is a fallen wall, like a stair from two to ten feet high.",
"visible": false,
"inventoryverbs": ["Look at", "Drop"],
"displayverbs": ["Look at"],
"climb": function() { if (e_monster.ride) {
OutputText ("You are already riding the monster.");
}
else {
OutputText ("While the monster fights the army, you sneak by the side, climbing a broken wall. You jump over the beast's back.");
set(e_monster, "ride", true);
} },
"_js_name": "e_debris",
"_types": ["defaultobject"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["debris"] = e_debris;
allObjects.push(e_debris);
objectsNameMap["debris"] = e_debris;
e_fight_battle = {
"elementtype": "object",
"name": "fight_battle",
"parent": e_battle,
"type": "command",
"pattern": "^fight (?<object_enemy>.*)$|^kill (?<g2_map_object_enemy>.*)$",
"script": function(parameters) { var object_enemy = parameters['object_enemy'];
if (e_player.isWarrior) {
if (object_enemy==e_demons) {
if (e_elven_sword.parent==e_player) {
OutputText ("You wield the demon's slayer, and the demons tremble and flee in despair.");
}
else {
OutputText ("You do your best, but the demons cause heavy losses to the King's force.");
}
endGame2();
}
else {
OutputText ("You are already fighting him. At least, avoiding his blows.");
}
}
else {
OutputText ("You are not the fighting type.");
} },
"_js_name": "e_fight_battle",
"_types": ["defaultcommand"]
};
elementsNameMap["fight_battle"] = e_fight_battle;
allCommands.push(e_fight_battle);
objectsNameMap["fight_battle"] = e_fight_battle;
e_Lareak = {
"elementtype": "object",
"name": "Lareak",
"parent": e_battle,
"type": "object",
"look": "He is wearing a full plate armor.",
"suffix": "the mercenary leader",
"visible": false,
"speak": function() { if (e_gold_chest.parent==e_player) {
OutputText ("You give the gold to Lareak.");
set(e_gold_chest, "parent", e_void);
}
if (e_gold_chest.parent==e_void) {
psay ("We are ready to help! Archers, fire now!");
OutputText ("The mercenaries quickly join the battle. Under a heavy rain of arrows, the demons retreat, defecting Vourtram");
}
else {
psay ("I'm sorry but the mercenaries decided to not take part in this battle.");
OutputText ("The demon attack causes heavy losses to the King's force.");
}
endGame2(); },
"_js_name": "e_Lareak",
"_types": ["namedmale", "defaultobject"],
"usedefaultprefix": false,
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} }
};
elementsNameMap["Lareak"] = e_Lareak;
allObjects.push(e_Lareak);
objectsNameMap["Lareak"] = e_Lareak;
e_saveLocal = {
"elementtype": "object",
"name": "saveLocal",
"type": "command",
"pattern": "^save (?<text>.*)$",
"script": function(parameters) { 
//JS
if (e_start.loading) {	
	return;
}
var text = parameters['text'];
if (!(e_game.web)) {
request ("RequestSave", text);
}
else if ( DictionaryContains (e_start.saves,text)) {
set(e_game, "tmp", text);
Ask ("Are you sure you want to overwrite this game?", function (result) { var ncmds = NewStringList();
for (var myItem = 0; myItem <= ListCount(e_start.cmds) - 2; myItem++) {
listadd (ncmds, StringListItem(e_start.cmds,myItem));
}
set(e_start, "cmds", ncmds);
if (result) {
dictionaryremove (e_start.saves, e_game.tmp);
doLocalSave (e_game.tmp);  // JS: You don't need to decrease turns here because ASK does not runs turn scripts!
} });
}
else if (DictionaryCount(e_start.saves)>=10) {
OutputText ("You reach the limit of ten saved games. Please {command:erase} one or more games before saving a new one");
}
else {
doLocalSave (text);
} },
"_js_name": "e_saveLocal",
"_types": ["defaultcommand"]
};
elementsNameMap["saveLocal"] = e_saveLocal;
allCommands.push(e_saveLocal);
objectsNameMap["saveLocal"] = e_saveLocal;
e_loadMenu = {
"elementtype": "object",
"name": "loadMenu",
"type": "command",
"pattern": "^load$",
"script": function(parameters) { 
//JS
if (e_start.loading) {
	
	return;
}
if (e_game.web) {
chooseLoad();
}
else {
OutputText ("Use the File-Open menu in the client version (or CTRL+O).");
} },
"_js_name": "e_loadMenu",
"_types": ["defaultcommand"]
};
elementsNameMap["loadMenu"] = e_loadMenu;
allCommands.push(e_loadMenu);
objectsNameMap["loadMenu"] = e_loadMenu;
e_erase_command = {
"elementtype": "object",
"name": "erase_command",
"type": "command",
"pattern": "^erase$",
"script": function(parameters) { 
//JS
if (e_start.loading) {
	
	return;
}

if (DictionaryCount(e_start.saves)==0) {
OutputText ("You have no games to erase.");
}
else {
set(e_start, "record", false);
var names = NewStringList();
var e_start_saves_isarray = (Object.prototype.toString.call(e_start.saves) === '[object Array]');
for (var iterator_name in e_start.saves) {
var name = e_start_saves_isarray ? e_start.saves[iterator_name] : iterator_name;
if (e_start_saves_isarray || iterator_name!="__dummyKey") { listadd (names, name); }
}
ShowMenu ("Pick a savegame to erase:", names, false, function (result) { set(e_game, "tmp", result);
Ask ("Are you sure you want to remove "+result+"?", function (result) { if (result) {
if (e_game.tmp==e_start.savename) {
OutputText ("You cannot erase the current game.");
}
else {
dictionaryremove (e_start.saves, e_game.tmp);
js_removegame(e_game.tmp); //JS
OutputText ("Game "+e_game.tmp+" was removed.");
}
}
set(e_start, "record", true); }); });
} },
"_js_name": "e_erase_command",
"_types": ["defaultcommand"]
};
elementsNameMap["erase_command"] = e_erase_command;
allCommands.push(e_erase_command);
objectsNameMap["erase_command"] = e_erase_command;
e_credits = {
"elementtype": "object",
"name": "credits",
"type": "command",
"pattern": "^credits$|^credit$|^about$",
"script": function(parameters) { OutputText ("This game was written and developed by <a href='mailto:vourtram@gmail.com'>Alexandre Torres</a>. It is licensed under a <a rel='license' href='http://creativecommons.org/licenses/by-nc-nd/4.0/'>Creative Commons</a> Attribution-NonCommercial-NoDerivatives 4.0 International License.</br>");
OutputText ("This game was developed with the <a href='textadventures.co.uk'>Quest 5</a>, an open source tool for developing adventure games. The {command:music} scores are hosted on youtube, and have open license or are in public domain:</br>");
OutputText ("<li>Instrumental medieval music compilation, by Derek & Brandon Fiechter.");
OutputText ("<li>Pavane is public domain, performed by uncredited author in a hapschord like keyboard.");
OutputText ("<li>Middle ages and renaissance music on Keyboard Instruments, by Patrick Denecker & Guy Penson.");
OutputText ("Please, hover the mouse over the 'music on/off' link to open the youtube viewer, and visit the channels to support the authors. The link is positioned in top right corner of the screen."); 
OutputText (" ");
OutputText ("Thanks for the testing and valuable feedback:");
OutputText (" - Andy 'The Pixie'");
OutputText (" - DarkLizerd");
OutputText (" - Gomes");
OutputText (" - Victor");
OutputText ("Special thanks for the Quest team for all the efforts creating IF tools.")
OutputText ("<a rel='license' href='http://creativecommons.org/licenses/by-nc-nd/4.0/'><img alt='Creative Commons License' style='border-width:0;display:inline' src='images/88x31.png' /></a>");
},
"_js_name": "e_credits",
"_types": ["defaultcommand"]
};
elementsNameMap["credits"] = e_credits;
allCommands.push(e_credits);
objectsNameMap["credits"] = e_credits;
e_music = {
"elementtype": "object",
"name": "music",
"type": "command",
"pattern": "^music$",
"unresolved": "",
"script": function(parameters) { OutputText ("Use this command to toggle the music on/off. </br> Or click in the music [on/off] in the title bar.</br> Type {command:credits} to know more about the scores."); },
"_js_name": "e_music",
"_types": ["defaultcommand"]
};
elementsNameMap["music"] = e_music;
allCommands.push(e_music);
objectsNameMap["music"] = e_music;
e_save_block = {
"elementtype": "object",
"name": "save_block",
"type": "command",
"pattern": "^save$",
"script": function(parameters) { 
//JS
if (e_start.loading) {

	return;
}
if (e_game.web) {
OutputText ("Please, inform the save name.");

}
else {
request ("RequestSave", "");
} },
"_js_name": "e_save_block",
"_types": ["defaultcommand"]
};
elementsNameMap["save_block"] = e_save_block;
allCommands.push(e_save_block);
objectsNameMap["save_block"] = e_save_block;
e_stay = {
"elementtype": "object",
"name": "stay",
"type": "command",
"pattern": "^stay$",
"script": function(parameters) { if (e_player.parent==e_the_base) {
stayNight();
}
else {
OutputText ("You can't stay the night here.");
} },
"_js_name": "e_stay",
"_types": ["defaultcommand"]
};
elementsNameMap["stay"] = e_stay;
allCommands.push(e_stay);
objectsNameMap["stay"] = e_stay;
e_throw_single = {
"elementtype": "object",
"name": "throw_single",
"type": "command",
"pattern": "^throw (?<object>.*)$",
"script": function(parameters) { var object = parameters['object'];
var menu = NewStringDictionary();
var candidates = NewObjectList();
var candidates = CreateUseMenuList (object);
if (ListCount(candidates) == 0) {
OutputText (Template("NoObjectsAvailable"));
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "usemenuobject", object);
if (HasString(object, "usemenuprompt")) {
var menucaption = object.usemenuprompt;
}
else {
var menucaption = Template("UseOnMenu");
}
ShowMenu (menucaption, menu, true, function (result) { if (result != null) {
doThrow (e_game.pov.usemenuobject, GetObject(result));
set(e_game.pov, "usemenuobject", null);
} });
} },
"_js_name": "e_throw_single",
"_types": ["defaultcommand"]
};
elementsNameMap["throw_single"] = e_throw_single;
allCommands.push(e_throw_single);
objectsNameMap["throw_single"] = e_throw_single;
e_spells_cmd = {
"elementtype": "object",
"name": "spells_cmd",
"type": "command",
"pattern": "^spells$",
"script": function(parameters) { if (e_player.isMage) {
var list = FormatObjectList("You currently know the following spells:", e_spell_book, Template("And"), ".");
if (list == "") {
OutputText ("You don't know any spell. Ask Dashiel about training to learn spells.");
}
else {
OutputText (list);
set(e_game, "turns", e_game.turns-1);
}
}
else {
OutputText ("You know nothing about spells.");
} },
"_js_name": "e_spells_cmd",
"_types": ["defaultcommand"]
};
elementsNameMap["spells_cmd"] = e_spells_cmd;
allCommands.push(e_spells_cmd);
objectsNameMap["spells_cmd"] = e_spells_cmd;
e_fill_cmd = {
"elementtype": "object",
"name": "fill_cmd",
"type": "command",
"pattern": "^fill (?<object1>\\S*)\\s?((in|with) (?<object2>.*))?$",
"script": function(parameters) { var object1 = parameters['object1'];
var object2 = parameters['object2'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
if (!(useAlt("fill",object1,object2))) {
OutputText ("I don't know how to fill it.");
} },
"_js_name": "e_fill_cmd",
"_types": ["defaultcommand"]
};
elementsNameMap["fill_cmd"] = e_fill_cmd;
allCommands.push(e_fill_cmd);
objectsNameMap["fill_cmd"] = e_fill_cmd;
e_pour_cmd = {
"elementtype": "object",
"name": "pour_cmd",
"type": "command",
"pattern": "^pour (?<objectA>\\S*)\\s?((on|at|in|over) (?<objectB>.*))?$",
"script": function(parameters) { var objectA = parameters['objectA'];
var objectB = parameters['objectB'];
if (!(IsDefined("objectA"))) {
OutputText ("pour what?");
}
else {
if (!(IsDefined("objectB"))) {
var objectB = null;
}
if (!(useAlt("pour",objectA,objectB))) {
OutputText ("I don't think I should pour "+GetDisplayAlias(objectA)+" that way.");
}
} },
"_js_name": "e_pour_cmd",
"_types": ["defaultcommand"]
};
elementsNameMap["pour_cmd"] = e_pour_cmd;
allCommands.push(e_pour_cmd);
objectsNameMap["pour_cmd"] = e_pour_cmd;
e_tie_cmd = {
"elementtype": "object",
"name": "tie_cmd",
"type": "command",
"pattern": "^tie (?<object1>\\S*)\\s?((on|at|with) (?<object2>.*))?$",
"script": function(parameters) { var object1 = parameters['object1'];
var object2 = parameters['object2'];
if (!(IsDefined("object2"))) {
var object2 = null;
}
if (!(useAlt("tie",object1,object2))) {
OutputText ("I don't know how to tie it.");
} },
"_js_name": "e_tie_cmd",
"_types": ["defaultcommand"]
};
elementsNameMap["tie_cmd"] = e_tie_cmd;
allCommands.push(e_tie_cmd);
objectsNameMap["tie_cmd"] = e_tie_cmd;
e_curses_cmd = {
"elementtype": "object",
"name": "curses_cmd",
"type": "command",
"pattern": "^(.*)fuck(.*)$|^suck(.*)$|^piss(.*)$|^shit(.*)$|^cock(.*)$|^ass(.*)$|^(.*)bitch(.*)$|^(.*)cunt(.*)$",
"script": function(parameters) { OutputText ("You wasted your time cursing...");
set(e_game, "turns", e_game.turns+1); },
"_js_name": "e_curses_cmd",
"_types": ["defaultcommand"]
};
elementsNameMap["curses_cmd"] = e_curses_cmd;
allCommands.push(e_curses_cmd);
objectsNameMap["curses_cmd"] = e_curses_cmd;
e_say_cmd = {
"elementtype": "object",
"name": "say_cmd",
"type": "command",
"pattern": "^say (?<text>.*)$",
"script": function(parameters) { var text = parameters['text'];
if (e_green_fairy.riddle>0 && e_green_fairy.parent == e_player.parent) {
fairy_response (text);
}
else {
OutputText ("You say <i>"+text+"</i>. Nobody seems to pay attention.");
} },
"_js_name": "e_say_cmd",
"_types": ["defaultcommand"]
};
elementsNameMap["say_cmd"] = e_say_cmd;
allCommands.push(e_say_cmd);
objectsNameMap["say_cmd"] = e_say_cmd;
e_noundo = {
"elementtype": "object",
"name": "noundo",
"type": "command",
"pattern": "^undo$",
"script": function(parameters) { OutputText ("There's nothing you can do that can't be done.<br/>Nothing you can say but you can learn how to play the game.<br/>It's easy. There is no regrets in this game."); },
"_js_name": "e_noundo",
"_types": ["defaultcommand"]
};
elementsNameMap["noundo"] = e_noundo;
allCommands.push(e_noundo);
objectsNameMap["noundo"] = e_noundo;
e_read_cmd = {
"elementtype": "object",
"name": "read_cmd",
"type": "command",
"pattern": "^read (?<object>.*)$",
"script": function(parameters) { var object = parameters['object'];
if ( !(GetBoolean(object,"read_away") )&& !(ListContains(ScopeInventory(), object))) {
OutputText (overloadedFunctions.DynamicTemplate("NotCarrying", object));
}
else if (e_player.isMage) {
if (HasAttribute(object,"read")) {
if (overloadedFunctions.TypeOf(object,"read")=="script") {
runscriptattribute2 (object, "read");
}
else {
OutputText (object.read);
}
}
else {
OutputText ("I cannot read anything here.");
}
}
else {
OutputText ("I don't know how to read.");
} },
"_js_name": "e_read_cmd",
"_types": ["defaultcommand"]
};
elementsNameMap["read_cmd"] = e_read_cmd;
allCommands.push(e_read_cmd);
objectsNameMap["read_cmd"] = e_read_cmd;
e_defaultverb = {
"elementtype": "type",
"name": "defaultverb",
"separator": "with; using",
"multiobjectmenu": "With which object?",
"multiobjectdefault": "That doesn't work.",
"multiobjectmenuempty": "There are no objects available to do that with.",
"script": function() { if (!(IsDefined("object2"))) {
var object2 = null;
}
switch (overloadedFunctions.TypeOf(object, this.property)) {
case "script":
if (object2 == null) {
runscriptattribute2 (object, this.property);
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "string":
if (object2 == null) {
OutputText (GetString(object, this.property));
}
else {
OutputText (this.multiobjectdefault);
}
break;
case "scriptdictionary":
if (object2 != null) {
HandleMultiVerb (object, this.property, object2, this.multiobjectdefault);
}
else {
var menu = NewStringDictionary();
var objectlist = ListCombine (ScopeReachableInventory(), ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
if (ListCount(candidates) == 0) {
OutputText (this.multiobjectmenuempty);
}
else {
GenerateMenuChoices (menu, candidates);
set(e_game.pov, "multiverb", this.property);
set(e_game.pov, "multiverbobject", object);
set(e_game.pov, "multiverbobjectdefault", this.multiobjectdefault);
ShowMenu (this.multiobjectmenu, menu, true, function (result) { if (result != null) {
HandleMultiVerb (e_game.pov.multiverbobject, e_game.pov.multiverb, GetObject(result), e_game.pov.multiverbobjectdefault);
set(e_game.pov, "multiverb", null);
set(e_game.pov, "multiverbobject", null);
set(e_game.pov, "multiverbobjectdefault", null);
} });
}
}
break;
case "null":
if (this.defaulttext != null) {
OutputText (this.defaulttext);
}
else if (this.defaulttemplate != null) {
OutputText (overloadedFunctions.DynamicTemplate(this.defaulttemplate, object));
}
else if (this.defaultexpression != null) {
var params = NewDictionary();
dictionaryadd (params, "object", object);
OutputText (overloadedFunctions.Eval(this.defaultexpression, params));
}
else {
error ("No verb response defined");
}
break;
default:
error ("No verb response defined");
} },
"_js_name": "e_defaultverb",
"_types": []
};
elementsNameMap["defaultverb"] = e_defaultverb;
allObjects.push(e_defaultverb);
objectsNameMap["defaultverb"] = e_defaultverb;
e_defaultgame = {
"elementtype": "type",
"name": "defaultgame",
"enablehyperlinks": true,
"echocommand": true,
"echohyperlinks": true,
"showdescriptiononenter": true,
"autodescription": true,
"defaultfont": "Georgia, serif",
"defaultfontsize": 12,
"defaultbackground": "White",
"defaultforeground": "Black",
"defaultlinkforeground": "Blue",
"backgroundimage": "",
"setbackgroundopacity": false,
"backgroundopacity": 5,
"menufont": "Arial",
"menufontsize": 9,
"menubackground": "White",
"menuforeground": "Black",
"menuhoverbackground": "LightGrey",
"menuhoverforeground": "Black",
"underlinehyperlinks": true,
"compassdirections": ["northwest", "north", "northeast", "west", "east", "southwest", "south", "southeast", "up", "down", "in", "out"],
"clearframe": true,
"timeelapsed": 0,
"appendobjectdescription": false,
"allobjects": ["all", "everything"],
"parserignoreprefixes": ["the", "a", "an"],
"displayroomdescriptiononstart": true,
"showpanes": true,
"showcommandbar": true,
"showlocation": true,
"setcustomwidth": false,
"customwidth": 950,
"setcustompadding": false,
"custompaddingtop": 30,
"custompaddingbottom": 0,
"custompaddingleft": 20,
"custompaddingright": 20,
"showborder": true,
"showscore": false,
"showhealth": false,
"showtitle": true,
"autodisplayverbs": true,
"autodescription_youarein": 1,
"autodescription_youcansee": 2,
"autodescription_youcango": 3,
"autodescription_description": 4,
"autodescription_youarein_useprefix": true,
"autodescription_youarein_newline": false,
"autodescription_youcansee_newline": false,
"autodescription_youcango_newline": false,
"autodescription_description_newline": false,
"changeroom_newline": true,
"command_newline": false,
"description": "",
"languageid": "en",
"gridmap": false,
"mapscale": 30,
"mapsize": 300,
"feature_lightdark": false,
"feature_pictureframe": false,
"feature_limitinventory": false,
"feature_asktell": false,
"deactivatecommandlinks": false,
"multiplecommands": false,
"publishfileextensions": "*.jpg;*.jpeg;*.png;*.gif;*.js;*.wav;*.mp3;*.htm;*.html;*.svg",
"changedpov": function(oldvalue) { InitPOV (oldvalue, e_game.pov); },
"_js_name": "e_defaultgame",
"_types": []
};
elementsNameMap["defaultgame"] = e_defaultgame;
allObjects.push(e_defaultgame);
objectsNameMap["defaultgame"] = e_defaultgame;
e_theme_novella = {
"elementtype": "type",
"name": "theme_novella",
"setcustompadding": true,
"showborder": false,
"showpanes": false,
"showlocation": false,
"setcustomwidth": true,
"customwidth": 650,
"custompaddingtop": 60,
"_js_name": "e_theme_novella",
"_types": []
};
elementsNameMap["theme_novella"] = e_theme_novella;
allObjects.push(e_theme_novella);
objectsNameMap["theme_novella"] = e_theme_novella;
e_theme_retro = {
"elementtype": "type",
"name": "theme_retro",
"defaultbackground": "Black",
"defaultforeground": "White",
"defaultlinkforeground": "White",
"defaultfont": "'Lucida Console', Monaco, monospace",
"defaultwebfont": "Press Start 2P",
"menufontsize": 14,
"menufont": "'Lucida Console', Monaco, monospace",
"menubackground": "Black",
"menuforeground": "White",
"menuhoverbackground": "GreenYellow",
"_js_name": "e_theme_retro",
"_types": []
};
elementsNameMap["theme_retro"] = e_theme_retro;
allObjects.push(e_theme_retro);
objectsNameMap["theme_retro"] = e_theme_retro;
e_theme_typewriter = {
"elementtype": "type",
"name": "theme_typewriter",
"setcustompadding": true,
"showborder": false,
"showpanes": false,
"showlocation": false,
"setcustomwidth": true,
"customwidth": 650,
"custompaddingtop": 60,
"defaultfont": "'Courier New', Courier, monospace",
"defaultwebfont": "Special Elite",
"_js_name": "e_theme_typewriter",
"_types": []
};
elementsNameMap["theme_typewriter"] = e_theme_typewriter;
allObjects.push(e_theme_typewriter);
objectsNameMap["theme_typewriter"] = e_theme_typewriter;
e_theme_hotdogstand = {
"elementtype": "type",
"name": "theme_hotdogstand",
"defaultbackground": "Red",
"defaultforeground": "Yellow",
"defaultlinkforeground": "Yellow",
"defaultfont": "'Comic Sans MS', cursive, sans-serif",
"menufontsize": 14,
"menufont": "Impact, Charcoal, sans-serif",
"menubackground": "Red",
"menuforeground": "Yellow",
"menuhoverbackground": "Black",
"menuhoverforeground": "Yellow",
"_js_name": "e_theme_hotdogstand",
"_types": []
};
elementsNameMap["theme_hotdogstand"] = e_theme_hotdogstand;
allObjects.push(e_theme_hotdogstand);
objectsNameMap["theme_hotdogstand"] = e_theme_hotdogstand;
e_defaultobject = {
"elementtype": "type",
"name": "defaultobject",
"visible": true,
"displayverbs": ["Look at", "Take"],
"inventoryverbs": ["Look at", "Use", "Drop"],
"take": false,
"use": false,
"givesingle": false,
"drop": true,
"gender": "it",
"article": "it",
"isopen": false,
"open": false,
"close": false,
"container": false,
"descprefix": "You are in",
"objectslistprefix": "You can see",
"exitslistprefix": "You can go",
"contentsprefix": "containing",
"description": "",
"scenery": false,
"hidechildren": false,
"listchildren": false,
"usedefaultprefix": true,
"volume": 0,
"dark": false,
"lightstrength": "",
"darklevel": false,
"grid_width": 1,
"grid_length": 1,
"grid_fill": "White",
"grid_border": "Black",
"grid_borderwidth": 1,
"grid_bordersides": 15,
"grid_render": false,
"grid_label": "",
"grid_parent_offset_auto": true,
"grid_parent_offset_x": 0,
"grid_parent_offset_y": 0,
"pov_alias": "me",
"pov_alt": ["myself", "self"],
"pov_look": "Looking good.",
"pov_gender": "you",
"pov_article": "yourself",
"feature_usegive": false,
"feature_container": false,
"feature_switchable": false,
"feature_edible": false,
"feature_player": false,
"feature_lightdark": false,
"visited": false,
"changedparent": function(oldvalue) { if (e_game.pov == this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue);
}
else {
OnEnterRoom (null);
}
if (e_game.gridmap) {
MergePOVCoordinates();
}
} },
"changedisopen": function(oldvalue) { if (this.isopen && HasScript(this, "onopen")) {
runscriptattribute2 (this, "onopen");
}
if (!(this.isopen )&& HasScript(this, "onclose")) {
runscriptattribute2 (this, "onclose");
} },
"changedlocked": function(oldvalue) { if (this.locked && HasScript(this, "onlock")) {
runscriptattribute2 (this, "onlock");
}
if (!(this.locked )&& HasScript(this, "onunlock")) {
runscriptattribute2 (this, "onunlock");
} },
"changedswitchedon": function(oldvalue) { if (this.switchedon && HasScript(this, "onswitchon")) {
runscriptattribute2 (this, "onswitchon");
}
if (!(this.switchedon )&& HasScript(this, "onswitchoff")) {
runscriptattribute2 (this, "onswitchoff");
} },
"_js_name": "e_defaultobject",
"_types": []
};
elementsNameMap["defaultobject"] = e_defaultobject;
allObjects.push(e_defaultobject);
objectsNameMap["defaultobject"] = e_defaultobject;
e_defaultexit = {
"elementtype": "type",
"name": "defaultexit",
"displayverbs": ["Go to"],
"visible": true,
"scenery": false,
"locked": false,
"lockmessage": "That way is locked.",
"lookonly": false,
"runscript": false,
"lightstrength": "",
"grid_length": 1,
"grid_render": false,
"grid_offset_x": 0,
"grid_offset_y": 0,
"_js_name": "e_defaultexit",
"_types": []
};
elementsNameMap["defaultexit"] = e_defaultexit;
allObjects.push(e_defaultexit);
objectsNameMap["defaultexit"] = e_defaultexit;
e_direction = {
"elementtype": "type",
"name": "direction",
"displayverbs": ["Go"],
"_js_name": "e_direction",
"_types": []
};
elementsNameMap["direction"] = e_direction;
allObjects.push(e_direction);
objectsNameMap["direction"] = e_direction;
e_compassdirection = {
"elementtype": "type",
"name": "compassdirection",
"prefix": "",
"suffix": "",
"_js_name": "e_compassdirection",
"_types": ["direction"],
"displayverbs": ["Go"]
};
elementsNameMap["compassdirection"] = e_compassdirection;
allObjects.push(e_compassdirection);
objectsNameMap["compassdirection"] = e_compassdirection;
e_updowndirection = {
"elementtype": "type",
"name": "updowndirection",
"prefix": "",
"suffix": "",
"_js_name": "e_updowndirection",
"_types": ["direction"],
"displayverbs": ["Go"]
};
elementsNameMap["updowndirection"] = e_updowndirection;
allObjects.push(e_updowndirection);
objectsNameMap["updowndirection"] = e_updowndirection;
e_inoutdirection = {
"elementtype": "type",
"name": "inoutdirection",
"prefix": "",
"suffix": "",
"_js_name": "e_inoutdirection",
"_types": ["direction"],
"displayverbs": ["Go"]
};
elementsNameMap["inoutdirection"] = e_inoutdirection;
allObjects.push(e_inoutdirection);
objectsNameMap["inoutdirection"] = e_inoutdirection;
e_northwestdirection = {
"elementtype": "type",
"name": "northwestdirection",
"alias": "northwest",
"alt": ["nw"],
"_js_name": "e_northwestdirection",
"_types": ["compassdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["northwestdirection"] = e_northwestdirection;
allObjects.push(e_northwestdirection);
objectsNameMap["northwestdirection"] = e_northwestdirection;
e_northdirection = {
"elementtype": "type",
"name": "northdirection",
"alias": "north",
"alt": ["n"],
"_js_name": "e_northdirection",
"_types": ["compassdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["northdirection"] = e_northdirection;
allObjects.push(e_northdirection);
objectsNameMap["northdirection"] = e_northdirection;
e_northeastdirection = {
"elementtype": "type",
"name": "northeastdirection",
"alias": "northeast",
"alt": ["ne"],
"_js_name": "e_northeastdirection",
"_types": ["compassdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["northeastdirection"] = e_northeastdirection;
allObjects.push(e_northeastdirection);
objectsNameMap["northeastdirection"] = e_northeastdirection;
e_westdirection = {
"elementtype": "type",
"name": "westdirection",
"alias": "west",
"alt": ["w"],
"_js_name": "e_westdirection",
"_types": ["compassdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["westdirection"] = e_westdirection;
allObjects.push(e_westdirection);
objectsNameMap["westdirection"] = e_westdirection;
e_eastdirection = {
"elementtype": "type",
"name": "eastdirection",
"alias": "east",
"alt": ["e"],
"_js_name": "e_eastdirection",
"_types": ["compassdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["eastdirection"] = e_eastdirection;
allObjects.push(e_eastdirection);
objectsNameMap["eastdirection"] = e_eastdirection;
e_southwestdirection = {
"elementtype": "type",
"name": "southwestdirection",
"alias": "southwest",
"alt": ["sw"],
"_js_name": "e_southwestdirection",
"_types": ["compassdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["southwestdirection"] = e_southwestdirection;
allObjects.push(e_southwestdirection);
objectsNameMap["southwestdirection"] = e_southwestdirection;
e_southdirection = {
"elementtype": "type",
"name": "southdirection",
"alias": "south",
"alt": ["s"],
"_js_name": "e_southdirection",
"_types": ["compassdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["southdirection"] = e_southdirection;
allObjects.push(e_southdirection);
objectsNameMap["southdirection"] = e_southdirection;
e_southeastdirection = {
"elementtype": "type",
"name": "southeastdirection",
"alias": "southeast",
"alt": ["se"],
"_js_name": "e_southeastdirection",
"_types": ["compassdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["southeastdirection"] = e_southeastdirection;
allObjects.push(e_southeastdirection);
objectsNameMap["southeastdirection"] = e_southeastdirection;
e_updirection = {
"elementtype": "type",
"name": "updirection",
"alias": "up",
"alt": ["u"],
"_js_name": "e_updirection",
"_types": ["updowndirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["updirection"] = e_updirection;
allObjects.push(e_updirection);
objectsNameMap["updirection"] = e_updirection;
e_downdirection = {
"elementtype": "type",
"name": "downdirection",
"alias": "down",
"alt": ["d"],
"_js_name": "e_downdirection",
"_types": ["updowndirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["downdirection"] = e_downdirection;
allObjects.push(e_downdirection);
objectsNameMap["downdirection"] = e_downdirection;
e_indirection = {
"elementtype": "type",
"name": "indirection",
"alias": "in",
"alt": [""],
"_js_name": "e_indirection",
"_types": ["inoutdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["indirection"] = e_indirection;
allObjects.push(e_indirection);
objectsNameMap["indirection"] = e_indirection;
e_outdirection = {
"elementtype": "type",
"name": "outdirection",
"alias": "out",
"alt": ["o"],
"_js_name": "e_outdirection",
"_types": ["inoutdirection"],
"prefix": "",
"suffix": "",
"displayverbs": ["Go"]
};
elementsNameMap["outdirection"] = e_outdirection;
allObjects.push(e_outdirection);
objectsNameMap["outdirection"] = e_outdirection;
e_defaultcommand = {
"elementtype": "type",
"name": "defaultcommand",
"pattern": "^$",
"_js_name": "e_defaultcommand",
"_types": []
};
elementsNameMap["defaultcommand"] = e_defaultcommand;
allObjects.push(e_defaultcommand);
objectsNameMap["defaultcommand"] = e_defaultcommand;
e_male = {
"elementtype": "type",
"name": "male",
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him",
"_js_name": "e_male",
"_types": []
};
elementsNameMap["male"] = e_male;
allObjects.push(e_male);
objectsNameMap["male"] = e_male;
e_namedmale = {
"elementtype": "type",
"name": "namedmale",
"usedefaultprefix": false,
"_js_name": "e_namedmale",
"_types": ["male"],
"displayverbs": ["Look at", "Speak to"],
"gender": "he",
"article": "him"
};
elementsNameMap["namedmale"] = e_namedmale;
allObjects.push(e_namedmale);
objectsNameMap["namedmale"] = e_namedmale;
e_female = {
"elementtype": "type",
"name": "female",
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her",
"_js_name": "e_female",
"_types": []
};
elementsNameMap["female"] = e_female;
allObjects.push(e_female);
objectsNameMap["female"] = e_female;
e_namedfemale = {
"elementtype": "type",
"name": "namedfemale",
"usedefaultprefix": false,
"_js_name": "e_namedfemale",
"_types": ["female"],
"displayverbs": ["Look at", "Speak to"],
"gender": "she",
"article": "her"
};
elementsNameMap["namedfemale"] = e_namedfemale;
allObjects.push(e_namedfemale);
objectsNameMap["namedfemale"] = e_namedfemale;
e_plural = {
"elementtype": "type",
"name": "plural",
"gender": "they",
"article": "them",
"_js_name": "e_plural",
"_types": []
};
elementsNameMap["plural"] = e_plural;
allObjects.push(e_plural);
objectsNameMap["plural"] = e_plural;
e_maleplural = {
"elementtype": "type",
"name": "maleplural",
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"_js_name": "e_maleplural",
"_types": []
};
elementsNameMap["maleplural"] = e_maleplural;
allObjects.push(e_maleplural);
objectsNameMap["maleplural"] = e_maleplural;
e_femaleplural = {
"elementtype": "type",
"name": "femaleplural",
"displayverbs": ["Look at", "Speak to"],
"gender": "they",
"article": "them",
"_js_name": "e_femaleplural",
"_types": []
};
elementsNameMap["femaleplural"] = e_femaleplural;
allObjects.push(e_femaleplural);
objectsNameMap["femaleplural"] = e_femaleplural;
e_openable = {
"elementtype": "type",
"name": "openable",
"open": true,
"close": true,
"displayverbs": ["Open", "Close"],
"inventoryverbs": ["Open", "Close"],
"_js_name": "e_openable",
"_types": []
};
elementsNameMap["openable"] = e_openable;
allObjects.push(e_openable);
objectsNameMap["openable"] = e_openable;
e_container_base = {
"elementtype": "type",
"name": "container_base",
"container": true,
"_js_name": "e_container_base",
"_types": []
};
elementsNameMap["container_base"] = e_container_base;
allObjects.push(e_container_base);
objectsNameMap["container_base"] = e_container_base;
e_container_closed = {
"elementtype": "type",
"name": "container_closed",
"open": true,
"close": true,
"displayverbs": ["Open", "Close"],
"inventoryverbs": ["Open", "Close"],
"_js_name": "e_container_closed",
"_types": ["container_base"],
"container": true
};
elementsNameMap["container_closed"] = e_container_closed;
allObjects.push(e_container_closed);
objectsNameMap["container_closed"] = e_container_closed;
e_container_open = {
"elementtype": "type",
"name": "container_open",
"isopen": true,
"open": true,
"close": true,
"displayverbs": ["Open", "Close"],
"inventoryverbs": ["Open", "Close"],
"_js_name": "e_container_open",
"_types": ["container_base"],
"container": true
};
elementsNameMap["container_open"] = e_container_open;
allObjects.push(e_container_open);
objectsNameMap["container_open"] = e_container_open;
e_surface = {
"elementtype": "type",
"name": "surface",
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"_js_name": "e_surface",
"_types": ["container_base"],
"container": true
};
elementsNameMap["surface"] = e_surface;
allObjects.push(e_surface);
objectsNameMap["surface"] = e_surface;
e_container = {
"elementtype": "type",
"name": "container",
"displayverbs": ["Open", "Close"],
"inventoryverbs": ["Open", "Close"],
"_js_name": "e_container",
"_types": ["container_open"],
"isopen": true,
"open": true,
"close": true,
"container": true
};
elementsNameMap["container"] = e_container;
allObjects.push(e_container);
objectsNameMap["container"] = e_container;
e_container_limited = {
"elementtype": "type",
"name": "container_limited",
"maxobjects": 1,
"maxvolume": 100,
"addscript": function() { var activecontainer = this;
var correct = true;
while (DoesInherit(activecontainer, "container_base")) {
if (HasInt(activecontainer, "maxvolume")) {
if (GetVolume(object, true) + GetVolume(activecontainer, false) > activecontainer.maxvolume) {
var correct = false;
if (HasString(this, "containerfullmessage")) {
var message = this.containerfullmessage;
}
else {
var message = overloadedFunctions.DynamicTemplate("ContainerFull", this);
}
}
}
var activecontainer = activecontainer.parent;
}
var children = GetDirectChildren(this);
if (listcount(children) >= this.maxobjects) {
var correct = false;
if (HasString(this, "containerfullmessage")) {
var message = this.containerfullmessage;
}
else {
var message = overloadedFunctions.DynamicTemplate("MaxObjectsInContainer", this);
}
}
if (correct == false) {
OutputText (message);
}
else {
set(object, "parent", this);
OutputText (Template("Done"));
} },
"displayverbs": ["Open", "Close"],
"inventoryverbs": ["Open", "Close"],
"_js_name": "e_container_limited",
"_types": ["container"],
"isopen": true,
"open": true,
"close": true,
"container": true
};
elementsNameMap["container_limited"] = e_container_limited;
allObjects.push(e_container_limited);
objectsNameMap["container_limited"] = e_container_limited;
e_container_lockable = {
"elementtype": "type",
"name": "container_lockable",
"locked": true,
"nokeymessage": "You do not have the key.",
"unlockmessage": "Unlocked.",
"lockmessage": "Locked.",
"canlockopen": false,
"autoopen": true,
"autounlock": true,
"openscript": function() { if (this.locked) {
if (this.autounlock && AllKeysAvailable(this)) {
runscriptattribute2 (this, "unlock");
if (!(this.isopen)) {
OpenObject (this);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
}
else {
OpenObject (this);
} },
"closescript": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("LockedObject", this));
}
else {
CloseObject (this);
} },
"lock": function() { if (this.locked) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyLocked", this));
}
else if (this.isopen && !(this.canlockopen)) {
OutputText (overloadedFunctions.DynamicTemplate("CannotLockOpen", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.lockmessage);
set(this, "locked", true);
}
else {
OutputText (this.nokeymessage);
}
} },
"unlock": function() { if (!(this.locked)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyUnlocked", this));
}
else {
if (AllKeysAvailable(this)) {
OutputText (this.unlockmessage);
set(this, "locked", false);
if (this.autoopen && !(this.isopen)) {
TryOpenClose (true, this);
}
}
else {
OutputText (this.nokeymessage);
}
} },
"_js_name": "e_container_lockable",
"_types": []
};
elementsNameMap["container_lockable"] = e_container_lockable;
allObjects.push(e_container_lockable);
objectsNameMap["container_lockable"] = e_container_lockable;
e_defaultplayer = {
"elementtype": "type",
"name": "defaultplayer",
"_js_name": "e_defaultplayer",
"_types": []
};
elementsNameMap["defaultplayer"] = e_defaultplayer;
allObjects.push(e_defaultplayer);
objectsNameMap["defaultplayer"] = e_defaultplayer;
e_switchable = {
"elementtype": "type",
"name": "switchable",
"switchedon": false,
"turnon": function() { if (ListContains(ScopeReachable(), this)) {
if (this.switchedon) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadySwitchedOn", this));
}
else {
if (HasString(this, "switchonmsg")) {
OutputText (this.switchonmsg);
}
else {
OutputText (overloadedFunctions.DynamicTemplate("SwitchedOn", this));
}
set(this, "switchedon", true);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("DefaultTurnOn", this));
} },
"turnoff": function() { if (ListContains(ScopeReachable(), this)) {
if (!(this.switchedon)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadySwitchedOff", this));
}
else {
if (HasString(this, "switchoffmsg")) {
OutputText (this.switchoffmsg);
}
else {
OutputText (overloadedFunctions.DynamicTemplate("SwitchedOff", this));
}
set(this, "switchedon", false);
}
}
else {
OutputText (overloadedFunctions.DynamicTemplate("DefaultTurnOff", this));
} },
"displayverbs": ["Switch on", "Switch off"],
"inventoryverbs": ["Switch on", "Switch off"],
"_js_name": "e_switchable",
"_types": []
};
elementsNameMap["switchable"] = e_switchable;
allObjects.push(e_switchable);
objectsNameMap["switchable"] = e_switchable;
e_edible = {
"elementtype": "type",
"name": "edible",
"eathealth": 0,
"eat": function() { if (HasString(this, "eatmsg")) {
OutputText (this.eatmsg);
}
else {
OutputText (overloadedFunctions.DynamicTemplate("Eaten", this));
}
if (HasInt(e_game.pov, "health")) {
set(e_game.pov, "health", e_game.pov.health + this.eathealth);
}
destroy (this.name); },
"displayverbs": ["Eat"],
"inventoryverbs": ["Eat"],
"_js_name": "e_edible",
"_types": []
};
elementsNameMap["edible"] = e_edible;
allObjects.push(e_edible);
objectsNameMap["edible"] = e_edible;
e_gridborder_path_ew = {
"elementtype": "type",
"name": "gridborder_path_ew",
"grid_bordersides": 10,
"_js_name": "e_gridborder_path_ew",
"_types": []
};
elementsNameMap["gridborder_path_ew"] = e_gridborder_path_ew;
allObjects.push(e_gridborder_path_ew);
objectsNameMap["gridborder_path_ew"] = e_gridborder_path_ew;
e_gridborder_path_e = {
"elementtype": "type",
"name": "gridborder_path_e",
"grid_bordersides": 11,
"_js_name": "e_gridborder_path_e",
"_types": []
};
elementsNameMap["gridborder_path_e"] = e_gridborder_path_e;
allObjects.push(e_gridborder_path_e);
objectsNameMap["gridborder_path_e"] = e_gridborder_path_e;
e_gridborder_path_w = {
"elementtype": "type",
"name": "gridborder_path_w",
"grid_bordersides": 14,
"_js_name": "e_gridborder_path_w",
"_types": []
};
elementsNameMap["gridborder_path_w"] = e_gridborder_path_w;
allObjects.push(e_gridborder_path_w);
objectsNameMap["gridborder_path_w"] = e_gridborder_path_w;
e_gridborder_path_ns = {
"elementtype": "type",
"name": "gridborder_path_ns",
"grid_bordersides": 5,
"_js_name": "e_gridborder_path_ns",
"_types": []
};
elementsNameMap["gridborder_path_ns"] = e_gridborder_path_ns;
allObjects.push(e_gridborder_path_ns);
objectsNameMap["gridborder_path_ns"] = e_gridborder_path_ns;
e_gridborder_path_n = {
"elementtype": "type",
"name": "gridborder_path_n",
"grid_bordersides": 7,
"_js_name": "e_gridborder_path_n",
"_types": []
};
elementsNameMap["gridborder_path_n"] = e_gridborder_path_n;
allObjects.push(e_gridborder_path_n);
objectsNameMap["gridborder_path_n"] = e_gridborder_path_n;
e_gridborder_path_s = {
"elementtype": "type",
"name": "gridborder_path_s",
"grid_bordersides": 13,
"_js_name": "e_gridborder_path_s",
"_types": []
};
elementsNameMap["gridborder_path_s"] = e_gridborder_path_s;
allObjects.push(e_gridborder_path_s);
objectsNameMap["gridborder_path_s"] = e_gridborder_path_s;
e_SaveType = {
"elementtype": "type",
"name": "SaveType",
"cmds": [],
"saves": {"__dummyKey": "" },
"record": true,
"savename": "",
"random": [],
"random_play": [],
"_js_name": "e_SaveType",
"_types": []
};
elementsNameMap["SaveType"] = e_SaveType;
allObjects.push(e_SaveType);
objectsNameMap["SaveType"] = e_SaveType;
e_spell_book_type = {
"elementtype": "type",
"name": "spell_book_type",
"no_remove": true,
"no_remove_msg": "You cannot remove this.",
"_js_name": "e_spell_book_type",
"_types": ["surface"],
"isopen": true,
"transparent": true,
"contentsprefix": "on which there is",
"container": true
};
elementsNameMap["spell_book_type"] = e_spell_book_type;
allObjects.push(e_spell_book_type);
objectsNameMap["spell_book_type"] = e_spell_book_type;
e_NoDrop = {
"elementtype": "type",
"name": "NoDrop",
"_js_name": "e_NoDrop",
"_types": []
};
elementsNameMap["NoDrop"] = e_NoDrop;
allObjects.push(e_NoDrop);
objectsNameMap["NoDrop"] = e_NoDrop;
e_Enemy = {
"elementtype": "type",
"name": "Enemy",
"enemy": "yes",
"danger": "death",
"ht": 10,
"exp": 1,
"armour": 0,
"aggressive": false,
"stab_level": 0,
"affect_calm": false,
"block_flee": false,
"damage": 2,
"push": function() { if (e_player.parent==e_combat_room) {
if (e_combat.pushed) {
OutputText ("You can only push one time before you combat movement.");
}
else if (savedRandomInt(0,1)==0) {
OutputText ("You successfully push "+this.alias+".");
set(e_combat, "en_red", e_combat.en_red+1);
}
else {
OutputText ("You tried to push "+this.alias+", but ended up losing your balance.");
set(e_combat, "pl_red", e_combat.pl_red+1);
}
set(e_combat, "pushed", true);
}
else {
OutputText ("It doesn't work.");
} },
"_js_name": "e_Enemy",
"_types": []
};
elementsNameMap["Enemy"] = e_Enemy;
allObjects.push(e_Enemy);
objectsNameMap["Enemy"] = e_Enemy;
e_Spell = {
"elementtype": "type",
"name": "Spell",
"castspell": true,
"castonobject": true,
"drop": function() { OutputText ("You don't want to rip your book apart."); },
"use": function() { OutputText ("You don't use a spell, you 'cast' it."); },
"_js_name": "e_Spell",
"_types": ["Readable"],
"read_away": false,
"read": function() { doRead (this); }
};
elementsNameMap["Spell"] = e_Spell;
allObjects.push(e_Spell);
objectsNameMap["Spell"] = e_Spell;
e_Armour = {
"elementtype": "type",
"name": "Armour",
"armour": 1,
"loc": "body",
"_js_name": "e_Armour",
"_types": []
};
elementsNameMap["Armour"] = e_Armour;
allObjects.push(e_Armour);
objectsNameMap["Armour"] = e_Armour;
e_Weapon = {
"elementtype": "type",
"name": "Weapon",
"damage": 1,
"_js_name": "e_Weapon",
"_types": []
};
elementsNameMap["Weapon"] = e_Weapon;
allObjects.push(e_Weapon);
objectsNameMap["Weapon"] = e_Weapon;
e_LockedRoom = {
"elementtype": "type",
"name": "LockedRoom",
"lockname": "",
"open_name": "",
"picklock": function() { do_picklock (this); },
"unlock": function() { OutputText (Template("NoKey")); },
"_js_name": "e_LockedRoom",
"_types": []
};
elementsNameMap["LockedRoom"] = e_LockedRoom;
allObjects.push(e_LockedRoom);
objectsNameMap["LockedRoom"] = e_LockedRoom;
e_PublicRoom = {
"elementtype": "type",
"name": "PublicRoom",
"public_level": 3,
"public_greeting": "An unknown passerby says <i>Hi {player.playername}! Good luck with your quest!</i>",
"_js_name": "e_PublicRoom",
"_types": []
};
elementsNameMap["PublicRoom"] = e_PublicRoom;
allObjects.push(e_PublicRoom);
objectsNameMap["PublicRoom"] = e_PublicRoom;
e_Treasure = {
"elementtype": "type",
"name": "Treasure",
"worth": 0,
"_js_name": "e_Treasure",
"_types": []
};
elementsNameMap["Treasure"] = e_Treasure;
allObjects.push(e_Treasure);
objectsNameMap["Treasure"] = e_Treasure;
e_UseAltType = {
"elementtype": "type",
"name": "UseAltType",
"useCmds": [],
"_js_name": "e_UseAltType",
"_types": []
};
elementsNameMap["UseAltType"] = e_UseAltType;
allObjects.push(e_UseAltType);
objectsNameMap["UseAltType"] = e_UseAltType;
e_Readable = {
"elementtype": "type",
"name": "Readable",
"read_away": false,
"read": function() { doRead (this); },
"_js_name": "e_Readable",
"_types": []
};
elementsNameMap["Readable"] = e_Readable;
allObjects.push(e_Readable);
objectsNameMap["Readable"] = e_Readable;
function GetDefaultPrefix(obj)
{
if (Instr("aeiou", LCase(Left(GetDisplayAlias(obj), 1))) > 0) {
return ("an");
}
else {
return ("a");
}
}
function WriteVerb(obj, verb)
{
return (CapFirst(obj.gender) + " " + Conjugate(obj, verb));
}
function Conjugate(obj, verb)
{
var gender = obj.gender;
if (gender == "he" || gender == "she") {
var gender = "it";
}
switch (verb) {
case "be":
switch (gender) {
case "i":
return ("am");
break;
case "you":
return ("are");
break;
case "it":
return ("is");
break;
case "we":
return ("are");
break;
case "they":
return ("are");
break;
default:
return ("is");
}
break;
case "do":
switch (gender) {
case "i":
return ("do");
break;
case "you":
return ("do");
break;
case "it":
return ("does");
break;
case "we":
return ("do");
break;
case "they":
return ("do");
break;
default:
return ("do");
}
break;
default:
if (gender == "it") {
return (verb + "s");
}
else {
return (verb);
}
}
}
function ListObjectContents(object)
{
if (GetBoolean(object, "isopen") && GetBoolean(object, "listchildren")) {
if (GetBoolean(object, "hidechildren")) {
set(object, "hidechildren", false);
}
if (HasString(object, "listchildrenprefix")) {
var listprefix = object.listchildrenprefix;
}
else {
var listprefix = overloadedFunctions.DynamicTemplate("ObjectContains", object);
}
var list = FormatObjectList(listprefix, object, Template("And"), ".");
if (list != "") {
OutputText (list);
}
}
}
function DoTake(object, ismultiple)
{
var prefix = "";
if (ismultiple) {
var prefix = GetDisplayAlias(object) + ": ";
}
if (object.parent == e_game.pov) {
OutputText (prefix + overloadedFunctions.DynamicTemplate("AlreadyTaken", object));
}
else if (!(ListContains(ScopeReachable(), object))) {
OutputText (prefix + overloadedFunctions.DynamicTemplate("ObjectNotOpen", GetBlockingObject(object)));
}
else {
var volume = 0;
var variable_continue = true;
var list_obj = GetAllChildObjects(e_game.pov);
var list_obj_isarray = (Object.prototype.toString.call(list_obj) === '[object Array]');
for (var iterator_obj in list_obj) {
var obj = list_obj_isarray ? list_obj[iterator_obj] : iterator_obj;
if (list_obj_isarray || iterator_obj!="__dummyKey") { if (HasInt(obj, "volume")) {
var volume = volume + obj.volume;
} }
}
if (!(Contains(e_game.pov, object))) {
var volume = volume + GetVolume(object,true);
}
if (HasInt(e_game.pov, "maxvolume")) {
if (volume > e_game.pov.maxvolume) {
var variable_continue = false;
if (HasString(e_game.pov, "containerfullmessage")) {
var message = prefix + e_game.pov.containerfullmessage;
}
else {
var message = prefix + overloadedFunctions.DynamicTemplate("FullInventory", object);
}
}
}
var children = GetDirectChildren(e_game.pov);
if (HasInt(e_game.pov, "maxobjects")) {
if (e_game.pov.maxobjects > 0) {
if (ListCount(children) >= e_game.pov.maxobjects) {
var variable_continue = false;
if (HasString(e_game.pov, "containermaxobjects")) {
var message = prefix + e_game.pov.containermaxobjects;
}
else {
var message = prefix + overloadedFunctions.DynamicTemplate("MaxObjectsInInventory", object);
}
}
}
}
if (variable_continue == false) {
OutputText (message);
}
else {
var found = true;
var takemsg = object.takemsg;
switch (overloadedFunctions.TypeOf(object, "take")) {
case "script":
if (ismultiple) {
OutputTextNoBr (prefix);
}
runscriptattribute2 (object, "take");
var takemsg = "";
break;
case "boolean":
if (object.take == true) {
set(object, "parent", e_game.pov);
if (takemsg == null) {
var takemsg = overloadedFunctions.DynamicTemplate("TakeSuccessful", object);
}
}
else {
var found = false;
}
break;
case "string":
set(object, "parent", e_game.pov);
var takemsg = object.take;
break;
default:
var found = false;
}
if (!(found )&& takemsg == null) {
var takemsg = overloadedFunctions.DynamicTemplate("TakeUnsuccessful", object);
}
if (LengthOf(takemsg) > 0) {
OutputText (prefix + takemsg);
}
if (HasScript(object, "ontake")) {
runscriptattribute2 (object, "ontake");
}
if (found && GetBoolean (object, "scenery") && object.parent == e_game.pov) {
set(object, "scenery", false);
}
}
}
}
function DoDrop(object, ismultiple)
{
var prefix = "";
if (ismultiple) {
var prefix = GetDisplayAlias(object) + ": ";
}
if (!(ListContains(ScopeInventory(), object))) {
OutputText (prefix + overloadedFunctions.DynamicTemplate("NotCarrying", object));
}
else if (!(ListContains(ScopeReachable(), object))) {
OutputText (prefix + overloadedFunctions.DynamicTemplate("ObjectNotOpen", GetBlockingObject(object)));
}
else {
var found = true;
var dropmsg = object.dropmsg;
switch (overloadedFunctions.TypeOf(object, "drop")) {
case "script":
if (ismultiple) {
OutputTextNoBr (prefix);
}
runscriptattribute2 (object, "drop");
var dropmsg = "";
break;
case "boolean":
if (object.drop == true) {
set(object, "parent", e_game.pov.parent);
if (dropmsg == null) {
var dropmsg = overloadedFunctions.DynamicTemplate("DropSuccessful", object);
}
}
else {
var found = false;
}
break;
case "string":
set(object, "parent", e_game.pov.parent);
var dropmsg = object.drop;
break;
default:
var found = false;
}
if (!(found )&& dropmsg == null) {
var dropmsg = overloadedFunctions.DynamicTemplate("DropUnsuccessful", object);
}
if (LengthOf(dropmsg) > 0) {
OutputText (prefix + dropmsg);
}
if (HasScript(object, "ondrop")) {
runscriptattribute2 (object, "ondrop");
}
}
}
function CreateUseMenuList(object)
{
var objectlist = NewObjectList();
var objectlist = ScopeReachableInventory();
var objectlist = ListCombine (objectlist, ScopeReachableNotHeld());
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = NewObjectList();
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
return (candidates);
}
function TryOpenClose(doopen, object)
{
if (doopen) {
var action = "open";
var scriptaction = "openscript";
}
else {
var action = "close";
var scriptaction = "closescript";
}
if (!(ListContains(ScopeReachable(), object))) {
OutputText (overloadedFunctions.DynamicTemplate("ObjectNotOpen", GetBlockingObject(object)));
}
else {
var found = false;
if (GetBoolean(object, action)) {
if (doopen) {
if (object.isopen) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyOpen", object));
}
else {
if (HasScript(object, scriptaction)) {
runscriptattribute2 (object, scriptaction);
}
else {
OpenObject (object);
}
}
}
else {
if (!(object.isopen)) {
OutputText (overloadedFunctions.DynamicTemplate("AlreadyClosed", object));
}
else {
if (HasScript(object, scriptaction)) {
runscriptattribute2 (object, scriptaction);
}
else {
CloseObject (object);
}
}
}
}
else {
if (doopen) {
OutputText (overloadedFunctions.DynamicTemplate("CantOpen", object));
}
else {
OutputText (overloadedFunctions.DynamicTemplate("CantClose", object));
}
}
}
}
function OpenObject(object)
{
if (HasString(object, "openmsg")) {
OutputText (object.openmsg);
}
else {
OutputText (overloadedFunctions.DynamicTemplate("OpenSuccessful", object));
}
set(object, "isopen", true);
ListObjectContents (object);
}
function CloseObject(object)
{
if (HasString(object, "closemsg")) {
OutputText (object.closemsg);
}
else {
OutputText (overloadedFunctions.DynamicTemplate("CloseSuccessful", object));
}
set(object, "isopen", false);
}
function CreateGiveMenuList(object)
{
var objectlist = NewObjectList();
//var objectlist = ScopeReachableInventory();
//var objectlist = ListCombine (objectlist, ScopeReachableNotHeld());
var objectlist = ScopeReachableNotHeld();
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = NewObjectList();
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
return (candidates);
}
function HandleGiveTo(object1, object2)
{
var handled = false;
if (HasString(object2, "give")) {
OutputText (object2.give);
var handled = true;
}
else if (overloadedFunctions.TypeOf(object2, "give") == "scriptdictionary") {
if (DictionaryContains(object2.give, object1.name)) {
var parameters = NewObjectDictionary();
dictionaryadd (parameters, "this", object2);
dictionaryadd (parameters, "object", object1);
invoke (ScriptDictionaryItem(object2.give, object1.name), parameters);
var handled = true;
}
if (!(handled)) {
if (HasScript(object2, "giveanything")) {
var parameters = NewObjectDictionary();
dictionaryadd (parameters, "object", object1);
runscriptattribute3 (object2, "giveanything", parameters);
var handled = true;
}
}
}
if (!(handled)) {
if (HasString(object1, "giveto")) {
OutputText (object1.giveto);
var handled = true;
}
else if (overloadedFunctions.TypeOf(object1, "giveto") == "scriptdictionary") {
if (DictionaryContains(object1.giveto, object2.name)) {
var parameters = NewObjectDictionary();
dictionaryadd (parameters, "this", object1);
dictionaryadd (parameters, "object", object2);
invoke (ScriptDictionaryItem(object1.giveto, object2.name), parameters);
var handled = true;
}
else {
if (HasScript(object1, "givetoanything")) {
var parameters = NewObjectDictionary();
dictionaryadd (parameters, "object", object2);
runscriptattribute3 (object1, "givetoanything", parameters);
var handled = true;
}
}
}
}
if (!(handled)) {
OutputText (overloadedFunctions.DynamicTemplate("DefaultGive", object2, object1));
}
}
function HandleUseOn(object1, object2)
{
var handled = false;
if (HasString(object2, "useon")) {
OutputText (object2.useon);
var handled = true;
}
else if (overloadedFunctions.TypeOf(object2, "useon") == "scriptdictionary") {
if (DictionaryContains(object2.useon, object1.name)) {
var parameters = NewObjectDictionary();
dictionaryadd (parameters, "this", object2);
dictionaryadd (parameters, "object", object1);
invoke (ScriptDictionaryItem(object2.useon, object1.name), parameters);
var handled = true;
}
else {
if (HasScript(object2, "useanything")) {
var parameters = NewObjectDictionary();
dictionaryadd (parameters, "object", object1);
runscriptattribute3 (object2, "useanything", parameters);
var handled = true;
}
}
}
if (!(handled)) {
if (HasString(object1, "selfuseon")) {
OutputText (object1.selfuseon);
var handled = true;
}
else if (overloadedFunctions.TypeOf(object1, "selfuseon") == "scriptdictionary") {
if (DictionaryContains(object1.selfuseon, object2.name)) {
var parameters = NewObjectDictionary();
dictionaryadd (parameters, "this", object1);
dictionaryadd (parameters, "object", object2);
invoke (ScriptDictionaryItem(object1.selfuseon, object2.name), parameters);
var handled = true;
}
else {
if (HasScript(object1, "selfuseanything")) {
var parameters = NewObjectDictionary();
dictionaryadd (parameters, "object", object2);
runscriptattribute3 (object1, "selfuseanything", parameters);
var handled = true;
}
}
}
}
if (!(handled)) {
OutputText (overloadedFunctions.DynamicTemplate("DefaultUseOn", object2, object1));
}
}
function DoAskTell(object, text, property, defaultscript, defaulttemplate)
{
var handled = false;
var maxstrength = 0;
var match = null;
var text = LCase(text);
if (overloadedFunctions.TypeOf(object, property) == "scriptdictionary") {
var dictionary = GetAttribute(object, property);
var dictionary_isarray = (Object.prototype.toString.call(dictionary) === '[object Array]');
for (var iterator_keywords in dictionary) {
var keywords = dictionary_isarray ? dictionary[iterator_keywords] : iterator_keywords;
if (dictionary_isarray || iterator_keywords!="__dummyKey") { var strength = GetKeywordsMatchStrength(LCase(keywords), text);
if (strength >= maxstrength && strength>0) {
var match = ScriptDictionaryItem(dictionary, keywords);
var maxstrength = strength;
} }
}
if (match != null) {
var parameters = NewObjectDictionary();
dictionaryadd (parameters, "this", object);
invoke (match, parameters);
var handled = true;
}
}
if (!(handled)) {
if (HasScript(object, defaultscript)) {
runscriptattribute2 (object, defaultscript);
}
else {
OutputText (overloadedFunctions.DynamicTemplate(defaulttemplate, object));
}
}
}
function GetKeywordsMatchStrength(keywords, input)
{
var keywordlist = Split(keywords, " ");
var inputlist = Split(input, " ");
var strength = 0;
var inputlist_isarray = (Object.prototype.toString.call(inputlist) === '[object Array]');
for (var iterator_word in inputlist) {
var word = inputlist_isarray ? inputlist[iterator_word] : iterator_word;
if (inputlist_isarray || iterator_word!="__dummyKey") { var keywordlist_isarray = (Object.prototype.toString.call(keywordlist) === '[object Array]');
for (var iterator_keyword in keywordlist) {
var keyword = keywordlist_isarray ? keywordlist[iterator_keyword] : iterator_keyword;
if (keywordlist_isarray || iterator_keyword!="__dummyKey") { if (StartsWith(word, keyword)) {
var strength = strength + LengthOf(keyword);
} }
} }
}
return (strength);
}
function CompareNames(name, value, obj, fullmatches, partialmatches)
{
if (name == value) {
if (!(ListContains(fullmatches, obj))) {
listadd (fullmatches, obj);
}
}
else {
if (StartsWith(name, value)) {
if (!(ListContains(partialmatches, obj))) {
listadd (partialmatches, obj);
}
}
else {
if (Instr(name, " " + value) > 0) {
if (!(ListContains(partialmatches, obj))) {
listadd (partialmatches, obj);
}
}
}
}
}
function GenerateMenuChoices(dictionary, objects)
{
var objects_isarray = (Object.prototype.toString.call(objects) === '[object Array]');
for (var iterator_obj in objects) {
var obj = objects_isarray ? objects[iterator_obj] : iterator_obj;
if (objects_isarray || iterator_obj!="__dummyKey") { if (!(DictionaryContains(dictionary, obj.name))) {
dictionaryadd (dictionary, obj.name, GetDisplayAlias(obj));
} }
}
}
function ResolveName(variable, value, objtype)
{
var found = false;
if (e_game.pov.commandmetadata != null) {
if (DictionaryContains(e_game.pov.commandmetadata, value)) {
var result = GetObject(StringDictionaryItem(e_game.pov.commandmetadata, value));
if (result != null) {
if (ListContains(ScopeVisible(), result)) {
var found = true;
return (result);
}
}
}
}
if (!(found)) {
var value = LCase(value);
var result = ResolveNameInternal(variable, value, objtype);
if (result != null) {
return (result);
}
else {
var e_game_parserignoreprefixes_isarray = (Object.prototype.toString.call(e_game.parserignoreprefixes) === '[object Array]');
for (var iterator_prefix in e_game.parserignoreprefixes) {
var prefix = e_game_parserignoreprefixes_isarray ? e_game.parserignoreprefixes[iterator_prefix] : iterator_prefix;
if (e_game_parserignoreprefixes_isarray || iterator_prefix!="__dummyKey") { if (StartsWith(value, prefix + " ")) {
var result = ResolveNameInternal(variable, Mid(value, LengthOf(prefix) + 1), objtype);
} }
}
if (result == null && LengthOf(variable) == 0 && !(GetBoolean(e_game.pov, "currentcommandmultiobjectpending"))) {
UnresolvedCommand (value, e_game.pov.currentcommandpendingvariable);
}
return (result);
}
}
}
function ResolveNameInternal(variable, value, objtype)
{
var fullmatches = NewObjectList();
var partialmatches = NewObjectList();
set(e_game.pov, "currentcommandmultiobjectpending", false);
if (objtype == "object") {
var scope = ScopeVisible();
}
else if (objtype == "exit") {
var scope = ScopeExits();
}
var value = Trim(value);
var scope_isarray = (Object.prototype.toString.call(scope) === '[object Array]');
for (var iterator_obj in scope) {
var obj = scope_isarray ? scope[iterator_obj] : iterator_obj;
if (scope_isarray || iterator_obj!="__dummyKey") { var name = LCase(GetDisplayAlias(obj));
CompareNames (name, value, obj, fullmatches, partialmatches);
if (obj.alt != null) {
var obj_alt_isarray = (Object.prototype.toString.call(obj.alt) === '[object Array]');
for (var iterator_altname in obj.alt) {
var altname = obj_alt_isarray ? obj.alt[iterator_altname] : iterator_altname;
if (obj_alt_isarray || iterator_altname!="__dummyKey") { CompareNames (LCase(altname), value, obj, fullmatches, partialmatches); }
}
} }
}
if (objtype == "object" && e_game.lastobjects != null) {
var e_game_lastobjects_isarray = (Object.prototype.toString.call(e_game.lastobjects) === '[object Array]');
for (var iterator_obj in e_game.lastobjects) {
var obj = e_game_lastobjects_isarray ? e_game.lastobjects[iterator_obj] : iterator_obj;
if (e_game_lastobjects_isarray || iterator_obj!="__dummyKey") { CompareNames (LCase(obj.article), value, obj, fullmatches, partialmatches);
CompareNames (LCase(obj.gender), value, obj, fullmatches, partialmatches); }
}
}
if (ListCount(fullmatches) == 1) {
return (ListItem(fullmatches, 0));
}
else if (ListCount(fullmatches) == 0 && ListCount(partialmatches) == 1) {
return (ListItem(partialmatches, 0));
}
else if (ListCount(fullmatches) + ListCount(partialmatches) == 0) {
return (null);
}
else {
var menu = NewStringDictionary();
GenerateMenuChoices (menu, fullmatches);
GenerateMenuChoices (menu, partialmatches);
if (LengthOf(variable) > 0) {
set(e_game.pov, "currentcommandpendingvariable", variable);
ShowMenu (overloadedFunctions.DynamicTemplate("DisambiguateMenu", value), menu, true, function (result) { var varname = e_game.pov.currentcommandpendingvariable;
set(e_game.pov, "currentcommandpendingvariable", null);
if (result != null) {
AddToResolvedNames (varname, GetObject(result));
} });
}
else {
set(e_game.pov, "currentcommandmultiobjectpending", true);
ShowMenu (overloadedFunctions.DynamicTemplate("DisambiguateMenu", value), menu, true, function (result) { if (result != null) {
listadd (e_game.pov.currentcommandpendingobjectlist, GetObject(result));
ResolveNextNameListItem();
} });
}
return (null);
}
}
function ResolveNameList(value, scope, objtype)
{
set(e_game.pov, "currentcommandpendingobjectlist", NewObjectList());
set(e_game.pov, "currentcommandpendingobjectlistunresolved", NewStringList());
set(e_game.pov, "currentcommandpendingobjectscope", scope);
set(e_game.pov, "currentcommandpendingobjecttype", objtype);
var inputlist = Split(value, ",");
var inputlist_isarray = (Object.prototype.toString.call(inputlist) === '[object Array]');
for (var iterator_inputbase in inputlist) {
var inputbase = inputlist_isarray ? inputlist[iterator_inputbase] : iterator_inputbase;
if (inputlist_isarray || iterator_inputbase!="__dummyKey") { var inputlist2 = Split(inputbase, " " + Template("And") + " ");
var inputlist2_isarray = (Object.prototype.toString.call(inputlist2) === '[object Array]');
for (var iterator_input in inputlist2) {
var input = inputlist2_isarray ? inputlist2[iterator_input] : iterator_input;
if (inputlist2_isarray || iterator_input!="__dummyKey") { listadd (e_game.pov.currentcommandpendingobjectlistunresolved, input); }
} }
}
ResolveNextNameListItem();
}
function ResolveNextNameListItem()
{
var resolvedall = false;
if (overloadedFunctions.TypeOf(e_game.pov, "currentcommandpendingobjectlistunresolved") == "stringlist") {
var queuelength = ListCount(e_game.pov.currentcommandpendingobjectlistunresolved);
if (queuelength > 0) {
var thisitem = Trim(StringListItem(e_game.pov.currentcommandpendingobjectlistunresolved, 0));
if (queuelength == 1) {
set(e_game.pov, "currentcommandpendingobjectlistunresolved", null);
}
else {
var newqueue = NewStringList();
for (var i = 1; i <= queuelength - 1; i++) {
listadd (newqueue, StringListItem(e_game.pov.currentcommandpendingobjectlistunresolved, i));
}
set(e_game.pov, "currentcommandpendingobjectlistunresolved", newqueue);
}
ResolveNameListItem (Trim(thisitem));
}
else {
var resolvedall = true;
}
}
else {
var resolvedall = true;
}
if (resolvedall) {
ResolveNameListItemFinished (e_game.pov.currentcommandpendingobjectlist);
}
}
function ResolveNameListItem(value)
{
if (ListContains(e_game.allobjects, value)) {
if (!(DictionaryContains(e_game.pov.currentcommandresolvedelements, "multiple"))) {
dictionaryadd (e_game.pov.currentcommandresolvedelements, "multiple", true);
}
ResolveNameListItemFinished (e_game.pov.currentcommandpendingobjectscope);
}
else {
var object = ResolveName("", value, e_game.pov.currentcommandpendingobjecttype);
if (object != null) {
if (!(ListContains(e_game.pov.currentcommandpendingobjectlist, object))) {
listadd (e_game.pov.currentcommandpendingobjectlist, object);
}
ResolveNextNameListItem();
}
}
}
function ResolveNameListItemFinished(result)
{
if (ListCount(result) > 1) {
if (!(DictionaryContains(e_game.pov.currentcommandresolvedelements, "multiple"))) {
dictionaryadd (e_game.pov.currentcommandresolvedelements, "multiple", true);
}
}
AddToResolvedNames (e_game.pov.currentcommandpendingvariable, result);
}
function HandleNextCommandQueueItem()
{
if (overloadedFunctions.TypeOf(e_game.pov, "commandqueue") == "stringlist") {
var queuelength = ListCount(e_game.pov.commandqueue);
if (queuelength > 0) {
var thiscommand = Trim(StringListItem(e_game.pov.commandqueue, 0));
if (queuelength == 1) {
set(e_game.pov, "commandqueue", null);
}
else {
var newqueue = NewStringList();
for (var i = 1; i <= queuelength - 1; i++) {
listadd (newqueue, StringListItem(e_game.pov.commandqueue, i));
}
set(e_game.pov, "commandqueue", newqueue);
}
if (LengthOf(thiscommand) > 0) {
HandleSingleCommand (thiscommand);
}
else {
HandleNextCommandQueueItem();
}
}
}
}
function HandleSingleCommand(command)
{
var candidates = NewObjectList();
var list_cmd = ScopeCommands();
var list_cmd_isarray = (Object.prototype.toString.call(list_cmd) === '[object Array]');
for (var iterator_cmd in list_cmd) {
var cmd = list_cmd_isarray ? list_cmd[iterator_cmd] : iterator_cmd;
if (list_cmd_isarray || iterator_cmd!="__dummyKey") { if (IsRegexMatch(cmd.pattern, command, cmd.name)) {
listadd (candidates, cmd);
} }
}
var maxstrength = -1;
var thiscommand = null;
var candidates_isarray = (Object.prototype.toString.call(candidates) === '[object Array]');
for (var iterator_candidate in candidates) {
var candidate = candidates_isarray ? candidates[iterator_candidate] : iterator_candidate;
if (candidates_isarray || iterator_candidate!="__dummyKey") { var strength = GetMatchStrength(candidate.pattern, command, candidate.name);
if (strength >= maxstrength) {
var skip = false;
if (thiscommand != null) {
if (thiscommand.parent != null && candidate.parent == null) {
var skip = true;
}
}
if (!(skip)) {
var thiscommand = candidate;
var maxstrength = strength;
}
} }
}
if (thiscommand == null) {
if (HasScript(e_game, "unresolvedcommandhandler")) {
var params = NewDictionary();
dictionaryadd (params, "command", command);
runscriptattribute3 (e_game, "unresolvedcommandhandler", params);
}
else {
OutputText (Template("UnrecognisedCommand"));
}
HandleNextCommandQueueItem();
}
else {
var varlist = Populate(thiscommand.pattern, command, thiscommand.name);
HandleSingleCommandPattern (command, thiscommand, varlist);
}
}
function FinishTurn()
{
RunTurnScripts();
UpdateStatusAttributes();
CheckDarkness();
UpdateObjectLinks();
}
function HandleSingleCommandPattern(command, thiscommand, varlist)
{
set(e_game.pov, "currentcommand", command);
set(e_game.pov, "currentcommandpattern", thiscommand);
set(e_game.pov, "currentcommandvarlist", varlist);
set(e_game.pov, "currentcommandvarlistqueue", NewStringList());
var varlist_isarray = (Object.prototype.toString.call(varlist) === '[object Array]');
for (var iterator_key in varlist) {
var key = varlist_isarray ? varlist[iterator_key] : iterator_key;
if (varlist_isarray || iterator_key!="__dummyKey") { listadd (e_game.pov.currentcommandvarlistqueue, key); }
}
set(e_game.pov, "currentcommandresolvedelements", NewDictionary());
set(e_game.pov, "currentcommandresolvedobjects", NewObjectList());
set(e_game.pov, "currentcommandunresolvedobject", null);
set(e_game.pov, "currentcommandpendingvariable", null);
ResolveNextName();
}
function ResolveNextName()
{
var resolvedall = false;
var queuetype = overloadedFunctions.TypeOf(e_game.pov, "currentcommandvarlistqueue");
if (queuetype == "stringlist") {
var queuelength = ListCount(e_game.pov.currentcommandvarlistqueue);
if (queuelength > 0) {
var variable_var = StringListItem(e_game.pov.currentcommandvarlistqueue, 0);
if (queuelength == 1) {
set(e_game.pov, "currentcommandvarlistqueue", null);
}
else {
var newqueue = NewStringList();
for (var i = 1; i <= queuelength - 1; i++) {
listadd (newqueue, StringListItem(e_game.pov.currentcommandvarlistqueue, i));
}
set(e_game.pov, "currentcommandvarlistqueue", newqueue);
}
var value = StringDictionaryItem(e_game.pov.currentcommandvarlist, variable_var);
if (value != "") {
var result = null;
var resolvinglist = false;
if (StartsWith(variable_var, "object")) {
if (HasDelegateImplementation(e_game.pov.currentcommandpattern, "multiple")) {
set(e_game.pov, "currentcommandpendingobjectlist", NewObjectList());
set(e_game.pov, "currentcommandpendingvariable", variable_var);
ResolveNameList (value, RunDelegateFunction(e_game.pov.currentcommandpattern, "multiple"), "object");
var resolvinglist = true;
}
else {
var result = ResolveName(variable_var, value, "object");
}
}
else if (StartsWith(variable_var, "exit")) {
var result = ResolveName(variable_var, value, "exit");
}
else if (StartsWith(variable_var, "text")) {
var result = StringDictionaryItem(e_game.pov.currentcommandvarlist, variable_var);
}
else {
error ("Unhandled command variable '" + variable_var + "' - command variable names must begin with 'object', 'exit' or 'text'");
}
if (result == null) {
if ((!resolvinglist) && LengthOf(GetString(e_game.pov, "currentcommandpendingvariable")) == 0) {
UnresolvedCommand (value, variable_var);
}
}
else {
AddToResolvedNames (variable_var, result);
}
}
else {
ResolveNextName();
}
}
else {
var resolvedall = true;
}
}
else if (queuetype == "null") {
var resolvedall = true;
}
else {
error ("Invalid queue type");
}
if (resolvedall) {
set(e_game, "lastobjects", e_game.pov.currentcommandresolvedobjects);
if (!(DictionaryContains(e_game.pov.currentcommandresolvedelements, "multiple"))) {
dictionaryadd (e_game.pov.currentcommandresolvedelements, "multiple", false);
}
if (!(GetBoolean(e_game.pov.currentcommandpattern, "isundo"))) {
if (LengthOf(e_game.pov.currentcommand) > 0) {
starttransaction (e_game.pov.currentcommand);
}
}
if (!(GetBoolean(e_game.pov.currentcommandpattern, "isoops"))) {
set(e_game, "unresolvedcommand", null);
set(e_game, "unresolvedcommandvarlist", null);
set(e_game, "unresolvedcommandkey", null);
}
if (HasScript(e_game.pov.currentcommandpattern, "script")) {
runscriptattribute3 (e_game.pov.currentcommandpattern, "script", e_game.pov.currentcommandresolvedelements);
}
HandleNextCommandQueueItem();
}
}
function AddToResolvedNames(variable_var, result)
{
if (overloadedFunctions.TypeOf(result) == "object") {
if (result.type == "object") {
listadd (e_game.pov.currentcommandresolvedobjects, result);
}
}
else if (overloadedFunctions.TypeOf(result) == "objectlist") {
var result_isarray = (Object.prototype.toString.call(result) === '[object Array]');
for (var iterator_obj in result) {
var obj = result_isarray ? result[iterator_obj] : iterator_obj;
if (result_isarray || iterator_obj!="__dummyKey") { if (obj.type == "object") {
listadd (e_game.pov.currentcommandresolvedobjects, obj);
} }
}
}
dictionaryadd (e_game.pov.currentcommandresolvedelements, variable_var, result);
ResolveNextName();
}
function UnresolvedCommand(objectname, varname)
{
var unresolvedobject = objectname;
var unresolvedkey = varname;
if (HasString(e_game.pov.currentcommandpattern, "unresolved")) {
if (ListCount(e_game.pov.currentcommandvarlist) > 1) {
OutputText (e_game.pov.currentcommandpattern.unresolved + " (" + unresolvedobject + ")");
}
else {
OutputText (e_game.pov.currentcommandpattern.unresolved);
}
}
else {
if (ListCount(e_game.pov.currentcommandvarlist) > 1) {
OutputText (Template("UnresolvedObject") + " (" + unresolvedobject + ")");
}
else {
OutputText (Template("UnresolvedObject"));
}
}
set(e_game, "unresolvedcommand", e_game.pov.currentcommandpattern);
set(e_game, "unresolvedcommandvarlist", e_game.pov.currentcommandvarlist);
set(e_game, "unresolvedcommandkey", unresolvedkey);
}
function HandleMultiVerb(object, property, object2, variable_default)
{
var dictionary = GetAttribute(object, property);
if (DictionaryContains(dictionary, object2.name)) {
var parameters = NewDictionary();
dictionaryadd (parameters, "this", object);
dictionaryadd (parameters, "object", object2);
invoke (ScriptDictionaryItem(dictionary, object2.name), parameters);
}
else {
var parameters = NewDictionary();
dictionaryadd (parameters, "this", object);
dictionaryadd (parameters, "object", object2);
if (DictionaryContains(dictionary, "default")) {
invoke (ScriptDictionaryItem(dictionary, "default"), parameters);
}
else {
OutputText (variable_default);
}
}
}
function GetPlacesObjectsList()
{
return (ListExclude(ScopeVisibleNotHeldNotScenery(), e_game.pov));
}
function GetExitsList()
{
return (RemoveLookOnlyExits(RemoveSceneryObjects(ScopeExits())));
}
function ScopeInventory()
{
var result = NewObjectList();
var list_obj = GetAllChildObjects(e_game.pov);
var list_obj_isarray = (Object.prototype.toString.call(list_obj) === '[object Array]');
for (var iterator_obj in list_obj) {
var obj = list_obj_isarray ? list_obj[iterator_obj] : iterator_obj;
if (list_obj_isarray || iterator_obj!="__dummyKey") { if (ContainsVisible(e_game.pov, obj)) {
listadd (result, obj);
} }
}
return (result);
}
function ScopeReachableInventory()
{
var result = NewObjectList();
var list_obj = GetAllChildObjects(e_game.pov);
var list_obj_isarray = (Object.prototype.toString.call(list_obj) === '[object Array]');
for (var iterator_obj in list_obj) {
var obj = list_obj_isarray ? list_obj[iterator_obj] : iterator_obj;
if (list_obj_isarray || iterator_obj!="__dummyKey") { if (ContainsReachable(e_game.pov, obj)) {
listadd (result, obj);
} }
}
return (result);
}
function ScopeVisibleNotHeld()
{
return (ScopeVisibleNotHeldForRoom(e_game.pov.parent));
}
function ScopeVisibleNotHeldForRoom(room)
{
if (room == e_game.pov.parent) {
var result = ListCombine(ScopeReachableNotHeldForRoom(room), ScopeVisibleNotReachableForRoom(room));
listadd (result, e_game.pov);
return (result);
}
else {
return (ListCombine(ScopeReachableNotHeldForRoom(room), ScopeVisibleNotReachableForRoom(room)));
}
}
function ScopeVisibleNotHeldNotScenery()
{
return (ScopeVisibleNotHeldNotSceneryForRoom(e_game.pov.parent));
}
function ScopeVisibleNotHeldNotSceneryForRoom(room)
{
return (RemoveSceneryObjects(ScopeVisibleNotHeldForRoom(room)));
}
function ScopeReachable()
{
return (ScopeReachableForRoom(e_game.pov.parent));
}
function ScopeReachableForRoom(room)
{
if (room == e_game.pov.parent) {
var result = ListCombine(ScopeReachableNotHeldForRoom(room), ScopeReachableInventory());
listadd (result, e_game.pov);
}
else {
var result = ScopeReachableNotHeldForRoom(room);
}
return (result);
}
function ScopeVisibleNotReachable()
{
return (ScopeVisibleNotReachableForRoom(e_game.pov.parent));
}
function ScopeVisibleNotReachableForRoom(room)
{
var result = NewObjectList();
var exclude = ScopeReachableForRoom(room);
listadd (exclude, e_game.pov);
var newParent = GetNonTransparentParent(room);
var list_obj = GetAllChildObjects(newParent);
var list_obj_isarray = (Object.prototype.toString.call(list_obj) === '[object Array]');
for (var iterator_obj in list_obj) {
var obj = list_obj_isarray ? list_obj[iterator_obj] : iterator_obj;
if (list_obj_isarray || iterator_obj!="__dummyKey") { if (ContainsVisible(newParent, obj) && !(ListContains(exclude, obj))) {
listadd (result, obj);
} }
}
return (result);
}
function GetNonTransparentParent(room)
{
if (GetBoolean(room, "transparent")) {
if (room.parent == null) {
return (room);
}
else {
return (GetNonTransparentParent(room.parent));
}
}
else {
return (room);
}
}
function ScopeReachableNotHeld()
{
return (ScopeReachableNotHeldForRoom(e_game.pov.parent));
}
function ScopeVisibleLightsource(lightstrength)
{
var result = ScopeVisible();
var lightobjects = NewObjectList();
var result_isarray = (Object.prototype.toString.call(result) === '[object Array]');
for (var iterator_obj in result) {
var obj = result_isarray ? result[iterator_obj] : iterator_obj;
if (result_isarray || iterator_obj!="__dummyKey") { if (GetBoolean(obj, "lightsource") && GetString(obj, "lightstrength") == lightstrength) {
listadd (lightobjects, obj);
} }
}
var exits = ScopeExits();
var exits_isarray = (Object.prototype.toString.call(exits) === '[object Array]');
for (var iterator_obj in exits) {
var obj = exits_isarray ? exits[iterator_obj] : iterator_obj;
if (exits_isarray || iterator_obj!="__dummyKey") { if (GetBoolean(obj, "lightsource") && GetString(obj, "lightstrength") == lightstrength) {
listadd (lightobjects, obj);
} }
}
return (lightobjects);
}
function ScopeReachableNotHeldForRoom(room)
{
var result = NewObjectList();
var list_obj = GetAllChildObjects(room);
var list_obj_isarray = (Object.prototype.toString.call(list_obj) === '[object Array]');
for (var iterator_obj in list_obj) {
var obj = list_obj_isarray ? list_obj[iterator_obj] : iterator_obj;
if (list_obj_isarray || iterator_obj!="__dummyKey") { if (ContainsReachable(room, obj) && obj != e_game.pov && !(Contains(e_game.pov, obj))) {
listadd (result, obj);
} }
}
return (result);
}
function ScopeVisible()
{
return (ScopeVisibleForRoom(e_game.pov.parent));
}
function ScopeVisibleForRoom(room)
{
if (room == e_game.pov.parent) {
return (ListCombine(ScopeVisibleNotHeldForRoom(room), ScopeInventory()));
}
else {
return (ScopeVisibleNotHeldForRoom(room));
}
}
function ScopeExits()
{
return (ScopeExitsForRoom(e_game.pov.parent));
}
function ScopeExitsForRoom(room)
{
var result = NewObjectList();
var list_exit = AllExits();
var list_exit_isarray = (Object.prototype.toString.call(list_exit) === '[object Array]');
for (var iterator_exit in list_exit) {
var exit = list_exit_isarray ? list_exit[iterator_exit] : iterator_exit;
if (list_exit_isarray || iterator_exit!="__dummyKey") { if (exit.parent == room) {
if (exit.visible) {
if (GetBoolean(room, "darklevel")) {
if (GetBoolean(exit, "lightsource")) {
listadd (result, exit);
}
}
else {
listadd (result, exit);
}
}
} }
}
return (result);
}
function ScopeCommands()
{
var result = NewObjectList();
var list_command = AllCommands();
var list_command_isarray = (Object.prototype.toString.call(list_command) === '[object Array]');
for (var iterator_command in list_command) {
var command = list_command_isarray ? list_command[iterator_command] : iterator_command;
if (list_command_isarray || iterator_command!="__dummyKey") { if (command.parent == null || command.parent == e_game.pov.parent) {
listadd (result, command);
} }
}
return (result);
}
function GetBlockingObject(obj)
{
var result = null;
var list_obj = ListParents(obj);
var list_obj_isarray = (Object.prototype.toString.call(list_obj) === '[object Array]');
for (var iterator_obj in list_obj) {
var obj = list_obj_isarray ? list_obj[iterator_obj] : iterator_obj;
if (list_obj_isarray || iterator_obj!="__dummyKey") { if (result == null && !(CanReachThrough(obj))) {
var result = obj;
} }
}
return (result);
}
function ListParents(obj)
{
var result = NewObjectList();
if (obj.parent != null) {
var parent_as_list = NewObjectList();
listadd (parent_as_list, obj.parent);
var result = ListCombine(parent_as_list, ListParents(obj.parent));
}
return (result);
}
function ContainsVisible(parentObj, searchObj)
{
return (ContainsAccessible(parentObj, searchObj, false));
}
function ContainsReachable(parentObj, searchObj)
{
return (ContainsAccessible(parentObj, searchObj, true));
}
function ContainsAccessible(parentObj, searchObj, onlyReachable)
{
if (!(HasObject(searchObj, "parent"))) {
return (false);
}
else if (!(searchObj.visible)) {
return (false);
}
else if (GetBoolean(parentObj, "darklevel") && !(GetBoolean(searchObj, "lightsource"))) {
return (false);
}
else {
if (searchObj.parent == null) {
return (false);
}
else if (searchObj.parent == parentObj) {
return (true);
}
else {
if (onlyReachable) {
var canAdd = CanReachThrough(searchObj.parent);
}
else {
var canAdd = CanSeeThrough(searchObj.parent);
}
if (canAdd) {
return (ContainsAccessible(parentObj, searchObj.parent, onlyReachable));
}
else {
return (false);
}
}
}
}
function GetVolume(obj, allinclusive)
{
var result = 0;
var list_object = GetAllChildObjects ( obj );
var list_object_isarray = (Object.prototype.toString.call(list_object) === '[object Array]');
for (var iterator_object in list_object) {
var object = list_object_isarray ? list_object[iterator_object] : iterator_object;
if (list_object_isarray || iterator_object!="__dummyKey") { if (HasInt(object, "volume")) {
var result = result + object.volume;
} }
}
if (allinclusive && HasInt(obj, "volume")) {
var result = result + obj.volume;
}
return (result);
}
function CanSeeThrough(obj)
{
return ((GetBoolean(obj, "transparent") || CanReachThrough(obj)) && !(GetBoolean(obj, "hidechildren")));
}
function CanReachThrough(obj)
{
return (GetBoolean(obj, "isopen") && !(GetBoolean(obj, "hidechildren")));
}
function Got(obj)
{
return (ListContains(ScopeInventory(), obj));
}
function UpdateObjectLinks()
{
if (e_game.enablehyperlinks) {
var data = NewStringDictionary();
var list_object = ScopeVisible();
var list_object_isarray = (Object.prototype.toString.call(list_object) === '[object Array]');
for (var iterator_object in list_object) {
var object = list_object_isarray ? list_object[iterator_object] : iterator_object;
if (list_object_isarray || iterator_object!="__dummyKey") { dictionaryadd (data, object.name, Join(GetDisplayVerbs(object), "/")); }
}
updateObjectLinks (data)
var exits = NewStringList();
var list_exit = ScopeExits();
var list_exit_isarray = (Object.prototype.toString.call(list_exit) === '[object Array]');
for (var iterator_exit in list_exit) {
var exit = list_exit_isarray ? list_exit[iterator_exit] : iterator_exit;
if (list_exit_isarray || iterator_exit!="__dummyKey") { listadd (exits, exit.name); }
}
updateExitLinks (exits)
var commands = NewStringList();
var list_cmd = ScopeCommands();
var list_cmd_isarray = (Object.prototype.toString.call(list_cmd) === '[object Array]');
for (var iterator_cmd in list_cmd) {
var cmd = list_cmd_isarray ? list_cmd[iterator_cmd] : iterator_cmd;
if (list_cmd_isarray || iterator_cmd!="__dummyKey") { listadd (commands, cmd.name); }
}
updateCommandLinks (commands)
}
}
function ShowRoomDescription()
{
var isDark = CheckDarkness();
if (isDark) {
var descriptionfield = "darkroomdescription";
}
else {
var descriptionfield = "description";
}
if (e_game.autodescription) {
var desc = "";
for (var i = 1; i <= 4; i++) {
if (i == e_game.autodescription_youarein) {
if (e_game.autodescription_youarein_useprefix) {
var youarein = e_game.pov.parent.descprefix;
var desc = AddDescriptionLine (desc, youarein + " " + GetDisplayName(e_game.pov.parent) + ".");
}
else {
var desc = AddDescriptionLine (desc, "<b>" + CapFirst(GetDisplayName(e_game.pov.parent)) + "</b>");
}
if (e_game.autodescription_youarein_newline) {
OutputText (desc + "<br/>");
var desc = "";
}
}
if (i == e_game.autodescription_youcansee) {
var objects = FormatObjectList(e_game.pov.parent.objectslistprefix, GetNonTransparentParent(e_game.pov.parent), Template("And"), ".");
var desc = AddDescriptionLine(desc, objects);
if (e_game.autodescription_youcansee_newline) {
OutputText (desc + "<br/>");
var desc = "";
}
}
if (i == e_game.autodescription_youcango) {
var exits = FormatExitList(e_game.pov.parent.exitslistprefix, GetExitsList(), Template("Or"), ".");
var desc = AddDescriptionLine(desc, exits);
if (e_game.autodescription_youcango_newline) {
OutputText (desc + "<br/>");
var desc = "";
}
}
if (i == e_game.autodescription_description) {
if (HasScript(e_game.pov.parent, descriptionfield)) {
if (LengthOf(desc) > 0) {
OutputText (desc);
var desc = "";
}
runscriptattribute2 (e_game.pov.parent, descriptionfield);
if (e_game.autodescription_description_newline) {
OutputText ("");
}
}
else {
var desc = AddDescriptionLine(desc, GetRoomDescription());
if (e_game.autodescription_description_newline) {
OutputText (desc + "<br/>");
var desc = "";
}
}
}
}
if (LengthOf(desc) > 0) {
OutputText (desc);
}
}
else {
if (HasScript(e_game.pov.parent, descriptionfield)) {
runscriptattribute2 (e_game.pov.parent, descriptionfield);
}
else {
var fulldesc = GetRoomDescription();
if (LengthOf(fulldesc) > 0) {
OutputText (fulldesc);
}
}
}
}
function AddDescriptionLine(desc, line)
{
if (LengthOf(line) > 0) {
if (LengthOf(desc) > 0) {
OutputText (desc);
var desc = "";
}
var desc = desc + line;
}
return (desc);
}
function GetRoomDescription()
{
var fulldesc = "";
if (CheckDarkness()) {
if (HasString(e_game.pov.parent, "darkroomdescription")) {
if (LengthOf(e_game.pov.parent.darkroomdescription) > 0) {
var fulldesc = e_game.pov.parent.darkroomdescription;
}
}
}
else {
if (HasString(e_game.pov.parent, "description")) {
if (LengthOf(e_game.pov.parent.description) > 0) {
var fulldesc = e_game.pov.parent.description;
}
}
}
if (e_game.appendobjectdescription) {
var list_val = ScopeVisibleNotHeld();
var list_val_isarray = (Object.prototype.toString.call(list_val) === '[object Array]');
for (var iterator_val in list_val) {
var val = list_val_isarray ? list_val[iterator_val] : iterator_val;
if (list_val_isarray || iterator_val!="__dummyKey") { if (HasString(val, "inroomdescription")) {
if (LengthOf(val.inroomdescription) > 0 && val != e_game.pov) {
var fulldesc = fulldesc + " " + val.inroomdescription;
}
} }
}
}
return (Trim(fulldesc));
}
function OnEnterRoom(oldRoom)
{
set(e_game, "displayroomdescriptiononstart", false);
if (IsDefined("oldRoom")) {
if (oldRoom != null) {
if (HasScript(oldRoom, "onexit")) {
runscriptattribute2 (oldRoom, "onexit");
}
}
}
on_ready (function() { if ((!GetBoolean(e_game.pov.parent, "visited")) && HasScript(e_game.pov.parent, "beforefirstenter")) {
runscriptattribute2 (e_game.pov.parent, "beforefirstenter");
}
on_ready (function() { if (HasScript(e_game.pov.parent, "beforeenter")) {
runscriptattribute2 (e_game.pov.parent, "beforeenter");
}
on_ready (function() { if (e_game.gridmap) {
Grid_CalculateMapCoordinates (e_game.pov.parent, e_game.pov);
Grid_DrawPlayerInRoom (e_game.pov.parent);
}
if (IsDefined("oldRoom")) {
if (oldRoom != null && e_game.changeroom_newline && !(e_game.command_newline)) {
OutputText ("");
}
}
request ("UpdateLocation", CapFirst(GetDisplayName(e_game.pov.parent)));
var roomFrameExists = false;
if (HasString(e_game.pov.parent, "picture")) {
if (LengthOf(e_game.pov.parent.picture) > 0) {
var roomFrameExists = true;
SetFramePicture (e_game.pov.parent.picture);
}
}
if (e_game.clearframe && !(roomFrameExists)) {
ClearFramePicture();
}
if (e_game.showdescriptiononenter) {
ShowRoomDescription();
}
if (HasScript( e_game, "roomenter")) {
runscriptattribute2 (e_game, "roomenter");
}
on_ready (function() { if ((!GetBoolean(e_game.pov.parent, "visited")) && HasScript(e_game.pov.parent, "firstenter")) {
runscriptattribute2 (e_game.pov.parent, "firstenter");
}
on_ready (function() { if (HasScript(e_game.pov.parent, "enter")) {
runscriptattribute2 (e_game.pov.parent, "enter");
} });
set (e_game.pov.parent, "visited", true); }); }); }); });
}
function FormatObjectList(preList, parent, preFinal, postList)
{
var result = "";
var count = 0;
var list = RemoveSceneryObjects(GetDirectChildren(parent));
if (CheckDarkness()) {
var list = RemoveDarkObjects(list);
}
var listLength = ListCount(list);
var list_isarray = (Object.prototype.toString.call(list) === '[object Array]');
for (var iterator_item in list) {
var item = list_isarray ? list[iterator_item] : iterator_item;
if (list_isarray || iterator_item!="__dummyKey") { if (LengthOf(result) == 0) {
var result = preList + " ";
}
var result = result + GetDisplayNameLink(item, "object");
if (CanSeeThrough(item)) {
var result = result + FormatObjectList(" (" + item.contentsprefix, item, preFinal, ")");
}
var count = count + 1;
if (count == listLength - 1) {
var result = result + " " + preFinal + " ";
}
else if (count < listLength) {
var result = result + ", ";
}
else {
var result = result + postList;
} }
}
return (result);
}
function RemoveSceneryObjects(list)
{
var result = NewObjectList();
var list_isarray = (Object.prototype.toString.call(list) === '[object Array]');
for (var iterator_obj in list) {
var obj = list_isarray ? list[iterator_obj] : iterator_obj;
if (list_isarray || iterator_obj!="__dummyKey") { if (!(obj.scenery )&& obj != e_game.pov && obj.visible) {
listadd (result, obj);
} }
}
return (result);
}
function RemoveLookOnlyExits(list)
{
var result = NewObjectList();
var list_isarray = (Object.prototype.toString.call(list) === '[object Array]');
for (var iterator_obj in list) {
var obj = list_isarray ? list[iterator_obj] : iterator_obj;
if (list_isarray || iterator_obj!="__dummyKey") { if (!(obj.lookonly)) {
listadd (result, obj);
} }
}
return (result);
}
function RemoveDarkObjects(list)
{
var result = NewObjectList();
var list_isarray = (Object.prototype.toString.call(list) === '[object Array]');
for (var iterator_obj in list) {
var obj = list_isarray ? list[iterator_obj] : iterator_obj;
if (list_isarray || iterator_obj!="__dummyKey") { if (GetBoolean(obj, "lightsource") || obj.parent == e_game.pov) {
listadd (result, obj);
} }
}
return (result);
}
function FormatExitList(preList, list, preFinal, postList)
{
var result = "";
var listLength = ListCount(list);
if (listLength > 0) {
var count = 0;
var result = preList + " ";
var list_isarray = (Object.prototype.toString.call(list) === '[object Array]');
for (var iterator_item in list) {
var item = list_isarray ? list[iterator_item] : iterator_item;
if (list_isarray || iterator_item!="__dummyKey") { var result = result + GetDisplayNameLink(item, "exit");
var count = count + 1;
if (count == listLength - 1) {
var result = result + " " + preFinal + " ";
}
else if (count < listLength) {
var result = result + ", ";
} }
}
var result = result + postList;
}
return (result);
}
function GetDisplayAlias(obj)
{
if (HasString(obj, "alias")) {
var result = obj.alias;
}
else {
var result = obj.name;
}
return (result);
}
function GetDisplayName(obj)
{
return (GetDisplayNameLink(obj, ""));
}
//Override function GetDisplayNameLink(obj, type)

function ObjectLink(obj)
{
return ("{object:" + obj.name + "}");
}
function GetListDisplayAlias(obj)
{
if (HasString(obj, "listalias")) {
var result = obj.listalias;
}
else {
var result = GetDisplayAlias(obj);
}
return (result);
}
function CheckDarkness()
{
var roomCheckDarkness = true;
if (GetBoolean(e_game.pov.parent, "dark")) {
if (ListCount(ScopeVisibleLightsource("strong")) > 0) {
var roomCheckDarkness = false;
}
}
else {
var roomCheckDarkness = false;
}
set(e_game.pov.parent, "darklevel", roomCheckDarkness);
return (roomCheckDarkness);
}
function EnableTimer(timer)
{
set(timer, "enabled", true);
set(timer, "trigger", e_game.timeelapsed + timer.interval);
}
function DisableTimer(timer)
{
set(timer, "enabled", false);
}
function SetTimerInterval(timer, interval)
{
set(timer, "interval", interval);
}
function SetTimerScript(timer, script)
{
set(timer, "script", script);
}
function SetTimeout(interval, script)
{
SetTimeoutID (interval, "", script);
}
function SetTimeoutID(interval, name, script)
{
var timername = "";
if (name == "") {
var timername = GetUniqueElementName("timeout");
}
else {
if (GetTimer(name) == null && GetObject(name) == null) {
var timername = name;
}
else {
error ("Error creating timer: There is already an existing object named " + name);
}
}
if (!(timername == "")) {
createtimer (timername);
var timer = GetTimer(timername);
SetTimerInterval (timer, interval);
set(timer, "timeoutscript", script);
SetTimerScript (timer, function (result) { set(this, "enabled", false);
invoke (this.timeoutscript);
destroy (this.name); });
EnableTimer (timer);
}
}
function Pause(interval)
{
request ("Pause", ToString(interval * 1000));
}
function RunTurnScripts()
{
if (IsGameRunning()) {
if (e_game.menucallback == null) {
var list_turnscript = AllTurnScripts();
var list_turnscript_isarray = (Object.prototype.toString.call(list_turnscript) === '[object Array]');
for (var iterator_turnscript in list_turnscript) {
var turnscript = list_turnscript_isarray ? list_turnscript[iterator_turnscript] : iterator_turnscript;
if (list_turnscript_isarray || iterator_turnscript!="__dummyKey") { if (GetBoolean(turnscript, "enabled")) {
var inscope = false;
if (turnscript.parent == e_game || turnscript.parent == null) {
var inscope = true;
}
else {
if (Contains(turnscript.parent, e_game.pov)) {
var inscope = true;
}
}
if (inscope) {
runscriptattribute2 (turnscript, "script");
}
} }
}
}
}
}
function EnableTurnScript(turnscript)
{
set(turnscript, "enabled", true);
}
function DisableTurnScript(turnscript)
{
set(turnscript, "enabled", false);
}
function SetTurnScript(turnscript, script)
{
set(turnscript, "script", script);
}
function SetTurnTimeout(turncount, script)
{
SetTurnTimeoutID (turncount, "", script);
}
function SetTurnTimeoutID(turncount, name, script)
{
var turnscriptname = "";
if (name == "") {
var turnscriptname = GetUniqueElementName("turnscript");
}
else {
if (GetObject(name) == null && GetTimer(name) == null) {
var turnscriptname = name;
}
else {
error ("Error creating turnscript: There is already an existing object named " + name);
}
}
if (!(turnscriptname=="")) {
createturnscript (turnscriptname);
var turnscript = GetObject(turnscriptname);
set(turnscript, "turncount", 0);
set(turnscript, "triggerturncount", turncount);
set(turnscript, "timeoutscript", script);
SetTurnScript (turnscript, function (result) { set(this, "turncount", this.turncount + 1);
if (this.turncount >= this.triggerturncount) {
set(this, "enabled", false);
invoke (this.timeoutscript);
destroy (this.name);
} });
EnableTurnScript (turnscript);
}
}
function UpdateStatusAttributes()
{
var status = AddStatusAttributesForElement("", e_game, e_game.statusattributes);
var status = AddStatusAttributesForElement(status, e_game.pov, e_game.povstatusattributes);
var status = AddStatusAttributesForElement(status, e_game.pov, e_game.pov.statusattributes);
request ("SetStatus", status);
}
function AddStatusAttributesForElement(status, element, statusAttributes)
{
if (statusAttributes != null) {
var statusAttributes_isarray = (Object.prototype.toString.call(statusAttributes) === '[object Array]');
for (var iterator_attr in statusAttributes) {
var attr = statusAttributes_isarray ? statusAttributes[iterator_attr] : iterator_attr;
if (statusAttributes_isarray || iterator_attr!="__dummyKey") { if (LengthOf(status) > 0) {
var status = status + "\n";
}
var status = status + FormatStatusAttribute(attr, GetAttribute(element, attr), StringDictionaryItem(statusAttributes, attr)); }
}
}
return (status);
}
function FormatStatusAttribute(attr, value, format)
{
if (LengthOf(format) == 0) {
return (CapFirst(attr) + ": " + value);
}
else {
if (overloadedFunctions.TypeOf(value) == "int" || overloadedFunctions.TypeOf(value) == "double") {
var value = ToString(value);
}
if (overloadedFunctions.TypeOf(value) == "null") {
var value = "";
}
return (Replace(format, "!", value));
}
}
function InitStatusAttributes()
{
if (e_game.showscore) {
set(e_game, "score", 0);
if (e_game.statusattributes == null) {
set(e_game, "statusattributes", NewStringDictionary());
}
dictionaryadd (e_game.statusattributes, "score", "Score: !");
}
if (e_game.showhealth) {
if (e_game.povstatusattributes == null) {
set(e_game, "povstatusattributes", NewStringDictionary());
}
dictionaryadd (e_game.povstatusattributes, "health", "Health: !%");
}
}
function IncreaseScore(amount)
{
if (!(HasInt(e_game, "score"))) {
error ("Score is not configured. To enable score, go to 'game' and tick 'Show score' on the Player tab.");
}
set(e_game, "score", e_game.score + amount);
}
function DecreaseScore(amount)
{
if (!(HasInt(e_game, "score"))) {
error ("Score is not configured. To enable score, go to 'game' and tick 'Show score' on the Player tab.");
}
set(e_game, "score", e_game.score - amount);
}
function IncreaseHealth(amount)
{
if (!(HasInt(e_game.pov, "health"))) {
error ("Health is not configured. To enable health, go to 'game' and tick 'Show health' on the Player tab.");
}
set(e_game.pov, "health", e_game.pov.health + amount);
}
function DecreaseHealth(amount)
{
if (!(HasInt(e_game.pov, "health"))) {
error ("Health is not configured. To enable health, go to 'game' and tick 'Show health' on the Player tab.");
}
set(e_game.pov, "health", e_game.pov.health - amount);
}
function OutputText(text)
{
var data = NewDictionary();
dictionaryadd (data, "fulltext", text);
var text = ProcessTextSection(text, data);
OutputTextRaw (text);
}
function OutputTextRaw(text)
{
var format = GetCurrentTextFormat("");
addText ("<span style=\"" + format + "\">" + text + "</span><br/>")
if (GetString(e_game, "commandbarformat") != format) {
ResetCommandBarFormat();
}
request ("Speak", text);
}
function ResetCommandBarFormat()
{
var format = GetCurrentTextFormat("") + ";background:" + e_game.defaultbackground;
set(e_game, "commandbarformat", format);
setCommandBarStyle (format)
}
function OutputTextNoBr(text)
{
var data = NewDictionary();
dictionaryadd (data, "fulltext", text);
var text = ProcessTextSection(text, data);
OutputTextRawNoBr (text);
}
function OutputTextRawNoBr(text)
{
addText ("<span style=\"" + GetCurrentTextFormat("") + "\">" + text + "</span>")
request ("Speak", text);
}
function GetCurrentTextFormat(colour)
{
var style = "";
if (UIOptionUseGameFont()) {
var font = GetCurrentFontFamily();
}
else {
var font = GetUIOption("OverrideFontName");
}
if (LengthOf(font) > 0) {
var style = style + "font-family:" + font + ";";
}
if (LengthOf(colour) == 0) {
if (UIOptionUseGameColours()) {
var colour = e_game.defaultforeground;
}
else {
var colour = GetUIOption("OverrideForeground");
}
}
if (LengthOf(colour) > 0) {
var style = style + "color:" + colour + ";";
}
if (UIOptionUseGameFont()) {
var size = e_game.defaultfontsize;
}
else {
var size = ToDouble(GetUIOption("OverrideFontSize"));
}
if (size > 0) {
var style = style + "font-size:" + ToString(size) + "pt;";
}
return (style);
}
function GetCurrentLinkTextFormat()
{
return (GetCurrentTextFormat(GetLinkTextColour()));
}
function UIOptionUseGameFont()
{
var value = GetUIOption("UseGameFont");
if (value == null || value == "true") {
return (true);
}
else {
return (false);
}
}
function UIOptionUseGameColours()
{
var value = GetUIOption("UseGameColours");
if (value == null || value == "true") {
return (true);
}
else {
return (false);
}
}
function GetLinkTextColour()
{
if (UIOptionUseGameColours()) {
return (e_game.defaultlinkforeground);
}
else {
return (GetUIOption("OverrideLinkForeground"));
}
}
function ProcessTextSection(text, data)
{
var containsUnprocessedSection = false;
var open = Instr(text, "{");
if (open > 0) {
var nestCount = 1;
var searchStart = open + 1;
var finished = false;
while (!(finished)) {
var nextOpen = Instr(searchStart, text, "{");
var nextClose = Instr(searchStart, text, "}");
if (nextClose > 0) {
if (nextOpen > 0 && nextOpen < nextClose) {
var nestCount = nestCount + 1;
var searchStart = nextOpen + 1;
}
else {
var nestCount = nestCount - 1;
var searchStart = nextClose + 1;
if (nestCount == 0) {
var close = nextClose;
var containsUnprocessedSection = true;
var finished = true;
}
}
}
else {
var finished = true;
}
}
}
if (containsUnprocessedSection) {
var section = Mid(text, open + 1, close - open - 1);
var value = ProcessTextCommand(section, data);
var text = Left(text, open - 1) + value + ProcessTextSection(Mid(text, close + 1), data);
}
return (text);
}
function ProcessTextCommand(section, data)
{
if (StartsWith(section, "if ")) {
return (ProcessTextCommand_If(section, data));
}
else if (StartsWith(section, "object:")) {
return (ProcessTextCommand_Object(section, data));
}
else if (StartsWith(section, "command:")) {
return (ProcessTextCommand_Command(Mid(section, 9), data));
}
else if (StartsWith(section, "page:")) {
return (ProcessTextCommand_Command(Mid(section, 6), data));
}
else if (StartsWith(section, "exit:")) {
return (ProcessTextCommand_Exit(section, data));
}
else if (StartsWith(section, "once:")) {
return (ProcessTextCommand_Once(section, data));
}
else if (StartsWith(section, "notfirst:")) {
return (ProcessTextCommand_NotFirst(section, data));
}
else if (StartsWith(section, "random:")) {
return (ProcessTextCommand_Random(section, data));
}
else if (StartsWith(section, "rndalt:")) {
return (ProcessTextCommand_RandomAlias(section, data));
}
else if (StartsWith(section, "img:")) {
return (ProcessTextCommand_Img(section, data));
}
else if (StartsWith(section, "counter:")) {
return (ProcessTextCommand_Counter(Mid(section, 9), data));
}
else if (StartsWith(section, "select:")) {
return (ProcessTextCommand_Select(section, data));
}
else {
var dot = Instr(section, ".");
if (dot == 0) {
return ("{" + ProcessTextSection(section, data) + "}");
}
else {
var objectname = Left(section, dot - 1);
var attributename = Mid(section, dot + 1);
var object = GetObject(objectname);
if (object == null) {
return ("{" + ProcessTextSection(section, data) + "}");
}
else {
if (HasAttribute(object, attributename)) {
var type = overloadedFunctions.TypeOf(object, attributename);
switch (type) {
case "string":
case "int":
case "double":
return (ToString(GetAttribute(object, attributename)));
break;
case "boolean":
var result = GetAttribute(object, attributename);
if (result) {
return ("true");
}
else {
return ("false");
}
break;
default:
return ("(" + type + ")");
}
}
else {
return ("");
}
}
}
}
}
function ProcessTextCommand_Object(section, data)
{
var objectname = Mid(section, 8);
var text = "";
var colon = Instr(objectname, ":");
if (colon > 0) {
var text = Mid(objectname, colon + 1);
var objectname = Left(objectname, colon - 1);
}
var object = GetObject(objectname);
if (object == null) {
return ("{" + ProcessTextSection(section, data) + "}");
}
else {
if (LengthOf(text) == 0) {
var text = SafeXML(GetDisplayAlias(object));
}
if (e_game.enablehyperlinks) {
var linkid = ProcessTextCommand_GetNextLinkId();
var colour = "";
if (HasString(object, "linkcolour") && GetUIOption("UseGameColours") == "true") {
var colour = object.linkcolour;
}
else {
var colour = GetLinkTextColour();
}
var style = GetCurrentTextFormat(colour);
return ("<a id=\"" + linkid + "\" style=\"" + style + "\" class=\"cmdlink elementmenu\" data-elementid=\"" + object.name + "\">" + text + "</a>");
}
else {
return (text);
}
}
}
function ProcessTextCommand_GetNextLinkId()
{
if (!(HasInt(e_game, "lastlinkid"))) {
set(e_game, "lastlinkid", 0);
}
set(e_game, "lastlinkid", e_game.lastlinkid + 1);
return ("verblink" + e_game.lastlinkid);
}
function ProcessTextCommand_Command(command, data)
{
var text = command;
var colon = Instr(command, ":");
if (colon > 0) {
var text = Mid(command, colon + 1);
var command = Left(command, colon - 1);
}
var style = GetCurrentLinkTextFormat();
var candidates = NewObjectList();
var list_cmd = ScopeCommands();
var list_cmd_isarray = (Object.prototype.toString.call(list_cmd) === '[object Array]');
for (var iterator_cmd in list_cmd) {
var cmd = list_cmd_isarray ? list_cmd[iterator_cmd] : iterator_cmd;
if (list_cmd_isarray || iterator_cmd!="__dummyKey") { if (IsRegexMatch(cmd.pattern, command, cmd.name)) {
listadd (candidates, cmd);
} }
}
var elementid = "";
if (ListCount(candidates) == 1) {
var cmd = ObjectListItem(candidates, 0);
var elementid = cmd.name;
}
var linkid = ProcessTextCommand_GetNextLinkId();
var dataattrs = "";
if (e_game.deactivatecommandlinks) {
var dataattrs = dataattrs + "data-deactivateonclick=\"true\" ";
}
var dataattrs = dataattrs + "data-command=\"" + command + "\"";
return ("<a id=\"" + linkid + "\" style=\"" + style + "\" class=\"cmdlink commandlink\" data-elementid=\"" + elementid + "\" " + dataattrs + ">" + ProcessTextSection(text, data) + "</a>");
}
function ProcessTextCommand_Exit(section, data)
{
var exitname = Mid(section, 6);
var exit = GetObject(exitname);
if (exit == null) {
return ("{" + ProcessTextSection(section, data) + "}");
}
else {
var verbs = GetDisplayVerbs(exit);
var alias = GetDisplayAlias(exit);
var command = LCase(StringListItem(verbs, 0)) + " " + alias;
var style = GetCurrentLinkTextFormat();
return ("<a style=\"" + style + "\" class=\"cmdlink exitlink\" data-elementid=\"" + exit.name + "\" data-command=\"" + command + "\">" + alias + "</a>");
}
}
function ProcessTextCommand_Once(section, data)
{
if (!(HasAttribute(e_game, "textprocessor_seen"))) {
set(e_game, "textprocessor_seen", NewDictionary());
}
var fulltext = StringDictionaryItem(data, "fulltext");
if (!(DictionaryContains(e_game.textprocessor_seen, fulltext))) {
var onceSectionsInThisText = NewList();
dictionaryadd (e_game.textprocessor_seen, fulltext, onceSectionsInThisText);
}
else {
var onceSectionsInThisText = DictionaryItem(e_game.textprocessor_seen, fulltext);
}
if (!(ListContains(onceSectionsInThisText, section))) {
listadd (onceSectionsInThisText, section);
return (ProcessTextSection(Mid(section, 6), data));
}
else {
return ("");
}
}
function ProcessTextCommand_NotFirst(section, data)
{
if (!(HasAttribute(e_game, "textprocessor_seen"))) {
set(e_game, "textprocessor_seen", NewDictionary());
}
var fulltext = StringDictionaryItem(data, "fulltext");
if (!(DictionaryContains(e_game.textprocessor_seen, fulltext))) {
var onceSectionsInThisText = NewList();
dictionaryadd (e_game.textprocessor_seen, fulltext, onceSectionsInThisText);
}
else {
var onceSectionsInThisText = DictionaryItem(e_game.textprocessor_seen, fulltext);
}
if (!(ListContains(onceSectionsInThisText, section))) {
listadd (onceSectionsInThisText, section);
return ("");
}
else {
return (ProcessTextSection(Mid(section, 10), data));
}
}
function ProcessTextCommand_Random(section, data)
{
var elements = Mid(section, 8);
var elementslist = Tsplit(elements);
var index = GetRandomInt(0, ListCount(elementslist) - 1);
return (ProcessTextSection(ListItem(elementslist, index), data));
}
function Tsplit(splittext)
{
var itemlist = NewStringList();
var sections = 0;
var startpos = 1;
for (var i = 1; i <= LengthOf(splittext); i++) {
if (Mid(splittext, i, 1) == "{") {
var sections = sections + 1;
}
if (Mid(splittext, i, 1) == "}") {
var sections = sections - 1;
}
if (Mid(splittext, i, 1) == ":" && 0 >= sections) {
var item = Mid(splittext, startpos, i - startpos);
listadd (itemlist, item);
var startpos = i + 1;
}
}
var item = Mid(splittext, startpos);
listadd (itemlist, item);
return (itemlist);
}
function ProcessTextCommand_RandomAlias(section, data)
{
var objectname = Mid(section, 8);
var object = GetObject(objectname);
if (object == null) {
return ("{" + ProcessTextSection(section, data) + "}");
}
else {
var count = ListCount(object.alt);
if (count > 0) {
return (ListItem(object.alt, GetRandomInt(0, count - 1)));
}
else {
return ("");
}
}
}
function ProcessTextCommand_If(section, data)
{
var command = Mid(section, 4);
var colon = Instr(command, ":");
if (colon == 0) {
return ("{if " + command + "}");
}
else {
var text = Mid(command, colon + 1);
var condition = Left(command, colon - 1);
var operator = Instr(condition, "<=");
if (operator != 0) {
var operatorlength = 2;
}
if (operator == 0) {
var operator = Instr(condition, ">=");
if (operator != 0) {
var operatorlength = 2;
}
}
if (operator == 0) {
var operator = Instr(condition, "<>");
if (operator != 0) {
var operatorlength = 2;
}
}
if (operator == 0) {
var operator = Instr(condition, "<");
if (operator != 0) {
var operatorlength = 1;
}
}
if (operator == 0) {
var operator = Instr(condition, ">");
if (operator != 0) {
var operatorlength = 1;
}
}
if (operator == 0) {
var operator = Instr(condition, "=");
if (operator != 0) {
var operatorlength = 1;
}
}
if (operator == 0) {
var checkfor = true;
if (StartsWith(condition, "not ")) {
var checkfor = false;
var condition = Mid(condition, 5);
}
var dot = Instr(condition, ".");
if (dot == 0) {
var result = GetBoolean(e_game, condition);
}
else {
var objectname = Left(condition, dot - 1);
var attributename = Mid(condition, dot + 1);
var object = GetObject(objectname);
if (object == null) {
var result = false;
}
else {
var result = GetBoolean(object, attributename);
}
}
if (result == checkfor) {
return (ProcessTextSection(text, data));
}
else {
return ("");
}
}
else {
var lhs = Left(condition, operator - 1);
var rhs = Mid(condition, operator + operatorlength);
var op = Mid(condition, operator, operatorlength);
var dot = Instr(lhs, ".");
if (dot == 0) {
var objectname = "";
var attributename = "";
if (HasInt(e_game, lhs)) {
var objectname = "game";
var attributename = lhs;
}
else {
return ("{if " + command + "}");
}
}
else {
var objectname = Left(lhs, dot - 1);
var attributename = Mid(lhs, dot + 1);
}
var object = GetObject(objectname);
if (object == null) {
return ("{if " + command + "}");
}
else {
var value = GetAttribute(object, attributename);
if (overloadedFunctions.TypeOf(value) == "object") {
var value = value.name;
}
if (op == "=") {
if (ToString(value) == rhs) {
return (ProcessTextSection(text, data));
}
else {
return ("");
}
}
else if (op == "<>") {
if (!(ToString(value) == rhs)) {
return (ProcessTextSection(text, data));
}
else {
return ("");
}
}
else if (op == ">") {
if (ToDouble(ToString(value)) > ToDouble(rhs)) {
return (ProcessTextSection(text, data));
}
else {
return ("");
}
}
else if (op == "<") {
if (ToDouble(ToString(value)) < ToDouble(rhs)) {
return (ProcessTextSection(text, data));
}
else {
return ("");
}
}
else if (op == ">=") {
if (ToDouble(ToString(value)) >= ToDouble(rhs)) {
return (ProcessTextSection(text, data));
}
else {
return ("");
}
}
else if (op == "<=") {
if (ToDouble(ToString(value)) <= ToDouble(rhs)) {
return (ProcessTextSection(text, data));
}
else {
return ("");
}
}
}
}
}
}
function ProcessTextCommand_Img(section, data)
{
var filename = Mid(section, 5);
return ("<img src=\"" + GetFileURL(filename) + "\" />");
}
function ProcessTextCommand_Counter(section, data)
{
if (HasAttribute(e_game, section)) {
return (ToString(GetAttribute(e_game, section)));
}
else {
return ("0");
}
}
function ProcessTextCommand_Select(section, data)
{
var elements = Mid(section, 8);
var elementslist = Split(elements, ":");
var objectandatt = StringListItem (elementslist, 0);
listremove (elementslist, objectandatt);
var objectandattlist = Split(objectandatt, ".");
if (!(ListCount (objectandattlist) == 2)) {
return ("{" + ProcessTextSection(section, data) + "}");
}
else {
var object = GetObject(StringListItem(objectandattlist, 0));
if (object == null) {
return ("{" + ProcessTextSection(section, data) + "}");
}
else if (!(HasInt (object, StringListItem(objectandattlist, 1)))) {
return ("{" + ProcessTextSection(section, data) + "}");
}
else {
var index = GetInt(object, StringListItem(objectandattlist, 1));
if ((0 > index) || (index >= Listcount(elementslist))) {
return ("{" + ProcessTextSection(section, data) + "}");
}
else {
return (ProcessTextSection(ListItem(elementslist, index), data));
}
}
}
}
function SetFramePicture(filename)
{
request ("SetPanelContents", "<img src=\"" + GetFileURL(filename) + "\" onload=\"setPanelHeight()\"/>");
set(e_game, "panelcontents", filename);
}
function ClearFramePicture()
{
request ("SetPanelContents", "");
set(e_game, "panelcontents", null);
}
function ClearScreen()
{
request ("ClearScreen", "");
}
function SetForegroundColour(colour)
{
request ("Foreground", colour);
set(e_game, "defaultforeground", colour);
}
function SetBackgroundColour(colour)
{
request ("Background", colour);
set(e_game, "defaultbackground", colour);
}
function SetFontName(font)
{
set(e_game, "defaultfont", font);
set(e_game, "defaultwebfont", "");
}
function SetWebFontName(font)
{
AddExternalStylesheet ("https://fonts.googleapis.com/css?family=" + Replace(font, " ", "+"));
set(e_game, "defaultwebfont", font);
}
function AddExternalStylesheet(stylesheet)
{
if (e_game.externalstylesheets == null) {
set(e_game, "externalstylesheets", NewStringList());
}
if (!(ListContains(e_game.externalstylesheets, stylesheet))) {
listadd (e_game.externalstylesheets, stylesheet);
addExternalStylesheet (stylesheet)
}
}
function SetFontSize(size)
{
set(e_game, "defaultfontsize", size);
}
function PrintCentered(text)
{
SetAlignment ("center");
OutputText (text);
SetAlignment ("left");
}
function ShowYouTube(id)
{
AddYouTube (id)
}
function ShowVimeo(id)
{
AddVimeo (id)
}
function WaitForKeyPress()
{
request ("Wait", "");
}
function DisplayHttpLink(text, url, https)
{
var pos = Instr(url, "://");
if (pos > 0) {
var url = Mid(url, pos + 3);
}
if (https) {
var url = "https://" + url;
}
else {
var url = "http://" + url;
}
OutputText ("<a style=\"" + GetCurrentLinkTextFormat() + "\" href=\"" + url + "\">" + text + "</a>");
}
function DisplayMailtoLink(text, url)
{
if (Instr(url, "mailto:") == 0) {
var url = "mailto:" + url;
}
OutputText ("<a style=\"" + GetCurrentLinkTextFormat() + "\" href=\"" + url + "\">" + text + "</a>");
}
function CommandLink(cmd, text)
{
return ("{command:" + cmd + ":" + text + "}");
}
function Log(text)
{
request ("Log", text);
}
function SetBackgroundImage(filename)
{
//SetBackgroundImage (GetFileURL(filename))
$("body").css("background-image", "url(" + filename + ")");
set(e_game, "backgroundimage", filename);
}
function SetBackgroundOpacity(opacity)
{
//SetBackgroundOpacity (opacity)
set(e_game, "backgroundopacity", opacity);
set(e_game, "setbackgroundopacity", true);
}
function DisplayList(list, numbers)
{
if (numbers) {
var result = "<ol>";
}
else {
var result = "<ul>";
}
var list_isarray = (Object.prototype.toString.call(list) === '[object Array]');
for (var iterator_item in list) {
var item = list_isarray ? list[iterator_item] : iterator_item;
if (list_isarray || iterator_item!="__dummyKey") { var result = result + "<li>" + item + "</li>"; }
}
if (numbers) {
var result = result + "</ol>";
}
else {
var result = result + "</ul>";
}
OutputText (result);
}
function SetAlignment(align)
{
createNewDiv (align)
}
function GetCurrentFontFamily()
{
if (e_game.defaultwebfont == null) {
return (e_game.defaultfont);
}
else {
if (e_game.defaultwebfont == "") {
return (e_game.defaultfont);
}
else {
return ("'" + e_game.defaultwebfont + "', " + e_game.defaultfont);
}
}
}
function Grid_SetScale(scale)
{
Grid_SetScale (scale)
}
function Grid_CalculateMapCoordinates(room, playerobject)
{
if (room.parent != null) {
if (room.grid_parent_offset_auto) {
set(room, "grid_parent_offset_x", (room.parent.grid_width - room.grid_width) /2.0);
set(room, "grid_parent_offset_y", (room.parent.grid_length - room.grid_length) /2.0);
}
Grid_SetGridCoordinateForPlayer (playerobject, room.parent, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") - room.grid_parent_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, room.parent, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") - room.grid_parent_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, room.parent, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
set(room.parent, "grid_render", true);
Grid_CalculateMapCoordinates (room.parent, playerobject);
}
var list_exit = AllExits();
var list_exit_isarray = (Object.prototype.toString.call(list_exit) === '[object Array]');
for (var iterator_exit in list_exit) {
var exit = list_exit_isarray ? list_exit[iterator_exit] : iterator_exit;
if (list_exit_isarray || iterator_exit!="__dummyKey") { if (exit.parent == room && !(GetBoolean(exit, "lookonly"))) {
if (DoesInherit(exit, "northdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + room.grid_width/2.0 + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") - exit.to.grid_width/2.0);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", (Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") - exit.to.grid_length) - exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") - exit.grid_length);
set(exit, "grid_render", true);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "eastdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + room.grid_width + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + room.grid_length/2.0 + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") + exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") - exit.to.grid_length/2.0);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") + exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y"));
set(exit, "grid_render", true);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "southdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + room.grid_width/2.0 + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + room.grid_length + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") - exit.to.grid_width/2.0);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") + exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") + exit.grid_length);
set(exit, "grid_render", true);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "westdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + room.grid_length/2.0 + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", (Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") - exit.to.grid_width) - exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") - exit.to.grid_length/2.0);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") - exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y"));
set(exit, "grid_render", true);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "northwestdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", (Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") - exit.to.grid_width) - exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", (Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") - exit.to.grid_length) - exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") - exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") - exit.grid_length);
set(exit, "grid_render", true);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "northeastdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + room.grid_width + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") + exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", (Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") - exit.to.grid_length) - exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") + exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") - exit.grid_length);
set(exit, "grid_render", true);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "southwestdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + room.grid_length + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", (Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") - exit.to.grid_width) - exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") + exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") - exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") + exit.grid_length);
set(exit, "grid_render", true);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "southeastdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + room.grid_width + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + room.grid_length + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") + exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") + exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_x", Grid_GetGridCoordinateForPlayer(playerobject, exit, "x") + exit.grid_length);
Grid_SetGridCoordinateForPlayer (playerobject, exit, "end_y", Grid_GetGridCoordinateForPlayer(playerobject, exit, "y") + exit.grid_length);
set(exit, "grid_render", true);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "updirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + room.grid_width/2.0 - exit.to.grid_width/2.0 + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + room.grid_length/2.0 - exit.to.grid_length/2.0 + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z") + exit.grid_length);
set(exit, "grid_render", false);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "downdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + room.grid_width/2.0 - exit.to.grid_width/2.0 + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + room.grid_length/2.0 - exit.to.grid_length/2.0 + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z") - exit.grid_length);
set(exit, "grid_render", false);
set(exit.to, "grid_render", true);
}
else if (DoesInherit(exit, "indirection") || DoesInherit(exit, "outdirection")) {
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "x", Grid_GetGridCoordinateForPlayer(playerobject, room, "x") + room.grid_width/2.0 - exit.to.grid_width/2.0 + exit.grid_offset_x);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "y", Grid_GetGridCoordinateForPlayer(playerobject, room, "y") + room.grid_length/2.0 - exit.to.grid_length/2.0 + exit.grid_offset_y);
Grid_SetGridCoordinateForPlayer (playerobject, exit.to, "z", Grid_GetGridCoordinateForPlayer(playerobject, room, "z"));
set(exit, "grid_render", false);
set(exit.to, "grid_render", true);
}
} }
}
}
function Grid_DrawPlayerInRoom(room)
{
if (room.grid_render) {
Grid_DrawRoom (room, false, e_game.pov);
var player_x = Grid_GetGridCoordinateForPlayer(e_game.pov, room, "x") + room.grid_width/2.0;
var player_y = Grid_GetGridCoordinateForPlayer(e_game.pov, room, "y") + room.grid_length/2.0;
var player_z = Grid_GetGridCoordinateForPlayer(e_game.pov, room, "z");
Grid_DrawPlayer (player_x, player_y, player_z, 5, "black", 2, "yellow")
}
}
function Grid_DrawRoom(room, redraw, playerobject)
{
if (room.grid_render) {
if (redraw || !(Grid_GetRoomBooleanForPlayer(playerobject, room, "grid_isdrawn"))) {
if (room.parent != null) {
Grid_DrawRoom (room.parent, redraw, playerobject);
}
Grid_DrawBox (Grid_GetGridCoordinateForPlayer(e_game.pov, room, "x"), Grid_GetGridCoordinateForPlayer(e_game.pov, room, "y"), Grid_GetGridCoordinateForPlayer(e_game.pov, room, "z"), room.grid_width, room.grid_length, room.grid_border, room.grid_borderwidth, room.grid_fill, room.grid_bordersides)
if (LengthOf(room.grid_label) > 0) {
var label_x = Grid_GetGridCoordinateForPlayer(e_game.pov, room, "x") + room.grid_width/2.0;
var label_y = (Grid_GetGridCoordinateForPlayer(e_game.pov, room, "y") + room.grid_length/2.0) - 0.5;
Grid_DrawLabel (label_x, label_y, Grid_GetGridCoordinateForPlayer(e_game.pov, room, "z"), room.grid_label)
}
var list_exit = AllExits();
var list_exit_isarray = (Object.prototype.toString.call(list_exit) === '[object Array]');
for (var iterator_exit in list_exit) {
var exit = list_exit_isarray ? list_exit[iterator_exit] : iterator_exit;
if (list_exit_isarray || iterator_exit!="__dummyKey") { if (exit.grid_render && exit.parent == room && exit.grid_length > 0) {
Grid_DrawLine (Grid_GetGridCoordinateForPlayer(e_game.pov, exit, "x"), Grid_GetGridCoordinateForPlayer(e_game.pov, exit, "y"), Grid_GetGridCoordinateForPlayer(e_game.pov, exit, "end_x"), Grid_GetGridCoordinateForPlayer(e_game.pov, exit, "end_y"), "black", 1);
} }
}
Grid_SetRoomBooleanForPlayer (playerobject, room, "grid_isdrawn", true);
}
}
}
function Grid_ShowCustomLayer(visible)
{
if (visible) {
Grid_ShowCustomLayer (true)
}
else {
Grid_ShowCustomLayer (false)
}
}
function Grid_ClearCustomLayer()
{
Grid_ClearCustomLayer ()
}
function Grid_DrawLine(x1, y1, x2, y2, border, borderWidth)
{
Grid_DrawLine (x1, y1, x2, y2, border, borderWidth)
}
function Grid_DrawArrow(id, x1, y1, x2, y2, border, borderWidth)
{
Grid_DrawArrow (id, x1, y1, x2, y2, border, borderWidth)
}
function Grid_DrawGridLines(x1, y1, x2, y2, border)
{
Grid_DrawGridLines (x1, y1, x2, y2, border)
}
function Grid_SetCentre(x, y)
{
Grid_SetCentre (x, y)
}
function Grid_DrawSquare(id, x, y, width, height, text, fill)
{
Grid_DrawSquare (id, x, y, width, height, text, fill)
}
function Grid_LoadSvg(data, id)
{
Grid_LoadSvg (data, id)
}
function Grid_DrawSvg(id, symbolid, x, y, width, height)
{
Grid_DrawSvg (id, symbolid, x, y, width, height)
}
function Grid_DrawImage(id, url, x, y, width, height)
{
Grid_DrawImage (id, url, x, y, width, height)
}
function Grid_AddNewShapePoint(x, y)
{
Grid_AddNewShapePoint (x, y)
}
function Grid_DrawShape(id, border, fill, opacity)
{
Grid_DrawShape (id, border, fill, opacity)
}
function JS_GridSquareClick(parameterstring)
{
var parameters = Split(parameterstring, ";");
var x = ToInt(StringListItem(parameters, 0));
var y = ToInt(StringListItem(parameters, 1));
GridSquareClick (x, y);
}
function GridSquareClick(x, y)
{

}
function Grid_Redraw()
{
var list_object = AllObjects();
var list_object_isarray = (Object.prototype.toString.call(list_object) === '[object Array]');
for (var iterator_object in list_object) {
var object = list_object_isarray ? list_object[iterator_object] : iterator_object;
if (list_object_isarray || iterator_object!="__dummyKey") { if (Grid_GetRoomBooleanForPlayer(e_game.pov, object, "grid_isdrawn")) {
Grid_DrawRoom (object, true, e_game.pov);
} }
}
}
function Grid_SetGridCoordinateForPlayer(playerobject, room, coordinate, value)
{
var coordinates = Grid_GetPlayerCoordinatesForRoom(playerobject, room);
if (DictionaryContains(coordinates, coordinate)) {
dictionaryremove (coordinates, coordinate);
}
dictionaryadd (coordinates, coordinate, value * 1.0);
}
function Grid_GetGridCoordinateForPlayer(playerobject, room, coordinate)
{
var coordinates = Grid_GetPlayerCoordinatesForRoom(playerobject, room);
return (DictionaryItem(coordinates, coordinate));
}
function Grid_SetRoomBooleanForPlayer(playerobject, room, coordinate, value)
{
var datadictionary = Grid_GetPlayerCoordinatesForRoom(playerobject, room);
if (DictionaryContains(datadictionary, coordinate)) {
dictionaryremove (datadictionary, coordinate);
}
dictionaryadd (datadictionary, coordinate, value);
}
function Grid_GetRoomBooleanForPlayer(playerobject, room, attribute)
{
var coordinatedata = Grid_GetPlayerCoordinateDictionary(playerobject);
if (!(DictionaryContains(coordinatedata, room.name))) {
return (false);
}
else {
var datadictionary = Grid_GetPlayerCoordinatesForRoom(playerobject, room);
if (DictionaryContains(datadictionary, attribute)) {
return (DictionaryItem(datadictionary, attribute));
}
else {
return (false);
}
}
}
function Grid_GetPlayerCoordinateDictionary(playerobject)
{
if (HasAttribute(playerobject, "grid_coordinates_delegate")) {
return (Grid_GetPlayerCoordinateDictionary(playerobject.grid_coordinates_delegate));
}
else {
if (!(HasAttribute(playerobject, "grid_coordinates"))) {
set(playerobject, "grid_coordinates", NewDictionary());
Grid_SetGridCoordinateForPlayer (playerobject, playerobject.parent, "x", 0);
Grid_SetGridCoordinateForPlayer (playerobject, playerobject.parent, "y", 0);
Grid_SetGridCoordinateForPlayer (playerobject, playerobject.parent, "z", 0);
set(playerobject.parent, "grid_render", true);
Grid_CalculateMapCoordinates (playerobject.parent, playerobject);
}
return (playerobject.grid_coordinates);
}
}
function Grid_GetPlayerCoordinatesForRoom(playerobject, room)
{
var coordinatedata = Grid_GetPlayerCoordinateDictionary(playerobject);
if (!(DictionaryContains(coordinatedata, room.name))) {
dictionaryadd (coordinatedata, room.name, NewDictionary());
}
return (DictionaryItem(coordinatedata, room.name));
}
function MergePOVCoordinates()
{
var coordinateowner = GetCoordinateOwner(e_game.pov);
var list_obj = GetDirectChildren(e_game.pov.parent);
var list_obj_isarray = (Object.prototype.toString.call(list_obj) === '[object Array]');
for (var iterator_obj in list_obj) {
var obj = list_obj_isarray ? list_obj[iterator_obj] : iterator_obj;
if (list_obj_isarray || iterator_obj!="__dummyKey") { if (obj != e_game.pov && HasAttribute(obj, "grid_coordinates")) {
var objcoordinateowner = GetCoordinateOwner(obj);
if (coordinateowner != objcoordinateowner) {
MapPOVCoordinates (objcoordinateowner, coordinateowner);
}
} }
}
}
function GetCoordinateOwner(playerobject)
{
if (HasAttribute(playerobject, "grid_coordinates_delegate")) {
return (GetCoordinateOwner(playerobject.grid_coordinates_delegate));
}
else {
return (playerobject);
}
}
function MapPOVCoordinates(source, target)
{
var sourcecoordinates = Grid_GetPlayerCoordinateDictionary(source);
var targetcoordinates = Grid_GetPlayerCoordinateDictionary(target);
var xoffset = Grid_GetGridCoordinateForPlayer(target, e_game.pov.parent, "x") - Grid_GetGridCoordinateForPlayer(source, e_game.pov.parent, "x");
var yoffset = Grid_GetGridCoordinateForPlayer(target, e_game.pov.parent, "y") - Grid_GetGridCoordinateForPlayer(source, e_game.pov.parent, "y");
var zoffset = Grid_GetGridCoordinateForPlayer(target, e_game.pov.parent, "z") - Grid_GetGridCoordinateForPlayer(source, e_game.pov.parent, "z");
var sourcecoordinates_isarray = (Object.prototype.toString.call(sourcecoordinates) === '[object Array]');
for (var iterator_roomname in sourcecoordinates) {
var roomname = sourcecoordinates_isarray ? sourcecoordinates[iterator_roomname] : iterator_roomname;
if (sourcecoordinates_isarray || iterator_roomname!="__dummyKey") { var coordinatedata = DictionaryItem(sourcecoordinates, roomname);
if (!(DictionaryContains(targetcoordinates, roomname))) {
var newroomdata = NewDictionary();
dictionaryadd (targetcoordinates, roomname, newroomdata);
MapPOVCoordinate (coordinatedata, newroomdata, "x", xoffset);
MapPOVCoordinate (coordinatedata, newroomdata, "y", yoffset);
MapPOVCoordinate (coordinatedata, newroomdata, "z", zoffset);
MapPOVCoordinate (coordinatedata, newroomdata, "end_x", xoffset);
MapPOVCoordinate (coordinatedata, newroomdata, "end_y", yoffset);
}
else {
var newroomdata = DictionaryItem(targetcoordinates, roomname);
}
if (DictionaryContains(coordinatedata, "grid_isdrawn")) {
if (DictionaryContains(newroomdata, "grid_isdrawn")) {
dictionaryremove (newroomdata, "grid_isdrawn");
}
dictionaryadd (newroomdata, "grid_isdrawn", DictionaryItem(coordinatedata, "grid_isdrawn"));
} }
}
set(source, "grid_coordinates_delegate", target);
Grid_Redraw();
Grid_DrawPlayerInRoom (e_game.pov.parent);
}
function MapPOVCoordinate(sourcedata, targetdata, name, offset)
{
if (DictionaryContains(sourcedata, name)) {
var value = DictionaryItem(sourcedata, name);
dictionaryadd (targetdata, name, value + offset);
}
}
function DiceRoll(dicetype)
{
var dpos = Instr(dicetype, "d");
if (dpos == 0) {
error ("Invalid dice type: " + dicetype);
}
else {
var number_string = Left(dicetype, dpos - 1);
var sides_string = Mid(dicetype, dpos + 1);
if (!((IsNumeric(number_string) )&& IsNumeric(sides_string))) {
error ("Invalid dice type: " + dicetype);
}
else {
var number = ToInt(number_string);
var sides = ToInt(sides_string);
var total = 0;
for (var i = 1; i <= number; i++) {
var total = total + GetRandomInt(1, sides);
}
return (total);
}
}
}
function TextFX_Typewriter(text, speed)
{
TextFX_Typewriter_Internal (text, speed, GetCurrentFontFamily(), e_game.defaultforeground, e_game.defaultfontsize);
}
function TextFX_Typewriter_Internal(text, speed, font, color, size)
{
TextFX.Typewriter (text, speed, font, color, size)
}
function TextFX_Unscramble(text, speed, reveal)
{
TextFX_Unscramble_Internal (text, speed, reveal, GetCurrentFontFamily(), e_game.defaultforeground, e_game.defaultfontsize);
}
function TextFX_Unscramble_Internal(text, speed, reveal, font, color, size)
{
TextFX.Unscramble (text, speed, reveal, font, color, size)
}
function InitInterface()
{
if (e_game.setcustomwidth) {
setGameWidth (e_game.customwidth)
}
if (!(e_game.showborder)) {
hideBorder ()
}
if (e_game.setcustompadding) {
setGamePadding (e_game.custompaddingtop, e_game.custompaddingbottom, e_game.custompaddingleft, e_game.custompaddingright)
}
if (e_game.externalstylesheets != null) {
var e_game_externalstylesheets_isarray = (Object.prototype.toString.call(e_game.externalstylesheets) === '[object Array]');
for (var iterator_stylesheet in e_game.externalstylesheets) {
var stylesheet = e_game_externalstylesheets_isarray ? e_game.externalstylesheets[iterator_stylesheet] : iterator_stylesheet;
if (e_game_externalstylesheets_isarray || iterator_stylesheet!="__dummyKey") { addExternalStylesheet (stylesheet) }
}
}
if (e_game.setbackgroundopacity) {
SetBackgroundOpacity (e_game.backgroundopacity);
}
request ("Background", e_game.defaultbackground);
request ("Foreground", e_game.defaultforeground);
request ("LinkForeground", e_game.defaultlinkforeground);
if (LengthOf(e_game.backgroundimage) > 0) {
SetBackgroundImage (e_game.backgroundimage);
}
request ("SetCompassDirections", Join(e_game.compassdirections, ";"));
request ("SetInterfaceString", "InventoryLabel=Inventory");
request ("SetInterfaceString", "StatusLabel=Status");
request ("SetInterfaceString", "PlacesObjectsLabel=Places and Objects");
request ("SetInterfaceString", "CompassLabel=Compass");
request ("SetInterfaceString", "InButtonLabel=in");
request ("SetInterfaceString", "OutButtonLabel=out");
request ("SetInterfaceString", "EmptyListLabel=(empty)");
request ("SetInterfaceString", "NothingSelectedLabel=(nothing selected)");
request ("SetInterfaceString", "TypeHereLabel=Type here...");
request ("SetInterfaceString", "ContinueLabel=Continue...");
SetMenuBackground (e_game.menubackground)
SetMenuForeground (e_game.menuforeground)
SetMenuHoverBackground (e_game.menuhoverbackground)
SetMenuHoverForeground (e_game.menuhoverforeground)
SetMenuFontName (e_game.menufont)
SetMenuFontSize (e_game.menufontsize + "pt")
if (!(e_game.underlinehyperlinks)) {
TurnOffHyperlinksUnderline ()
}
if (e_game.showpanes) {
request ("Show", "Panes");
}
else {
request ("Hide", "Panes");
}
ResetCommandBarFormat();
if (e_game.showcommandbar) {
request ("Show", "Command");
}
else {
request ("Hide", "Command");
}
if (e_game.showlocation) {
request ("Show", "Location");
}
else {
request ("Hide", "Location");
}
if (HasString(e_game, "panelcontents")) {
SetFramePicture (e_game.panelcontents);
}
if (e_game.gridmap) {
ShowGrid (e_game.mapsize)
Grid_SetScale (e_game.mapscale);
if (e_game.pov != null) {
if (e_game.pov.parent != null) {
Grid_Redraw();
Grid_DrawPlayerInRoom (e_game.pov.parent);
}
}
}
InitUserInterface();
}
function StartGame()
{
StartTurnOutputSection();
if (e_game.showtitle) {
JsStartOutputSection ("title")
PrintCentered ("<span style=\"font-size:260%\">" + e_game.gamename + "</span>");

if (e_game.subtitle != null) {
if (LengthOf(e_game.subtitle) > 0) {
PrintCentered ("<span style=\"font-size:130%\">" + e_game.subtitle + "</span>");
}
}
if (e_game.author != null) {
if (LengthOf(e_game.author) > 0) {
PrintCentered ("<br/><span style=\"font-size:140%\">by " + e_game.author + "</span>");
}
}
OutputText ("<div style=\"margin-top:20px\"></div>");
JsEndOutputSection ("title")
}
if (e_game.pov == null) {
var playerObject = GetObject("player");
if (playerObject == null) {
if (ListCount(AllObjects()) > 0) {
var firstRoom = ObjectListItem(AllObjects(), 0);
}
else {
create ("room");
var firstRoom = room;
}
create ("player");
set(e_player, "parent", firstRoom);
}
set(e_game, "pov", e_player);
}
else {
InitPOV (null, e_game.pov);
}
InitStatusAttributes();
UpdateStatusAttributes();
InitVerbsList();
if (HasScript(e_game, "start")) {
runscriptattribute2 (e_game, "start");
}
UpdateStatusAttributes();
UpdateObjectLinks();
on_ready (function() { if (e_game.gridmap) {
Grid_DrawPlayerInRoom (e_game.pov.parent);
}
if (e_game.displayroomdescriptiononstart) {
OnEnterRoom (null);
}
UpdateStatusAttributes();
UpdateObjectLinks(); });

}
function RandomChance(percentile)
{
return (GetRandomInt(1,100) <= percentile);
}
function SetObjectFlagOn(object, flag)
{
set (object, flag, true);
}
function SetObjectFlagOff(object, flag)
{
set (object, flag, false);
}
function IncreaseObjectCounter(object, counter)
{
if (!(HasInt(object, counter))) {
set (object, counter, 0);
}
set (object, counter, GetInt(object, counter) + 1);
}
function DecreaseObjectCounter(object, counter)
{
if (!(HasInt(object, counter))) {
set (object, counter, 0);
}
set (object, counter, GetInt(object, counter) - 1);
}
function IsSwitchedOn(object)
{
return (GetBoolean(object, "switchedon"));
}
function AddToInventory(object)
{
set(object, "parent", e_game.pov);
}
function MoveObject(object, parent)
{
set(object, "parent", parent);
}
function MoveObjectHere(object)
{
set(object, "parent", e_game.pov.parent);
}
function RemoveObject(object)
{
set(object, "parent", null);
}
function MakeObjectVisible(object)
{
set(object, "visible", true);
}
function MakeObjectInvisible(object)
{
set(object, "visible", false);
}
function MakeExitVisible(object)
{
set(object, "visible", true);
}
function MakeExitInvisible(object)
{
set(object, "visible", false);
}
function HelperOpenObject(object)
{
set(object, "isopen", true);
}
function HelperCloseObject(object)
{
set(object, "isopen", false);
}
function CloneObject(object)
{
var newobject = Clone(object);
if (!(HasString(object, "alias"))) {
set(newobject, "alias", object.name);
}
return (newobject);
}
function CloneObjectAndMove(object, newparent)
{
var newobject = CloneObject(object);
set(newobject, "parent", newparent);
return (newobject);
}
function LockExit(exit)
{
set(exit, "locked", true);
}
function UnlockExit(exit)
{
set(exit, "locked", false);
}
function SwitchOn(object)
{
set(object, "switchedon", true);
}
function SwitchOff(object)
{
set(object, "switchedon", false);
}
function SetDark(object)
{
set(object, "dark", true);
}
function SetLight(object)
{
set(object, "dark", false);
}
function SetObjectLightstrength(object, strength)
{
if (LengthOf(strength) == 0) {
set(object, "lightsource", false);
}
else {
set(object, "lightsource", true);
}
set(object, "lightstrength", strength);
}
function SetExitLightstrength(exit, strength)
{
if (LengthOf(strength) == 0) {
set(exit, "lightsource", false);
}
else {
set(exit, "lightsource", true);
}
set(exit, "lightstrength", strength);
}
function ChangePOV(object)
{
if (e_game.pov != object) {
set(e_game, "pov", object);
if (e_game.gridmap) {
Grid_ClearAllLayers ()
Grid_Redraw();
}
OnEnterRoom (null);
}
}
function InitPOV(oldPOV, newPOV)
{
if (oldPOV != null) {
set(oldPOV, "alias", oldPOV.external_alias);
set(oldPOV, "alt", oldPOV.external_alt);
set(oldPOV, "look", oldPOV.external_look);
set(oldPOV, "gender", oldPOV.external_gender);
set(oldPOV, "article", oldPOV.external_article);
}
set(newPOV, "external_alias", newPOV.alias);
set(newPOV, "external_alt", newPOV.alt);
set(newPOV, "external_look", newPOV.look);
set(newPOV, "external_gender", newPOV.gender);
set(newPOV, "external_article", newPOV.article);
if (!(GetBoolean(newPOV, "pov_used"))) {
if (newPOV.alt == null) {
set(newPOV, "pov_alt", newPOV.pov_alt);
}
else {
set(newPOV, "pov_alt", ListCombine(newPOV.alt, newPOV.pov_alt));
}
if (newPOV.alias != null) {
listadd (newPOV.pov_alt, newPOV.alias);
}
if (e_game.showhealth) {
set(newPOV, "health", 100);
set(newPOV, "changedhealth", function() { if (this.health > 100) {
set(this, "health", 100);
}
else if (this.health == 0) {
if (HasScript(e_game, "onhealthzero")) {
runscriptattribute2 (e_game, "onhealthzero");
}
}
else if (this.health < 0) {
set(this, "health", 0);
} });
}
set(newPOV, "pov_used", true);
}
set(newPOV, "alias", newPOV.pov_alias);
set(newPOV, "alt", newPOV.pov_alt);
set(newPOV, "look", newPOV.pov_look);
set(newPOV, "gender", newPOV.pov_gender);
set(newPOV, "article", newPOV.pov_article);
}
function InitVerbsList()
{
set(e_game, "verbattributes", NewStringList());
set(e_game, "verbattributeslookup", NewObjectDictionary());
var list_cmd = AllCommands();
var list_cmd_isarray = (Object.prototype.toString.call(list_cmd) === '[object Array]');
for (var iterator_cmd in list_cmd) {
var cmd = list_cmd_isarray ? list_cmd[iterator_cmd] : iterator_cmd;
if (list_cmd_isarray || iterator_cmd!="__dummyKey") { if (HasString(cmd, "property")) {
listadd (e_game.verbattributes, cmd.property);
dictionaryadd (e_game.verbattributeslookup, cmd.property, cmd);
} }
}
}
function GetDisplayVerbs(object) {
    if (Contains(e_game.pov, object)) {
        var baselist = object.inventoryverbs;
    } else {
        var baselist = object.displayverbs;
    }
    if (!(e_game.autodisplayverbs) || GetBoolean(object, "usestandardverblist")) {
        return (baselist);
    } else {
        if (HasAttribute(object, "generatedverbslist")) {
            var verbs = object.generatedverbslist;
        } else {
            var verbs = NewStringList();
            var list_attr = GetAttributeNames(object, false);
            var list_attr_isarray = (Object.prototype.toString.call(list_attr) === '[object Array]');
            for (var iterator_attr in list_attr) {
                var attr = list_attr_isarray ? list_attr[iterator_attr] : iterator_attr;
                if (list_attr_isarray || iterator_attr != "__dummyKey") {
                    if (ListContains(e_game.verbattributes, attr)) {
                        var cmd = ObjectDictionaryItem(e_game.verbattributeslookup, attr);
                        if (HasString(cmd, "displayverb")) {
                            var displayverb = CapFirst(cmd.displayverb);
                        } else {
                            var displayverb = CapFirst(attr);
                        }
                        if (!(ListContains(baselist, displayverb))) {
                            listadd(verbs, displayverb);
                        }
                    }
                }
            }
            set(object, "generatedverbslist", verbs);
        }
        if (GetBoolean(object, "useindividualverblist")) {
            return (verbs);
        } else {
            return (ListCombine(baselist, verbs));
        }
    }
}
function ShowMenu(caption, options, allowCancel, callback)
{
var outputsection = StartNewOutputSection();
OutputText (caption);
var count = 0;
set(e_game, "menuoptionskeys", NewStringList());
var options_isarray = (Object.prototype.toString.call(options) === '[object Array]');
for (var iterator_option in options) {
var option = options_isarray ? options[iterator_option] : iterator_option;
if (options_isarray || iterator_option!="__dummyKey") { listadd (e_game.menuoptionskeys, option);
var count = count + 1;
if (overloadedFunctions.TypeOf(options) == "stringlist") {
var optionText = option;
}
else {
var optionText = StringDictionaryItem(options, option);
}
// JS error fixed
option = option.replace(/[']/g, "\\'");
option = option.replace(/["]/g, "\\\"");
OutputText (count + ": <a class=\"cmdlink\" style=\"" + GetCurrentLinkTextFormat() + "\" onclick=\"ASLEvent('ShowMenuResponse','" + option + "')\">" + optionText + "</a>"); }
}
EndOutputSection (outputsection);
set(e_game, "menuoptions", options);
set(e_game, "menuallowcancel", allowCancel);
set(e_game, "menucallback", callback);
set(e_game, "menuoutputsection", outputsection);
}
function HandleMenuTextResponse(input)
{
var handled = false;
if (IsInt(input)) {
var number = ToInt(input);
if (number > 0 && number <= ListCount(e_game.menuoptionskeys)) {
var handled = true;
ShowMenuResponse (StringListItem(e_game.menuoptionskeys, number - 1));
}
}
return (handled);
}
function ClearMenu()
{
HideOutputSection (e_game.menuoutputsection);
set(e_game, "menuoutputsection", null);
set(e_game, "menuoptions", null);
set(e_game, "menucallback", null);
}
function StartNewOutputSection()
{
if (!(HasInt(e_game, "lastoutputsection"))) {
set(e_game, "lastoutputsection", 0);
}
set(e_game, "lastoutputsection", e_game.lastoutputsection + 1);
var name = "section" + e_game.lastoutputsection;
JsStartOutputSection (name)
return (name);
}
function EndOutputSection(name)
{
JsEndOutputSection (name)
}
function HideOutputSection(name)
{
JsHideOutputSection (name)
}
function StartTurnOutputSection()
{
if (HasString(e_game, "currentturnoutputsection")) {
set(e_game, "lastturnoutputsection", e_game.currentturnoutputsection);
EndOutputSection (e_game.currentturnoutputsection);
}
set(e_game, "currentturnoutputsection", StartNewOutputSection());
}
function HidePreviousTurnOutput()
{
if (HasString(e_game, "lastturnoutputsection")) {
HideOutputSection (e_game.lastturnoutputsection);
}
}
function Ask(question, callback)
{
var options = NewStringList();
listadd (options, "Yes");
listadd (options, "No");
set(e_game, "askcallback", callback);
ShowMenu (question, options, false, function (result) { var parameters = NewDictionary();
if (result == "Yes") {
var boolresult = true;
}
else {
var boolresult = false;
}
dictionaryadd (parameters, "result", boolresult);
var callback = e_game.askcallback;
set(e_game, "askcallback", null);
invoke (callback, parameters); });
}
function AllKeysAvailable(object)
{
if (HasObject(object, "key")) {
if (!(HasInt(object,"keycount"))) {
set(object, "keycount", 1);
set(object, "key1", object.key);
}
if (!(HasObject(object, "key1"))) {
set(object, "key1", object.key);
}
}
for (var x = 1; x <= object.keycount; x++) {
var keyname = "key" + ToString(x);
if (HasObject(object, keyname)) {
if (!(ListContains(ScopeInventory(), GetAttribute(object, keyname)))) {
return (false);
}
}
}
return (true);
}
function ShowMenuResponse(option)
{
if (e_start.record) {
listadd (e_start.cmds, "*"+option);
}
if (e_game.menucallback == null) {
error ("Unexpected menu response");
}
else {
var parameters = NewStringDictionary();
dictionaryadd (parameters, "result", option);
var script = e_game.menucallback;
ClearMenu();
invoke (script, parameters);
// JS: lets increment turns here too!
if (is_asl_event)
	TryFinishTurn();
}
}
function HandleCommand(command, metadata)
{
if (e_game.menucallback == null) {
listadd (e_start.cmds, command);
}
var handled = false;
if (e_game.menucallback != null) {
if (HandleMenuTextResponse(command)) {
var handled = true;
}
else {
if (e_game.menuallowcancel) {
ClearMenu();
}
else {
var handled = true;
}
}
}
if (!(handled)) {
StartTurnOutputSection();
if (StartsWith (command, "*")) {
OutputText ("");
OutputText (SafeXML (command));
}
else {
var shownlink = false;
if (e_game.echocommand) {
if (metadata != null && e_game.enablehyperlinks && e_game.echohyperlinks) {
var metadata_isarray = (Object.prototype.toString.call(metadata) === '[object Array]');
for (var iterator_key in metadata) {
var key = metadata_isarray ? metadata[iterator_key] : iterator_key;
if (metadata_isarray || iterator_key!="__dummyKey") { if (EndsWith(command, key)) {
var objectname = StringDictionaryItem(metadata, key);
var object = GetObject(objectname);
if (object != null) {
OutputText ("");
OutputText ("> " + Left(command, LengthOf(command) - LengthOf(key)) + "{object:" + object.name + "}");
var shownlink = true;
}
} }
}
}
if (!(shownlink)) {
OutputText ("");
OutputTextRaw ("> " + SafeXML(command));
}
}
if (e_game.command_newline) {
OutputText ("");
}
set(e_game.pov, "commandmetadata", metadata);
if (e_game.multiplecommands) {
var commands = Split(command, ".");
if (ListCount(commands) == 1) {
set(e_game.pov, "commandqueue", null);
HandleSingleCommand (Trim(command));
}
else {
set(e_game.pov, "commandqueue", commands);
HandleNextCommandQueueItem();
}
}
else {
set(e_game.pov, "commandqueue", null);
HandleSingleCommand (Trim(command));
}
}
}
}
function savedRandomInt(a, b)
{
var ret = _getSavedRandom();
if (ret==null) {
var ret = GetRandomInt(a,b);
}
else {
var ret = ToInt(ret);
}
listadd (e_start.random, ToString(ret));
return (ret);
}
function _getSavedRandom()
{
if (ListCount(e_start.random_play)>0) {
var ret = StringListItem(e_start.random_play, 0);
var tmp = NewStringList();
for (var myItem = 1; myItem <= ListCount(e_start.random_play) - 1; myItem++) {
listadd (tmp, StringListItem(e_start.random_play,myItem));
}
set(e_start, "random_play", tmp);
return (ret);
}
else {
return (null);
}
}
function savedRandomChance(range)
{
var ret = _getSavedRandom();
if (ret==null) {
var ret = RandomChance(range);
}
else {
if (ret=="True" || ret=="true") {
var ret = true;
}
else {
var ret = false;
}
}
listadd (e_start.random, ToString(ret));
return (ret);
}
function initMultiSave()
{
set(e_start, "random", NewStringList());
set(e_start, "random_play", NewStringList());
set(e_start, "cmds", NewStringList());
set(e_start, "saves", NewStringDictionary());
set(e_start, "record", true);
}
function _testRandomChance()
{
set(e_start, "random", NewStringList());
set(e_start, "random_play", NewStringList());
listadd (e_start.random_play, "2");
listadd (e_start.random_play, "3");
listadd (e_start.random_play, "2");
listadd (e_start.random_play, "5");
listadd (e_start.random_play, "True");
listadd (e_start.random_play, "False");
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomChance(50));
Log ("="+savedRandomChance(50));
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomInt(0,5));
set(e_start, "random_play", ListExclude( e_start.random, NewStringList()));
set(e_start, "random", NewStringList());
Log ("reading again");
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomChance(50));
Log ("="+savedRandomChance(50));
Log ("="+savedRandomInt(0,5));
Log ("="+savedRandomInt(0,5));
}
function ProcessTextSection2(text)
{
var containsUnprocessedSection = false;
var open = Instr(text, "{");
Log ("tx2:"+open);
if (open > 0) {
var nestCount = 1;
var searchStart = open + 1;
var finished = false;
while (!(finished)) {
var nextOpen = Instr(searchStart, text, "{");
var nextClose = Instr(searchStart, text, "}");
if (nextClose > 0) {
if (nextOpen > 0 && nextOpen < nextClose) {
var nestCount = nestCount + 1;
var searchStart = nextOpen + 1;
}
else {
var nestCount = nestCount - 1;
var searchStart = nextClose + 1;
if (nestCount == 0) {
var close = nextClose;
var containsUnprocessedSection = true;
var finished = true;
}
}
}
else {
var finished = true;
}
}
}
if (containsUnprocessedSection) {
var section = Mid(text, open + 1, close - open - 1);
var value = ProcessTextCommand2(section);
var text = Left(text, open - 1) + value + ProcessTextSection2(Mid(text, close + 1));
}
return (text);
}
function ProcessTextCommand2(section)
{
Log ("txcmd:"+section);
if (StartsWith(section, "ask:")) {
return (ProcessTextCommand_Ask(Mid(section, 5)));
}
else {
return ("{"+section+"}");
}
}
function ProcessTextCommand_Ask(command)
{
var text = command;
var colon = Instr(command, ":");
Log ("text:"+text);
if (colon > 0) {
var text = Mid(command, colon + 1);
var command = Left(command, colon - 1);
}
Log ("text:"+command+","+text);
var about = text;
var colon = Instr(text, ":");
if (colon > 0) {
var about = Left(text, colon - 1);
var text = Mid(text, colon + 1);
}
Log ("text:"+about+","+text);
return ("{command:ask "+command+" about "+about+":"+text+"}");
}
function GetDisplayNameLink(obj, type)
{
var verbs = GetDisplayVerbs(obj);
if (verbs != null) {
var verbCount = ListCount(verbs);
}
else {
var verbCount = 0;
}
if (type == "exit" && verbCount == 1) {
if (!(e_game.enablehyperlinks)) {
var result = GetDisplayAlias(obj);
}
else {
var result = "{exit:" + obj.name + "}";
}
}
else if (type == "") {
var result = GetDisplayAlias(obj);
}
else {
var result = "{object:" + obj.name + "}";
}
if (!(GetBoolean(obj, "usedefaultprefix"))) {
if (obj.prefix == null) {
var prefix = "";
}
else {
var prefix = obj.prefix;
}
}
else if (type == "exit") {
var prefix = "";
}
else {
var prefix = GetDefaultPrefix(obj);
}
if (LengthOf(prefix) > 0) {
var prefix = prefix + " ";
}
var result = prefix + result;
if (!(GetBoolean(obj, "usedefaultprefix") )&& HasString(obj, "suffix")) {
var space = " ";
if (LengthOf(obj.suffix) > 0) {
if (Left(obj.suffix,1)==",") {
var space = "";
}
var result = result + space + obj.suffix;
}
}
return (result);
}
function CreateGiveMenuList(object)
{
var objectlist = NewObjectList();
var objectlist = ScopeReachableNotHeld();
var excludelist = NewObjectList();
listadd (excludelist, e_game.pov);
listadd (excludelist, object);
var candidates = NewObjectList();
var candidates = ListExclude(RemoveSceneryObjects(objectlist), excludelist);
return (candidates);
}
function InitUserInterface()
{
$('#divOutput').css('background-color','rgba(240, 240, 224, 0.498039)');
 addText (e_game.css)/*
eval ("$('#compassLabel').insertBefore('#inventoryLabel')")
eval ("$('#compassAccordion').insertBefore('#inventoryLabel')")
eval ("$('#placesObjectsLabel').insertBefore('#inventoryLabel')")
eval ("$('#placesObjectsAccordion').insertBefore('#inventoryLabel')")*/
request ("SetInterfaceString", "PlacesObjectsLabel=Things you can see");
eval ("$('#txtCommandDiv').css('position', 'fixed');")
eval ("$('#txtCommandDiv').css('bottom', '10px');")
eval ("$('#gameContent').css('margin-bottom', '70px');")
if (e_start.savename=="") {
eval ("$('#cmdSave').css('display','none');")
}
else {
var req = "setTurnLabel;"+e_game.turns;
executeJS (req);
} 
}
function wolfFollow(room)
{
if (e_Wolf.parent==e_void) {
DisableTurnScript (e_wolfTurn);
}
else if (e_Wolf.parent==room) {
if (e_player.parent==e_Maze || e_player.parent==e_temple_phoenix) {
MoveObject (e_Wolf, e_wolf_den);
DisableTurnScript (e_wolfTurn);
set(e_Wolf, "calm", 0);
}
else if (e_Wolf.calm==0) {
OutputText ("The Evil Wolf follows you!! Run away!");
MoveObject (e_Wolf, e_player.parent);
}
}
}
function printScore()
{
if (e_player.class=="warrior") {
OutputText ("Your fighting experience is "+e_player.fightexp);
}
switch (e_player.level) {
case 0:
OutputText ("Apprentice Level 1: You are nobody.");
break;
case 1:
OutputText ("Apprentice Level 2: You are an apprentice, and your guild master sees some potential in you.");
break;
case 2:
OutputText ("Apprentice Level 3: Some people on your guild already recognizes you.");
break;
case 3:
OutputText ("Apprentice Level 4: You are respected among your guild and some people recognizes you in the streets.");
break;
case 4:
OutputText ("Heroic Level 1: Unknown people recognizes your courage.");
break;
case 5:
OutputText ("Heroic Level 2: Most people treats you with fear and respect. Sometimes people will seek your aid.");
break;
case 6:
OutputText ("Heroic Level 3: You are famous across the entire kingdom.");
break;
case 7:
OutputText ("Heroic Level 4: You are legendary. Some people will doubt your history and most will think you are a demigod.");
break;

}
OutputText ("You played for "+e_game.turns+" turns.");
if (e_player.deaths==0) {
OutputText ("You never needed the help of Coriander ");
}
else {
OutputText ("You were rescued by Coriander "+e_player.deaths+" time(s).");
}
}
function checkMonsters_deprecated(room)
{
if (room!=e_combat_room) {
var list_item = GetDirectChildren(room);
var list_item_isarray = (Object.prototype.toString.call(list_item) === '[object Array]');
for (var iterator_item in list_item) {
var item = list_item_isarray ? list_item[iterator_item] : iterator_item;
if (list_item_isarray || iterator_item!="__dummyKey") { if (HasAttribute(item,"aggressive")) {
if (item.parent==room && e_player.last_room!=e_player.parent && e_player.parent!=e_temple_phoenix) {
OutputText ("The enemy blocks your way!");
attack (room, item);
}
} }
}
}
}
function death(room)
{
MoveObject (e_player, e_temple_phoenix);
set(e_player, "deaths", e_player.deaths+1);
MoveObject (e_horse, e_stable);
OutputText ("When you are about to feel the cold kiss of death, a powerful light brings you back to safety. You are healed.");
}
function checkWolf(room)
{
if (e_Wolf.parent==room) {
set(e_Wolf, "turns", 0);
EnableTurnScript (e_wolfTurn);
}
}
function fightEnemy(enemy)
{
set(e_combat, "turns", 0);
set(e_combat, "en_mult", 1);
set(e_combat, "pl_mult", 1);
set(e_combat, "pl_exp", Math.floor(e_player.fightexp/10));
set(e_combat, "pl_ht", 10+e_combat.pl_exp);
set(e_combat, "pl_armour", calcArmour());
set(e_combat, "pl_dam", chooseWeapon());
set(e_combat, "en_dam", enemy.damage);
set(e_combat, "en_ht", enemy.ht);
set(e_combat, "en_exp", enemy.exp);
set(e_combat, "pl_red", 0);
set(e_combat, "en_red", 0);
set(e_combat, "pushed", false);
set(e_combat, "mode", "Attack and defend.");
set(e_combat, "pl_stance", "None");
set(e_combat, "result", "");
debmsg ("player armour="+e_combat.pl_armour+ ", weapon dam="+e_combat.pl_dam+", exp level="+e_combat.pl_exp);
debmsg ("enemy armour="+enemy.armour+ ", weapon dam="+e_combat.en_dam+", exp level="+e_combat.en_exp);
debmsg ("player last room:"+e_player.last_room);
return (fightTurn(enemy));
}
function testSkill(sk_level, reductor, multiplier)
{
var pl_test = savedRandomInt(0,11);
var pl_test = pl_test+reductor;
if (multiplier<0) {
var pl_test = pl_test/(-multiplier);
}
else {
var pl_test = pl_test*multiplier;
}
var pl_test = sk_level-pl_test;
return (pl_test);
}
function fightMenu(enemy, result)
{
set(e_combat, "pushed", false);
set(e_combat, "turns", e_combat.turns+1);
if (result=="Flee." && e_combat_room.canFlee) {
OutputText ("You try to flee!");

if (savedRandomInt(1,6)>2) {
set(e_combat, "result", "flee");
MoveObject (enemy, GetObject(e_combat_room.room));
MoveObject (e_player, e_combat_room.player_enters_by);
}
else {
OutputText ("...Without success");
set(e_combat_room, "canFlee", false);
printCombatRoom();
}
}
else {
set(e_combat_room, "canFlee", !(GetBoolean(enemy, "block_flee")));
var mode = result;
Log ("mode="+mode);
var enter_red = e_combat.pl_red;
if (enemy==e_brigand1 && e_combat.turns%3==0) {
if (mode=="Full defense.") {
OutputText ("<span style=\"color:blue\">The brigand tries to throw sand at your eyes, but you avoid it.</span>");
set(e_combat, "en_red", 2);
}
else {
OutputText ("<span style=\"color:red\">The brigand throws sand at your eyes.</span>");
set(e_combat, "pl_red", 7);
}
}
if (enemy==e_orc1 && e_orc1.rage) {
if (mode=="Full defense.") {
OutputText ("<span style=\"color:blue\">The orc attacks with a great rage, but you are prepared.</span>");
set(e_combat, "en_mult", 1);
}
else {
OutputText ("<span style=\"color:red\">The orc attacks with a great rage.</span>");
set(e_combat, "en_mult", -3);
if (mode=="Full attack.") {
set(e_combat, "pl_red", max(4,e_combat.pl_red));
}
else {
set(e_combat, "pl_red", max(2,e_combat.pl_red));
}
}
}
if (enemy==e_impostor && e_impostor.bolt) {
if (mode=="Full attack.") {
OutputText ("<span style=\"color:blue\">Your fast attack breaks the enemy\u00b4s concentration.</span>");
set(e_combat, "en_red", max(2,e_combat.en_red));
}
else {
OutputText ("<span style=\"color:red\">The enemy throws a lightning bolt at you, causing intense pain.</span>");
var damage = savedRandomInt(2,5);
set(e_combat, "pl_ht", max(1,e_combat.pl_ht- damage));
if (e_combat.pl_ht< (10+e_combat.pl_exp)/4) {
OutputText ("<b>You are <span style=\"color:red\">wounded</span> and near exhaustion.</b>");
set(e_impostor, "bolt", false);
}
else {
OutputText ("The enemy mumbles strange words...");
}
return (true);
}
}
if (HasAttribute(enemy,"demon")) {
if (e_elven_sword.parent==e_player) {
OutputText ("The demon tries to scream, but the elven sword glows and you don\u00b4t hear his voice.");
}
else {
OutputText ("The demon <b>screams</b> and you fell <span style=\"color:red\">disorientated!</span>");
set(e_combat, "pl_red", savedRandomInt(3,10));
}
var rnd = savedRandomInt(0,2);
if (rnd==1) {
var rnd = savedRandomInt(0,199);
if (rnd>e_player.fightexp) {
OutputText ("The demon throws a <span style=\"color:red\">fireball</span> at you. You fell an intense <span style=\"color:red\">pain</span>.");
var damage = savedRandomInt(2,5);
set(e_combat, "pl_ht", max(1,e_combat.pl_ht- damage));
}
else {
OutputText ("The demon throws a <span style=\"color:red\">fireball</span> at you, but you manages to <span style=\"color:blue\">dodge</span> it");
}
}
}
if (HasAttribute(enemy,"stance")) {
set(e_combat, "en_mult", 1);
if (enemy.stance == "Eisenport" && e_combat.pl_stance!="Eisenport") {
if (mode == "Attack and defend.") {
OutputText ("you managed to penetrate his Eisenport stance");
}
else {
OutputText ("the enemy tricked you with his fighting stance");
set(e_combat, "pl_red", savedRandomInt(3,8));
}
}
else if (enemy.stance == "Nebenhut" && e_combat.pl_stance!="Nebenhut") {
if (mode == "Full defense.") {
set(e_combat, "en_red", 5);
}
else {
OutputText ("the enemy tricked you with his fighting stance");
set(e_combat, "pl_red", savedRandomInt(1,3));
}
}
else if (enemy.stance == "Right vom tag") {
OutputText ("the enemy makes a full attack move");
set(e_combat, "en_mult", -2);
set(e_combat, "en_red", 3);
}
else if (enemy.stance == "Bocca di falcone" && e_combat.pl_stance!="Bocca di falcone") {
OutputText ("the enemy makes a full attack move");
if (mode == "Full defense.") {
OutputText ("the enemy tricked you with his fighting stance");
set(e_combat, "en_mult", -3);
set(e_combat, "pl_red", 2);
}
else {
set(e_combat, "en_mult", -2);
set(e_combat, "en_red", 3);
}
}
else if (enemy.stance == "Fool's guard" && e_combat.pl_stance!="Fool's guard" ) {
if (mode=="Full attack.") {
OutputText ("the enemy tricked you with his fighting stance");
set(e_combat, "en_mult", -3);
set(e_combat, "pl_red", savedRandomInt(2,8));
}
else {
set(e_combat, "pl_red", 1);
}
}
}
set(e_combat, "pl_mult", 1);
if (mode == "Full attack.") {
set(e_combat, "pl_mult", -2);
}
if (e_combat.pl_stance == "Eisenport" && enemy.stance!="Eisenport") {
if (enemy.stance == "Nebenhut" || enemy.stance =="") {
OutputText ("Your Eisenport stance was ineffecive.");
}
else {
set(e_combat, "en_red", e_combat.en_red + savedRandomInt(3,8));
}
}
else if (e_combat.pl_stance == "Nebenhut" && enemy.stance!="Nebenhut") {
if (enemy.stance == "Fool's guard") {
set(e_combat, "pl_red", e_combat.pl_red+5);
}
else {
set(e_combat, "en_red", e_combat.en_red+savedRandomInt(1,3));
}
}
else if (e_combat.pl_stance == "Right vom tag") {
set(e_combat, "pl_mult", -2);
set(e_combat, "pl_red", e_combat.pl_red+3);
var mode = "Attack and defend.";
}
else if (e_combat.pl_stance == "Bocca di falcone" && enemy.stance!="Bocca di falcone") {
if (enemy.stance=="Fool's guard") {
OutputText ("you tricked the enemy with the Bocca di falcone");
set(e_combat, "pl_mult", -3);
set(e_combat, "en_red", e_combat.en_red + 2);
set(e_combat, "pl_red", 0);
var mode = "Attack and defend.";
}
else {
set(e_combat, "pl_mult", -2);
set(e_combat, "pl_red", e_combat.pl_red+3);
}
}
else if (e_combat.pl_stance == "Fool's guard" && enemy.stance!="Fool's guard" ) {
if (enemy.stance=="Right vom tag") {
OutputText ("you tricked the enemy with your fighting stance");
set(e_combat, "pl_mult", -3);
set(e_combat, "pl_red", 0);
set(e_combat, "en_red", e_combat.en_red+savedRandomInt(2,8));
var mode = "Attack and defend.";
}
else {
set(e_combat, "en_red", e_combat.en_red+1);
}
}
if (mode == "Full attack." || mode == "Attack and defend.") {
var pl_test = testSkill(e_combat.pl_exp,e_combat.pl_red,e_combat.pl_mult);
var en_test = testSkill(e_combat.en_exp,e_combat.en_red,1)-2;
debmsg ("pl attack:pl_test="+pl_test+",en_test"+en_test+",pl_mult="+e_combat.pl_mult+",pl_red="+e_combat.pl_red+",en_red="+e_combat.en_red);
if (pl_test>en_test) {
var damage = savedRandomInt(0,e_combat.pl_exp)+e_combat.pl_dam;
if (pl_test-10>en_test) {
OutputText ("You <span style=\"color:blue\">hit</span> your foe <b>very hard</b>.");
var damage = e_combat.pl_exp+e_combat.pl_dam;
}
else {
OutputText ("You <span style=\"color:blue\">hit</span> your foe.");
}
var base_dam = damage;
if (mode == "Full attack.") {
var damage = damage+damage/2;
}
var damage = damage - enemy.armour;
if (damage<0) {
var damage = 0;
}
if (damage==0) {
OutputText ("Your attack was absorbed by the foe's armor");
}
set(e_combat, "en_ht", e_combat.en_ht-damage);
set(e_combat, "en_red", damage/2);
if (e_combat.en_red>4) {
OutputText ("Your foe is suffering in pain.");
}
else if (e_combat.en_red>2) {
OutputText ("Your foe is dizzy.");
}
else if (e_combat.en_red>1) {
OutputText ("Your foe is a little dizzy.");
}
if (e_combat.en_ht< enemy.ht/4) {
OutputText ("Your foe is <span style=\"color:blue\">wounded</span> and near exhaustion.");
}
debmsg ("pl hits:dam="+damage+"("+base_dam+"),en_ht="+e_combat.en_ht+",en_red="+e_combat.en_red);
}
else {
OutputText ("You <span style=\"color:red\">missed</span> your attack");
var en_red = 0;
}
}
else {
OutputText ("You choose to only defend for a while");
}
if (e_combat.en_ht>=0) {
set(e_combat, "pl_mult", 1);
if (mode == "Full defense.") {
set(e_combat, "pl_mult", -2);
}
var pl_test = testSkill(e_combat.pl_exp,e_combat.pl_red,e_combat.pl_mult)-2;
var en_test = testSkill(e_combat.en_exp,e_combat.en_red,e_combat.en_mult);
debmsg ("pl attack:pl_test="+pl_test+",en_test"+en_test+",pl_mult="+e_combat.pl_mult+",en_mult="+e_combat.en_mult+",pl_red="+e_combat.pl_red+",en_red="+e_combat.en_red);
if (en_test>pl_test || mode == "Full attack.") {
var damage = savedRandomInt(0,e_combat.en_exp)+e_combat.en_dam;
if (en_test-10>pl_test) {
OutputText ("Your foe <span style=\"color:red\">hits</span> you <b>very hard</b>.");
var damage = e_combat.en_exp+e_combat.en_dam;
}
else {
OutputText ("Your foe <span style=\"color:red\">hits</span> you.");
}
var base_dam = damage;
if (mode == "Full defense.") {
var damage = damage -damage/2;
}
else if (e_combat.en_mult<0) {
var damage = damage + (-e_combat.en_mult)*damage/2;
}
var damage = damage - e_combat.pl_armour;
if (damage<0) {
var damage = 0;
}
if (damage==0) {
OutputText ("Your armor absorbs the damage");
}
set(e_combat, "pl_ht", e_combat.pl_ht-damage);
var cur_red = e_combat.pl_red;
set(e_combat, "pl_red", damage/2);
if (e_combat.pl_red>4) {
OutputText ("You are suffering in pain.");
}
else if (e_combat.pl_red>2) {
OutputText ("You are dizzy.");
}
else if (e_combat.pl_red>1) {
OutputText ("You are a little dizzy.");
}
else if (e_combat.pl_red<=1 && cur_red>1 && enter_red>1) {
OutputText ("You are no longer dizzy.");
}
if (e_combat.pl_ht< (10+e_combat.pl_exp)/4) {
OutputText ("<b>You are <span style=\"color:red\">wounded</span> and near exhaustion.</b>");
}
debmsg ("foe hits:dam="+damage+"("+base_dam+"),pl_ht="+e_combat.pl_ht+",pl_red="+e_combat.pl_red);
}
else {
OutputText ("Your foe <span style=\"color:blue\">missed</span> his attack");
if (e_combat.pl_red>2 && enter_red>1) {
OutputText ("You are no longer dizzy.");
}
set(e_combat, "pl_red", 0);
}
}
if (e_combat.en_ht<0) {
MoveObject (enemy, GetObject(e_combat_room.room));
MoveObject (e_player, GetObject(e_combat_room.room));
set(e_combat, "result", "win");
if (enemy.danger=="death") {
OutputText ("You <b>killed</b> "+GetDisplayName(enemy)+".");
kill_monster (enemy);
}
else {
OutputText (GetDisplayName(enemy)+" recognized "+hisHer(enemy)+" <span style=\"color:blue\">defeat</span>.");
}
var exp = e_combat.en_exp - e_combat.pl_exp;
if (exp<-2) {
var exp = 0;
}
else if (exp<2) {
var exp = 2;
}
if (exp>0) {
var exp = savedRandomInt(exp/2+1,exp+2);
}
if (enemy == e_impostor || enemy == e_orc1 || enemy == e_captain) {
var exp = exp+2;
}
exp = Math.ceil(exp)
OutputText ("The Fight is over. You <span style=\"color:blue\">won "+exp+"</span> fighter experience points.");
set(e_player, "fightexp", e_player.fightexp+exp);
if (HasAttribute(e_player.parent,"turns")) {
set(e_player.parent, "turns", 0);
}
removeEnemy (enemy);
}
else if (e_combat.pl_ht<0) {
MoveObject (e_player, GetObject(e_combat_room.room));
MoveObject (enemy, GetObject(e_combat_room.room));
debmsg ("player LOST");
OutputText ("You <span style=\"color:red\">lost</span> this match.");
set(e_combat, "result", "lost");
if (enemy.danger=="death") {
debmsg ("player DIED");
if (HasAttribute(e_player.parent,"turns")) {
set(e_player.parent, "turns", 0);
}
death (e_player.parent);
}
else {
var exp = e_combat.en_exp - e_combat.pl_exp;
if (exp>0) {
OutputText ("The Fight is over. You <span style=\"color:blue\">won "+exp+"</span> fighter experience points.");
set(e_player, "fightexp", e_player.fightexp+exp);
}
}
if (e_player.parent==e_courtyard1) {
OutputText ("You loose the contest. Perhaps you should train a little more.");
set(e_player, "contest", 0);
set(e_contester1, "visible", false);
set(e_contester1, "parent", e_courtyard1);
set(e_contester2, "visible", false);
set(e_contester2, "parent", e_courtyard1);
set(e_contester3, "visible", false);
set(e_contester3, "parent", e_courtyard1);
}
}
else {
if (enemy==e_impostor) {
if (savedRandomChance(30)) {
set(e_impostor, "bolt", true);
OutputText ("The enemy mumbles strange words...");
}
else {
set(e_impostor, "bolt", false);
}
}
if (enemy==e_orc1) {
set(e_combat, "en_mult", 1);
if (savedRandomChance(30)) {
set(e_orc1, "rage", true);
OutputText ("The orc stares at you with an intense rage in the eyes");
}
else {
if (e_orc1.rage) {
if (e_combat.en_red<4) {
set(e_combat, "en_red", 4);
}
}
set(e_orc1, "rage", false);
}
}
if (HasAttribute(enemy,"stance")) {
var rnd = savedRandomInt(0,6);
var dif = max(e_combat.en_exp - e_combat.pl_exp,0);
var dif = savedRandomInt(0,dif);
if (rnd==1) {
set(enemy, "stance", "Eisenport");
if (dif==0) {
OutputText ("The enemy assumes an Eisenport stance");
}
}
else if (rnd==2) {
set(enemy, "stance", "Nebenhut");
if (dif==0) {
OutputText ("The enemy assumes a Nebenhut stance");
}
}
else if (rnd==3) {
set(enemy, "stance", "Right vom tag");
if (dif==0) {
OutputText ("The enemy assumes a Right vom tag stance");
}
}
else if (rnd==4) {
set(enemy, "stance", "Bocca di falcone");
if (dif==0) {
OutputText ("The enemy assumes a Bocca di falcone stance");
}
}
else if (rnd==5) {
set(enemy, "stance", "Fool's guard");
if (dif==0) {
OutputText ("The enemy assumes a Fool's guard stance");
}
}
else {
set(enemy, "stance", "");
}
if (dif>0) {
OutputText ("The enemy assumes an unknown guard stance");
}
}
printCombatRoom();
}
}
return (true);
}
function removeEnemy(enemy)
{
if (e_player.parent==e_courtyard1) {
MoveObject (enemy, e_void);
OutputText ("You won this match!");
if (e_contester1.parent==e_void && e_contester2.parent==e_void && e_contester3.parent==e_void) {
set(e_player, "contest", 2);
OutputText ("The referee raises your hand and says <i>We have a winner!</i>. <br/>You completed all guild quests.");
set(e_player, "level", 3);
}
}
else if (enemy==e_orc1) {
UnlockExit (e_forest1_to_forest_current);
UnlockExit (e_forest1_to_forest_house);
UnlockExit (e_forest_current_to_forest1);
}
else if (enemy==e_brigand1) {
UnlockExit (e_forest_current2_to_hide_entrance);
}
else if (enemy==e_impostor) {
dead_impostor();
}
else if (enemy==e_hall_guard) {
MoveObject (e_hall_guard, e_void);
UnlockExit (e_exit_to_captain_office);
UnlockExit (e_hallway_to_hallway2);
if (e_player.class=="warrior") {
set(e_player, "stance", true);
OutputText ("The captain enters the hall wielding his sword ready to attack!");
MoveObject (e_captain, e_hallway);
set(e_captain, "aggressive", true);
set(e_player.parent, "turns", 1);
}
}
else if (enemy==e_castle_guard) {
OutputText ("This fight <b>damaged</b> your small sword.");
set(e_smallsword, "alias", e_smallsword.alias + "(damaged)");
}
else if (enemy==e_captain1) {
set(e_captain, "parent", e_void);
set(e_elven_ring, "parent", e_captain1);
UnlockExit (e_outside_to_captain_office);
}
else if (enemy==e_demon_guard1) {
UnlockExit (e_hallway2_to_corridor);
MoveObject (enemy, e_void);
}
else if (enemy==e_demon_guard2) {
UnlockExit (e_corridor2_to_antechamber);
MoveObject (enemy, e_void);
}
else if (enemy==e_stone_god) {
UnlockExit (e_temple1_to_temple2);
UnlockExit (e_temple1_to_cage);
set(e_temple1, "look", "The temple is now safe.");
}
}
function fightTurn(enemy)
{
debmsg ("pl:exp="+e_combat.pl_exp+",ht="+e_combat.pl_ht+",red="+e_combat.pl_red);
debmsg ("foe:exp="+e_combat.en_exp+",ht="+e_combat.en_ht+",red="+e_combat.en_red);
set(e_combat_room, "enemy", enemy.name);
set(e_combat_room, "canFlee", !(GetBoolean(enemy, "block_flee")));
set(e_combat_room, "room", e_player.parent.name);
set(e_combat_room, "player_enters_by", e_player.last_room);
MoveObject (enemy, e_combat_room);
MoveObject (e_player, e_combat_room);
return (true);
}
function fightTurn_(enemy)
{
var actionList = NewStringList();
listadd (actionList, "Attack and defend.");
listadd (actionList, "Full attack.");
listadd (actionList, "Full defense.");
if (!(GetBoolean(enemy, "block_flee"))) {
listadd (actionList, "Flee.");
}
debmsg ("pl:exp="+e_combat.pl_exp+",ht="+e_combat.pl_ht+",red="+e_combat.pl_red);
debmsg ("foe:exp="+e_combat.en_exp+",ht="+e_combat.en_ht+",red="+e_combat.en_red);
if (e_combat.result!="") {
debmsg ("combat eneded, returning..."+e_combat.result);
return (false);
}
showmenu_async ("Choose your action", actionList, false, function(result) { fightMenu (enemy, result); });
debmsg ("showmenu ended");
return (true);
}
function hisHer(npc)
{
if (npc.gender=="she") {
return ("her");
}
else if (npc.gender=="they") {
return ("their");
}
else {
return ("his");
}
}
function debmsg(str)
{
if (e_game.debug) {
Log ("@@ "+str);
}
}
function get_gold_dagger(pdagger)
{
if (pdagger.parent==e_iron_safe) {
OutputText ("When you get the dagger it activates some mechanism that locks the room.<br/>The Weapon's Master arrives and says:<br/><i>Ha! Another thief trying to rob me! You known what I'm going to do with you?</i><br/><i>I'm going to ROB YOU. </i><br/>And so you give him all your coins just before he kicks you out of his guild.");
set(e_bag_master, "coins", e_purse.coins);
set(e_purse, "coins", 0);
MoveObject (e_player, e_temple_phoenix);
MakeObjectVisible (e_bag_master);
HelperCloseObject (e_iron_safe);
set(e_iron_safe, "locked", true);
MoveObject (pdagger, e_iron_safe);
}
else {
AddToInventory (pdagger);
}
}
function check_thief_quest()
{
if (e_gold_dagger.parent==e_void && e_wand.parent==e_void) {
OutputText ("<i>Well done! So, now you need to increase your status, I will help you! A few weeks ago that thug stole a valuable painting from the palace. It happens that I have this painting here... take it and return it to the king's herald  </i><br/>And so you returned the painting to the Herald, and received a reward of 10 coins.<br/>You completed all guild quests.");
set(e_player, "level", 3);
set(e_purse, "coins", e_purse.coins+10);
}
}
function gameStart()
{
request ("Hide", "Panes");
eval ("$( 'body' ).hide();")
eval ("$('#location').text('What is your name?');")
PrintCentered (e_game.description);
//eval ("$( 'body' ).toggle( 'pulsate' );")
eval ("$( 'body' ).toggle( 'pulsate' );")
checkMusic();
playsound ("thunder.mp3", false, false);

}
function newGame()
{
getinput_async (function(result) { doNewGame (result); });
request ("Show", "Command");
OutputText ("<br/><b>By what name shalt thou be called?</b>");
}
function loadGame()
{
set(e_player, "playername", "ToBeDefined");
executeJS ("loadLocal");
}
function askHelp()
{
OutputText ("You get no answer. (The topics you can ask about are usually in <b>bold</b> when you speak or ask about something.)");
}
function calcArmour()
{
var head = 0;
var body = 0;
var shield = 0;
var dhead = "nothing";
var dbody = "nothing";
var dshield = "nothing";
var list_item = ScopeInventory();
var list_item_isarray = (Object.prototype.toString.call(list_item) === '[object Array]');
for (var iterator_item in list_item) {
var item = list_item_isarray ? list_item[iterator_item] : iterator_item;
if (list_item_isarray || iterator_item!="__dummyKey") { if (HasAttribute(item, "armour")) {
if (item.loc=="body" && body<item.armour) {
var body = item.armour;
var dbody = item.alias;
}
else if (item.loc=="head" && head<item.armour) {
var head = item.armour;
var dhead = item.alias;
}
else if (item.loc=="shield" && shield<item.armour) {
var shield = item.armour;
var dshield = item.alias;
}
} }
}
OutputText ("You wear: "+dhead+" at head; "+dbody+" at the body; "+dshield+" as a shield.");
return (head+body+shield);
}
function chooseWeapon()
{
var dam = -1;
var wield = "bare hands";
var list_item = ScopeInventory();
var list_item_isarray = (Object.prototype.toString.call(list_item) === '[object Array]');
for (var iterator_item in list_item) {
var item = list_item_isarray ? list_item[iterator_item] : iterator_item;
if (list_item_isarray || iterator_item!="__dummyKey") { if (HasAttribute(item, "damage")) {
if (dam<item.damage) {
var dam = item.damage;
var wield = item.alias;
}
} }
}
OutputText ("You fight with "+wield);
return (dam);
}
function attack(room, enemy)
{
OutputText ("The "+enemy.alias+" attacks...");
if (e_player.class=="thief" || e_player.class=="mage") {
if (HasAttribute(e_player.parent,"turns")) {
set(e_player.parent, "turns", 0);
}
death (room);
}
else {
fightEnemy (enemy);
}
}
function kill_monster(monster)
{
if (HasAttribute(monster, "coins")) {
if (monster.coins>0) {
OutputText ("You searched the corpse. You found "+monster.coins+" coins, that you placed in your purse.");
set(e_purse, "coins", e_purse.coins+monster.coins);
}
}
var first_obj = true;
var list_item = GetDirectChildren(monster);
var list_item_isarray = (Object.prototype.toString.call(list_item) === '[object Array]');
for (var iterator_item in list_item) {
var item = list_item_isarray ? list_item[iterator_item] : iterator_item;
if (list_item_isarray || iterator_item!="__dummyKey") { if (GetBoolean(item, "take")) {
set(item, "parent", monster.parent);
if (first_obj) {
OutputText ("You found the following objects in the corpse:");
var first_obj = false;
}
OutputText ("---- {object:"+item.name+"}");
} }
}
set(monster, "parent", e_void);
}
function freeTiedMan()
{
set(e_tied_brigand, "tied", false);
set(e_tied_brigand, "sleep", true);
set(e_tied_brigand, "alias", "unconscious man");
set(e_rope_tie, "parent", e_void);
OutputText ("The {object:tied_brigand:man} falls from the tree to the ground, hitting his head and passing away.");
if (e_player.class=="warrior" || e_player.class=="thief") {
set(e_rope, "visible", true);
}
}
function tie_rope(object)
{
if (object==e_tree_river) {
OutputText ("You tied the rope to the strong trees, and use the rope to cross the rapids. You tied the rope to the trees in the other side so that you now can cross the river anytime.");
RemoveObject (e_rope);
UnlockExit (e_rapids_exit);
set(e_tree_river, "prefix", "strong");
set(e_tree_river, "alias", "trees with a rope");
set(e_tree_river, "suffix", "crossing the river");
}
else {
OutputText ("Why should you tie this?");
}
}
function finishBrigands()
{
set(e_barrier, "visible", false);
set(e_tied_brigand, "visible", false);
OutputText ("Leonard, the Brigand Leader, says:<br/><i>There is a great festival happening at Linwynne. Vourtram moved his court of devils to the old castle. It is the perfect time to surprise strike him. Meet me in the castle in a couple of days.</i> ");
MakeObjectVisible (e_brigands);
set(e_road_exit2, "lockmessage", "You better do that by horse! It is a long road...");
}
function play_flute()
{
OutputText ("You blow the flute and it plays 'Winyadepla'.");
if (e_player.parent == e_pit) {
OutputText ("The Trow seems a lot more friendly to you now");
set(e_Trow, "aggressive", false);
}
else if (e_player.parent == e_midgard) {
OutputText ("You hear a deep humming coming from the pit.");
}
}
function dead_impostor()
{
OutputText ("When the impostor dies, it turns back to his original demoniac form. Soon after the fight, other brigands arrive with Elias. <br/>He says: <i>I discovered where Leonard, our leader is. Vourtram's minions tried to kill him near the river, and he felt down the rapids. They thought he was dead, but he was only hurt. He will arrive at any moment.</i><br/>And so Leonard came back, and promised to help you against Vourtram.");
OutputText ("Leonard says: <i>The impostor used this potion to take my form. Please, keep his potion and use it to enter the castle. Drink and you will take the form of one of ours enemies.</i>");
MoveObject (e_disguise_potion2, e_player);
MoveObject (e_orc1, e_forest_current);
set(e_orc1, "exp", 4);
set(e_orc1, "armour", 4);
set(e_orc1, "ht", 20);
set(e_forest_current_to_forest1, "locked", true);
finishBrigands();
}
function GB(obj, attr)
{
if (HasAttribute(obj,attr)) {
return (GetBoolean(obj,attr));
}
else {
return (false);
}
}
function doLibTurn()
{
var list_item = GetDirectChildren(e_lib1);
var list_item_isarray = (Object.prototype.toString.call(list_item) === '[object Array]');
for (var iterator_item in list_item) {
var item = list_item_isarray ? list_item[iterator_item] : iterator_item;
if (list_item_isarray || iterator_item!="__dummyKey") { if (item!=e_player) {
MoveObject (item, e_lib2);
} }
}
var list_item = GetDirectChildren(e_lib12);
var list_item_isarray = (Object.prototype.toString.call(list_item) === '[object Array]');
for (var iterator_item in list_item) {
var item = list_item_isarray ? list_item[iterator_item] : iterator_item;
if (list_item_isarray || iterator_item!="__dummyKey") { if (item!=e_player) {
MoveObject (item, e_lib2);
} }
}
}
function set_mouse_trap()
{
OutputText ("You place some cheese on the trap");
set(e_mouse_trap, "alias", "baited mouse trap");
SetObjectFlagOn (e_mouse_trap, "cheese");
}
function add_cauldron(item)
{
if (e_cauldron.switchedon) {
if (e_immortality_book.parent == e_player) {
if (item==e_dragon_blood) {
OutputText ("You pour the vial in the cauldron.");
MoveObject (e_dragon_blood, e_cauldron);
}
else if (item==e_coconut_water) {
OutputText ("You pour the coconut water in the cauldron.");
MoveObject (e_coconut_water, e_cauldron);
}
else if (item==e_oak_shield) {
OutputText ("It is not pure ashes, but it should do! You put the burned oak inside the cauldron.");
MoveObject (e_oak_shield, e_cauldron);
}
else if (item==e_cheese) {
if (e_cauldron.cheese) {
OutputText ("It already has enough cheese.");
}
else {
OutputText ("You put some cheese in the cauldron, and keep the rest for later.");
set(e_cauldron, "cheese", true);
}
}
else if (item==e_garlic) {
OutputText ("You put the garlic inside the cauldron.");
MoveObject (e_garlic, e_cauldron);
}
}
else {
OutputText ("You don't have a potion recipe.");
}
}
else {
OutputText ("You better switch the fire on before adding ingredients.");
}
if (e_dragon_blood.parent==e_cauldron && e_coconut_water.parent==e_cauldron && e_oak_shield.parent==e_cauldron && e_garlic.parent==e_cauldron && e_cauldron.cheese) {
OutputText ("The cauldron EXPLODES WITH A BOOOM!");
set(e_cauldron, "parent", e_void);
OutputText ("after the smoke dissipates, you can see that the cauldron turned into a vial of potion.");
MoveObject (e_revert_potion, e_lib2);
}
}
function do_picklock(object)
{
if (e_player.class=="thief") {
var lexit = GetObject(object.lockname);
if (lexit.locked) {
OutputText ("Piece of cake.");
UnlockExit (lexit);
if (HasAttribute(object,"open_name")) {
set(object, "alias", object.open_name);
}
}
else {
OutputText ("It is open!");
}
}
else {
OutputText ("You don't know how!");
}
}
function drinkInvisPotion()
{
if (e_gold_chest.parent == e_treasury_door) {
if (e_player.parent == e_trophy_room) {
OutputText ("You manage to hide yourself, and when nobody was watching, you drank just half of the potion. Alakazan, you are invisible. You quickly manages to bypass the guards and enter the treasury.");
MoveObject (e_player, e_treasury);
set(e_invis_potion, "uses", e_invis_potion.uses*2);
}
else {
OutputText ("It is better to spare this potion for the best place and moment.");
}
}
else {
OutputText ("You drank the remaining potion but it had no effect.");
MoveObject (e_invis_potion, e_void);
}
}
function grabMedallion()
{
MoveObject (e_medallion, e_player);
LockExit (e_master_to_antechamber);
LockExit (e_exit_to_master_room);
set(e_exit_to_master_room, "lockmessage", "You do not want another meeting with Vourtram right now.");
set(e_vourtram, "suffix", "Looks at you with rage.");
set(e_vourtram, "look", "The wizard wears a red robe and a black fez. He is ready to disembowel you.");
set(e_medallion, "suffix", "");
}
function takeMead()
{
if ((e_game.turns % 3)==0) {
OutputText ("The smith starts to slammer his hammer, making a loud sound.");
OutputText ("The elven smith has HUGE ears, but the noise is so big that you manages to get the mead from him.");
MoveObject (e_mead, e_player);
}
else {
OutputText ("The elven smith has HUGE ears, it is hard to take this without calling attention.");
}
}
function finishTheGame()
{
OutputText ("<br><b>*********************** GAME OVER **********************</b><br>");
OutputText ("You accumulated "+e_purse.coins+" coins.");
printScore();
OutputText ("<br>");
finish();
}
function savePrincess()
{
MoveObject (e_princess, e_void);
MoveObject (e_player, e_the_base);
OutputText ("Bernard says <i>Very well done! You managed to save the princess. It is a deed of a true hero.</i>");
set(e_player, "level", e_player.level+1);
set(e_guards3, "visible", false);
}
function cutRopes()
{
if (e_player.isMage) {
OutputText ("I'm not that strong.");
}
else if (e_princess.parent==e_player.parent) {
OutputText ("You hold the rope, grab the princess and cut it!");
OutputText ("<i>No... what? are you insane?</i>");
OutputText ("The chandelier falls, pushing you both across the throne room. The chandelier falls over the guards, and you both are thrown against the window, falling on the cliff into the deep cold waters of the river.");
OutputText ("You manage to swim the currents, bringing the princess to the inn, where you both recover drinking hot milk under the protection of Bernard.");
  MoveObject(e_ropes, e_void)  
  MoveObject(e_chandelier, e_void)  
DisableTurnScript (e_princessFollow);
savePrincess();
}
else {
OutputText ("Why should you do this right now?");
}
}
function changeStance(name)
{
if (e_player.stance) {
if (name=="") {
var menulist = NewStringList();
listadd (menulist, "Eisenport");
listadd (menulist, "Nebenhut");
listadd (menulist, "Right vom tag");
listadd (menulist, "Bocca di falcone");
listadd (menulist, "Fool's guard");
listadd (menulist, "None");
ShowMenu ("Pick a fighting stance:", menulist, false, function (result) { set(e_combat, "pl_stance", result);
set(e_stance, "alias", result);
printCombatRoom(); });
}
else {
set(e_combat, "pl_stance", name);
set(e_stance, "alias", name);
printCombatRoom();
}
}
else {
OutputText ("You are not ready to choose the fighting stance");
}
}
function FormatList(preList, list, preFinal, postList)
{
var result = "";
var count = 0;
var listLength = ListCount(list);
var list_isarray = (Object.prototype.toString.call(list) === '[object Array]');
for (var iterator_item in list) {
var item = list_isarray ? list[iterator_item] : iterator_item;
if (list_isarray || iterator_item!="__dummyKey") { if (LengthOf(result) == 0) {
var result = preList + " ";
}
var result = result + item;
var count = count + 1;
if (count == listLength - 1) {
var result = result + " " + preFinal + " ";
}
else if (count < listLength) {
var result = result + ", ";
}
else {
var result = result + postList;
} }
}
return (result);
}
function printCombatRoom()
{
var moves = NewStringList();
if (e_combat.pl_stance=="None" || e_combat.pl_stance=="Eisenport" || e_combat.pl_stance=="Nebenhut") {
listadd (moves, "a {command:combat normal:normal attack} move");
}
if (e_combat.pl_stance=="None" || e_combat.pl_stance=="Right vom tag" || e_combat.pl_stance=="Bocca di falcone") {
listadd (moves, "a {command:combat full:full attack} move");
}
if (e_combat.pl_stance=="None" || e_combat.pl_stance=="Fool's guard") {
listadd (moves, "a {command:combat defensive:full defense} move");
}
var txt = FormatList(" You can make ",moves,"or",".");
OutputText ("{if player.stance:Your current {command:stance} is <b>{combat.pl_stance}</b>. }"+txt+"{if combat_room.canFlee: You can also try to {command:flee}.}");
}
function psay(pmsg)
{
var pmsg = ProcessTextSection2(pmsg);
OutputText ("<i>"+pmsg+"</i>");
}
function askin(obj, topic, txt)
{
if (!(IsDefined("txt"))) {
var txt = topic;
}
return ("{command:ask "+obj+" about "+topic+":"+txt+"}");
}
function mistress_get()
{
psay ("I will enter the room and get the gem for you.");
OutputText ("After a few minutes she gives the gem to you.");
psay ("Remember that the only way to defeat Vourtram is to find his soul jar and then show it to him.");
psay ("Now, deliver this gem to Bernard in the Inn. Don't be afraid, the bigger they are, the harder they fall.");
OutputText ("She left the room after giving the medallion to you.");
MoveObject (e_mistress, e_void);
grabMedallion();
}
function checkHorse()
{
var room = e_player.parent;
var inCastle = false;
while (room!=null) {
if (room==e_the_castle) {
var inCastle = true;
}
var room = room.parent;
}
if (inCastle) {
Log ("In castle");
MoveObject (e_horse, e_the_base);
}
else {
Log ("Outside castle");
MoveObject (e_horse, e_stable);
}
}
function endGame2()
{
MakeObjectInvisible (e_demons);
MakeObjectInvisible (e_Lareak);
MakeObjectVisible (e_vourtram2);
OutputText ("Suddenly you see Vourtram over the battlements.");
if (!(e_princess.parent==e_void)) {
OutputText ("He is holding the princess, and before anybody could move, he pushes the girl that falls to her death.");
psay ("Bhahahahaha! Fools!");
}
psay ("Now you will face your doom!");
OutputText ("Vourtram jumps to the battlefield and starts to throw fireballs. You quickly manages to approach the sorcerer.");
OutputText ("Vourtram looks at you with rage in his eyes.");
if (e_player.isMage) {
if (e_diary_vourtram.parent==e_archmage) {
OutputText ("At this moment, Dashiel and his colleagues break the evil spell of Vourtram, that looses his strength for a second.");
endGame3();
}
else {
OutputText ("Vourtram throws a powerful spell at you, and you loose your consciousness.");
OutputText ("When you wake, the battle is over. Vourtram lost, but also escaped.");
endGameFinish();
}
} else if (e_soul_jar.parent!=e_player) {
OutputText ("Vourtram throws a powerful spell at you, and you loose your consciousness.");
OutputText ("When you wake, the battle is over. Vourtram lost, but also escaped.");
endGameFinish();	
}
}
function endGame()
{
if (e_player.isMage) {
MoveObject (e_teleport_orb, e_player);
}
else if (e_player.isThief) {
MakeObjectVisible (e_Lareak);
}
OutputText ("-x-");
OutputText ("    After a night of sleep, you wake up ready to the assault. The loyal forces of the King, aided by the brigands, are already positioned.");
OutputTextNoBr ("    Suddenly, a huge dragon opens a hole in the wall. It is Fafnir, that finally left the imprisonment in the castle. ");
OutputText ("You and the soldiers enter the castle by this hole, fighting the army of Vourtram. It is a tough battle, but you are winning. Many enemy soldiers are surrendering.");
OutputText ("    However, the demons of Vourtram appear. Dozens of them are flying from the windows.");
MoveObject (e_player, e_battle);
executeJS ("playMusic;3");
}
function endGame3()
{
MakeObjectInvisible (e_vourtram2);
MakeObjectVisible (e_monster);
OutputTextNoBr ("    Vourtram utter some magical words, transforming himself into a {object:monster}.");
if (e_player.isThief) {
OutputText (" The Walls fall around you, creating a {object:debris}.");
MakeObjectVisible (e_debris);
}
else {
OutputText ("");
}
if (e_player.isWarrior) {
MakeObjectVisible (e_spear);
}
}
function endGameFinish()
{
set(e_player, "marry", false);
if (e_princess.parent==e_void) {
Ask ("Do you want to marry the Princess?", function (result) { if (result) {
set(e_player, "marry", true);
}
endGameFinish2(); });
}
else {
endGameFinish2();
}
}
function endGameFinish2()
{
var demons = e_gold_chest.parent==e_void || e_elven_sword.parent==e_player || e_banish_spell.parent==e_spell_book;
var win = (e_player.isMage && e_diary_vourtram.parent==e_archmage) || e_soul_jar.parent==e_player;
if (win) {
set(e_player, "level", e_player.level+1);
}
if (demons) {
OutputText ("After the victory, the King returned to the throne.");
if (e_princess.parent==e_void) {
if (e_player.marry) {
OutputText ("You proposed to the princess, and she accepted to be your bride. You and the princess eventually married, and you became the new ruler of the land.");
}
else {
OutputText ("You received a nobility title, and an important position in the court, where you made a few good new friends. Eventually, your instincts were too strong, and you left all of this behind seeking for new adventures.");
}
if (!(win)) {
OutputText ("However, your rule was not an easy one. Poverty and plagues cursed your lands. After all, what happened to Vourtram?");
}
}
else {
OutputText ("But the King died shortly after.");
if (!(win)) {
OutputText ("An unknown count appeared to reclaim the throne, and after a short war with other factions, became the new King. Many people say that this count looks every day more like Vourtram.");
}
OutputText ("You left the kingdom shortly after these events, seeking for more adventures in distant lands!");
}
}
else {
OutputText ("After the victory, the King returned to the throne, but the kingdom was ruined.");
if (e_princess.parent==e_void) {
if (e_player.marry) {
OutputText ("You proposed to the princess, but the kingdom needed a richer and powerful pretender in order to rebuilt all damages.");
}
OutputText ("The princess married a rich prince from another kingdom.");
if (!(win)) {
OutputText ("Many people say that this prince looks very much like Vourtram.");
}
}
else {
OutputText ("And the King died shortly after.");
if (!(win)) {
OutputText ("An unknown Count appeared to reclaim the throne, and after a short war with other factions, became the new King. Many people say that this count looks every day more like Vourtram.");
}
}
OutputText ("You left the kingdom shortly after these events, seeking for more adventures in distant lands!");
}
finishTheGame();
}
function js_loadgame(cmds)
{
if (!(e_game.web)) {
OutputText ("Use the File-Open menu in the client version (or CTRL+O).");
}
else {
var gname = null;
if (cmds=="") {
OutputText ("We could not find any game do load.");
}
else {
if (Instr(cmds,"#")>0) {
var tmp = Split(cmds,"#");
var cmds = StringListItem(tmp,0);
var gname = StringListItem(tmp,1);
}
var names = retrieveSaves(cmds);
if (gname==null) {
ShowMenu ("Pick a savegame to load:", names, false, function (result) { Log ("calling doload for "+result);
doLoad (result); });
}
else {
doLoad (gname);
}
}
}
}
function doLoad(result)
{
	OutputText ("Loading game "+result+"...");
	//JS: display loading frame
	$("body").append('<div id="load_frame" style="position:fixed;z-index:10;opacity:0.8;background:rgba(0,0,0,0.6);width:100%;height:100%;top:0;left:0;"></div>');
	$('#load_frame').append('<img src="loading.gif" style="position:relative;z-index:15;top:50%;width:64px;height:64px;"></img>');
	//----end JS
	set(e_start, "result", result);

	setTimeout(function(){
		set(e_start, "loading", true);
		set(e_game, "turns", 1); //Only on JS version
		var result = e_start.result;
		set(e_start, "cmds", NewStringList());
		var save = StringDictionaryItem(e_start.saves,result);
		var end = InstrRev (save, "]");
		var st = InstrRev (save, "[");
		var version = 0;
		if (st>0 && end>0) {
			if (end<LengthOf(save)) {
				var version = Right(save,LengthOf(save)-end-1);
			}
			var rnds = Mid(save,st+1,end-st-1);
			var cmds = Left(save,st-1);
			set(e_start, "random_play", Split(rnds,","));
		} else {
			var cmds = save;
			set(e_start, "random_play", NewStringList());
		}
		Log ("all random:"+Join(e_start.random_play,","));
		set(e_start, "random", NewStringList());
		var lst = Split(cmds,".");
		var run_scripts = false; //JS
		e_game.turns=0;
		var lst_isarray = (Object.prototype.toString.call(lst) === '[object Array]');
		//JS mudou tudo para tentar usar timeouts?
		lst.reverse()
		//while (lst.length>0) lst.pop()
		/*for (var iterator_cmd in lst) {

		}*/
		doLoadTimed(lst_isarray,lst,run_scripts);
	}, 80);
}

function doLoadTimed(lst_isarray,lst,run_scripts) {
	var i=40;
	while (lst.length>0 && i-->0) {
		//var cmd = lst_isarray ? lst[iterator_cmd] : iterator_cmd;
		var cmd = lst.pop();
		if (lst_isarray || iterator_cmd!="__dummyKey") { 
			if (run_scripts) {
				RunTurnScripts();
				run_scripts = false;
			}
			if (StartsWith(cmd,"*")) {
				cmd = cmd.substring(1,cmd.length);//Right(cmd,LengthOf(cmd)-1);
				ShowMenuResponse (cmd);
				run_scripts = true;
				if (lst.length>0 && StartsWith(lst[lst.length-1],"*")) {
					run_scripts =false;
				}
			} else if (awaitingInputCallback) { 	//JS
				awaitingInputCallback = false;
				awaitingCallback = false;
				//run_scripts = true;
				var acmd=cmd;
				if (StartsWith(cmd,"%")) {
					cmd = cmd.substring(1,cmd.length);
				} else {
					acmd = "%"+cmd;
				}
				if (e_start.record) {
					listadd (e_start.cmds, acmd);
				}
	
				getinputCallback(cmd);
			} else {
				HandleCommand (cmd, null);
				run_scripts = true;
			} 	
		}
	}// while
	if (lst.length>0)
		setTimeout(function() {doLoadTimed(lst_isarray,lst,run_scripts)}, 80);
	else {	
		if (run_scripts) {
			RunTurnScripts();			
		}
			
		set(e_start, "loading", false);
		set(e_start, "random_play", NewStringList());
		clearPast(150);
		//JS -- remove frame
		$('#load_frame').remove();
		//--end JS
		//request ("Show", "Panes");
		//added in the JS version
		
		beginningOfCurrentTurnScrollPosition = $("#gameContent").height();
		scrollToEndNow();
		UpdateObjectLinks();
		var req = "setTurnLabel;"+e_game.turns;
		executeJS (req);		

	}
}
function chooseLoad()
{
var names = NewStringList();
var saves = NewStringList();
var e_start_saves_isarray = (Object.prototype.toString.call(e_start.saves) === '[object Array]');
for (var iterator_name in e_start.saves) {
var name = e_start_saves_isarray ? e_start.saves[iterator_name] : iterator_name;
if (e_start_saves_isarray || iterator_name!="__dummyKey") { listadd (names, name);
listadd (saves, name+":"+StringDictionaryItem(e_start.saves,name)); }
}
if (ListCount(names)>0) {
set(e_start, "record", false);
set(e_start, "data", Join(saves,"|"));
ShowMenu ("Pick a savegame to load:", names, false, function (result) { set(e_game, "tmp", result);
Ask ("Are you sure you want to load "+result+"?", function (result) { if (result) {
executeJS ("chooseLoadGame;"+e_game.tmp+";"+e_start.data);
set(e_start, "data", "");
}
set(e_start, "record", true); }); });
}
else {
OutputText ("There is no game to be loaded.");
}
}
function doLocalSave(text)
{
OutputTextNoBr ("Saving gameplay... ");
var send = NewStringList();
var e_start_cmds_isarray = (Object.prototype.toString.call(e_start.cmds) === '[object Array]');
for (var iterator_cmd in e_start.cmds) {
var cmd = e_start_cmds_isarray ? e_start.cmds[iterator_cmd] : iterator_cmd;
if (e_start_cmds_isarray || iterator_cmd!="__dummyKey") { var cn = LCase(Trim(cmd));
//if (!(StartsWith(cn,"save") )&& !(StartsWith(cn,"load") )&& !(StartsWith(cn,"erase"))) {//JS
listadd (send, cmd);
//} //JS
 }
}
var data = Join(send,".");
var rnds = Join(e_start.random,",");
var data = data+"["+rnds+"]";
var data = data+e_game.version;
dictionaryadd (e_start.saves, text, data);
set(e_start, "savename", text);
executeJS ("saveLocal;"+text+";"+data);
//request ("RequestSave", "");
OutputText ("Game saved.");
}
function invisClue(topic, clue)
{
if (HasAttribute(e_game, "defaultbackground")) {
var bg = LCase (e_game.defaultbackground);
}
else {
var bg = "white";
}
OutputText ("<i>" + topic + "</i> [<font class='clue' color=\"" + bg + "\">" + clue + "</font>]");  //JS
}
function doNewGame(name)
{
set(e_player, "playername", name);
OutputText ("Be welcome "+e_player.playername);
OutputText ("Type {command:Help :Help}, {command:Credits:Credits} and {command:Score:Score} at least once in the game. Try {command:Hints:Hints} if you get stuck.");
set(e_start, "cmds", NewStringList());
listadd (e_start.cmds, "my name is "+name);
//request ("Show", "Panes");
//OutputText ("<br/>");
set(e_game, "turns", 0);
MoveObject (e_player, e_temple_phoenix);
executeJS ("_retrieveSaves");
setTurnLabel(1); //only on JS version
UpdateObjectLinks(); // JS bug ?
}
function start_callback(ret)
{
set(e_start, "callback", true);
var values = Split(ret,":");
var web = StringListItem(values,1);
if (web=="false") {
set(e_game, "web", false);
newGame();
}
else {
OutputText ("<center>Do you want to start a new game or restore a previous one?</center>");
OutputText ("<center>{command:new:New Game} or {command:load:Load Game}</center>");
}
}
function js_retrieveSaves(cmds)
{
var names = retrieveSaves (cmds);

}
function retrieveSaves(cmds)
{
var names = NewStringList();
if (!(cmds=="")) {
var allSaves = Split(cmds,"|");
set(e_start, "saves", NewStringDictionary());
var allSaves_isarray = (Object.prototype.toString.call(allSaves) === '[object Array]');
for (var iterator_save in allSaves) {
var save = allSaves_isarray ? allSaves[iterator_save] : iterator_save;
if (allSaves_isarray || iterator_save!="__dummyKey") { var info = Split(save,":");
dictionaryadd (e_start.saves, StringListItem(info,0), StringListItem(info,1));
listadd (names, StringListItem(info,0)); }
}
var e_start_saves_isarray = (Object.prototype.toString.call(e_start.saves) === '[object Array]');
for (var iterator_save in e_start.saves) {
var save = e_start_saves_isarray ? e_start.saves[iterator_save] : iterator_save;
if (e_start_saves_isarray || iterator_save!="__dummyKey") { var item = StringDictionaryItem(e_start.saves,save);
Log (save+"="+item); }
}
}
return (names);
}
function stayNight()
{
if (e_inn_keeper.in_castle && e_medallion.parent==e_void) {
Ask ("This will end this game. Are you sure?", function (result) { if (result) {
endGame();
}
else {
OutputText ("I'm not ready.");
} });
}
else {
psay ("I think you must first gather more {ask:bernard:information} about the castle.");
}
}
function fairy_response(result)
{
if (e_start.record) {
//listadd (e_start.cmds, "%"+result); //JS
}
var result = LCase(Trim(result));
if (StartsWith(result,"say ")) {
var result = Replace(result,"say ","");
}
if (StartsWith(result,"answer ")) {
var result = Replace(result,"answer ","");
}
if (e_fairy_dust.parent==e_green_fairy) {
OutputText ("Your say <i>" + result+"</i>");
if (LCase(Trim(result))=="cloud" || LCase(Trim(result))=="a cloud" || LCase(Trim(result))=="clouds") {
psay ("Very well! Take this bag of dust... how about another riddle? If you win, I will teach you a spell.");
set(e_fairy_dust, "parent", e_player);
set(e_green_fairy, "riddle", 0);
}
else {
psay ("No, it is not... think about it and speak with me when you got the answer.");
}
}
else {
if (LCase(Trim(result))=="trow" || LCase(Trim(result))=="a trow") {
psay ("Very well! Here is the blind spell, I find it useful to buy time to hide or escape from bad creatures. I sense that you will need it in the future. Well, gotta go now! Nice to meet ya!");
set(e_blind_spell, "parent", e_spell_book);
set(e_green_fairy, "parent", e_void);
}
else {
psay ("No, it is not... think about it and speak with me when you got the answer.");
}
}
}
function doCastOn(object_spell, object_target)
{
if (object_spell==e_calm_spell && e_calm_spell.parent==e_spell_book) {
if (object_target==e_Wolf) {
OutputText ("You utter the magic words and the Wolf has calmed down. You suspect that this spell won't last long.");
set(e_Wolf, "calm", 8);
}
else if (object_target==e_firewall) {
OutputText ("You utter the magic words and the fire extinguishes.");
set(e_firewall, "visible", false);
set(e_bookcase, "visible", true);
set(e_history_books, "visible", true);
set(e_geo_books, "visible", true);
set(e_accounting_books, "visible", true);
set(e_computer_books, "visible", true);
set(e_lib2, "secret", 0);
set(e_levitation_spell, "visible", true);
}
else if (object_target==e_wyvern) {
OutputText ("You utter the magic words and the wyvern is much more friendly.");
set(e_wyvern, "calm", true);
UnlockExit (e_exit_to_master_room);
}
else if (object_target==e_water && e_player.parent==e_temple_trap) {
if (e_temple_trap.level==0) {
OutputText ("You utter the magic words and the current stops revealing a calm pond.");
set(e_temple_trap, "level", 1);
MakeObjectVisible (e_fern);
set(e_temple_trap, "description", "You are floating in a large pond.");
}
else {
OutputText ("You utter the magic words but nothing happens.");
}
}
else if (object_target.enemy=="yes" && GB(object_target,"affect_calm")) {
OutputText ("You utter the magic words ... and the "+object_target.alias+" leaves with no more aggression.");
removeEnemy (object_target);
set(object_target, "parent", e_void);
}
else {
OutputText ("It doesn't seems to work.");
}
}
else if (object_spell==e_banish_spell && e_banish_spell.parent==e_spell_book) {
if (HasAttribute(object_target, "demon")) {
OutputText ("You utter the magic words and the demon disappears into flames.");
removeEnemy (object_target);
}
else if (object_target==e_demons) {
OutputText ("You start to banish the demons, one by one. Eventually they give up and flee.");
endGame2();
}
else {
OutputText ("It doesn't seems to work.");
}
}
else if (object_spell==e_apport_spell && e_apport_spell.parent==e_spell_book) {
if (object_target==e_letter && e_letter.parent==e_tall_tree) {
OutputText ("You utter the magic words and the letter floats towards your hand.");
AddToInventory (e_letter);
}
else if (object_target==e_lever1) {
if (e_in_forest_tower.locked) {
OutputText ("You utter the magic words and the lever opens a secret door to the tower.");
UnlockExit (e_in_forest_tower);
}
else {
OutputText ("You utter the magic words and the lever closes the secret door to the tower.");
LockExit (e_in_forest_tower);
}
}
else if (object_target==e_rope_tie) {
OutputText ("You utter the magic words and unties the rope.");
freeTiedMan();
}
else if (object_target==e_kibisis) {
OutputText ("This object is too heavy for your spell.");
}
else if (object_target==e_lever) {
if (e_temple_trap.level==2) {
OutputText ("You utter the magic words and the lever moves.");
OutputText ("The grate opens and you crawl into a tunnel that leads back to the temple.");
MoveObject (e_player, e_temple1);
}
else {
OutputText ("You utter the magic words but nothing happens.");
}
}
else if (object_target==e_levitation_spell && e_levitation_spell.parent==e_lib2 && e_levitation_spell.visible) {
OutputText ("You utter the magic words and the parchment floats towards your hands. It is a levitation spell, that you write down at your spells book.");
set(e_levitation_spell, "parent", e_spell_book);
set(e_levitation_spell, "alias", "levitation spell");
set(e_levitation_spell, "listalias", "-- levitation spell");
set(e_levitation_spell, "look", "The levitation spell allows the wizard to move vertically.");
set(e_levitation_spell, "suffix", "");
}
else if (object_target==e_medallion && e_medallion.parent!=e_player) {
OutputText ("You utter the magic words and the medallion floats towards your hands. As you get the medallion, Vourtram wakes and yells! You are in trouble! Guards are coming! Do something! Save!");
grabMedallion();
}
else {
OutputText ("It doesn't seems to work.");
}
}
else if (object_spell==e_shape_spell) {
if (object_target==e_tree_river && e_rapids_exit.locked==true) {
UnlockExit (e_rapids_exit);
set(e_tree_river, "alias", "tree bridge");
OutputText ("You utter the magic words ordering the trees to bend over the rapids, creating a bridge.");
}
else if (object_target==e_tree_forest) {
OutputText ("This spell does not work with dead trees.");
}
else if (object_target==e_bushes) {
OutputText ("You utter the magic words ordering the bushes to shape like a {random:giant rabbit:bear:donut:dragon:hypercube:cow}. After a while, you decide to revert the spell... it is better in its natural shape");
}
else if (object_target==e_vines2) {
if (e_hall_guard.parent == e_hallway) {
if (e_hall_guard.blind> 0) {
OutputText ("You wait until the guard is near the vines and utter the magic words ordering the vines to grab and pull the guard through the window. You can see his body dragged by the river flow.");
removeEnemy (e_hall_guard);
}
else {
OutputText ("You don't see the point of doing this now.");
}
}
else {
OutputText ("You don't see the point of doing this.");
}
}
else if (object_target==e_fern) {
if (e_temple_trap.level==1) {
OutputText ("You utter the magic words and grows enough fern to create a buoy.");
OutputText ("You manage to float until you find a wall.");
set(e_temple_trap, "level", 2);
MakeObjectInvisible (e_fern);
MakeObjectVisible (e_wall);
set(e_temple_trap, "description", "You are floating in front of a wall.");
}
else {
OutputText ("You utter the magic words but nothing happens.");
}
}
else {
OutputText ("I don't see how to shape this.");
}
}
else if (object_spell==e_blind_spell && e_blind_spell.parent==e_spell_book) {
if (object_target==e_medusa) {
set(e_medusa, "blind", 3);
OutputText ("She seems to be blinded for a few seconds. But not enough to enter the library.");
}
else if (object_target==e_fruit_dealer) {
set(e_fruit_dealer, "blind", 4);
OutputText ("She seems to be blinded for a few seconds.");
}
else if (object_target==e_hall_guard) {
set(e_hall_guard, "blind", 4000);
OutputText ("You utter the magic words and he seems to be blinded.");
}
else if (object_target==e_cook) {
OutputText ("Just when you start the incantations, the cook beats your hand with a big wooden spoon!");
psay ("Don't get funny with me.");
}
else if (object_target==e_officers || object_target==e_guards3 || object_target==e_guards2 || object_target==e_guards || object_target==e_castle_guard) {
OutputText ("You don't think it would be a very good idea.");
}
else {
OutputText ("You utter the magical words, but the spell seems to be ineffective.");
}
}
else if (object_spell==e_levitation_spell && e_levitation_spell.parent==e_spell_book) {
if (object_target==e_well) {
OutputText ("You gently floats down the well.");
MoveObject (e_player, e_sub_river);
}
else if (object_target==e_sturdy_tree) {
OutputText ("You gently floats up the tree to find a closed window. Perhaps if you were a thief.");
}
else if (object_target==e_window1) {
if ( e_medallion.parent==e_player) {
OutputText ("You climb the window and utter the magical words, floating down. Meanwhile, Vourtram casts an spell at you. You are now imprisoned by an energy sphere.");
MoveObject (e_player, e_floating_sphere);
}
else {
OutputText ("If you do that now, Vourtram would notice you.");
}
}
else {
OutputText ("You utter the magical words, but the spell seems to be ineffective.");
}
}
else {
if (HasAttribute(object_target, "enemy")) {
OutputText ("You cast "+object_spell.name);
}
else {
OutputText ("You utter the magical words, but the spell seems to be ineffective.");
}
}
}
function doCast(object_spell)
{
if (object_spell==e_reveal_spell && e_reveal_spell.parent==e_spell_book) {
if (e_player.parent == e_dark_alley && e_kobold.parent==e_game) {
MoveObject (e_kobold, e_dark_alley);
OutputText ("Your spell reveals a {object:kobold:Kobold} hidden in the shadows. He looks quite surprised:<br/><i>Oh my! please, don't kill me!</i>");
}
else if (e_player.parent == e_guild_mages) {
if (e_fake_diamond.visible==false) {
MakeObjectVisible (e_fake_diamond);
OutputText ("Your spell reveals an invisible {object:fake_diamond:diamond}. Dashiel exclaims: <i>Great! You found my diamond imitation. You can have it, if you like. </i>");
}
else {
OutputText ("This room is full of magical spells, but none of interest for you");
}
}
else if (e_player.parent == e_guild_thieves && e_kobold_ring.parent==e_elder_thief) {
OutputText ("The elder thief has a magical ring in his pocket.");
MakeObjectVisible (e_kobold_ring);
if (e_kobold_ring.known==1) {
OutputText ("You sense that this is the Kobold's emerald ring.");
}
}
else if (e_player.parent == e_temple_trap) {
OutputText ("You are under the effect of an unknown spell.");
}
else if (e_player.parent == e_forest_house) {
OutputText ("The spell reveals a magically concealed {object:lever1:lever}.");
MakeObjectVisible (e_lever1);
}
else if (e_player.parent == e_midgard) {
OutputText ("You sense an aggressive spiritual force from the pit...probably a Trow.");
}
else if (e_player.parent==e_forest3 && e_green_fairy.visible==false) {
MakeObjectVisible (e_green_fairy);
OutputText ("You hear a thin {object:green_fairy:voice} coming from the trees: <i>I'm here, nosy giant! Wanna play with me?</i>");
}
else if (e_player.parent==e_lib1 || e_player.parent==e_lib12) {
set(e_lib_door, "to", e_lib2);
MoveObject (e_player, e_lib2);
}
else if (e_player.parent==e_throne_room && !(e_floating_portal.visible)) {
set(e_floating_portal, "visible", true);
OutputText ("The spell reveals a small portal floating in the air above the throne");
}
else if (e_player.parent==e_hide_entrance) {
OutputText ("You sense an unknown spell in this boulder.");
}
else {
OutputText ("The spell reveals nothing magical.");
}
}
else if (object_spell==e_teleport_spell && e_teleport_spell.parent==e_spell_book) {
if (e_teleport_orb.parent==e_player) {
OutputText ("Nothing happens");
}
else {
if (e_princess.parent == e_player.parent) {
OutputText ("you grab the princess and you both teleport");
DisableTurnScript (e_princessFollow);
MoveObject (e_princess, e_teleport_orb.parent);
}
var insidePortal = isInArea(e_temple_entrance);
if (insidePortal) {
OutputText ("The teleport spell didn't seems to work here!");
}
else {
if (e_player.parent==e_master_room && e_master_to_antechamber.locked) {
OutputText ("You don't have time to this spell now!");
}
else {
MoveObject (e_player, e_teleport_orb.parent);
checkHorse();
}
}
}
}
else if (object_spell==e_levitation_spell && e_levitation_spell.parent==e_spell_book) {
if (e_player.parent==e_sub_river) {
OutputText ("You gently floats up through the well.");
MoveObject (e_player, e_courtyard2);
}
else if (e_player.parent==e_courtyard2) {
OutputText ("You could float up, but the guards would see you. However, you can cast levitation at the well, if you whish to go down.");
}
else if (e_player.parent==e_west_wall || e_player.parent==e_east_wall || e_player.parent==e_the_gate) {
OutputText ("You could float up, but the guards would see you.");
}
else if (e_player.parent==e_throne_room) {
OutputText ("You levitates towards the floating portal You are close, but it is too small for you to enter");
set(e_portal, "player_float", true);
}
else if (e_player.parent==e_temple_entrance) {
OutputText ("You levitates and enters the temple by the second story.");
MoveObject (e_player, e_temple3);
}
else {
OutputText ("You gently floats up and down. However... for what?");
}
}
else {
OutputText ("cast at what?");
}
}
function isInArea(area)
{
var room = e_player.parent;
var inArea = false;
while (room!=null) {
if (room==area) {
var inArea = true;
}
var room = room.parent;
}
return (inArea);
}
function doThrow(object_weapon, object_target)
{
if (object_weapon.parent!=e_player) {
OutputText ("You don't have it.");
}
else if (e_player.class=="warrior") {
Log ("object_weapon:"+object_weapon);
Log ("object_target.name:"+object_target.name);
if (e_player.parent == e_combat_room) {
OutputText ("You can't throw when in close combat.");
}
else if (object_weapon==e_wooden_spear && object_target==e_outlaw_thug && object_target.parent==e_dark_alley) {
OutputText ("You throw the spear in the cornered thug, hitting his chest. The wound is not deadly, but he can't move anymore. Finally the authorities arrive and you receive a reward of 10 coins for the capture.");
MoveObject (e_outlaw_thug, e_void);
set(e_purse, "coins", e_purse.coins+10);
set(e_player, "level", 1);
set(e_player, "fightexp", e_player.fightexp+5);
}
else if (object_target==e_rope_tie ) {
if (object_weapon==e_wooden_spear && object_weapon.parent==e_player) {
OutputText ("Bullseye!");
freeTiedMan();
}
else if (object_weapon==e_smallsword) {
OutputText ("It is too clumsy to be thrown.");
}
else {
OutputText ("It won't work.");
}
}
else if (object_weapon==e_horn ) {
OutputText ("The horn is very sharp but unbalanced.");
}
else if (object_weapon==e_wooden_spear && object_target==e_wyvern ) {
if (e_wooden_spear.horned) {
OutputText ("The spear trespasses the beast's heart, and both are consumed in red flames.");
set(e_wooden_spear, "parent", e_void);
set(e_wyvern, "parent", e_void);
UnlockExit (e_exit_to_master_room);
}
else {
OutputText ("You throw the spear but it rebounds at the thick skin of the wyvern. The {object:wooden_spear} lays on the ground.");
MoveObject (e_wooden_spear, e_player.parent);
}
}
else if (object_weapon==e_spear && object_target==e_monster ) {
OutputText ("You grab the spear, aim at the beast's heart and throw... the spear trespasses the monster's chest.");
OutputText ("The beast drops in the ground, dead. The crowd shouts:");
psay ("<b>Victory! VOURTRAM IS DEAD!</b>");
endGameFinish();
}
else {
OutputText ("Why should I throw that?");
}
}
else {
OutputText ("I have a bad aim...better not.");
}
}
function useAlt(cmd, object1, object2)
{
if (!(HasAttribute(object1,"useCmds"))) {
return (false);
}
if (ListContains( object1.useCmds,cmd)) {
if (object2==null) {
HandleSingleCommand ("use "+GetDisplayAlias (object1));
}
else {
HandleSingleCommand ("use "+GetDisplayAlias (object1)+" with "+GetDisplayAlias (object2));
}
return (true);
}
else {
return (false);
}
}
function executeFunctionByName(functionName, context)
{
OutputText ("This should be overriden");
}
function executeJS(str)
{
OutputText ("should be overriden.");
}
function doRead(object)
{
if (overloadedFunctions.TypeOf(object, "look") == "script") {
runscriptattribute2 (object, "look");
}
else {
var lookdesc = "";
if (HasString(object, "look")) {
var lookdesc = object.look;
}
if (LengthOf(lookdesc) == 0) {
var lookdesc = Template("DefaultObjectDescription");
}
OutputText (lookdesc);
}
}
e_forceCallback = {
"elementtype": "timer",
"name": "forceCallback",
"interval": 7,
"enabled": true,
"script": function() { if (!(e_start.callback)) {
start_callback ("web:true");
}
DisableTimer (e_forceCallback); },
"_js_name": "e_forceCallback",
"_types": []
};
elementsNameMap["forceCallback"] = e_forceCallback;
allTimers.push(e_forceCallback);
objectsNameMap["forceCallback"] = e_forceCallback;
// renames the updateList function, hidding the spells in the new version
updateListOriginal = updateList
updateList = function updateList(listName, listData) {
	updateListOriginal(listName, listData);
	if (listName="inventory")
		$('#lstInventory li:contains("--")').css('display','none');
};

function executeJS(str) {
	args = str.split(";");	
	window["executeFunctionByName"].apply(window, args);
}

function executeFunctionByName(functionName) {//,context
  var args = [].slice.call(arguments).splice(1);//2
  var context = window;
  var namespaces = functionName.split(".");
  var func = namespaces.pop();
  for(var i = 0; i < namespaces.length; i++) {
    context = context[namespaces[i]];
  }
  return context[func].apply(context, args);
}
function startVourtram() {
	
	var ret = "web:"+webPlayer;
	ASLTimed("start_callback",ret);
}
canSendCommand=true;
function ASLTimed() {
	var args = arguments;	
	window.setTimeout(function () {  //f.apply(f, ['hello', ' ', 'world']));
	   if (/*canSendCommand*/true) {
			//ASLEvent(x,y)
			ASLEvent.apply(ASLEvent,args);
	   } else {
			//ASLTimed(x,y)
			ASLTimed.apply(ASLTimed,args);
	   }
    }, 50);
}
function getLoadData() {
	var saves = getSaveGames()
	var data="";
	
	for (var key in saves) {
		if (saves.hasOwnProperty(key)) {
			if (data!=="") {
				data=data+"|";
			}				
			data=data+key+":"+saves[key];
		}
	}	
	return data;
}
function importGame() {
  var name = prompt("Please enter save name", "");
  if (name=="" || name==null) {
	return;
  }
  var code = prompt("Please enter game string", "");
  if (code=="" || code==null) {
	return;
  }
  code = LZString.decompressFromBase64(code);
  //console.log(code);
  
  if (code==null) {
	alert("Invalid game string.");
  }else {
	saveLocal(name,code);
	_retrieveSaves();
	$("#gameList").empty();
  }
}
function js_removegame(name) {
	var saves = getSaveGames();
	if (saves==null)
		return;
	delete saves[name];
	
	setSaveGames(saves);
}
function listGames() {
	var saves = getSaveGames();
	var glst = $("#gameList");
	glst.empty();
	for (var key in saves) {
		if (saves.hasOwnProperty(key)) {
			glst.append('<a class="btn" onclick="copyGame(\''+key+'\')">'+key+'</a>');
	
			//var res = saves[key];
			//res = LZString.compress(res);
			//msg(key+":"+res);
		}
	}
}
function copyGame(key) {
	var saves = getSaveGames();
	var res = saves[key];
	res = LZString.compressToBase64(res);
	copyToClipboard(res);
	
}
function copyToClipboard(text) {
	$("#gameList").empty();
	$("#gameList").append("<p>Copy to clipboard: Ctrl+C</p>");
	$("#gameList").append("<input id=\"export\"/>");
	$("#export").attr("value",text);
	$("#export").select();
	//window.prompt("Copy to clipboard: Ctrl+C, Enter", text); // text too big for prompt
/*
  var aux = document.createElement("input");
  aux.setAttribute("value", text);
  document.body.appendChild(aux);
  aux.focus();
  aux.select();
  var succeed = document.execCommand("copy");
  document.body.removeChild(aux);*/
}
function decodeLoadData(data) {
    var saves = data.split("|");
	var ret ={};
	for (var i=0;i<saves.length;i++) {
		info = saves[i].split(":");
		ret[info[0]] = info[1];
		//ret[i] = {name:info[0],data:info[1]};
	}
	return ret;	
}
function loadLocal() {
	var data = getLoadData();
	//var cmds = JSON.parse(data);
	ASLTimed("js_loadgame",data);	
}
function _retrieveSaves() {
	var data = getLoadData();
	//var cmds = JSON.parse(data);
	ASLTimed("js_retrieveSaves",data);	
}
function saveLocal(name,data) {
	/*
	var cmdList = $('#loadData');
	if (cmdList.length==0) {
	   $('#gamePanes').append('<div id="loadData"></div>');
	   cmdList = $('#loadData');
	}
	cmdList.html(data);*/
	
	var saves = getSaveGames();
	if (saves==null)
		saves={};
	saves[name]=data;
	//saves.push({name:name,data:data});
	setSaveGames(saves);
	
}
var store={};
function getSaveGames() {
	var saves = getStorage(SAVE_CODE);
	if (webPlayer) {	
		saves=JSON.parse(saves);
	}
	return saves;
}
function setSaveGames(saves) {
	if (webPlayer) {
		saves = JSON.stringify(saves); 
	}
	setStorage(SAVE_CODE,saves);
}
function getStorage(name) {
    if (webPlayer) {	
		if (typeof(Storage) !== "undefined") {
		    var str = localStorage.getItem(name);
			return str;
		} else {
			return null;
		}
	} else {
		return store[name];
	}
}
function setStorage(name,value) {
	if (webPlayer) {		
		if (typeof(Storage) !== "undefined") {
			localStorage.setItem(name, value);
		}
	} else {
		store[name]=value;
		return;
	}
}
function chooseLoadGame(game,data) {
	setStorage("LoadGame",game);
	var saves = decodeLoadData(data);
	setSaveGames(saves);
	if (webPlayer)
		window.location=NEW_GAME_URL;
	
}
function restartLoading() {
	var load = getStorage("LoadGame");
	if (load!=null && load!="") {
		var data = getLoadData();
		setStorage("LoadGame","");
		ASLTimed("js_loadgame",data+"#"+load);
	}
}




/*
function queueCommand(cmds) {
window.setTimeout(function () {
       if (cmds.length>0) {
		   if (canSendCommand) {
				//send....
				var cmd = cmds[0]
				if (typeof cmd=="string") {
					ASLEvent('ShowMenuResponse',cmd);
				} else {
					var cn = cmd.command.toLowerCase().trim();		
					
					if (cn.lastIndexOf("load", 0) !== 0 && cn.lastIndexOf("save", 0) !== 0) {				
						sendCommand(cmd.command,cmd.metadata)
					}
				}
				//
				cmds.splice(0, 1);
			}
			queueCommand(cmds)		   
		}
    }, 20);
}
*/
music_links=[
	"https://www.youtube.com/embed/DEeAN471boQ?rel=0&autoplay=1&loop=1&playlist=DEeAN471boQ",
	"https://www.youtube.com/embed/YnziQL2FUQs?rel=0&autoplay=1&loop=0&playlist=DEeAN471boQ",
	"https://www.youtube.com/embed/N-tCTMfVmfA?rel=0&autoplay=1&loop=1&playlist=N-tCTMfVmfA",
	"https://www.youtube.com/embed/VlYfxV40x4o?rel=0&autoplay=1&loop=1&playlist=N-tCTMfVmfA"];
music_num=0;
music_on=true;
music_titles=["Medieval music","Pavane","Middle ages Keyboard Instruments","Celtic Battle Music - Boudicca"];

function setTurnLabel(turn) {
    var parentDiv = $(".navbar-inner .container");
	if ($('#inv-menu').length==0) {  //JS ONLY
		parentDiv.append("<a id=\"inv-menu\" href=\"javascript:sendCommand('inv');\" style=\"float: left;line-height: 32px;display: block;margin-right: 5px\" title=\"Inventory\" ></a>");
		$('#inv-menu').append("<img alt=\"Inv.\" style=\"border-width:0;margin: 1px;line-height: 20px;display: inline-block;\" src=\"images/bag.png\" />")
	}	
	if ($('#turn').length==0) {
		$('#cmdSave').css("display","none");
		parentDiv.append('<b id=\"turn\">Turn: '+turn+'</b>');
		$("#turn").css("float","left");
		$("#turn").css("line-height","32px");
		$("#turn").css("padding-right","8px");
	} else {
		$('#turn').text('Turn: '+turn);
	}
    if ($('#music').length==0) {//gamePanesRunning		
		var music = parentDiv.append('<div id="music"></div>');
		var onoff = music_on ? "on" : "off";
		$('#music').css("float","left").css("line-height","32px").append('<a id="music_toggle">[music '+onoff+']</a>');
		$('#music_toggle').click(function() {
			toggleMusic();
		});
		
		if (music_on)
			toggleMusic();
		$( "#music" ).hover( 
			function() {
				if (music_on) {
					$( "#music_f" ).css("display","block");
					$('#music_toggle').text("[music on:"+music_titles[music_num]+"]");
				}
			}, 
			function() {
				if (music_on) {
					$( "#music_f" ).css("display","none");
					$('#music_toggle').text("[music on]");
				}
			} );
		
		$( "#music" ).bind('touchstart', 
			function() {
				if (music_on) {
					$( "#music_f" ).css("display","block");
					$('#music_toggle').text("[music on:"+music_titles[music_num]+"]");
				}
			});
		$( "#music" ).bind('touchend', 	
			function() {
				if (music_on) {
					$( "#music_f" ).css("display","none");
					$('#music_toggle').text("[music on]");
				}
			} );
		
	}
	
}

	
function playMusic(num) {
    var hasFrame = $('#music_f').length!=0;
	if (music_num==num && hasFrame) {
		return;
	}
	if (hasFrame) {
		$('#music_f').remove();
	}
	music_num=num;
	if (music_on) {
		$("#music").append('<iframe id="music_f" width="200" height="200" src="'+music_links[music_num]+'" frameborder="0" allowfullscreen></iframe>');
		$('#music_f').css("display","none");
		
	}
}
function checkMusic() {
	var smusic = getStorage("music");
	if (smusic=="off") {
		music_on=false;
	}
}


function toggleMusic() {
	if ($('#music_f').length==0) {	
		music_on=true;
		playMusic(music_num);
		$('#music_toggle').text("[music on]");
		setStorage("music","on");
	} else {
		$('#music_f').remove();
		$('#music_toggle').text("[music off]");
		setStorage("music","off");
		music_on=false;
	}
}
function mobilecheck() {
  var check = false;
  (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);
  return check;
}
function IsInt(val) {	
	return !isNaN(val);
}
function max() {
	return Math.max.apply(window, arguments);//Math.max(arguments);
}
function getObject(name) {
	return objectsNameMap[name];
}
function InstrRev(str,sub) {
	return str.indexOf(sub)+1;
}
function ui_init() {
$("#gameTitle").remove();
}
// Instrumental: https://www.youtube.com/watch?v=N-tCTMfVmfA
// Pavane: https://www.youtube.com/watch?v=YnziQL2FUQs ou <iframe width="560" height="315" src="https://www.youtube.com/embed/YnziQL2FUQs" frameborder="0" allowfullscreen></iframe>
/*

<iframe width=”300″ height=”24″ src="https://www.youtube.com/embed/DEeAN471boQ?rel=0&autohide=0″" frameborder="0" allowfullscreen></iframe>
*/
var NEW_GAME_URL = "index.html";//"http://textadventures.co.uk/games/play/xxu6lhlgfku68z97fjfd5w";
var SAVE_CODE="xxu6lhlgfku68z97fjfd5w";
