Файл: quest_talk.php
Строк: 41
<?php
include_once("settings.php");
include_once("game_header.php");
include_once("quest_msg.php");
include_once("player_thing.php");
$skills = new CSkill($db,$vnum);
$quest_msg = new CQuestMsg($db,$room_id);
$player_thing = new CPlayerThings($db,$vnum);
if(!isset($mode)) $mode="";
switch ($mode){
case 'answer':
$dialog = $quest_msg->getDialog($id);
$smarty->assign('QUESTION',$dialog['question']);
//check quest
switch ($id){
case '3020':
//check object in player inventory
$tool=$player_thing->getThingVnum(54);
if($tool==-1){
$smarty->assign('ANSWER',"дБ ФЩ ОЙЛБЛ ПВНБОХФШ НЕОС ИПЮЕЫШ");
break;
}
$smarty->assign('ANSWER',"уРБУЙВП,РПТБДПЧБМ УФБТЙЛБ. б ЛБЛ ФБН НПК ЧОХЮЕЛ, ЦЙЧ МЙ. иПФС...<br>уФБТЙЛ ЪБРМБЛБМ<br>бИ, МБДОП.....<br>пФВМБЗПДБТА С ФЕВС, ОБХЮХ ЛБЛ ТЩВХ МПЧЙФШ.");
$player_thing->removeThing($tool,1);
$skills->setSkill(SKILL_FISH);
break;
default:
$smarty->assign('ANSWER',$dialog['answer']);
break;
}
$quest_talk_txt=$smarty->fetch($templ_path.'/quest_talk_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++;
}
$quest_talk_txt=$smarty->fetch($templ_path.'/quest_talk.tpl');
break;
}
$smarty->assign('MAIN',$quest_talk_txt);
$smarty->display($templ_path.'/game.tpl');
?>