• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tlschema函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中tlschema函数的典型用法代码示例。如果您正苦于以下问题:PHP tlschema函数的具体用法?PHP tlschema怎么用?PHP tlschema使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了tlschema函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: drpap_dohook

function drpap_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            if ($session['user']['location'] == get_module_setting("paploc") && $session['user']['dragonkills'] >= get_module_setting("dk")) {
                tlschema($args['schemas']['marketnav']);
                addnav($args['marketnav']);
                tlschema();
                addnav("Dr Paprika's Office", "runmodule.php?module=drpap&op=enter");
            }
            break;
        case "changesetting":
            if ($args['setting'] == "villagename") {
                if ($args['old'] == get_module_setting("paploc")) {
                    set_module_setting("paploc", $args['new']);
                }
            }
            break;
        case "dragonkilltext":
            if (get_module_setting("reset") == 1) {
                set_module_pref("count", 0);
            }
            break;
        case "moderate":
            $args['drpap'] = "Dr Paprika's Waiting Room";
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:drpap.php


示例2: sethsong_run

function sethsong_run()
{
    $op = httpget('op');
    $visits = get_module_setting("visits");
    $been = get_module_pref("been");
    $iname = getsetting("innname", LOCATION_INN);
    tlschema("inn");
    page_header($iname);
    rawoutput("<span style='color: #9900FF'>");
    output_notl("`c`b");
    output($iname);
    output_notl("`b`c");
    tlschema();
    // Short circuit out if we've heard enough
    if ($been >= $visits) {
        output("%s`0 clears his throat and drinks some water.", getsetting("bard", "`^Seth"));
        output("\"I'm sorry, my throat is just too dry.\"");
    } else {
        sethsong_sing();
    }
    addnav("Where to?");
    addnav("I?Return to the Inn", "inn.php");
    villagenav();
    rawoutput("</span>");
    page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:26,代码来源:sethsong.php


示例3: improbablehousing_furnitureshop_dohook

function improbablehousing_furnitureshop_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            tlschema($args['schemas']['marketnav']);
            addnav($args['marketnav']);
            tlschema();
            addnav("Cadfael's Furniture", "runmodule.php?module=improbablehousing_furnitureshop&op=start");
            break;
        case "improbablehousing_sleepslot":
            $hid = $args['hid'];
            $house = $args['house'];
            $rid = $args['rid'];
            $slot = $args['slot'];
            // debug($rid);
            // debug($house);
            if (improbablehousing_getkeytype($house, $rid) >= 100) {
                //player has a master key, or owns the Dwelling
                $furniture = get_items_with_prefs("furniture");
                // debug($furniture);
                if (is_array($furniture)) {
                    addnav("Put down Furniture");
                    foreach ($furniture as $key => $vals) {
                        //debug($vals);
                        addnav("Install Furniture");
                        addnav(array("Put down %s", $vals['verbosename']), "runmodule.php?module=improbablehousing_furnitureshop&op=drop&item=" . $key . "&hid=" . $args['house']['id'] . "&rid=" . $args['rid'] . "&slot=" . $args['slot']);
                    }
                }
            }
            break;
    }
    return $args;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:34,代码来源:improbablehousing_furnitureshop.php


示例4: iitems_hunterslodge_dohook

function iitems_hunterslodge_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "superuser":
            if ($session['user']['superuser'] & SU_EDIT_USERS) {
                addnav("Hunter's Lodge Purchase Log", "runmodule.php?module=iitems_hunterslodge&op=superuser");
            }
            break;
        case "village":
            tlschema($args['schemas']['fightnav']);
            addnav($args['fightnav']);
            tlschema();
            blocknav("lodge.php");
            addnav("L?The Hunter's Lodge", "runmodule.php?module=iitems_hunterslodge&op=start");
            break;
        case "newday":
            if ($session['user']['referer'] > 0) {
                $sql = "SELECT lastip, uniqueid FROM " . db_prefix("accounts") . " WHERE acctid={$session['user']['referer']}";
                $result = db_query($sql);
                $row = db_fetch_assoc($result);
                if ($row['lastip'] != $session['lastip'] && $row['uniqueid'] != $session['uniqueid']) {
                    $sql = "UPDATE " . db_prefix("accounts") . " SET donation=donation+1 WHERE acctid={$session['user']['referer']}";
                    $result = db_query($sql);
                }
            }
            break;
        case "items-returnlinks":
            $args['lodge'] = "runmodule.php?module=iitems_hunterslodge&op=start";
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:33,代码来源:iitems_hunterslodge.php


