From 4af1784f06ac1c8863bfdacef8b562dafb6f6ed1 Mon Sep 17 00:00:00 2001 From: lopar Date: Fri, 23 Mar 2018 23:30:05 +0200 Subject: [PATCH] =?UTF-8?q?=D1=85=D0=BE=D1=82=D1=8C=20=D0=BD=D0=B5=D0=BC?= =?UTF-8?q?=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BF=D1=80=D0=B8=D0=B2=D0=B5=D0=B4?= =?UTF-8?q?=D1=91=D0=BC=20=D0=B2=20=D0=BF=D0=BE=D1=80=D1=8F=D0=B4=D0=BE?= =?UTF-8?q?=D0=BA,=20=D1=87=D1=82=D0=BE=D0=B1=D1=8B=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D1=80=D1=83=D0=B3=D0=B0=D0=BB=D1=81=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module_quest.php | 157 ++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 84 deletions(-) diff --git a/module_quest.php b/module_quest.php index fd2be10..b8f4fb6 100644 --- a/module_quest.php +++ b/module_quest.php @@ -1,16 +1,18 @@ endq((int)$_GET['end_qst_now'], 'end', $user); +if ($_GET['end_qst_now']) { + echo $q->endq((int)$_GET['end_qst_now'], 'end', $user); } -if($_GET['end_qst']) { - echo $q->winqst((int)$_GET['end_qst'], $user); +if ($_GET['end_qst']) { + echo $q->winqst((int)$_GET['end_qst'], $user); } $qsee = ''; @@ -20,103 +22,90 @@ $qx = 0; -404 - - - + '.$pq['name'].'Выполнить
'.$pq['info'].'
'.$q->info($pq, $user['id']).'

'; - $qx++; +$sp = db::c()->query('SELECT `vars` FROM `actions` WHERE `vars` LIKE "?S" AND `vals` = "?s" AND `uid` = ?i LIMIT 100', "%start_quest%", "go", $user['id']); +while ($pl = $sp->fetch_assoc()) { + $questId = str_replace('start_quest', '', $pl['vars']); + $pq = db::c()->query('SELECT `id`,`name`,`info` FROM `quests` WHERE `id` = ?i', $questId)->fetch_assoc(); + $qsee .= sprintf(' %sВыполнить
%s
$s

', $pq['id'], $pq['name'], $pq['id'], $pq['info'], $q->info($pq, $user['id'])); + $qx++; } -if($qsee == '') { - $qsee = '
К сожалению у вас нет ни одного задания
'; -} - - -if($q->error != '') { - $error = $q->error; -} - - +if (!$qsee) $qsee = 'У вас нет заданий.'; +if ($q->error) $error = $q->error; ?>
-
Состояние персонажа,
-
- - -
- '.$error.''; } ?> -
- -
+
Состояние персонажа,
+
+ + +
+ +
+ +
- \ No newline at end of file