Exemple #1
0
function skill435_summon_npc($nkind)
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('skill435', 'map', 'sys', 'player', 'logger', 'input'));
    $log .= '你召唤出了保安<span class="yellow">' . $skill435_npc['sub'][$nkind]['name'] . '</span>来保护你!<br>';
    $x = (int) \skillbase\skill_getvalue(435, 't');
    $spid = \addnpc\addnpc(25, $nkind, 1);
    if ($spid == -1) {
        $log .= '出现了一个BUG,请联系管理员。抱歉。<br>';
        return;
    }
    //设置位置
    $db->query("UPDATE {$tablepre}players SET pls='{$pls}' WHERE pid='{$spid}'");
    \skillbase\skill_setvalue(435, 'p' . $x, $spid);
    \skillbase\skill_setvalue(435, 'l' . $x, $now);
    \skillbase\skill_setvalue(435, 's' . $x, $nkind);
    \skillbase\skill_setvalue(435, 'h' . $x, 1);
    //保安技能skill436(收工资)
    $pdata = \player\fetch_playerdata_by_pid($spid);
    \skillbase\skill_acquire(436, $pdata);
    \skill436\skill436_set_hpid($pid, $pdata);
    \skill436\skill436_set_label($x, $pdata);
    \player\player_save($pdata);
}
Exemple #2
0
function crm_lose_event()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys', 'logger', 'addnpc'));
    \addnpc\addnpc(75, 0, 20);
    \addnpc\addnpc(75, 1, 20);
    \addnpc\addnpc(75, 2, 20);
}
Exemple #3
0
function gamesysctl_extractnpc()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys', 'player', 'itemmain', 'logger', 'addnpc', 'npc', 'gamesysctl'));
    $enpc_num = sizeof($extract_npc);
    if (!$enpc_num) {
        $log .= "当你提交了操作后,一个大大的error出现在了画面上,虽然你是一个不讲鹰语的爱国者,但是“错误”这个单词你还是认识的。<br><span class='yellow'>画面下方的错误原因中写着:系统中无可释放NPC。</span><br>";
        return;
    }
    addnews($now, 'gsc_exnpc', $name);
    //我真是哔了狗
    $e_A = rand(0, $enpc_num);
    $e_npc_A = $e_A > 0 ? $extract_npc[$e_A - 1] : $extract_npc[$e_A];
    $eA_type = $e_npc_A['type'];
    $eA_sub = $e_npc_A['sub'];
    $eA_num = $e_npc_A['num'];
    $eA_type_info = $npcinfo[$eA_type];
    $eA_sub_info = $eA_type_info['sub'];
    $eA_npc_info = $eA_sub_info[$eA_sub];
    $eA_name = $eA_npc_info['name'];
    \addnpc\addnpc($eA_type, $eA_sub, $eA_num);
    $e_B = rand(0, $enpc_num);
    $e_npc_B = $e_B > 0 ? $extract_npc[$e_B - 1] : $extract_npc[$e_B];
    $eB_type = $e_npc_B['type'];
    $eB_sub = $e_npc_B['sub'];
    $eB_num = $e_npc_B['num'];
    $eB_type_info = $npcinfo[$eB_type];
    $eB_sub_info = $eB_type_info['sub'];
    $eB_npc_info = $eB_sub_info[$eB_sub];
    $eB_name = $eB_npc_info['name'];
    \addnpc\addnpc($eB_type, $eB_sub, $eB_num);
    $e_C = rand(0, $enpc_num);
    $e_npc_C = $e_C > 0 ? $extract_npc[$e_C - 1] : $extract_npc[$e_C];
    $eC_type = $e_npc_C['type'];
    $eC_sub = $e_npc_C['sub'];
    $eC_num = $e_npc_C['num'];
    $eC_type_info = $npcinfo[$eC_type];
    $eC_sub_info = $eC_type_info['sub'];
    $eC_npc_info = $eC_sub_info[$eC_sub];
    $eC_name = $eC_npc_info['name'];
    \addnpc\addnpc($eC_type, $eC_sub, $eC_num);
    $log .= "当你提交了操作后,控制台的屏幕上显示出了黄色的反馈信息。<br><span class='yellow'>“已释放NPC:<br>【{$npc_typeinfo[$eA_type]} {$eA_name}】 - <span class='red'>{$eA_num}</span>名<br>【{$npc_typeinfo[$eB_type]} {$eB_name}】 - <span class='red'>{$eB_num}</span>名<br>【{$npc_typeinfo[$eC_type]} {$eC_name}】 - <span class='red'>{$eC_num}</span>名<br>请小心。它们的位置分别在……”</span><br>你还没来得及阅读完下文,控制台就因<span class='red'>能源不足</span>而自动休眠了……这坑爹的能量核心是国产的吧……<br>";
    foreach (array(1, 2, 3, 4, 5, 6) as $i) {
        if (${'itm' . $i} == '能量核心' && ${'itms' . $i} > 0) {
            $core['itme'] =& ${'itme' . $i};
            $core['itms'] =& ${'itms' . $i};
            $core['itm'] =& ${'itm' . $i};
            $core['itmk'] =& ${'itmk' . $i};
            $core['itmsk'] =& ${'itmsk' . $i};
            \itemmain\itms_reduce($core);
            break;
        }
    }
}