示例5: gauntlet_dohook

function gauntlet_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "hprecalc":
            $args['total'] -= get_module_pref("extrahps");
            if (!get_module_setting("carrydk")) {
                $args['extra'] -= get_module_pref("extrahps");
                set_module_pref("extrahps", 0);
            }
            break;
        case "dragonkill":
            set_module_pref("seendk", 0);
            break;
        case "newday":
            set_module_pref("seen", 0);
            break;
        case "village":
            tlschema($args['schemas']['fightnav']);
            addnav($args["fightnav"]);
            tlschema();
            addnav("The Gauntlet", "runmodule.php?module=gauntlet");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:26,代码来源:gauntlet.php


示例6: relativedate

function relativedate(string $indate) : string
{
    $lastOn = round((strtotime('now') - strtotime($indate)) / 86400, 0) . 'days';
    tlschema('datetime');
    if (substr($lastOn, 0, 2) == '1 ') {
        $lastOn = translate_inline('1 day');
    } else {
        if (date('Y-m-d', strtotime($lastOn)) == date('Y-m-d')) {
            $lastOn = translate_inline('Today');
        } else {
            if (date('Y-m-d', strtotime($lastOn)) == date('Y-m-d', strtotime('-1 day'))) {
                $lastOn = translate_inline('Yesterday');
            } else {
                if (strpos($indate, '0000-00-00') !== false) {
                    $lastOn = translate_inline('Never');
                } else {
                    $lastOn = sprintf_translate('%s days', round((strtotime('now') - strtotime($indate)) / 86400, 0));
                    rawoutput(tlbutton_clear());
                }
            }
        }
    }
    tlschema();
    return $lastOn;
}
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:25,代码来源:datetime.php


示例7: maikopan_dohook

