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

PHP blocknav函数代码示例

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

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



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

示例1: dwshacks_dohook

function dwshacks_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "dwellings-list-type":
            addnav("Show Only Types");
            addnav(array("%s", translate_inline(ucfirst(get_module_setting("dwnameplural", "dwshacks")))), "runmodule.php?module=dwellings&op=list&showonly=dwshacks&ref={$args['ref']}&sortby={$args['sortby']}&order={$args['order']}");
            break;
        case "dwellings-list-interact":
            if ($args['type'] == "dwshacks" && $args['status'] == 1 && get_module_setting("maxkeys") == 123456789) {
                addnav("", "runmodule.php?module=dwellings&op=enter&dwid={$args['dwid']}");
                $tress = translate_inline("Tresspass");
                rawoutput("<a href='runmodule.php?module=dwellings&op=enter&dwid={$args['dwid']}'>{$tress}</a>");
            }
            break;
        case "dwellings-manage":
            $dwid = $args['dwid'];
            if (get_module_setting("maxkeys") == 123456789 && $args['type'] == "dwshacks") {
                blocknav("runmodule.php?module=dwellings&op=keys&dwid={$dwid}");
            }
            break;
        case "dwellings":
            if (get_module_objpref("city", $args['cityid'], "showdwshacks")) {
                output("  Along the narrow pathway, precariously placed wood planks are nailed and leaning on each other in a fashion that only leaves you to assume they are supposed to be %s.`0", translate_inline(get_module_setting("dwnameplural")));
                if ($args['allowbuy'] == 1 && $session['user']['dragonkills'] >= get_module_setting("dkreq")) {
                    $cityid = $args['cityid'];
                    addnav("Options");
                    addnav(array("Establish a %s", translate_inline(ucfirst(get_module_setting("dwname", "dwshacks")))), "runmodule.php?module=dwellings&op=buy&type=dwshacks&subop=presetup&cityid={$cityid}");
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:34,代码来源:dwshacks.php


示例2: 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


示例3: 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


示例4: newbfaq_dohook

function newbfaq_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "commentary_talkform":
            if (!get_module_pref("seenrules")) {
                //debug($args);
                $args['blocktalkform'] = true;
                $args['message'] = "<a href='runmodule.php?module=newbfaq&op=start'>Click here to join in the chinwagging!</a>";
                addnav("", "runmodule.php?module=newbfaq&op=start");
            }
            break;
        case "village":
            if (get_module_pref("reminduser") == 1) {
                addnav("", "runmodule.php?module=newbfaq&op=rem");
                redirect("runmodule.php?module=newbfaq&op=rem");
            } else {
                addnav("Info");
                addnav("Frequently Asked Questions", "runmodule.php?module=newbfaq&op=faq");
                //addnav("The Rules","runmodule.php?module=newbfaq&op=rules");
                blocknav("petition.php?op=faq");
            }
            break;
        case "biostat":
            $id = $args['acctid'];
            $ret = rawurlencode($args['return_link']);
            if ($session['user']['superuser'] & SU_EDIT_COMMENTS) {
                addnav("Superuser");
                addnav("Send rules reminder", "runmodule.php?module=newbfaq&op=setrem&id={$id}&ret={$ret}");
            }
            //		break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:34,代码来源:newbfaq.php


示例5: scrapbots_scavenge

function scrapbots_scavenge($reps = 1)
{
    global $session;
    //todo: hook in Stamina system, factor in remaining Stamina and experience
    //Get the player's Scrap
    $playerscrap = scrapbots_get_player_scrap();
    for ($i = 0; $i < $reps; $i++) {
        //Actually, let's just put in a random chance that the player will trip and impale themselves on a rusty bit of pointy scrap
        require_once "modules/staminasystem/lib/lib.php";
        $return = process_action("Scavenging for Scrap");
        if ($return['lvlinfo']['levelledup'] == true) {
            output("`n`c`b`0You gained a level in Scavenging for Scrap!  You are now level %s!  This action will cost fewer Stamina points now, so you can Scavenge more each day!`b`c`n", $return['lvlinfo']['newlvl']);
        }
        $stamina = get_stamina();
        $failchance = e_rand(1, 100);
        if ($stamina < 100) {
            output("`4You're getting tired.`0  Clambering around on a big pile of pointy, rusted scrap metal while you're half-asleep carries certain risks.`n");
        }
        if ($failchance > $stamina) {
            output("`\$This fact is driven home to you as you slip on an oily bit of sheet metal and fall head-first into the pile!`nYou `blose`b some hitpoints!`n`0");
            $hploss = e_rand(0, floor($session['user']['maxhitpoints'] / 2));
            $session['user']['hitpoints'] -= $hploss;
            if ($session['user']['hitpoints'] <= 0) {
                output("`\$You begin to feel a bit dizzy from the lack of blood.  Before you know it, you've collapsed, and the friendly local Robots have helped themselves to your cash and summoned the Retraining Personnel!`n");
                $session['user']['alive'] = false;
                $session['user']['gold'] = 0;
                addnav("Whoops.");
                addnav("Daily News", "news.php");
                blocknav("runmodule.php?module=scrapbots&scavenge=1");
                blocknav("runmodule.php?module=scrapbots&scavenge=10");
                blocknav("village.php");
                break;
            }
        }
        //dummy vals for now
        $normalchance = 100;
        $rarechance = 66;
        $veryrarechance = 99;
        $scrapnames = scrapbots_scrapnames();
        $scavengerarity = e_rand(1, 99);
        if ($scavengerarity <= $normalchance) {
            //award normal object
            $award = e_rand(0, 15);
            $playerscrap['data']['normalitems'][$award] += 1;
            output("`0You rummage through the scrap pile and come up with a `5%s`0.`n", $scrapnames['normalitems'][$award]);
        } elseif ($scavengerarity > $normalchance && $scavengerarity <= $rarechance) {
            $award = e_rand(0, 12);
            $playerscrap['data']['rareitems'][$award] += 1;
            output("`0You find a rare item!  A pretty nice `5%s`0.`n", $scrapnames['rareitems'][$award]);
        } elseif ($scavengerarity > $rarechance) {
            //award very rare item
            $award = e_rand(0, 3);
            $playerscrap['data']['veryrareitems'][$award] += 1;
            output("`0You find a very rare item!  This `5%s`0 looks like it's in good nick!`n", $scrapnames['veryrareitems'][$award]);
        }
    }
    set_module_pref("scrap", serialize($playerscrap), "scrapbots");
    return;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:59,代码来源:lib.php


示例6: dwellingscostsp_dohook

function dwellingscostsp_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "dwellings-buy-valuecheck":
            $typeid = get_module_setting("typeid", $args['type']);
            $paidsp = abs((int) httppost('paidsp'));
            if ($paidsp < 0) {
                $paidsp = 0;
            }
            $pointsavailable = $session['user']['donation'] - $session['user']['donationspent'];
            if ($pointsavailable < $paidsp) {
                $args['allowpay'] = 0;
                blocknav("runmodule.php?module=dwellings&op=build&type=" . $args['type'] . "&dwid=" . $args['dwid'] . "");
                output("`nYou do not have that many site points.");
            } elseif ($paidsp > get_module_objpref("dwellingtypes", $typeid, "spcost") - get_module_objpref("dwellings", $args['dwid'], "spspent")) {
                $args['allowpay'] = 0;
                blocknav("runmodule.php?module=dwellings&op=build&type=" . $args['type'] . "&dwid=" . $args['dwid'] . "");
                output("`nYou have tried to spend more site points than you need to.");
            }
            break;
        case "dwellings-buy-setup":
            $typeid = get_module_setting("typeid", $args['type']);
            $paidsp = abs((int) httppost('paidsp'));
            if ($paidsp < 0) {
                $paidsp = 0;
            }
            $spent = get_module_objpref("dwellings", $args['dwid'], "spspent") + $paidsp;
            set_module_objpref("dwellings", $args['dwid'], "spspent", $spent);
            $session['user']['donationspent'] += $paidsp;
            if ($spent != get_module_objpref("dwellingtypes", $typeid, "spcost")) {
                $args['finished'] = 0;
            }
            break;
        case "dwellings-pay-costs":
            $typeid = get_module_setting("typeid", $args['type']);
            $costsp = get_module_objpref("dwellingtypes", $typeid, "spcost") - get_module_objpref("dwellings", $args['dwid'], "spspent");
            if ($costsp) {
                output("`#%s Site Points`0`n", $costsp);
            }
            break;
        case "dwellings-pay-input":
            $typeid = get_module_setting("typeid", $args['type']);
            $costsp = get_module_objpref("dwellingtypes", $typeid, "spcost") - get_module_objpref("dwellings", $args['dwid'], "spspent");
            $sp = translate_inline("Site Points");
            if ($costsp) {
                rawoutput("{$sp}: <input id='input' name='paidsp' width=5><br>");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:52,代码来源:dwellingscostsp.php


示例7: golinda_dohook

function golinda_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "pointsdesc":
            $args['count']++;
            $format = $args['format'];
            $str = translate("The ability to visit Golinda, the Lodge Healer costs %s points per day.  Golinda's rates are %s%% those of the normal healer.");
            $str = sprintf($str, get_module_setting("points"), get_module_setting("costpercent"));
            output($format, $str, true);
            break;
        case "newday":
            set_module_pref("paidtoday", 0);
            break;
        case "forest":
            if (get_module_pref("paidtoday")) {
                if (get_module_setting("blockhealer")) {
                    blocknav("healer.php", true);
                }
                addnav("Heal");
                addnav("Visit Golinda (already paid)", "runmodule.php?module=golinda&op=enter&from=forest");
            }
            break;
        case "lodge":
            // Reimburse people points spent for old version of Golinda
            $config = unserialize($session['user']['donationconfig']);
            if (!is_array($config)) {
                $config = array();
            }
            if (array_key_exists('healer', $config) && $config['healer']) {
                $points = 150 * round($config['healer'] / 10, 0);
                $points += 20 * round($config['healer'] % 10, 0);
                if ($points > $session['user']['donationspent']) {
                    $points = $session['user']['donationspent'];
                }
                $session['user']['donationspent'] -= $points;
                unset($config['healer']);
                if ($points) {
                    output("`^Due to changes in the way in which Golinda is handled, you have been refunded %s donation points!`n`n", $points);
                }
            }
            $session['user']['donationconfig'] = serialize($config);
            $cost = get_module_setting("points");
            if (get_module_pref("paidtoday")) {
                addnav("Visit Golinda (already paid)", "runmodule.php?module=golinda&op=enter");
            } else {
                addnav(array("Visit Golinda (%s points)", $cost), "runmodule.php?module=golinda&op=enter");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:52,代码来源:golinda.php


示例8: 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


示例9: buildinghitpoints_determine_navs

function buildinghitpoints_determine_navs($info)
{
    foreach ($info['data'] as $key => $vals) {
        if ($vals['hitpoints'] < $vals['maxhitpoints']) {
            blocknav($vals['blocknav']);
            addnav("Repairs");
            addnav(array("Repair %s", $vals['buildingname']), "runmodule.php?module=buildinghitpoints&op=repair&city=" . $info['cid'] . "&building=" . $key);
        } else {
            addnav("Reinforcements");
            addnav(array("Reinforce %s", $vals['buildingname']), "runmodule.php?module=buildinghitpoints&op=repair&city=" . $info['cid'] . "&building=" . $key);
        }
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:13,代码来源:buildinghitpoints.php


示例10: settings_dohook

function settings_dohook($hook, $args)
{
    switch ($hook) {
        case 'footer-news':
        case 'village':
            if ($hook == 'village') {
                addnav($args['othernav']);
            } else {
                addnav('News');
            }
            addnav('*?Settings*', 'runmodule.php?module=settings');
            blocknav('prefs.php');
            break;
        case 'footer-modules':
            if (httpget('cat') != '' && httpget('module') != '' || is_array(httppost('module'))) {
                $userprefs = db_prefix('module_userprefs');
                $modules = db_prefix('modules');
                $sql = db_query("SELECT DISTINCT m.modulename AS fallback,\n                    mu.modulename, mu.setting, m.formalname\n                    FROM {$modules} AS m\n                    LEFT JOIN {$userprefs} AS mu ON m.modulename = mu.modulename\n                    WHERE (setting LIKE 'user_%' OR m.infokeys LIKE '%|prefs|%')");
                $fill = [];
                $rewrite = json_decode(get_module_setting('rewrite'), true);
                while ($row = db_fetch_assoc($sql)) {
                    if ($row['setting'] != '' && strpos($row['setting'], 'user_') !== false) {
                        $structuredKey = "{$row['modulename']}__{$row['setting']}";
                        if ($rewrite[$structuredKey] != $row['formalname']) {
                            $fill[$structuredKey] = $rewrite[$structuredKey];
                        } else {
                            $fill[$structuredKey] = $row['formalname'];
                        }
                    } else {
                        $possibleKeys = get_module_info($row['fallback'])['prefs'];
                        foreach ($possibleKeys as $key => $val) {
                            if (strpos($key, 'user_') !== false) {
                                $structuredKey = "{$row['fallback']}__{$key}";
                                if ($rewrite[$structuredKey] != $row['formalname'] && $rewrite[$structuredKey] != '') {
                                    $fill[$structuredKey] = $rewrite[$structuredKey];
                                } else {
                                    $fill[$structuredKey] = $row['formalname'];
                                }
                            }
                        }
                    }
                }
                if ($fill != $rewrite) {
                    set_module_setting('rewrite', json_encode($fill));
                    output("`QUpdating the 'Settings' module rewrite conditions...");
                }
            }
            break;
    }
    return $args;
}
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:51,代码来源:settings.php


示例11: mountrarity_dohook

function mountrarity_dohook($hookname, $args)
{
    switch ($hookname) {
        case "newday-runonce":
            $sql = "SELECT mountid FROM " . db_prefix("mounts") . " WHERE mountactive=1";
            $result = db_query($sql);
            while ($row = db_fetch_assoc($result)) {
                $id = $row['mountid'];
                $rarity = get_module_objpref("mounts", $id, "rarity");
                if (e_rand(1, 100) > $rarity) {
                    set_module_objpref("mounts", $id, "unavailable", 1);
                } else {
                    // You need to reset the availability if it's not unavailable
                    // otherwise, it never becomes available again!
                    set_module_objpref("mounts", $id, "unavailable", 0);
                }
            }
            break;
        case "mountfeatures":
            $rarity = get_module_objpref("mounts", $args['id'], "rarity");
            $args['features']['Rarity'] = $rarity;
            break;
        case "stables-desc":
            if (get_module_setting("showout")) {
                $sql = "SELECT mountid, mountname FROM " . db_prefix("mounts") . " WHERE mountactive=1";
                $result = db_query($sql);
                output("`nA sign by the door proclaims that the following mounts are out of stock for today:");
                while ($row = db_fetch_assoc($result)) {
                    $out = get_module_objpref("mounts", $row['mountid'], "unavailable");
                    if ($out) {
                        output("`n%s", $row['mountname']);
                    }
                }
            } else {
                output("`nIf you don't see something you like today, perhaps you should check again tomorrow.");
            }
            break;
        case "stables-nav":
            $sql = "SELECT mountid FROM " . db_prefix("mounts") . " WHERE mountactive=1";
            $result = db_query($sql);
            while ($row = db_fetch_assoc($result)) {
                $id = $row['mountid'];
                $out = get_module_objpref("mounts", $id, "unavailable");
                if ($out) {
                    blocknav("stables.php?op=examine&id={$id}");
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:51,代码来源:mountrarity.php


示例12: mountaccessories_dohook

function mountaccessories_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "boughtmount":
        case "soldmount":
            $accs = get_player_acc_list();
            $hadaccessories = count($accs);
            if ($hadaccessories != 0) {
                output("Merick merrily strips off the accessories adorning your previous mount, and tosses them into a pile in the corner.  \"Ye'll nae be needin' these any more, I dare wager!\"`n`nYou contemplate asking him for the accessories back, or perhaps some money for them - but the slightly manic look in Merick's eye, and the sharpened pitchfork slung across his back, give you second thoughts.`n");
            }
            strip_accessories();
            addnav("Browse Mount Accessories", "runmodule.php?module=mountaccessories&op=browse");
            if ($session['user']['hashorse'] == 0) {
                blocknav("runmodule.php?module=mountaccessories&op=browse");
            }
            break;
        case "newday":
            apply_all_accessories();
            break;
        case "superuser":
            addnav("Edit Mount Accessories", "runmodule.php?module=mountaccessories&op=editdefaultaccessories");
            break;
        case "stables-nav":
            if ($session['user']['hashorse'] > 0) {
                addnav("Browse Mount Accessories", "runmodule.php?module=mountaccessories&op=browse");
            }
            break;
        case "charstats":
            if ($session['user']['hashorse'] > 0) {
                $rawaccs = get_player_acc_list();
                $display = "";
                $number = 0;
                foreach ($rawaccs as $acc => $details) {
                    $number++;
                    $display .= $details['displayname'];
                    $display .= "<br>";
                }
                $stat = "Mount Accessories";
                if ($number == 0) {
                    $display = "None";
                }
                setcharstat("Equipment Info", $stat, $display);
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:48,代码来源:mountaccessories.php


示例13: basictraining_dohook

function basictraining_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            tlschema($args['schemas']['fightnav']);
            addnav($args['fightnav']);
            tlschema();
            addnav("Basic Training", "runmodule.php?module=basictraining&op=start");
            break;
        case "newday":
            if (!get_module_pref("visited")) {
                blocknav("village.php");
                blocknav("news.php");
                addnav("Get on with it", "runmodule.php?module=basictraining&op=start");
            }
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:19,代码来源:basictraining.php


示例14: additionalkeys_dohook

function additionalkeys_dohook($hookname, $args)
{
    $add = get_module_objpref("dwellings", $args['dwid'], "addkeys");
    $args['maxkeys'] += $add;
    global $session;
    switch ($hookname) {
        case "dwellings-manage":
            $type = $args['type'];
            $dwid = httpget('dwid');
            $typeid = get_module_setting("typeid", $type);
            addnav("Management");
            if (get_module_objpref("dwellingtypes", $typeid, "keys", "additionalkeys") != 0) {
                addnav("Keymaker", "runmodule.php?module=additionalkeys&op=buykeys&dwid={$dwid}&type={$type}");
            } else {
                blocknav("Keymaker", "runmodule.php?module=additionalkeys&op=buykeys&dwid={$dwid}&type={$type}");
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:20,代码来源:additionalkeys.php


示例15: alternativeresurrect_dohook

function alternativeresurrect_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "ramiusfavors":
            blocknav("graveyard.php?op=resurrection");
            if ($session['user']['deathpower'] >= 100) {
                $deathoverlord = getsetting('deathoverlord', 'Ramius');
                addnav(array("%s Favors", sanitize($deathoverlord)));
                addnav("e?Resurrection (100 favor)", "runmodule.php?module=alternativeresurrect&op=resurrect");
            }
            break;
        case "shades":
            if ($session['user']['bufflist'] != "a:0:{}") {
                set_module_pref("bufflist", $session['user']['bufflist']);
            }
            break;
        case "newday":
            clear_module_pref("bufflist");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:23,代码来源:alternativeresurrect.php


示例16: get_module_setting

            $dks = get_module_setting("dks");
            if (get_module_setting('flirttype')) {
                output("`n`n\"`&Just a friendly reminder. I can only help you if someone has proposed to you.  I recommend you visit the `\$Love `@Shack`&,`@\" `^%s`@ says to you helpfully.", $vicar);
            } elseif ($dks > $session['user']['dragonkills']) {
                output("`n`n\"`&You will not be able to propose to anyone until after you've reached `^%s dragonkill%s`&,`@\" `^%s`@ says to you helpfully.", $dks, translate_inline($dks > 1 ? "s" : ""), $vicar);
            }
        }
        break;
}
addnav("Navigation");
if (get_module_setting("location") == 1) {
    addnav("Return to the Gardens", "gardens.php");
} else {
    villagenav();
}
addnav("Actions");
addnav("Talk to Others", "runmodule.php?module=marriage&op=" . $op . "&op2=talk");
if (get_module_pref("supernomarry") == 1 || get_module_pref("user_wed") == 1) {
    addnav("Proposals Blocked", "runmodule.php?module=marriage&op=general&op2=nopropose");
    blocknav("runmodule.php?module=marriage&op=" . $op . "&op2=proposelist");
    blocknav("runmodule.php?module=marriage&op=" . $op . "&op2=propose");
}
if ($session['user']['marriedto'] == 0) {
    if (get_module_setting('flirttype') == 0 && $session['user']['dragonkills'] >= get_module_setting("dks")) {
        addnav("Propose", "runmodule.php?module=marriage&op=" . $op . "&op2=propose");
    }
    addnav("View Proposals", "runmodule.php?module=marriage&op=" . $op . "&op2=proposelist");
} else {
    addnav("Get a Divorce!", "runmodule.php?module=marriage&op=" . $op . "&op2=divorce");
}
page_footer();
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:general.php


示例17: onslaught_dohook

function onslaught_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "village":
            $lv = onslaught_checkbreach();
            if ($lv >= 100) {
                redirect("runmodule.php?module=onslaught&op=start");
            } else {
                switch ($session['user']['location']) {
                    case "NewHome":
                        switch ($lv) {
                            case $lv < 10:
                                output("`0NewHome seems quiet at the moment - by which you mean there are no monsters actively banging on the gates.  The people manning the turret-mounted machine guns are chatting jovially with each other and sharing cigarettes.  For now at least, NewHome is safe.`n`n");
                                break;
                            case $lv < 25:
                                output("`0You glance upwards, towards the Monster Defence Turrets.  Their custodians are idly scanning the horizon.  From time to time, a gunner will nudge his or her fellow guard and point somewhere off in the middle distance.  NewHome remains well-guarded.`n`n");
                                break;
                            case $lv < 50:
                                output("`0The brave men and women atop the Monster Defence Turrets seem more alert than usual - they attentively focus on the surrounding Jungle, keeping watch over their territory.  Every now and then a gun will swivel suddenly and take aim, only for trigger fingers to become relaxed as a slavering beast is confirmed as nothing more than a shadow or a rustle in the breeze.`n`n");
                                break;
                            case $lv < 70:
                                output("`0Shots have recently been fired from the Monster Defence Turrets, and the smell of gunpowder hangs in the air.  The atmosphere is tense, guarded - the people of NewHome glance nervously at their Outpost's buttresses, wondering if people would think them paranoid if they just, y'know, shored them up a little bit.  A few new planks here and there.  Nothing to worry about.  Nothing at all.`n`n");
                                break;
                            case $lv < 80:
                                output("`0Bursts of machine gun fire can occasionally be heard from the Monster Defence Turrets.  Their custodians laugh and cheer as monsters fall - most of their days are slow, tedious, made up of perpetual smoking and the occasional unfortunately misdetected rabbit, and it's nice to get some action once in a while.  The people of NewHome go about their daily business, but their smiles seem strained, as if pasted on.  Some of them are casually inspecting the Outpost walls, taking measurements and carrying hammers.`n`n");
                                break;
                            case $lv < 90:
                                output("`0Things up in the Monster Defence Turrets are getting a little tense.  The joyful laughter from the gunners first slowed then stopped as their unexpected fun gave way to unexpected challenge.  The atmosphere is charged - shops are still open, but you have to knock to be let in.  Hands are gently gripping weapons.  Talk is subdued.  Cold sweat is trickling down spines.  A few citizens are making themselves busy hammering new planks to the Outpost walls to reinforce them.  NewHome is, it would seem, under threat.`n`n");
                                break;
                            case $lv < 95:
                                output("`0The guns in the Monster Defence Turrets haven't stopped firing for the past few minutes.  Conversation is subdued under frequent bursts of fire.  The gunners swear and call down for more ammunition, their hands sweaty, their faces red.  Outside the Outpost, bullets thump into earth and flesh, churning the grass into brown and red ruin.  Inside, citizens run back and forth between the Outpost walls, the turrets, the ammunition stores and the lumber piles, wondering why the hell they didn't reinforce the walls yesterday, or the week before, or the month before that.`n`neBoy's is doing a roaring trade in first aid kits and grenades, and Sheila is staying open for just as long as she can, serving Customers Who Aren't Looters At All, No Sir, with one hand on her favourite shotgun.  As for the other merchants, well...`n`nThe Museum is closed and locked up tight, as is the Hunter's Lodge, the Council Offices, Corporal Punishment's Basic Training, the Bank, the Comms Tent, the Strategy Hut, Mike's Chop Shop...  even greasy old Joe is standing outside his diner, sharpening a large meat cleaver.  NewHome is preparing for the worst.`n`n");
                                blocknav("lodge.php");
                                blocknav("runmodule.php?module=basictraining&op=start");
                                blocknav("runmodule.php?module=counciloffices&councilop=enter");
                                blocknav("runmodule.php?module=newhomemuseum&op=lobby");
                                blocknav("bank.php");
                                blocknav("gypsy.php");
                                blocknav("runmodule.php?module=staminafood&op=start&location=nh");
                                blocknav("runmodule.php?module=strategyhut");
                                blocknav("stables.php");
                                break;
                            case $lv < 100:
                                output("`0All conversation in the Outpost square has ceased.  Screaming and cursing can be heard from overhead, the custodians of the Monster Defence Turrets throwing out all the lead they can.  The angle of their fire has lowered over the past few minutes, and now powerful shoulders crunch at the Outpost's frail wooden walls, serrated claws splinter the defences.  The gunners' hands are numb, their ears ringing, their throats on fire, their barrels glowing red.`n`nAll you can smell is the gunner's smoke.  All you can hear is their fire.  You see people screaming, but you don't hear them.  You see the gunners frantically gesturing for more ammunition, but there isn't enough to go around.  Doors have gone missing from shops and turned up nailed to the Outpost walls.  Still some stragglers stumble into the Outpost from the melee outside, covered in blood and panting, showering all the thanks in the world on the gunners, their preferred deity, or both.`n`nMister Stern sits on the steps of his museum polishing his glasses, a shiny little six-shot revolver lying on the steps beside him.  He puts his glasses back on and picks the gun up, looking it over as though he's not sure what to do with it.  Corporal Punishment sits beside Mister Stern, one arm around the thin man, the other resting on his own pistol.  Over at Sheila's, Mike is hovering indecisively around the door with a single red rose in one hand and a machete in the other.`n`nHeads turn as a single mighty BANG pushes the Northernmost Outpost walls inwards, splintering the buttresses.  A long, black claw is quickly hacked off by a nearby citizen, and lies twitching on the ground.`n`nNewHome prepares for death or glory.`n`n");
                                break;
                        }
                        break;
                    case "Kittania":
                        break;
                    case "New Pittsburgh":
                        break;
                    case "Squat Hole":
                        break;
                    case "Pleasantville":
                        break;
                    case "Cyber City 404":
                        break;
                    case "AceHigh":
                        break;
                    case "Improbable Central":
                        break;
                }
            }
            break;
    }
    r 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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