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

PHP get_module_setting函数代码示例

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

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



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

示例1: rail_peddler_run

function rail_peddler_run()
{
    global $session, $inventory;
    $op = httpget("op");
    $loc = rail_peddler_getloc();
    $hid = $loc["peddlerhid"];
    $rid = $loc["peddlerrid"];
    $price = get_module_setting("peddlerprice");
    if ($op == "buy") {
        $headertext = "Why sure, I'll take one of those!";
    } else {
        $headertext = "Go away, I'm busy.";
    }
    page_header($headertext);
    switch ($op) {
        case "buy":
            output("The scruffy vendor's eyes gleam. Was that a fla`gs`0h of green, or no? \"`2Verra wise, %s. Ye willna be sorry!`0\"`n`n", translate_inline($session['user']['sex'] ? 'lass' : 'lad'));
            give_item("cardcase");
            //			if (!$success){
            //				output("Then -- a frown. \"`2Wait, no, I canna sell t'ye. Ye'd better petition the Big Boss, tell 'im t'see what's gaen wrong wiv all dis.`0\"`n`n");
            //			} else {
            output("You have a fine leather card case. Pleased, you admire its soft texture. What an excellent purchase you have made!`n`n");
            //			}
            $session['user']['gems'] -= $price;
            break;
        case "pass":
            output("\"`2Bleedin' smart-arse.`0\" The scruffy vendor shrugs and goes off to pester someone else.`n`n");
            break;
    }
    addnav("Back to the Concourse", "runmodule.php?module=improbablehousing&op=interior&hid={$hid}&rid={$rid}");
    page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:32,代码来源:rail_peddler.php


示例2: marriage_lovedrinks

function marriage_lovedrinks()
{
    $z = 2;
    $s = get_module_setting('loveDrinksAdd');
    if (is_module_installed('drinks') && $s < $z) {
        $sql = array();
        $ladd = array();
        if ($s < 1) {
            // We use 'lessthan' so more drinks can be packaged with this
            $sql[] = "INSERT INTO " . db_prefix("drinks") . " VALUES (0, 'Love Brew', 1, 25, 5, 0, 0, 0, 20, 0, 5, 15, 0.0, 0, 0, 'Cedrik reaches under the bar, pulling out a purple cupid shaped bottle... as he pours it into a crystalline glass, the glass shines and he puts a pineapple within the liquid... \"Here, have a Love Brew..\" says Cedrik.. and as you try it, you feel uplifted!', '`%Love Brew', 12, 'You remember love..', 'Despair sets in.', '1.1', '.9', '1.5', '0', '', '', '')";
            $ladd[] = "Love Brew";
        }
        if ($s < 2) {
            // We use 'lessthan' so more drinks can be packaged with this
            $sql[] = "INSERT INTO " . db_prefix("drinks") . " VALUES (0, 'Heart Mist', 1, 25, 5, 0, 0, 0, 20, 0, 5, 15, 0.0, 0, 0, 'Cedrik grabs for a rather garish looking bottle on the shelf behind him... as he pours it into a large yellow mug, the porcelain seems to dissolve.. ooh er.. he puts a tomato within the sweet smelling gunk... \"Here, have a Heart Mist..\" says Cedrik.. and as you try it, you see symbols of love!', '`\$Heart Mist', 18, '`%Misty hearts fly around you..', '`#The sky falls...', '1.1', '.9', '1.5', '0', '', '', '')";
            $ladd[] = "Heart Misy";
        }
        foreach ($sql as $val) {
            db_query($val);
        }
        foreach ($ladd as $val) {
            $sql = "SELECT * FROM " . db_prefix("drinks") . " WHERE name='{$val}' ORDER BY costperlevel";
            $result = db_query($sql);
            $row = db_fetch_assoc($result);
            set_module_objpref('drinks', $row['drinkid'], 'loveOnly', 1, 'marriage');
        }
        set_module_setting('loveDrinksAdd', $z);
        output("`n`c`b`^Marriage Module - Drinks have been added to the Loveshack`0`b`c");
    } elseif (!is_module_active('drinks')) {
        set_module_setting('loveDrinksAdd', 0);
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:32,代码来源:lovedrinks.php


示例3: nooblube_dohook

function nooblube_dohook($hookname, $args)
{
    global $session, $badguy;
    switch ($hookname) {
        case "battle-defeat":
            //check to see if they're alive first, 'cause otherwise it'll add favour when they get wiped out on the FailBoat
            if ($session['user']['alive'] == false) {
                break;
            }
            //check to see if they've got any hitpoints, for stuff like the Tattoo Monster and defeating their masters
            if ($session['user']['hitpoints'] > 0) {
                break;
            }
            $maxlevel = get_module_setting("level");
            $currentlevel = $session['user']['level'];
            if ($currentlevel < $maxlevel) {
                if ($session['user']['dragonkills'] == 0) {
                    if ($session['user']['deathpower'] < 100) {
                        $session['user']['deathpower'] = get_module_setting("lube");
                    }
                    $tutormsg = translate_inline("`#What did I tell you about being careful?  Bloody newbies.  Okay, those nice gentlemen coming towards you will pick you up and drag you to my FailBoat, but don't worry about it too much.  Just come and see me below decks and I'll get you put on the next boat back to the Island.  Don't get used to it though, matey - once you hit level ten, you'll have to fight for your freedom like everyone else.");
                    if ($tutormsg) {
                        tutor_talk("%s", $tutormsg);
                    }
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:nooblube.php


示例4: drunkard_runevent

function drunkard_runevent($type)
{
    global $session;
    require_once "lib/partner.php";
    $partner = get_partner();
    $chance = get_module_setting("spillchance");
    $roll = e_rand(1, 100);
    $seen = get_module_pref("seen");
    set_module_pref("seen", $seen + 1);
    output("`5A very drunk patron stumbles into you as you make your way across the crowded room.`n`n");
    if ($roll < $chance) {
        // He spills on you
        output("`5He is carrying a nearly full glass of ale.");
        output("As he collides with you, it spills all over your nearly clean clothes!");
        output("As you look up, you notice %s`5 watching you and become acutely embarrassed.", $partner);
        output("You notice %s`5 is trying to keep from laughing out loud at your mishap.", $partner);
        output("`n`n`&You `\$lose 1`& charm point.");
        if ($session['user']['charm'] > 0) {
            $session['user']['charm']--;
        }
    } else {
        // You're safe
        output("`5Fortunately his glass was already empty.");
        output("You escort him over to a chair where he can sit without running into everyone else.");
        output("As you stand up, you catch %s's`5 eye and receive a big smile for your kindness.", $partner);
        output("`n`n`&You gain `^1`& charm.");
        $session['user']['charm']++;
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:29,代码来源:drunkard.php


示例5: wcgpoints_supporterpoints_dohook

function wcgpoints_supporterpoints_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "wcgpoints_increased":
            if (get_module_pref("gotfirst")) {
                $session['user']['donation'] += 5;
                output("`5`bYou have five extra Supporter Points!`b  Thank you for contributing to humanitarian research.`0`n`n");
            } else {
                if (get_module_pref("runtime", "wcgpoints") > get_module_setting("initialrequirement")) {
                    $session['user']['donation'] += get_module_setting("initialreward");
                    require_once "lib/systemmail.php";
                    $subj = "You've got Supporter Points!";
                    $body = "As a thank-you for helping us to support humanitarian research via grid computing, we've given you 500 Supporter Points completely free of charge.  Thank you so much!  Remember that you'll get five extra Supporter Points every time your World Community Grid points increase (which is usually every 24 hours, if you let the client run regularly).  Have fun!";
                    systemmail($session['user']['acctid'], $subj, $body);
                    set_module_pref("gotfirst", true);
                }
            }
            break;
        case "wcg-features-desc":
            output("`bFree Supporter Points`b: After you've run the World Community Grid client for at least 24 hours (it doesn't have to be all at once - an hour here and an hour there will soon add up), you'll get 500 Supporter Points completely free of charge.  After that, you'll get 5 Supporter Points every time World Community Grid reports that your Cobblestones have increased.`n`n");
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:wcgpoints_supporterpoints.php


示例6: addgems_dohook

function addgems_dohook($hook, $args)
{
    global $session;
    $session['user']['gems'] += get_module_setting('how_many');
    output("`^%s`n`0", get_module_setting('message'));
    return $args;
}
开发者ID:stephenKise,项目名称:Legend-of-the-Green-Dragon,代码行数:7,代码来源:addgems.php


示例7: cakeordeath_run

function cakeordeath_run()
{
    global $session;
    page_header("Cake Or Death");
    switch (httpget("op")) {
        case "examine":
            // Tell the player what the deal with Cake Or Death is
            $counter = number_format(get_module_setting("counter"));
            output("`0A shiny wooden table sits back from the main street.  Behind it, a man sits idly reading the Improbable Island Enquirer.  Before him, sat on the table, is a large sponge cake.  Above him is a banner, displaying the name of his game:`b'`5Cake`0 or `4Death!`0'`b`n`nHe sees you pondering the sign, and calls over to you.  `b'`5Cake`0 or `4Death!`0  `b`5Cake`0 or `4Death!`0' he cries.  'Ninety-nine per cent chance of `b`5Cake`0`b!'`n`nIt's not often that an immaculately-dressed gentleman with glowing green eyes offers you a 99% chance of cake.  What would you like to do?");
            //add navs
            addnav("CAKE!", "runmodule.php?module=cakeordeath&op=play");
            addnav("Back away slowly", "village.php");
            break;
        case "play":
            $counter = get_module_setting("counter");
            addnav("Back to the Outpost", "village.php");
            if ($counter > 0) {
                output("The green-eyed gentleman hands you a slice of cake, on a paper plate.  You thank him, and walk away merrily wolfing down your prize.`n`nYou feel `5Full Of Cake!`0");
                set_module_setting("counter", get_module_setting("counter") - 1);
                apply_buff('tastycake', array("name" => "`5Full Of Cake`0", "rounds" => 10, "atkmod" => 1.1, "defmod" => 1.1, "roundmsg" => "`5The cake you ate earlier has boosted your energy!`n", "schema" => "module-cakeordeath"));
            }
            if ($counter <= 0) {
                output("The green-eyed gentleman hands you a slice of cake, on a paper plate.  You thank him, and walk away merrily wolfing down your prize.`n`nYou feel `5Full Of Cake!`0`n`nMoments later, the slow-acting poison starts to take effect.  The world begins to melt in front of you.  Grey spots dance on the edges of your vision.  Behind you, a green-eyed monster offers you another slice of cake, laughing and pointing.`n`nYou curse your luck as the hallucinations begin to kick in.");
                set_module_setting("counter", 100);
                apply_buff('failcake', array("name" => "`5Full Of FailCake`0", "rounds" => -1, "regen" => -10, "startmsg" => "`5You are walking on pink icing.  The sky is made of jam.  Your eyes are two cherries.  That cake was awesome.`0`n", "roundmsg" => "`5The poisoned cake saps your strength, and you lose ten hitpoints!`0`n", "schema" => "module-cakeordeath"));
                if (is_module_active("medals")) {
                    require_once "modules/medals.php";
                    medals_award_medal("failcake", "Failcake Fancier", "This player was unfortunate at the Cake or Death stand...", "medal_failcake.png");
                }
            }
            break;
    }
    page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:34,代码来源:cakeordeath.php


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


示例9: monsterkills_run

function monsterkills_run()
{
    page_header("Most Monster Kills");
    $acc = db_prefix("accounts");
    $mp = db_prefix("module_userprefs");
    $sql = "SELECT {$acc}.name AS name,\r\n\t\t{$acc}.acctid AS acctid,\r\n\t\t{$mp}.value AS kills,\r\n\t\t{$mp}.userid FROM {$mp} INNER JOIN {$acc}\r\n\t\tON {$acc}.acctid = {$mp}.userid \r\n\t\tWHERE {$mp}.modulename = 'monsterkills' \r\n\t\tAND {$mp}.setting = 'kills' \r\n\t\tAND {$mp}.value > 0 ORDER BY ({$mp}.value+0)\t\r\n\t\tDESC limit " . get_module_setting("list") . "";
    $result = db_query($sql);
    $rank = translate_inline("Kills");
    $name = translate_inline("Name");
    output("`n`b`c`@Most`\$ Monster `@Kills`n`n`c`b");
    rawoutput("<table border='0' cellpadding='2' cellspacing='1' align='center'>");
    rawoutput("<tr class='trhead'><td align=center>{$name}</td><td align=center>{$rank}</td></tr>");
    for ($i = 0; $i < db_num_rows($result); $i++) {
        $row = db_fetch_assoc($result);
        if ($row['name'] == $session['user']['name']) {
            rawoutput("<tr class='trhilight'><td>");
        } else {
            rawoutput("<tr class='" . ($i % 2 ? "trdark" : "trlight") . "'><td align=left>");
        }
        output_notl("%s", $row['name']);
        rawoutput("</td><td align=right>");
        output_notl("%s", $row['kills']);
        rawoutput("</td></tr>");
    }
    rawoutput("</table>");
    addnav("Back to HoF", "hof.php");
    villagenav();
    page_footer();
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:29,代码来源:monsterkills.php


示例10: mapchat_dohook

function mapchat_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "worldnav":
            $chats = unserialize(get_module_setting("placedchats"));
            $ploc = get_module_pref("worldXYZ", "worldmapen");
            $chatarea = 0;
            if (!is_array($chats)) {
                $chats = array();
            }
            foreach ($chats as $key => $vals) {
                if ($ploc == $vals['loc']['x'] . "," . $vals['loc']['y'] . ",1") {
                    output("`0There's a little tent here.`n");
                    addnav("Investigate Tent", "runmodule.php?module=mapchat&xyz=" . $ploc);
                    $chatarea = 1;
                    break;
                }
            }
            if (!$chatarea) {
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:mapchat.php


示例11: iitems_crates_gypsy_run

function iitems_crates_gypsy_run()
{
    global $session;
    page_header("Crate Locations");
    $cost = get_module_setting("cost", "iitems_crates_gypsy");
    if ($cost == 1) {
        $p = "Cigarette";
    } else {
        $p = "Cigarettes";
    }
    if ($session['user']['gems'] >= $cost) {
        $session['user']['gems'] -= $cost;
        output("`5You hand over the %s and the old man chuckles.  \"`!Aaah, thank ye kindly.  Now, here we are!  I'd recommend you write these down.  And be quick about it - these crates tend to disappear `ifast!`i`5\"`n`nHe reaches under his desk and brings up a chalkboard with all the locations of the Island's crates written upon it, corresponding to the squares on your crudely-drawn World Map and laid out as X and Y co-ordinates.  You spend a few minutes studying the board.`n`n", $p);
        $crates = unserialize(get_module_setting("crates", "iitemcrates"));
        foreach ($crates as $key => $vals) {
            output("%s,%s`n", $vals['loc']['x'], $vals['loc']['y']);
        }
    } else {
        output("`5You enthusiastically agree to the price, before realising that you don't actually have that many cigarettes.  Whoops.");
    }
    addnav("Leave");
    addnav("Return to the Outpost", "village.php");
    page_footer();
    return true;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:iitems_crates_gypsy.php


示例12: bioextension_dohook

function bioextension_dohook($hookname, $args)
{
    global $session;
    if ($hookname == "bioinfo") {
        $sql = "SELECT donation FROM " . db_prefix("accounts") . " WHERE acctid = '" . $args['acctid'] . "'";
        $result = db_query($sql);
        $row = db_fetch_assoc($result);
        if ($row['donation'] >= get_module_setting("threshhold")) {
            $bio = get_module_pref("user_extendedbio", "bioextension", $args['acctid']);
            $link = get_module_pref("user_extlink", "bioextension", $args['acctid']);
            $bio = str_replace(chr(13), "`n", $bio);
            $bio = stripslashes($bio);
            output("`0%s`n`n", $bio);
            if (substr($link, 0, 5) == "http:") {
                rawoutput("<a href=\"" . $link . "\">Player's webpage</a><br /><br />");
            }
        }
    } else {
        if ($hookname == "footer-prefs") {
            $bio = get_module_pref("user_extendedbio");
            $limit = get_module_setting("charlimit");
            if (strlen($bio) > $limit) {
                output("`c`4`bWARNING`b`0`c`nYour Extended Bio is oversized by %s characters.  If you navigate away from this page, your Extended Bio will have %s characters indiscriminately cut from the end.  Please edit and re-save your Extended Bio to avoid cuts.", strlen($bio) - $limit, strlen($bio) - $limit);
                $bio = substr($bio, 0, $limit);
                set_module_pref("user_extendedbio", $bio);
            }
        }
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:30,代码来源:bioextension.php


示例13: iitems_cratelocator_dohook

function iitems_cratelocator_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "iitems-use-item":
            if ($args['player']['itemid'] == "cratelocator") {
                $crates = unserialize(get_module_setting("crates"));
                output("`0You thumb the switch on your Crate Locator.  It buzzes and hisses for a moment, exhausting its primitive battery sending out a radio ping to nearby Crates.`n`n");
                $crates = unserialize(get_module_setting("crates", "iitemcrates"));
                debug($crates);
                $ploc = get_module_pref("worldXYZ", "worldmapen");
                list($px, $py, $pz) = explode(",", $ploc);
                $pxlow = $px - 5;
                $pxhigh = $px + 5;
                $pylow = $py - 5;
                $pyhigh = $py + 5;
                if (!is_array($crates)) {
                    $crates = array();
                }
                $count = 0;
                foreach ($crates as $key => $vals) {
                    if ($vals['loc']['x'] >= $pxlow && $vals['loc']['x'] <= $pxhigh && $vals['loc']['y'] >= $pylow && $vals['loc']['y'] <= $pyhigh) {
                        $count++;
                    }
                }
                output("It displays, weakly, the number `\$`b%s`b`0 in dull red LED's before its radio module catches fire.`n`n", $count);
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:31,代码来源:iitems_cratelocator.php


示例14: forestturn_runevent

function forestturn_runevent($type)
{
    global $session;
    // The only type of event we care about are the forest.
    $chance = get_module_setting("percentgain");
    $roll = e_rand(1, 100);
    if ($roll <= $chance) {
        output("`^You discover a skin of liquid hanging over the limb of a tree.");
        output("Since the sigils inscribed on the skin are those of someone you recognize as a very powerful warrior from the village, you decide that it would be safe to take a sip.`n`n`n");
        output("Man is that stuff potent!");
        output("You feel `!hyper`^.`n`n");
        output("You `%receive one`^ extra turn!`0");
        $session['user']['turns']++;
    } else {
        output("`^Walking along a path in the forest, you come upon a field of flowers.");
        output("Stopping to pick one, you inhale its scent.`n`n");
        output("`\$Yawn!");
        output("`^Man, that flower scent made you really sleepy.");
        output("You stumble off the path to take a nap.`n`n");
        if ($session['user']['turns'] > 0) {
            output("You `%lose one `^turn!`0");
            $session['user']['turns']--;
        }
    }
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:25,代码来源:forestturn.php


示例15: pinata_dohook

function pinata_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "newday":
            set_module_pref("hittoday", 0);
            break;
        case "gardens":
            if (is_module_active("gardenparty") && get_module_setting("party") == 1 || get_module_setting("active") == 1) {
                if (is_module_active("gardenparty")) {
                    $start = strtotime(get_module_setting("partystart", "gardenparty"));
                    $end = strtotime(get_module_setting("partyduration", "gardenparty"), $start);
                    $now = time();
                } else {
                    $start = 0;
                    $now = 2;
                    $end = 1;
                }
                if (get_module_setting("active") == 1 || $start <= $now && $end >= $now) {
                    if (get_module_pref("hittoday") < get_module_setting("maxhit")) {
                        output("`n`#You notice a crowd of partiers gathered around a `@Green Dragon shaped pinata`#, swinging awkwardly at it with a long pole. ");
                        output("They gesture you over for a turn, offering you the stick and a challenge to do better.`n`n");
                        if ($start <= $now && $end >= $now) {
                            addnav("Party Treats!");
                        }
                        addnav("Swat the Pinata", "runmodule.php?module=pinata");
                    } else {
                        output("You notice the remnants of the broken pinata, and a child sorting through looking for a missed prize.");
                    }
                }
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:35,代码来源:pinata.php


示例16: specificmaplocation_dohook

function specificmaplocation_dohook($hookname, $args)
{
    global $session;
    switch ($hookname) {
        case "worldnav":
            if (get_module_setting("finder1") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "14,37,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder1", $session['user']['name']);
            }
            if (get_module_setting("finder2") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "6,33,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder2", $session['user']['name']);
            }
            if (get_module_setting("finder3") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "17,31,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder3", $session['user']['name']);
            }
            if (get_module_setting("finder4") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "25,26,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder4", $session['user']['name']);
            }
            if (get_module_setting("finder5") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "7,21,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder5", $session['user']['name']);
            }
            if (get_module_setting("finder6") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "22,20,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder6", $session['user']['name']);
            }
            if (get_module_setting("finder7") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "14,17,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder7", $session['user']['name']);
            }
            if (get_module_setting("finder8") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "3,9,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder8", $session['user']['name']);
            }
            if (get_module_setting("finder9") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "22,6,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder9", $session['user']['name']);
            }
            if (get_module_setting("finder10") == "Nobody" && get_module_pref("worldXYZ", "worldmapen") == "4,3,1") {
                output("You found one of the ten boxes of cigarettes!  You open it up to find a hundred of the damned things!  Woohoo!");
                $session['user']['gems'] += 100;
                set_module_setting("finder10", $session['user']['name']);
            }
            break;
    }
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:59,代码来源:specificmaplocation.php


示例17: avatar_dohook

function avatar_dohook($hookname, $args)
{
    global $session;
    $cost = get_module_setting("cost");
    $changecost = get_module_setting("changecost");
    require_once "modules/avatar/func.php";
    require "modules/avatar/dohook/{$hookname}.php";
    return $args;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:9,代码来源:avatar.php


示例18: findgold_runevent

function findgold_runevent($type, $link)
{
    global $session;
    $min = $session['user']['level'] * get_module_setting("mingold");
    $max = $session['user']['level'] * get_module_setting("maxgold");
    $gold = e_rand($min, $max);
    output("`^Fortune smiles on you and you find %s gold!`0", $gold);
    $session['user']['gold'] += $gold;
    debuglog("found {$gold} gold in the dirt");
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:10,代码来源:findgold.php


示例19: get_default_action_list

function get_default_action_list()
{
    $actions = unserialize(get_module_setting("actionsarray", "staminasystem"));
    if (!is_array($actions)) {
        $actions = array();
        set_module_setting("actionsarray", serialize($actions), "staminasystem");
    }
    $actions = unserialize(get_module_setting("actionsarray", "staminasystem"));
    return $actions;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:10,代码来源:lib.php


示例20: peerpressure_victimtest

function peerpressure_victimtest()
{
    global $session;
    if ($session['user']['level'] != 15) {
        return 0;
    }
    if (get_module_pref("dayspast", "peerpressure") < get_module_setting("daysfree", "peerpressure")) {
        return 0;
    }
    return 100;
}
开发者ID:CavemanJoe,项目名称:Improbable-Island---DragonScales---DragonBones---LotGD-2.0---Season-Three,代码行数:11,代码来源:peerpressure.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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