function maikopan_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            if (get_module_pref("plotpoint3a", "watcher_quests") && !get_module_pref("plotpoint1") && $session['user']['location'] == "Kittania") {
                output("`0You hear quite a commotion coming from Maiko's cookery school.  A clattering of pots and pans, and a hoarse, screeching voice: \"`i`%Where is it?  WHERE IS IT?!`i`0\"`n`nYou might want to check that out.`n`n");
                addnav($args['fightnav']);
                tlschema();
                blocknav("runmodule.php?module=meatschool&op=start");
                addnav("Maiko's Cookery Academy", "runmodule.php?module=maikopan&step=1");
            } else {
                if (get_module_pref("plotpoint1") && !get_module_pref("plotpoint2")) {
                    blocknav("runmodule.php?module=meatschool&op=start");
                }
            }
            break;
        case "pub_kittania":
            if (get_module_pref("plotpoint1") && !get_module_pref("plotpoint2")) {
                redirect("runmodule.php?module=maikopan&step=2");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:maikopan.php


示例8: checkban

function checkban(string $login, bool $connect = false) : bool
{
    global $session;
    $accounts = db_prefix('accounts');
    $bans = db_prefix('accounts');
    $today = date('Y-m-d');
    $sql = db_query("SELECT lastip, uniquid, banoverride, superuser FROM {$accounts}\n        WHERE login = '{$login}'");
    $row = db_fetch_assoc($sql);
    if ($row['banoverride'] || $row['superuser'] & ~SU_DOESNT_GIVE_GROTTO) {
        return false;
    }
    db_free_result($sql);
    $sql = db_query("SELECT * FROM {$bans}\n        WHERE (\n            (ipfilter = '{$row['lastip']}' OR ipfilter = '{$_SERVER['REMOTE_ADDR']}')\n            OR (uniqueid = '{$row['uniqueid']}' OR uniqueid = '{$_COOKIE['lgi']}')\n        )\n        AND (banexpire = '000-00-00' OR banexpire >= '{$today}')");
    if (db_num_rows($sql) > 0) {
        if ($connect) {
            $session = [];
            tlschema('ban');
            $session['message'] .= translate_inline('`n`4You fall under a ban currently in place on this website:');
            while ($row = db_fetch_assoc($sql)) {
                $session['message'] .= "`n{$row['banreason']}`n";
                if ($row['banexpire'] == '0000-00-00') {
                    $session['message'] .= translate_inline("`\$This ban is permanent!`0");
                } else {
                    $session['message'] .= sprintf_translate("`^This ban will be removed `\$after`^ %s.`0", date("M d, Y", strtotime($row['banexpire'])));
                }
                db_query("UPDATE {$bans}\n                    SET lasthit = '{$today} 00:00:00'\n                    WHERE ipfilter = '{$row['ipfilter']}'\n                    AND uniqueid = '{$row['uniqueid']}'\n                    ");
            }
            $session['message'] .= translate_inline("`n`4If you wish, you may appeal your ban with the petition link.");
            tlschema();
            header('Location: home.php');
        }
        return true;
    }
    return false;
}
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:35,代码来源:checkban.php


示例9: oldhouse_dohook

function oldhouse_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "newday":
            set_module_pref("scaretoday", 0);
            break;
        case "changesetting":
            if ($args['setting'] == "villagename") {
                if ($args['old'] == get_module_setting("oldhouseloc")) {
                    set_module_setting("oldhouseloc", $args['new']);
                }
            }
            break;
        case "village":
            if ($session['user']['location'] == get_module_setting("oldhouseloc")) {
                tlschema($args['schemas']['tavernnav']);
                addnav($args['tavernnav']);
                tlschema();
                addnav("O?The Old House", "runmodule.php?module=oldhouse");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:oldhouse.php


示例10: fightnav

function fightnav($allowspecial = true, $allowflee = true, $script = false)
{
    global $PHP_SELF, $session, $newenemies, $companions;
    tlschema("fightnav");
    if ($script === false) {
        $script = substr($PHP_SELF, strrpos($PHP_SELF, "/") + 1) . "?";
    } else {
        if (!strpos($script, "?")) {
            $script .= "?";
            //		}elseif (substr($script,strlen($script)-1)!="&" && !substr($script,strlen($script)-1)=="?"){
        } elseif (substr($script, strlen($script) - 1) != "&") {
            $script .= "&";
        }
    }
    $fight = "Fight";
    $run = "Run";
    if (!$session['user']['alive']) {
        $fight = "F?Torment";
        $run = "R?Flee";
    }
    addnav($fight, $script . "op=fight");
    if ($allowflee) {
        addnav($run, $script . "op=run");
    }
    if ($session['user']['superuser'] & SU_DEVELOPER) {
        addnav("Abort", $script);
    }
    if (getsetting("autofight", 0)) {
        addnav("Automatic Fighting");
        addnav("5?For 5 Rounds", $script . "op=fight&auto=five");
        addnav("1?For 10 Rounds", $script . "op=fight&auto=ten");
        $auto = getsetting("autofightfull", 0);
        if (($auto == 1 || $auto == 2 && !$allowflee) && count($newenemies) == 1) {
            addnav("U?Until End", $script . "op=fight&auto=full");
        } elseif ($auto == 1 || $auto == 2 && !$allowflee) {
            addnav("U?Until current enemy dies", $script . "op=fight&auto=full");
        }
    }
    if ($allowspecial) {
        addnav("Special Abilities");
        modulehook("fightnav-specialties", array("script" => $script));
        if ($session['user']['superuser'] & SU_DEVELOPER) {
            addnav("`&Super user`0", "");
            addnav("!?`&&#149; __GOD MODE", $script . "op=fight&skill=godmode", true);
        }
        modulehook("fightnav", array("script" => $script));
    }
    if (count($newenemies) > 1) {
        addnav("Targets");
        foreach ($newenemies as $index => $badguy) {
            if ($badguy['creaturehealth'] <= 0 || isset($badguy['dead']) && $badguy['dead'] == true) {
                continue;
            }
            addnav(array("%s%s`0", isset($badguy['istarget']) && $badguy['istarget'] ? "`#*`0" : "", $badguy['creaturename']), $script . "op=fight&newtarget={$index}");
        }
    }
    tlschema();
}
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:58,代码来源:fightnav.php


示例11: eboy_dohook

function eboy_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            tlschema($args['schemas']['marketnav']);
            addnav($args['marketnav']);
            tlschema();
            addnav("eBoy's Trading Station", "runmodule.php?module=eboy&op=start");
            break;
        case "newday-runonce":
            $eboyitems = get_items_with_settings("eboy");
            //get number of players
            $sql = "SELECT count(acctid) AS c FROM " . db_prefix("accounts") . " WHERE locked=0";
            $result = db_query_cached($sql, "numplayers", 600);
            $row = db_fetch_assoc($result);
            $numplayers = $row['c'];
            $sql = "SELECT * from " . db_prefix("cityprefs");
            $result = db_query($sql);
            $numrows = db_num_rows($result);
            for ($i = 0; $i < $numrows; $i++) {
                $row = db_fetch_assoc($result);
                $cid = $row['cityid'];
                foreach ($eboyitems as $item => $settings) {
                    //Advance Multiplier
                    if ($settings['eboy_multiplier_' . $cid]) {
                        if ($settings['eboy_stock_' . $cid] < $numplayers / 10) {
                            increment_item_setting("eboy_multiplier_" . $cid, 0.1, $item);
                        } else {
                            if ($settings['stock_' . $cid] > $numplayers / 5) {
                                increment_item_setting("eboy_multiplier_" . $cid, -0.1, $item);
                            }
                        }
                        //stop prices staying ridiculously low
                        if (get_item_setting("eboy_multiplier_" . $cid, $item) < 0.1) {
                            set_item_setting("eboy_multiplier_" . $cid, 0.1, $item);
                        }
                        //or going ridiculously high
                        if (get_item_setting("eboy_multiplier_" . $cid, $item) > 50) {
                            set_item_setting("eboy_multiplier_" . $cid, 50, $item);
                        }
                    } else {
                        set_item_setting("eboy_multiplier_" . $cid, 1, $item);
                    }
                    if (!isset($settings['eboy_stock_' . $cid])) {
                        set_item_setting("eboy_stock_" . $cid, 1, $item);
                    }
                    increment_item_setting("eboy_stock_" . $cid, $settings['eboy_dailyadd'], $item);
                }
            }
            break;
        case "items-returnlinks":
            $args['eboy'] = "runmodule.php?module=eboy&op=start";
            break;
    }
    return $args;
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:57,代码来源:eboy.php


示例12: logd_error_handler

function logd_error_handler($errno, $errstr, $errfile, $errline)
{
    global $session;
    static $in_error_handler = 0;
    // If we have used the @ operator, just don't report anything!
    if (!error_reporting()) {
        return;
    }
    $in_error_handler++;
    if ($in_error_handler > 1) {
        //prevents the error handler from being re-called when we're already within a call of it.
        if ($errno & (E_USER_WARNING | E_WARNING)) {
            echo "PHP Warning: \"{$errstr}\"<br>in <b>{$errfile}</b> at <b>{$errline}</b>.  Additionally this occurred while within logd_error_handler().<br>";
        } elseif ($errno & (E_USER_ERROR | E_ERROR)) {
            echo "PHP ERROR: \"{$errstr}\"<br>in <b>{$errfile}</b> at <b>{$errline}</b>.  Additionally this occurred while within logd_error_handler().<br>";
        }
        $in_error_handler--;
        return;
    }
    switch ($errno) {
        case E_NOTICE:
        case E_USER_NOTICE:
            if (getsetting('show_notices', 0) && $session['user']['superuser'] & SU_SHOW_PHPNOTICE) {
                debug("PHP Notice: \"{$errstr}\"<br>in <b>{$errfile}</b> at <b>{$errline}</b>.");
            }
            break;
        case E_WARNING:
        case E_USER_WARNING:
            require_once "show_backtrace.php";
            tlschema("errorhandler");
            output("PHP Warning: \"%s\"`nin `b%s`b at `b%s`b.`n", $errstr, $errfile, $errline, true);
            tlschema();
            $backtrace = show_backtrace();
            rawoutput($backtrace);
            if (getsetting("notify_on_warn", 0) > "") {
                //$args = func_get_args();
                //call_user_func_array("logd_error_notify",$args);
                logd_error_notify($errno, $errstr, $errfile, $errline, $backtrace);
            }
            break;
        case E_ERROR:
        case E_USER_ERROR:
            require_once "lib/show_backtrace.php";
            echo sprintf("PHP ERROR: \"%s\"<br>in <b>%s</b> at <b>%s</b>.<br>", $errstr, $errfile, $errline);
            $backtrace = show_backtrace();
            echo $backtrace;
            if (getsetting("notify_on_error", 0) > "") {
                //$args = func_get_args();
                //call_user_func_array("logd_error_notify",$args);
                logd_error_notify($errno, $errstr, $errfile, $errline, $backtrace);
            }
            die;
            break;
    }
    $in_error_handler--;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:56,代码来源:errorhandler.php


示例13: dwellingseditor_run

function dwellingseditor_run()
{
    global $session;
    tlschema("dwellingseditor");
    $op = httpget('op');
    if ($op != "lookup") {
        page_header("Dwellings Editor");
    }
    addnav("Navigation");
    addnav("Back to the Grotto", "superuser.php");
    if ($op != "") {
        addnav("Dwelling List", "runmodule.php?module=dwellingseditor");
    }
    addnav("Find Dwellings by User", "runmodule.php?module=dwellingseditor&op=usersearch");
    addnav("Operations");
    if ($op != "typsu") {
        addnav("Type Pref Editor", "runmodule.php?module=dwellingseditor&op=typesu");
    }
    modulehook("dwellingseditor-main");
    $typeid = httpget("typeid");
    $dwid = httpget('dwid');
    $type = httpget("type");
    if ($type == "" && $dwid > 0) {
        $sql = "SELECT type FROM " . db_prefix("dwellings") . " WHERE dwid={$dwid}";
        $result = db_query($sql);
        $row = db_fetch_assoc($result);
        $type = $row['type'];
    }
    if ($dwid > 0) {
        addnav("Operations");
        if ($op != "edit") {
            addnav("Edit Dwelling Details", "runmodule.php?module=dwellingseditor&op=edit&dwid={$dwid}");
        }
        if ($op != "keys") {
            addnav("Manage Keys", "runmodule.php?module=dwellingseditor&op=keys&dwid={$dwid}");
        }
        if ($session['user']['superuser'] & SU_EDIT_COMMENTS) {
            addnav("Moderate Commentary", "moderate.php?area=dwellings-{$dwid}&dwid={$dwid}");
        }
        if ($op != "delete") {
            addnav("Delete this Dwelling", "runmodule.php?module=dwellingseditor&op=delete&dwid={$dwid}");
        }
        modulehook("dwellingseditor", array("dwid" => $dwid));
        addnav("Navigation");
        if ($op != "coffers") {
            addnav("Coffer Log", "runmodule.php?module=dwellingseditor&op=coffers&dwid={$dwid}");
        }
        if ($op != "dwsu") {
            addnav("Dwelling  Viewer", "runmodule.php?module=dwellingseditor&op=dwsu&dwid={$dwid}");
        }
    }
    require_once "modules/dwellingseditor/case_{$op}.php";
    page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:54,代码来源:dwellingseditor.php


示例14: meatschool_dohook

function meatschool_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            addnav($args['fightnav']);
            tlschema();
            addnav("Maiko's Cookery Academy", "runmodule.php?module=meatschool&op=start");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:12,代码来源:meatschool.php


示例15: insultschool_dohook

function insultschool_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            addnav($args['fightnav']);
            tlschema();
            addnav("Cuthbert's Academy of Lingual Defence", "runmodule.php?module=insultschool&op=start");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:12,代码来源:insultschool.php


示例16: handle_event

function handle_event($location, $baseLink = false, $needHeader = false)
{
    if ($baseLink === false) {
        global $PHP_SELF;
        $baseLink = substr($PHP_SELF, strrpos($PHP_SELF, "/") + 1) . "?";
    } else {
        //debug("Base link was specified as $baseLink");
        //debug(debug_backtrace());
    }
    global $session, $playermount, $badguy;
    $skipdesc = false;
    tlschema("events");
    $allowinactive = false;
    $eventhandler = httpget('eventhandler');
    if ($session['user']['superuser'] & SU_DEVELOPER && $eventhandler != "") {
        $allowinactive = true;
        $array = preg_split("/[:-]/", $eventhandler);
        if ($array[0] == "module") {
            $session['user']['specialinc'] = "module:" . $array[1];
        } else {
            $session['user']['specialinc'] = "";
        }
    }
    $_POST['i_am_a_hack'] = 'true';
    if ($session['user']['specialinc'] != "") {
        $specialinc = $session['user']['specialinc'];
        $session['user']['specialinc'] = "";
        if ($needHeader !== false) {
            page_header($needHeader);
        }
        output("`^`c`bSomething Special!`c`b`0");
        if (strchr($specialinc, ":")) {
            $array = split(":", $specialinc);
            $starttime = getmicrotime();
            module_do_event($location, $array[1], $allowinactive, $baseLink);
            $endtime = getmicrotime();
            if ($endtime - $starttime >= 1.0 && $session['user']['superuser'] & SU_DEBUG_OUTPUT) {
                debug("Slow Event (" . round($endtime - $starttime, 2) . "s): {$hookname} - {$row['modulename']}`n");
            }
        }
        if (checknavs()) {
            // The page rendered some linkage, so we just want to exit.
            page_footer();
        } else {
            $skipdesc = true;
            $session['user']['specialinc'] = "";
            $session['user']['specialmisc'] = "";
            httpset("op", "");
        }
    }
    tlschema();
    return $skipdesc;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:53,代码来源:events.php


示例17: uniqueforests_dohook

function uniqueforests_dohook($hookname, $args)
{
    global $session;
    require_once "modules/cityprefs/lib.php";
    $cityid = get_cityprefs_cityid("location", $session['user']['location']);
    switch ($hookname) {
        case "collect-events":
            if (get_module_objpref("city", $cityid, "use")) {
                foreach ($args as $index => $event) {
                    $event['rawchance'] = 0;
                    $events[$index] = $event;
                }
                $args = $events;
            }
            break;
        case "village":
            if (get_module_objpref("city", $cityid, "use")) {
                addnav($args['gatenav']);
                $name = get_module_objpref("city", $cityid, "name");
                blocknav("forest.php");
                addnav(array("%s", $name), "forest.php?location=uniqueforests");
            }
            break;
        case "header-forest":
            if (httpget('location') == "uniqueforests" || get_module_objpref("city", $cityid, "use")) {
                if (httpget('op') == "") {
                    global $block_new_output;
                    $block_new_output = true;
                }
                blocknav("runmodule.php", true);
                blocknav("healer.php", true);
                tlschema("module-uniqueforests");
            }
            break;
        case "footer-forest":
            if (httpget('location') == "uniqueforests" || get_module_objpref("city", $cityid, "use")) {
                $name = get_module_objpref("city", $cityid, "name");
                page_header(color_sanitize($name));
            }
            break;
        case "forest-desc":
            if (httpget('location') == "uniqueforests" || get_module_objpref("city", $cityid, "use")) {
                page_header(color_sanitize($name));
                global $block_new_output;
                $block_new_output = false;
                output(get_module_objpref("city", $cityid, "desc"));
                $block_new_output = true;
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:52,代码来源:uniqueforests.php


示例18: forest

function forest($noshowmessage = false)
{
    global $session, $playermount;
    tlschema("forest");
    //	mass_module_prepare(array("forest", "validforestloc"));
    addnav("Heal");
    addnav("H?Hospital Tent", "healer.php");
    addnav("Fight");
    addnav("L?Look for Something to Kill", "forest.php?op=search");
    if ($session['user']['level'] > 1) {
        addnav("S?Go Slumming", "forest.php?op=search&type=slum");
    }
    addnav("T?Go Thrillseeking", "forest.php?op=search&type=thrill");
    if (getsetting("suicide", 0)) {
        if (getsetting("suicidedk", 10) <= $session['user']['dragonkills']) {
            addnav("*?Search `\$Suicidally`0", "forest.php?op=search&type=suicide");
        }
    }
    if ($session['user']['level'] >= 15 && $session['user']['seendragon'] == 0) {
        // Only put the green dragon link if we are a location which
        // should have a forest.   Don't even ask how we got into a forest()
        // call if we shouldn't have one.   There is at least one way via
        // a superuser link, but it shouldn't happen otherwise.. We just
        // want to make sure however.
        $isforest = 0;
        $vloc = modulehook('validforestloc', array());
        foreach ($vloc as $i => $l) {
            if ($session['user']['location'] == $i) {
                $isforest = 1;
                break;
            }
        }
        if ($isforest || count($vloc) == 0) {
            addnav("G?`@Seek Out the Green Dragon", "forest.php?op=dragon");
        }
    }
    addnav("Other");
    villagenav();
    if ($noshowmessage != true) {
        output("`c`7`bThe Forest`b`0`c");
        output("The Forest, home to evil creatures and evildoers of all sorts.`n`n");
        output("The thick foliage of the forest restricts your view to only a few yards in most places.");
        output("The paths would be imperceptible except for your trained eye.");
        output("You move as silently as a soft breeze across the thick moss covering the ground, wary to avoid stepping on a twig or any of the numerous pieces of bleached bone that populate the forest floor, lest you betray your presence to one of the vile beasts that wander the forest.`n");
        modulehook("forest-desc");
    }
    modulehook("forest", array());
    module_display_events("forest", "forest.php");
    addnav("Inventory");
    addnav("View your Inventory", "inventory.php?items_context=forest");
    tlschema();
}
开发者ID:Beeps,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:52,代码来源:forest.php


示例19: counciloffices_dohook

function counciloffices_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            tlschema($args['schemas']['fightnav']);
            addnav($args['fightnav']);
            tlschema();
            addnav("Council Offices", "runmodule.php?module=counciloffices&councilop=enter");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:13,代码来源:counciloffices.php


示例20: catapult_dohook

function catapult_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            tlschema($args['schemas']['fightnav']);
            addnav($args['fightnav']);
            tlschema();
            addnav("Visit the Travel Agents", "runmodule.php?module=catapult&op=examine");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:13,代码来源:catapult.php



注:本文中的tlschema函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tm_icon函数代码示例发布时间:2022-05-23
下一篇:
PHP tln_unspace函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap