Файл: kitchen_cook.php
Строк: 91
<?php
include_once("settings.php");
include_once("game_header.php");
include_once("quest_msg.php");
include_once("player_thing.php");
$quest_msg = new CQuestMsg($db,$room_id);
$player_thing = new CPlayerThings($db,$vnum);
if(!isset($mode)) $mode="";
if(isset($info_msg))
{
    $smarty->assign('INFO_MSG',$info_msg);
    session_unregister("info_msg");
}
switch ($mode){
    case 'answer':
        $dialog = $quest_msg->getDialog($id);
        $smarty->assign('QUESTION',$dialog['question']);
        
        //check quest
        switch ($id){
            case '1020':
                //check object in player inventory
                $karas_id=$player_thing->getThingVnum(55);
                $karas=$player_thing->getCountThing($karas_id);
                
                $okun_id=$player_thing->getThingVnum(56);
                $okun=$player_thing->getCountThing($okun_id);
                
                $leash_id=$player_thing->getThingVnum(57);
                $leash=$player_thing->getCountThing($leash_id);
                
                $shuka_id=$player_thing->getThingVnum(58);
                $shuka=$player_thing->getCountThing($shuka_id);
                
                $tortila_id=$player_thing->getThingVnum(61);
                $tortila=$player_thing->getCountThing($tortila_id);
                
                if(!($karas>=5 && $okun>=4 && $leash >=3 && $shuka>=2 && $tortila>=1)){
                    $smarty->assign('ANSWER',"дБ ФЩ ОЙЛБЛ ПВНБОХФШ НЕОС ИПЮЕЫШ. оБМПЧЙ УОБЮБМБ ТЩВЩ, РПФПН РТЙДЕЫШ.");
                    break;
                }
                $player_thing->removeThing($karas_id,    5);
                $player_thing->removeThing($okun_id,    4);
                $player_thing->removeThing($leash_id,    3);
                $player_thing->removeThing($shuka_id,    2);
                $player_thing->removeThing($tortila_id,    1);
                if(!$skill->getSkillLevel(SKILL_COOK)){
                    $skill->setSkill(SKILL_COOK);    
                    $smarty->assign('ANSWER',"хИ ФЩ, НПМПДЕГ ЧУЕ ДПУФБМ, ДБЦЕ ЮЕТЕРБИХ. эБУ НЩ ЕЕ. оП ОБЮБФШ ОБДП У ЛБТБУЕК, ЪОБЕЫШ ЕУФШ ФБЛЙЕ, ЛБТБУЙ Ч УНЕФБОБ.<br>рТПЫЕМ ЮБУ. ъБ ЬФПФ ЮБУ, ЧЩ ЧБТЙМЙ, РБТЙМЙ, Й ЕЭЕ ЮФПФП, ФЙРБ ЗТПНЛП ЮЙИБС, ДПУФБЧБМЙ ЙЪ ВБОЛЙ ЮЕТОЩК РПТПЫПЛ Й УЩРБМЙ ЕЗП ОБ РТЙЗПФПЧМЕООХА ЕДХ.<br> рПНБМЕОШЛХ ЧЩ ХЪОБМЙ, ЛБЛ ЗПФПЧЙФУС ТЩВЛБ.");
                }else{
                    $smarty->assign('ANSWER',"чЪСЧ Х ЧБУ ЛПНРПОЕОФЩ, РПЧБТ РПУНПФТЕМ ОБ ЧБУ Й ЙЪТЕЛ: "уРБУЙВП РПТБДПЧБМ УФБТЙЛБ, ФПМШЛП ЪТС ФЩ ЬФП, ОЕЮЕНХ НЕОС ФЕВС ХЮЙФШ"");
                }
                break;
            default:
                $smarty->assign('ANSWER',$dialog['answer']);
                break;
        }
        $kitchen_cook_txt=$smarty->fetch($templ_path.'/kitchen_cook_answer.tpl');
    break;
    default:
    $dialog_msg=$quest_msg->getAllDialogs();
    $num=1;
    foreach($dialog_msg as $v)
    {
        $smarty->append("dialog_msg",array(
        'VNUM' => $v['vnum'],
        'NUM' => $num,
        'QUESTION' => $v['question'],
        ));
        $num++;
    }
    $kitchen_cook_txt=$smarty->fetch($templ_path.'/kitchen_cook.tpl');
    break;
}
$smarty->assign('MAIN',$kitchen_cook_txt);
echo($smarty->fetch($templ_path.'/game.tpl'));
?>