Обновления запросов для пещер.
This commit is contained in:
parent
707d6c5c99
commit
e0b08e0b1a
@ -745,7 +745,8 @@ class User
|
||||
'UPDATE `items_users` SET `use_text` = "' . $itm['use_text'] . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `items_text` (`item_id`,`time`,`login`,`text`,`city`,`x`) VALUES ("' . $itm['id'] . '","' . time() . '","' . $this->info['login'] . '","' . mysql_real_escape_string(
|
||||
'INSERT INTO `items_text` (`item_id`,`time`,`login`,`text`,`city`,`x`) VALUES ("' . $itm['id'] . '","' . time(
|
||||
) . '","' . $this->info['login'] . '","' . mysql_real_escape_string(
|
||||
htmlspecialchars($txt, null)
|
||||
) . '","' . $this->info['city'] . '","' . $sx . '")'
|
||||
);
|
||||
@ -801,7 +802,8 @@ class User
|
||||
$this->error = 'Персонаж уже проводит сделку';
|
||||
} else {
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `transfers` (`uid1`,`uid2`,`city`,`room`,`time`,`text`,`start1`) VALUES ("' . $this->info['id'] . '","' . $t['id'] . '","' . $this->info['city'] . '","' . $this->info['room'] . '","' . time() . '","' . mysql_real_escape_string(
|
||||
'INSERT INTO `transfers` (`uid1`,`uid2`,`city`,`room`,`time`,`text`,`start1`) VALUES ("' . $this->info['id'] . '","' . $t['id'] . '","' . $this->info['city'] . '","' . $this->info['room'] . '","' . time(
|
||||
) . '","' . mysql_real_escape_string(
|
||||
htmlspecialchars($_POST['textarea'], null)
|
||||
) . '","' . time() . '")'
|
||||
);
|
||||
@ -2048,40 +2050,22 @@ class User
|
||||
$clon['login'] .= ' (Клон)';
|
||||
}
|
||||
//копируем пользователя
|
||||
$ins1 = mysql_query(
|
||||
'INSERT INTO `users` (
|
||||
`align`,
|
||||
`login`,
|
||||
`level`,
|
||||
`pass`,
|
||||
`city`,
|
||||
`cityreg`,
|
||||
`name`,
|
||||
`sex`,
|
||||
`hobby`,
|
||||
`timereg`,
|
||||
`obraz`,
|
||||
`bot_id`,
|
||||
`inTurnir`,
|
||||
`temp`
|
||||
) VALUES (
|
||||
"' . $clon['align'] . '",
|
||||
"' . $clon['login'] . '",
|
||||
"' . $clon['level'] . '",
|
||||
"' . md5('bot_pass_' . $clon['login'] . '_') . '",
|
||||
"' . $this->info['city'] . '",
|
||||
"' . $clon['city_reg'] . '",
|
||||
"' . $clon['login'] . '",
|
||||
"' . $clon['sex'] . '",
|
||||
"",
|
||||
"' . $clon['time_reg'] . '",
|
||||
"' . $clon['obraz'] . '",
|
||||
"' . mysql_real_escape_string($id) . '",
|
||||
"' . $clon['inTurnir'] . '",
|
||||
5
|
||||
)'
|
||||
|
||||
Db::sql(
|
||||
"insert into users (align, login, level, pass, city, cityreg, name, sex, timereg, obraz, bot_id, inTurnir) values (?,?,?,uuid(),'Неведомые земли','Неведомые земли',?,?,?,?,?,?)",
|
||||
[
|
||||
$clon['align'],
|
||||
$clon['login'],
|
||||
$clon['level'],
|
||||
$clon['login'],
|
||||
$clon['sex'],
|
||||
$clon['time_reg'],
|
||||
$clon['obraz'],
|
||||
$id,
|
||||
$clon['inTurnir'],
|
||||
]
|
||||
);
|
||||
if ($ins1) {
|
||||
|
||||
if ($round > 0) {
|
||||
//Улучшаем мф. и статы и НР 1 раунд = +10%
|
||||
$statss = Conversion::dataStringToArray($clon['stats']);
|
||||
@ -2104,119 +2088,62 @@ class User
|
||||
$clon['stats'] = Conversion::arrayToDataString($statss);
|
||||
unset($statss);
|
||||
}
|
||||
if ($luser && $clon['level'] < 8) {
|
||||
//Хуже уворот, крит и защита
|
||||
$statss = Conversion::dataStringToArray($clon['stats']);
|
||||
$statss['m1'] = ceil($statss['m1'] * 0.75);
|
||||
$statss['m2'] = ceil($statss['m2'] * 0.75);
|
||||
$statss['m3'] = ceil($statss['m3'] * 0.75);
|
||||
$statss['m4'] = ceil($statss['m4'] * 0.75);
|
||||
$statss['m5'] = ceil($statss['m5'] * 0.75);
|
||||
$statss['za'] = ceil($statss['za'] * 0.25);
|
||||
|
||||
$clon['stats'] = Conversion::arrayToDataString($statss);
|
||||
unset($statss);
|
||||
}
|
||||
$uid = mysql_insert_id();
|
||||
$uid = Db::lastInsertId();
|
||||
|
||||
//копируем статы
|
||||
$ins2 = mysql_query(
|
||||
'INSERT INTO `stats` (`clone`,`id`,`stats`,`hpNow`,`upLevel`,`bot`,`priems`) VALUES ("' . $clon['id'] . '","' . $uid . '","' . $clon['stats'] . '","1000000","' . $clon['upLevel'] . '","1","' . $clon['priems'] . '")'
|
||||
);
|
||||
if ($ins2) {
|
||||
Db::sql('insert into stats (clone, id, stats, hpNow, upLevel, bot, priems) values (?,?,?,1000000,?,1,?)', [$clon['id'], $uid, $clon['stats'], $clon['upLevel'], $clon['priems']]);
|
||||
|
||||
//копируем предметы
|
||||
$sp = mysql_query(
|
||||
'SELECT `id`,`item_id`,`1price`,`2price`,`3price`,`uid`,`use_text`,`data`,`inOdet`,`inShop`,`delete`,`iznosNOW`,`iznosMAX`,`gift`,`gtxt1`,`gtxt2`,`kolvo`,`geniration`,`magic_inc`,`maidin`,`lastUPD`,`timeOver`,`overType`,`secret_id`,`time_create`,`inGroup`,`dn_delete`,`inTransfer`,`post_delivery`,`lbtl_`,`bexp`,`so`,`blvl` FROM `items_users` WHERE `uid` = "' . $clon['id'] . '" AND `inOdet` > 0 AND `delete` = "0" LIMIT 50'
|
||||
Db::sql(
|
||||
"insert into items_users (uid, item_id, data, inOdet, iznosMAX, kolvo) select ?, item_id, replace(data, 'toclan', 'to_clan_'), inOdet, iznosMAX, kolvo from items_users where inOdet > 0 and uid = ?",
|
||||
[$uid, $clon['id']]
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$pl['data'] = str_replace('toclan', 'to_clan_', $pl['data']);
|
||||
mysql_query(
|
||||
'INSERT INTO `items_users` (`uid`,`item_id`,`data`,`inOdet`,`iznosMAX`,`kolvo`) VALUES ("' . $uid . '","' . $pl['item_id'] . '","' . $pl['data'] . '","' . $pl['inOdet'] . '","' . $pl['iznosMAX'] . '","' . $pl['kolvo'] . '")'
|
||||
);
|
||||
}
|
||||
|
||||
//копируем эффекты
|
||||
$sp = mysql_query(
|
||||
'SELECT `id`,`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`,`timeAce`,`user_use`,`delete`,`v1`,`v2`,`img2`,`x`,`hod`,`bj`,`sleeptime`,`no_Ace`,`tr_life_user` FROM `eff_users` WHERE `uid` = "' . $clon['id'] . '" AND `delete` = "0" AND `deactiveTime` < "' . time() . '" AND `v1` != "priem" LIMIT 50'
|
||||
Db::sql(
|
||||
"insert into eff_users (uid, id_eff, data, name, overType, timeUse, x) select ?, id_eff, data, name, overType, timeUse, x from eff_users where uid = ? and deactiveTime < unix_timestamp() and v1 != 'priem'",
|
||||
[$uid, $clon['id']]
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
mysql_query(
|
||||
'INSERT INTO `eff_users` (`uid`,`id_eff`,`data`,`name`,`overType`,`timeUse`,`x`) VALUES ("' . $uid . '","' . $pl['id_eff'] . '","' . $pl['data'] . '","' . $pl['name'] . '","' . $pl['overType'] . '","' . $pl['timeUse'] . '","' . $pl['x'] . '")'
|
||||
);
|
||||
}
|
||||
|
||||
$r = $uid;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
|
||||
} else {
|
||||
if ($botDate == null) {
|
||||
$bot = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`stats`,`obraz`,`level`,`sex`,`name`,`hobby`,`type`,`itemsUse`,`priemUse`,`align`,`clan`,`align_zvanie`,`bonus`,`clan_zvanie`,`time_reg`,`city_reg`,`upLevel`,`active`,`expB`,`p_items`,`agressor`,`priems`,`priems_z`,`award` FROM `test_bot` WHERE `id` = "' . $id . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
|
||||
$bot = Db::getRow('select id, login, stats, upLevel, itemsUse from test_bot where id = ?', [$id]);
|
||||
|
||||
if (!isset($bot['id'])) {
|
||||
return [];
|
||||
} else {
|
||||
$bot = $botDate;
|
||||
}
|
||||
if (isset($bot['id'])) {
|
||||
if (isset($logins_bot[$bot['login']])) {
|
||||
$logins_bot[$bot['login']]++;
|
||||
$bot['login'] = $bot['login'] . ' (' . $logins_bot[$bot['login']] . ')';
|
||||
} else {
|
||||
$logins_bot[$bot['login']] = 1;
|
||||
}
|
||||
$ret = true;
|
||||
if ($bot['time_reg'] == 100) {
|
||||
$bot['time_reg'] = time();
|
||||
}
|
||||
if ($bot['city_reg'] == '{thiscity}') {
|
||||
$bot['city_reg'] = $this->info['city'];
|
||||
}
|
||||
|
||||
$ins1 = mysql_query(
|
||||
'INSERT INTO `users` (
|
||||
`align`,
|
||||
`login`,
|
||||
`level`,
|
||||
`pass`,
|
||||
`city`,
|
||||
`cityreg`,
|
||||
`name`,
|
||||
`sex`,
|
||||
`hobby`,
|
||||
`timereg`,
|
||||
`obraz`,
|
||||
`bot_id`,
|
||||
`temp`
|
||||
) VALUES (
|
||||
"' . $bot['align'] . '",
|
||||
"' . $bot['login'] . '",
|
||||
"' . $bot['level'] . '",
|
||||
"' . md5('bot_pass_' . $bot['login'] . '_') . '",
|
||||
"' . $this->info['city'] . '",
|
||||
"' . $bot['city_reg'] . '",
|
||||
"' . $bot['name'] . '",
|
||||
"' . $bot['sex'] . '",
|
||||
"' . $bot['hobby'] . '",
|
||||
"' . $bot['time_reg'] . '",
|
||||
"' . $bot['obraz'] . '",
|
||||
"' . mysql_real_escape_string($id) . '",
|
||||
6
|
||||
)'
|
||||
Db::sql(
|
||||
"insert into users (align, login, level, pass, city, cityreg, name, sex, hobby, timereg, obraz, bot_id)
|
||||
select align, ?, level, uuid(), 'Неведомые земли', 'Неведомые земли', name, sex, hobby, replace(time_reg, 100, unix_timestamp()), obraz, id
|
||||
from test_bot where id = ?",
|
||||
[$bot['login'], $id]
|
||||
);
|
||||
if ($ins1) {
|
||||
$uid = mysql_insert_id();
|
||||
if ($round > 0) {
|
||||
//Улучшаем мф. и статы и НР 1 раунд = +20%
|
||||
|
||||
$uid = Db::lastInsertId();
|
||||
|
||||
if ($round > 0) { //Улучшаем мф. и статы и НР 1 раунд = +20%
|
||||
$statss = Conversion::dataStringToArray($bot['stats']);
|
||||
//
|
||||
|
||||
$statss['s1'] = ceil($statss['s1'] * (1 + 0.20 * ($round)));
|
||||
$statss['s2'] = ceil($statss['s2'] * (1 + 0.20 * ($round)));
|
||||
$statss['s3'] = ceil($statss['s3'] * (1 + 0.20 * ($round)));
|
||||
$statss['s4'] = ceil($statss['s4'] * (1 + 0.20 * ($round)));
|
||||
//
|
||||
|
||||
$statss['hpAll'] = ceil($statss['hpAll'] * (1 + 0.20 * ($round)));
|
||||
$statss['mpAll'] = ceil($statss['mpAll'] * (1 + 0.20 * ($round)));
|
||||
//
|
||||
|
||||
$statss['m1'] = ceil($statss['m1'] * (1 + 0.20 * ($round)));
|
||||
$statss['m2'] = ceil($statss['m2'] * (1 + 0.20 * ($round)));
|
||||
$statss['m3'] = ceil($statss['m3'] * (1 + 0.20 * ($round)));
|
||||
@ -2227,55 +2154,32 @@ class User
|
||||
$bot['stats'] = Conversion::arrayToDataString($statss);
|
||||
unset($statss);
|
||||
}
|
||||
$ins2 = mysql_query(
|
||||
'INSERT INTO `stats` (`id`,`stats`,`hpNow`,`upLevel`,`bot`) VALUES ("' . $uid . '","' . $bot['stats'] . '","1000000","' . $bot['upLevel'] . '","1")'
|
||||
);
|
||||
if ($ins2) {
|
||||
|
||||
Db::sql('insert into stats (id, stats, hpNow, upLevel, bot) values (?,?,1000000,?,1)', [$uid, $bot['stats'], $bot['upLevel']]);
|
||||
|
||||
$bot['id'] = $uid;
|
||||
$bot['logins_bot'] = $logins_bot;
|
||||
$ret = $bot;
|
||||
|
||||
//Выдаем предметы
|
||||
$iu = explode(',', $bot['itemsUse']);
|
||||
|
||||
$i = 0;
|
||||
$w3b = 0;
|
||||
while ($i < count($iu)) {
|
||||
if ($iu[$i] > 0) {
|
||||
$idiu = $this->addItem($iu[$i], $bot['id']);
|
||||
$islot = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`inslot` FROM `items_main` WHERE `id` = "' . $iu[$i] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($islot['id'])) {
|
||||
if ($islot['inslot'] == 3) {
|
||||
if ($w3b == 1) {
|
||||
$islot = 14;
|
||||
|
||||
foreach ($iu as $item) {
|
||||
$iditem = ItemsModel::addItem($item, $bot['id']);
|
||||
$inslot = Db::getValue('select inslot from items_main where id = ?', [$item]) ?? 2000;
|
||||
if ($inslot === 3) {
|
||||
if ($w3b === 1) {
|
||||
$inslot = 14;
|
||||
} else {
|
||||
$islot = 3;
|
||||
$w3b = 1;
|
||||
}
|
||||
} else {
|
||||
$islot = $islot['inslot'];
|
||||
}
|
||||
} else {
|
||||
$islot = 2000;
|
||||
Db::sql('update items_users set inOdet = ? where id = ?', [$inslot, $iditem]);
|
||||
}
|
||||
mysql_query(
|
||||
'UPDATE `items_users` SET `inOdet` = "' . $islot . '" WHERE `id` = "' . $idiu . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
$ret = false;
|
||||
}
|
||||
} else {
|
||||
$ret = false;
|
||||
}
|
||||
return $ret;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
return $bot;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2363,11 +2267,13 @@ class User
|
||||
$col = $this->itemsX($iid);
|
||||
if ($col > 1) {
|
||||
$UpItems = mysql_query(
|
||||
'UPDATE `items_users` SET `uid` = ' . $this->info['id'] . ', `inGroup` = `inGroup`+1000, `1price` = "' . $i1['price1'] . '", `lastUPD` = "' . time() . '", `inShop` = 0 WHERE `inShop` = 30 AND `inOdet` = "0"AND `item_id`="' . $i2['item_id'] . '" AND `uid`="' . $i2['uid'] . '" AND `inGroup` = "' . $i2['inGroup'] . '" LIMIT ' . $col . ''
|
||||
'UPDATE `items_users` SET `uid` = ' . $this->info['id'] . ', `inGroup` = `inGroup`+1000, `1price` = "' . $i1['price1'] . '", `lastUPD` = "' . time(
|
||||
) . '", `inShop` = 0 WHERE `inShop` = 30 AND `inOdet` = "0"AND `item_id`="' . $i2['item_id'] . '" AND `uid`="' . $i2['uid'] . '" AND `inGroup` = "' . $i2['inGroup'] . '" LIMIT ' . $col . ''
|
||||
);
|
||||
} else {
|
||||
$UpItems = mysql_query(
|
||||
'UPDATE `items_users` SET `uid` = ' . $this->info['id'] . ', `1price` = "' . $i1['price1'] . '", `lastUPD` = "' . time() . '", `inShop` = 0 WHERE `id` = "' . $iid . '" AND `inOdet` = "0" AND `delete` = "0" AND `uid`="' . $i2['uid'] . '" LIMIT 1'
|
||||
'UPDATE `items_users` SET `uid` = ' . $this->info['id'] . ', `1price` = "' . $i1['price1'] . '", `lastUPD` = "' . time(
|
||||
) . '", `inShop` = 0 WHERE `id` = "' . $iid . '" AND `inOdet` = "0" AND `delete` = "0" AND `uid`="' . $i2['uid'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
//Вставляем функцию передачи кредитов владельцу предмета
|
||||
@ -4413,7 +4319,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
if ($po['sudba'] == '0') {
|
||||
$is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто наденет его. Никто другой не сможет его использовать." src="' . Config::img() . '/i/destiny0.gif">';
|
||||
} elseif ($po['sudba'] == '1') {
|
||||
$is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто возьмет предмет. Никто другой не сможет его использовать." src="' . Config::img() . '/i/destiny0.gif">';
|
||||
$is2 .= ' <img title="Этот предмет будет связан общей судьбой с первым, кто возьмет предмет. Никто другой не сможет его использовать." src="' . Config::img(
|
||||
) . '/i/destiny0.gif">';
|
||||
} else {
|
||||
$is2 .= ' <img title="Этот предмет связан общей судьбой с ' . $po['sudba'] . '. Никто другой не сможет его использовать." src="' . Config::img() . '/i/desteny.gif">';
|
||||
}
|
||||
@ -4597,7 +4504,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
$tr .= '<br>• Броня ' . $bn[$i] . ': ' . $po['add_mib' . $i] . '-' . $po['add_mab' . $i];
|
||||
}
|
||||
if (isset($po['mf_mib']) && $po['mf_mib'] > 0) {
|
||||
$tr .= ' <a href="main.php?inv=1&otdel=' . $_GET['otdel'] . '&rstv=' . $pl['id'] . '&mf=mib' . $i . '"><img src="' . Config::img() . '/i/up.gif" width="11" height="11"></a>';
|
||||
$tr .= ' <a href="main.php?inv=1&otdel=' . $_GET['otdel'] . '&rstv=' . $pl['id'] . '&mf=mib' . $i . '"><img src="' . Config::img(
|
||||
) . '/i/up.gif" width="11" height="11"></a>';
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
@ -4741,7 +4649,11 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
|
||||
if (isset($po['free_stats']) && $po['free_stats'] > 0) {
|
||||
$is2 .= '<br><strong>Распределение статов:</strong>';
|
||||
$is2 .= '<div style="margin-left:20px;"><small>Сила: ' . $po['add_s1'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=1"><img src="' . Config::img() . '/i/plus.gif"></a><br>Ловкость: ' . $po['add_s2'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=2"><img src="' . Config::img() . '/i/plus.gif"></a><br>Интуиция: ' . $po['add_s3'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=3"><img src="' . Config::img() . '/i/plus.gif"></a><br>Интеллект: ' . $po['add_s5'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=5"><img src="' . Config::img() . '/i/plus.gif"></a></small></div>';
|
||||
$is2 .= '<div style="margin-left:20px;"><small>Сила: ' . $po['add_s1'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=1"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>Ловкость: ' . $po['add_s2'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=2"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>Интуиция: ' . $po['add_s3'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=3"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>Интеллект: ' . $po['add_s5'] . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufs=5"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a></small></div>';
|
||||
$is2 .= '• Осталось распределений: ' . $po['free_stats'] . '';
|
||||
}
|
||||
|
||||
@ -4793,17 +4705,28 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
} else {
|
||||
$is2 .= '<div style="margin-left:20px;"><small>
|
||||
Мастерство владения мечами: ' . (0 + $po['add_a1']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=1"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения дубинами, булавами: ' . (0 + $po['add_a2']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=2"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения ножами, кастетами: ' . (0 + $po['add_a3']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=3"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения топорами, секирами: ' . (0 + $po['add_a4']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=4"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения магическими посохами: ' . (0 + $po['add_a5']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=5"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения стихией Огня: ' . (0 + $po['add_mg1']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=6"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения стихией Воздуха: ' . (0 + $po['add_mg2']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=7"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения стихией Воды: ' . (0 + $po['add_mg3']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=8"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения стихией Земли: ' . (0 + $po['add_mg4']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=9"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения магией Света: ' . (0 + $po['add_mg5']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=10"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения магией Тьмы: ' . (0 + $po['add_mg6']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=11"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения серой магией: ' . (0 + $po['add_mg7']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=12"><img src="' . Config::img() . '/i/plus.gif"></a><br>
|
||||
Мастерство владения дубинами, булавами: ' . (0 + $po['add_a2']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=2"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения ножами, кастетами: ' . (0 + $po['add_a3']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=3"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения топорами, секирами: ' . (0 + $po['add_a4']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=4"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения магическими посохами: ' . (0 + $po['add_a5']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=5"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения стихией Огня: ' . (0 + $po['add_mg1']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=6"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения стихией Воздуха: ' . (0 + $po['add_mg2']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=7"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения стихией Воды: ' . (0 + $po['add_mg3']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=8"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения стихией Земли: ' . (0 + $po['add_mg4']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=9"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения магией Света: ' . (0 + $po['add_mg5']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=10"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения магией Тьмы: ' . (0 + $po['add_mg6']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=11"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
Мастерство владения серой магией: ' . (0 + $po['add_mg7']) . ' <a href="?inv=1&itmid=' . $pl['id'] . '&otdel=' . ((int)$_GET['otdel']) . '&ufsms=12"><img src="' . Config::img(
|
||||
) . '/i/plus.gif"></a><br>
|
||||
</small></div>';
|
||||
$is2 .= 'Осталось распределений: ' . $mx1;
|
||||
}
|
||||
@ -4954,14 +4877,16 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
mysql_query('SELECT * FROM `clan` WHERE `id` = "' . $po['toclan1'][0] . '" LIMIT 1')
|
||||
);
|
||||
if (isset($clpo['id'])) {
|
||||
$is2 .= '<div style="color:brown;">Предмет принадлежит клану <img style="vertical-align:bottom" src="' . Config::img() . '/i/clan/' . $clpo['name_mini'] . '.gif" width="24" height"15"> <strong>' . $clpo['name'] . '</strong>';
|
||||
$is2 .= '<div style="color:brown;">Предмет принадлежит клану <img style="vertical-align:bottom" src="' . Config::img(
|
||||
) . '/i/clan/' . $clpo['name_mini'] . '.gif" width="24" height"15"> <strong>' . $clpo['name'] . '</strong>';
|
||||
$plpo = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`cityreg` FROM `users` WHERE `id` = "' . $po['toclan1'][1] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($plpo['id'])) {
|
||||
$is2 .= ' <font color=grey>(Дар игрока <strong>' . $plpo['login'] . '</strong><a href="info/' . $plpo['id'] . '" target="_blank"><img src="' . Config::img() . '/i/inf_' . $plpo['cityreg'] . '.gif" width="9"></a>)</font>';
|
||||
$is2 .= ' <font color=grey>(Дар игрока <strong>' . $plpo['login'] . '</strong><a href="info/' . $plpo['id'] . '" target="_blank"><img src="' . Config::img(
|
||||
) . '/i/inf_' . $plpo['cityreg'] . '.gif" width="9"></a>)</font>';
|
||||
if ($plpo['login'] == $this->info['login']) {
|
||||
if (isset($_GET['backmyitm'])) {
|
||||
$pl['inOdet'] = 0;
|
||||
@ -5107,7 +5032,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$is1 .= '<small>Предмет у игрока<br><strong>' . $yui['login'] . '</strong><a href="info/' . $yui['id'] . '" target="_blank"><img width="10" src="' . Config::img() . '/i/inf_' . $yui['cityreg'] . '.gif"></a></small>';
|
||||
$is1 .= '<small>Предмет у игрока<br><strong>' . $yui['login'] . '</strong><a href="info/' . $yui['id'] . '" target="_blank"><img width="10" src="' . Config::img(
|
||||
) . '/i/inf_' . $yui['cityreg'] . '.gif"></a></small>';
|
||||
if ($this->info['tt'][14][0] == 1 || ($this->info['id'] == $us_1)) {
|
||||
$is1 .= '<br><small style=""><a href="?clan&deposit&ungive_itm=' . $pl['id'] . '">Изъять предмет</a></small>';
|
||||
}
|
||||
@ -5469,13 +5395,15 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
}
|
||||
if ($pl['magic_inc'] && $pl['type'] == 30) {
|
||||
//используем эликсир
|
||||
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>"<strong>' . $pl['name'] . '</strong>"<br>Использовать сейчас?</td></tr></table>';
|
||||
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img(
|
||||
) . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>"<strong>' . $pl['name'] . '</strong>"<br>Использовать сейчас?</td></tr></table>';
|
||||
$useUrl = 'top.useiteminv(\'' . (0 + $pl['id']) . '\',\'' . $pl['img'] . '\',\'' . $pl['img'] . '\',1,\'' . $pldate . '\',\'' . (0 + $_GET['otdel']) . '\');';
|
||||
} elseif ($pl['magic_inc'] && $pl['type'] == 29) { //используем заклятие
|
||||
if (isset($po['useOnLogin']) && !isset($po['zazuby'])) { //на персонажа
|
||||
$useUrl = 'top.useMagic(\'' . $pl['name'] . '\',' . (0 + $pl['id']) . ',\'' . $pl['img'] . '\',1,\'main.php?' . $inv1 . 'otdel=' . ((int)$_GET['otdel']) . '&use_pid=' . $pl['id'] . '&rnd=' . $code . '\');';
|
||||
} else { //просто использование (на себя, либо без указания предмета\логина)
|
||||
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>"<strong>' . $pl['name'] . '</strong>"<br>Использовать сейчас?</td></tr></table>';
|
||||
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img(
|
||||
) . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>"<strong>' . $pl['name'] . '</strong>"<br>Использовать сейчас?</td></tr></table>';
|
||||
$useUrl = 'top.useiteminv(\'' . (0 + $pl['id']) . '\',\'' . $pl['img'] . '\',\'' . $pl['img'] . '\',1,\'' . $pldate . '\',\'' . (0 + $_GET['otdel']) . '\',' . (0 + $_GET['otdel']) . ');';
|
||||
}
|
||||
//на предмет
|
||||
@ -5522,14 +5450,17 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
if ($pl['group'] > 0) {
|
||||
$is1 .= '<br>';
|
||||
if ($this->itemsX($pl['id']) < $pl['group_max']) {
|
||||
$is1 .= '<a href="main.php?inv=1&otdel=' . ((int)$_GET['otdel']) . '&stack=' . $pl['id'] . '&rnd=' . $code . '" title="Собрать"><img src="' . Config::img() . '/i/stack.gif" /></a>';
|
||||
$is1 .= '<a href="main.php?inv=1&otdel=' . ((int)$_GET['otdel']) . '&stack=' . $pl['id'] . '&rnd=' . $code . '" title="Собрать"><img src="' . Config::img(
|
||||
) . '/i/stack.gif" /></a>';
|
||||
}
|
||||
if ($this->itemsX($pl['id']) > 1) {
|
||||
$is1 .= ' <a
|
||||
onClick="top.unstack(' . $pl['id'] . ',\'' . $pl['img'] . '\',\'' . $pl['name'] . '\',1,\'<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td align=\\\'center\\\' rowspan=\\\'2\\\' width=\\\'70px\\\'><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Разделить предмет <strong>' . $pl['name'] . '</strong>?</td></tr></table>\',\'' . intval(
|
||||
onClick="top.unstack(' . $pl['id'] . ',\'' . $pl['img'] . '\',\'' . $pl['name'] . '\',1,\'<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td align=\\\'center\\\' rowspan=\\\'2\\\' width=\\\'70px\\\'><img src=\\\'' . Config::img(
|
||||
) . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Разделить предмет <strong>' . $pl['name'] . '</strong>?</td></tr></table>\',\'' . intval(
|
||||
$_GET['otdel']
|
||||
) . '\'); return false;"
|
||||
href="main.php?inv=1&otdel=' . ((int)$_GET['otdel']) . '&unstack=' . $pl['id'] . '&rnd=' . $code . '" title="Разделить"><img src="' . Config::img() . '/i/unstack.gif" /></a>' . $script;
|
||||
href="main.php?inv=1&otdel=' . ((int)$_GET['otdel']) . '&unstack=' . $pl['id'] . '&rnd=' . $code . '" title="Разделить"><img src="' . Config::img(
|
||||
) . '/i/unstack.gif" /></a>' . $script;
|
||||
}
|
||||
}
|
||||
if (isset($po['toclan'])) {
|
||||
@ -5546,9 +5477,10 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
|
||||
if ($d[1] == 1) { //можно выкинуть
|
||||
if (!isset($po['nodelete'])) {
|
||||
$is1 .= ' <a onClick="top.drop(' . $pl['id'] . ',\'' . $pl['img'] . '\',\'' . $pl['name'] . '\',1,\'<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Предмет <strong>' . $pl['name'] . '</strong> будет утерян, вы уверены ?</td></tr></table>\',\'' . intval(
|
||||
$is1 .= ' <a onClick="top.drop(' . $pl['id'] . ',\'' . $pl['img'] . '\',\'' . $pl['name'] . '\',1,\'<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2><img src=\\\'' . Config::img(
|
||||
) . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Предмет <strong>' . $pl['name'] . '</strong> будет утерян, вы уверены ?</td></tr></table>\',\'' . intval(
|
||||
$_GET['otdel']
|
||||
) . ' . Config::img() . ' / i / clear . gif"></a>';
|
||||
) . Config::img() . ' / i / clear . gif"></a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5858,7 +5790,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
$itm['data'] = Conversion::dataStringToArray($itm['data']);
|
||||
unset($itm['data']['frompisher']);
|
||||
$itm['data'] = Conversion::arrayToDataString($itm['data']);
|
||||
if ($pl['data'] == $itm['data'] && $pl['name'] == $itm['name'] && $itm['iznosMAX'] == $pl['iznosMAX'] && $pl['iznosNOW'] == 0 && ($pl['timeOver'] == 0 || $pl['timeOver'] > time()) && $pl['gift'] == $itm['gift']) {
|
||||
if ($pl['data'] == $itm['data'] && $pl['name'] == $itm['name'] && $itm['iznosMAX'] == $pl['iznosMAX'] && $pl['iznosNOW'] == 0 && ($pl['timeOver'] == 0 || $pl['timeOver'] > time(
|
||||
)) && $pl['gift'] == $itm['gift']) {
|
||||
$upd = mysql_query(
|
||||
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `inGroup` = "' . $itm['inGroup'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'
|
||||
);
|
||||
@ -5994,7 +5927,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
`iu`.`bexp`,
|
||||
`iu`.`so`,
|
||||
`iu`.`blvl`
|
||||
FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE (`iu`.`inOdet`!="0" OR `iu`.`data` LIKE "%srok%" OR `iu`.`data` LIKE "%vip_sale%" OR `iu`.`data` LIKE "%sudba=1%" OR ( `iu`.`data` LIKE "%zazuby=%" AND `iu`.`data` NOT LIKE "%srok=%" ) OR `iu`.`iznosNOW` > 0 OR `im`.`srok` > 0 OR (`iu`.`timeOver`<' . time() . ' AND `iu`.`timeOver`!="0")) AND `iu`.`uid`="' . $u['id'] . '" AND (`iu`.`delete`="0" OR `iu`.`delete`="1000")'
|
||||
FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE (`iu`.`inOdet`!="0" OR `iu`.`data` LIKE "%srok%" OR `iu`.`data` LIKE "%vip_sale%" OR `iu`.`data` LIKE "%sudba=1%" OR ( `iu`.`data` LIKE "%zazuby=%" AND `iu`.`data` NOT LIKE "%srok=%" ) OR `iu`.`iznosNOW` > 0 OR `im`.`srok` > 0 OR (`iu`.`timeOver`<' . time(
|
||||
) . ' AND `iu`.`timeOver`!="0")) AND `iu`.`uid`="' . $u['id'] . '" AND (`iu`.`delete`="0" OR `iu`.`delete`="1000")'
|
||||
);
|
||||
while ($itm = mysql_fetch_array($cl)) {
|
||||
$po = [];
|
||||
@ -6428,7 +6362,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
$uimg = 'i/items/' . $pl['img'] . '';
|
||||
}
|
||||
|
||||
$witm[$pl['inOdet']] = '<img style="display:block;" src="' . Config::img() . '/' . $uimg . '" onMouseOver="top.hi(this,\'<center><strong>' . $pl['name'] . '</strong>' . $lvar . '</center>\',event,3,0,1,1,\'max-width:307px\')" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
$witm[$pl['inOdet']] = '<img style="display:block;" src="' . Config::img(
|
||||
) . '/' . $uimg . '" onMouseOver="top.hi(this,\'<center><strong>' . $pl['name'] . '</strong>' . $lvar . '</center>\',event,3,0,1,1,\'max-width:307px\')" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
|
||||
if ($i1 == 1) {
|
||||
$witm[$pl['inOdet']] = '<a href="/item/' . $pl['item_id'] . '" target="_blank">' . $witm[$pl['inOdet']] . '</a>';
|
||||
@ -6440,7 +6375,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
}
|
||||
if ($pl['magic_inc'] && $pl['type'] == 30) {
|
||||
//используем эликсир
|
||||
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>"<strong>' . $pl['name'] . '</strong>"<br>Использовать сейчас?</td></tr></table>';
|
||||
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img(
|
||||
) . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>"<strong>' . $pl['name'] . '</strong>"<br>Использовать сейчас?</td></tr></table>';
|
||||
$useUrl = 'top.useiteminv(\'' . (0 + $pl['id']) . '\',\'' . $pl['img'] . '\',\'' . $pl['img'] . '\',1,\'' . $pldate . '\',\'' . (0 + $_GET['otdel']) . '\');';
|
||||
} elseif ($pl['magic_inc'] && $pl['type'] == 29) {
|
||||
//используем заклятие
|
||||
@ -6453,7 +6389,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
$useUrl = 'top.useMagic(\'' . $pl['name'] . '\',' . (0 + $pl['id']) . ',\'' . $pl['img'] . '\',1,\'main.php?' . $inv1 . 'use_pid=' . $pl['id'] . '&rnd=' . $code . '\');';
|
||||
} else {
|
||||
//просто использование (на селя, либо без указания предмета\логина)
|
||||
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>"<strong>' . $pl['name'] . '</strong>"<br>Использовать сейчас?</td></tr></table>';
|
||||
$pldate = '<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2 width=\\\'80\\\' valign=\\\'middle\\\'><div align=\\\'center\\\'><img src=\\\'' . Config::img(
|
||||
) . '/i/items/' . $pl['img'] . '\\\'></div></td><td valign=\\\'middle\\\' align=\\\'left\\\'>"<strong>' . $pl['name'] . '</strong>"<br>Использовать сейчас?</td></tr></table>';
|
||||
$useUrl = 'top.useiteminv(\'' . (0 + $pl['id']) . '\',\'' . $pl['img'] . '\',\'' . $pl['img'] . '\',1,\'' . $pldate . '\',\'' . (0 + $_GET['otdel']) . '\');';
|
||||
}
|
||||
}
|
||||
@ -6548,7 +6485,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
} else {
|
||||
$uimg = 'i/items/' . $wj[1]['img'] . '';
|
||||
}
|
||||
$witm[1] = '<img style="display:block;" src="' . Config::img() . '/' . $uimg . '" onMouseOver="top.hi(this,\'<center>' . $wj1i . '</center>\',event,3,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
$witm[1] = '<img style="display:block;" src="' . Config::img(
|
||||
) . '/' . $uimg . '" onMouseOver="top.hi(this,\'<center>' . $wj1i . '</center>\',event,3,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
if ($i1 == 1) {
|
||||
$witm[1] = '<a href="/item/' . $wj[1]['item_id'] . '" target="_blank">' . $witm[1] . '</a>';
|
||||
} else {
|
||||
@ -6561,7 +6499,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
} else {
|
||||
$uimg = 'i/items/' . $wj[4]['img'] . '';
|
||||
}
|
||||
$witm[4] = '<img style="display:block;" src="' . Config::img() . '/' . $uimg . '" onMouseOver="top.hi(this,\'<center>' . $wj4i . '</center>\',event,3,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
$witm[4] = '<img style="display:block;" src="' . Config::img(
|
||||
) . '/' . $uimg . '" onMouseOver="top.hi(this,\'<center>' . $wj4i . '</center>\',event,3,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
if ($i1 == 1) {
|
||||
if ($wj4idd > 0 && isset($wj[4]['item_id'])) {
|
||||
$wj[4]['item_id'] = $wj4idd;
|
||||
@ -6617,9 +6556,11 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
)
|
||||
);
|
||||
if (isset($petimg['id'])) {
|
||||
$anml = '<img height="40" width="120" src="' . Config::img() . '/pet/' . $petimg['img'] . '" onMouseOver="top.hi(this,\'<strong>' . $an['name'] . '</strong> <i>(' . $anan2[$an['type']] . ')</i><br>Уровень: ' . $an['level'] . '\',event,2,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
$anml = '<img height="40" width="120" src="' . Config::img(
|
||||
) . '/pet/' . $petimg['img'] . '" onMouseOver="top.hi(this,\'<strong>' . $an['name'] . '</strong> <i>(' . $anan2[$an['type']] . ')</i><br>Уровень: ' . $an['level'] . '\',event,2,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
} else {
|
||||
$anml = '<img height="40" width="120" src="' . Config::img() . '/pet/' . $anan[$an['type']] . '.png" onMouseOver="top.hi(this,\'<strong>' . $an['name'] . '</strong><i>(' . $anan2[$an['type']] . ')</i><br>Уровень: ' . $an['level'] . '\',event,2,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
$anml = '<img height="40" width="120" src="' . Config::img(
|
||||
) . '/pet/' . $anan[$an['type']] . '.png" onMouseOver="top.hi(this,\'<strong>' . $an['name'] . '</strong><i>(' . $anan2[$an['type']] . ')</i><br>Уровень: ' . $an['level'] . '\',event,2,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();">';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6797,7 +6738,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
if ($e['type1'] == 18 || $e['type1'] == 19) {
|
||||
$e['img'] = $e['img2'];
|
||||
}
|
||||
$eff .= '<img width="38" height="23" style="margin:1px;display:block;float:left;" src="' . Config::img() . '/i/eff/' . $e['img'] . '"onMouseOver="top.hi(this,\'' . $ei . '\',event,0,1,1,1,\'\');" onMouseOut="top.hic(event);" onMouseDown="top.hic(event);" >';
|
||||
$eff .= '<img width="38" height="23" style="margin:1px;display:block;float:left;" src="' . Config::img(
|
||||
) . '/i/eff/' . $e['img'] . '"onMouseOver="top.hi(this,\'' . $ei . '\',event,0,1,1,1,\'\');" onMouseOut="top.hic(event);" onMouseDown="top.hic(event);" >';
|
||||
} elseif ($e['timeUse'] + $e['timeAce'] + $e['actionTime'] < time() && $e['timeUse'] != 77) {
|
||||
//удаляем эффект
|
||||
$ed = Conversion::dataStringToArray($e['data']);
|
||||
@ -6832,7 +6774,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
$sn['mpNow']
|
||||
) . '/' . (0 + $sn['mpAll']) . '</div>
|
||||
<div title="Уровень маны" class="hpborder" style="position:absolute; top:10px; width:120px; height:9px; z-index:13;"><img src="' . Config::img() . '/1x1.gif" height="9" width="1"></div>
|
||||
<div class="' . $lm[0] . ' senohp" style="height:9px; position:absolute; top:10px; width:' . $lm[1] . 'px; z-index:11;" id="lmp' . $u['id'] . '"><img src="' . Config::img() . '/1x1.gif" height="9" width="1"></div>
|
||||
<div class="' . $lm[0] . ' senohp" style="height:9px; position:absolute; top:10px; width:' . $lm[1] . 'px; z-index:11;" id="lmp' . $u['id'] . '"><img src="' . Config::img(
|
||||
) . '/1x1.gif" height="9" width="1"></div>
|
||||
<div title="Уровень маны" class="hp_none" style="position:absolute; top:10px; width:120px; height:10px; z-index:10;"></div>';
|
||||
} else {
|
||||
$hptop = 5;
|
||||
@ -6841,8 +6784,10 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
$sn['hpNow']
|
||||
) . '/' . (0 + $sn['hpAll']) . '</div>
|
||||
<div title="Уровень жизни" class="hpborder" style="position:absolute; top:' . $hptop . 'px; width:120px; height:9px; z-index:13;"><img src="' . Config::img() . '/1x1.gif" height="9" width="1"></div>
|
||||
<div class="' . $lh[0] . ' senohp" style="height:9px; width:' . $lh[1] . 'px; position:absolute; top:' . $hptop . 'px; z-index:11;" id="lhp' . $u['id'] . '"><img src="' . Config::img() . '/1x1.gif" height="9" width="1"></div>
|
||||
<div title="Уровень жизни" class="hp_none" style="position:absolute; top:' . $hptop . 'px; width:120px; height:10px; z-index:10;"><img src="' . Config::img() . '/1x1.gif" height="10"></div>' . $hpmp;
|
||||
<div class="' . $lh[0] . ' senohp" style="height:9px; width:' . $lh[1] . 'px; position:absolute; top:' . $hptop . 'px; z-index:11;" id="lhp' . $u['id'] . '"><img src="' . Config::img(
|
||||
) . '/1x1.gif" height="9" width="1"></div>
|
||||
<div title="Уровень жизни" class="hp_none" style="position:absolute; top:' . $hptop . 'px; width:120px; height:10px; z-index:10;"><img src="' . Config::img(
|
||||
) . '/1x1.gif" height="10"></div>' . $hpmp;
|
||||
//Собираем НР и МР
|
||||
$hpmp = '<div style="position:relative;">' . $hpmp . '</div>';
|
||||
|
||||
@ -7004,7 +6949,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
}
|
||||
$rt[0] .= '<div style="position:relative;height:220px;">
|
||||
<!-- образ -->
|
||||
<div style="position:absolute; width:120px; height:220px; z-index:1;"><a href="' . $invg[0] . '"><img onMouseOver="top.hi(this,\'Перейти в "<strong>' . $invg[1] . '</strong>"\',event,2,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();" width="120" height="220" src="' . Config::img() . '/' . $uobr . '" ' . $oi . '></a></div>
|
||||
<div style="position:absolute; width:120px; height:220px; z-index:1;"><a href="' . $invg[0] . '"><img onMouseOver="top.hi(this,\'Перейти в "<strong>' . $invg[1] . '</strong>"\',event,2,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();" width="120" height="220" src="' . Config::img(
|
||||
) . '/' . $uobr . '" ' . $oi . '></a></div>
|
||||
<div style="position:absolute; width:120px; height:auto; z-index:3;" align="left">' . $eff . '</div>' . $anml . '
|
||||
</div>';
|
||||
} else {
|
||||
@ -7019,7 +6965,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
}
|
||||
$rt[0] .= '<div class="inf2s" style="position:relative;height:220px;">
|
||||
<!-- образ -->
|
||||
<div style="position:absolute; width:120px; height:220px; z-index:1;"><a href="' . $invg[0] . '"><img onMouseOver="top.hi(this,\'Перейти в "<strong>' . $invg[1] . '</strong>"\',event,2,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();" width="120" height="220" src="' . Config::img() . '/1x1.gif" ' . $oi . '></a></div>
|
||||
<div style="position:absolute; width:120px; height:220px; z-index:1;"><a href="' . $invg[0] . '"><img onMouseOver="top.hi(this,\'Перейти в "<strong>' . $invg[1] . '</strong>"\',event,2,1,1,1,\'\');" onMouseOut="top.hic();" onMouseDown="top.hic();" width="120" height="220" src="' . Config::img(
|
||||
) . '/1x1.gif" ' . $oi . '></a></div>
|
||||
<div style="position:absolute; width:120px; height:auto; z-index:3;" align="left">' . $eff . '</div>' . $anml . '
|
||||
</div>';
|
||||
}
|
||||
@ -7069,7 +7016,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
|
||||
|
||||
if ($i1 == 0 && $u['battle'] == 0) {
|
||||
$rt[0] .= '<script>top.lafstReg[' . $u['id'] . '] = 0; top.startHpRegen("main",' . $u['id'] . ',' . (0 + $sn['hpNow']) . ',' . (0 + $sn['hpAll']) . ',' . (0 + $sn['mpNow']) . ',' . (0 + $sn['mpAll']) . ',' . (time() - $u['regHP']) . ',' . (time() - $u['regMP']) . ',' . (0 + $this->rgd[0]) . ',' . (0 + $this->rgd[1]) . ',1)</script>';
|
||||
$rt[0] .= '<script>top.lafstReg[' . $u['id'] . '] = 0; top.startHpRegen("main",' . $u['id'] . ',' . (0 + $sn['hpNow']) . ',' . (0 + $sn['hpAll']) . ',' . (0 + $sn['mpNow']) . ',' . (0 + $sn['mpAll']) . ',' . (time(
|
||||
) - $u['regHP']) . ',' . (time() - $u['regMP']) . ',' . (0 + $this->rgd[0]) . ',' . (0 + $this->rgd[1]) . ',1)</script>';
|
||||
}
|
||||
if ($ivv == 0 && $i1 == 0) {
|
||||
$rt[0] .= $this->info_remont();
|
||||
@ -7331,7 +7279,9 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
$id_hod++;
|
||||
}
|
||||
mysql_query(
|
||||
'INSERT INTO `battle_logs` (`time`,`battle`,`id_hod`,`text`,`vars`,`zona1`,`zonb1`,`zona2`,`zonb2`,`type`) VALUES ("' . time() . '","' . $u['battle'] . '","' . ($id_hod) . '","{tm1} ' . $text . ' у персонажа {u1}.","login1=' . $u['login'] . '||t1=' . $u['team'] . '||time1=' . time() . '","","","","","6")'
|
||||
'INSERT INTO `battle_logs` (`time`,`battle`,`id_hod`,`text`,`vars`,`zona1`,`zonb1`,`zona2`,`zonb2`,`type`) VALUES ("' . time(
|
||||
) . '","' . $u['battle'] . '","' . ($id_hod) . '","{tm1} ' . $text . ' у персонажа {u1}.","login1=' . $u['login'] . '||t1=' . $u['team'] . '||time1=' . time(
|
||||
) . '","","","","","6")'
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -7699,7 +7649,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
);
|
||||
$this->error = 'Вам нехорошо...';
|
||||
} elseif (mysql_query(
|
||||
'UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = "Предмет из упаковки. Дата запаковки: ' . date(
|
||||
'UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time(
|
||||
) . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = "Предмет из упаковки. Дата запаковки: ' . date(
|
||||
'd.m.Y H:i:s', $itmin['time_create']
|
||||
) . '" WHERE `id` = "' . $itmin['id'] . '" LIMIT 1'
|
||||
)) {
|
||||
@ -7730,7 +7681,8 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
||||
$pid = $this->addItem($s['id'], $this->info['id']);
|
||||
if ($pid > 0) {
|
||||
mysql_query(
|
||||
'UPDATE `items_users` SET `lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '" WHERE `id` = "' . $pid . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1'
|
||||
'UPDATE `items_users` SET `lastUPD` = "' . time(
|
||||
) . '",`gift` = "' . $itm['gift'] . '" WHERE `id` = "' . $pid . '" AND `uid` = "' . $this->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
$j++;
|
||||
@ -8052,12 +8004,14 @@ LIMIT 1'
|
||||
);
|
||||
$col = $col[0];
|
||||
mysql_query(
|
||||
'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '" WHERE `item_id`="' . $itm['item_id'] . '" AND `inOdet` = 0 AND `delete` < 100000 AND `uid` = "' . $itm['uid'] . '" AND `data` NOT LIKE "%nodelete%"' . $whr
|
||||
'UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time(
|
||||
) . '" WHERE `item_id`="' . $itm['item_id'] . '" AND `inOdet` = 0 AND `delete` < 100000 AND `uid` = "' . $itm['uid'] . '" AND `data` NOT LIKE "%nodelete%"' . $whr
|
||||
);
|
||||
$this->error = 'Предметы "' . $itm['name'] . ' (x' . ($col + 1) . ')" выброшены';
|
||||
$this->addDelo(
|
||||
1, $uid,
|
||||
'"<font color="maroon">System.inventory</font>": Предметы "<strong>' . $itm['name'] . ' (x' . $col . ')</strong>" [itm:' . $itm['id'] . '=' . time() . '] были <strong>выброшены</strong>.', time(),
|
||||
'"<font color="maroon">System.inventory</font>": Предметы "<strong>' . $itm['name'] . ' (x' . $col . ')</strong>" [itm:' . $itm['id'] . '=' . time(
|
||||
) . '] были <strong>выброшены</strong>.', time(),
|
||||
$this->info['city'], 'System.inventory', 0, 0
|
||||
);
|
||||
} else {
|
||||
@ -8131,7 +8085,8 @@ LIMIT 1'
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `exp` = "12499" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
echo '<script>chat.sendMsg(["new","' . time() . '","6","","' . $this->info['login'] . '","Для перехода на 6-ой уровень требуется "<strong>Кристалл Вечности [6]</strong>".","Black","1","1","0"]);</script>';
|
||||
echo '<script>chat.sendMsg(["new","' . time(
|
||||
) . '","6","","' . $this->info['login'] . '","Для перехода на 6-ой уровень требуется "<strong>Кристалл Вечности [6]</strong>".","Black","1","1","0"]);</script>';
|
||||
} else {
|
||||
mysql_query(
|
||||
'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1'
|
||||
@ -8576,7 +8531,8 @@ LIMIT 1'
|
||||
$r = '<font color="#FF0000"><strong>Вы успешно изъяли предмет "' . $itm_['name'] . '"</strong></font><br />';
|
||||
$col = $this->itemsX(((int)$id));
|
||||
mysql_query(
|
||||
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "6", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] | У персонажа : [' . $itm_['uid'] . ']", "' . $user['id'] . '")'
|
||||
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time(
|
||||
) . '", "6", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] | У персонажа : [' . $itm_['uid'] . ']", "' . $user['id'] . '")'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $res['id'] . '" ' . $o . ' WHERE `id` = "' . $id . '" LIMIT 1'
|
||||
@ -8607,7 +8563,8 @@ LIMIT 1'
|
||||
if ($user['inTurnir'] == 0 && $user['inTurnirnew'] == 0) {
|
||||
$col = $this->itemsX(((int)$id));
|
||||
mysql_query(
|
||||
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "5", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] Хозяин : [' . $cls . ']", "' . $user['id'] . '")'
|
||||
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time(
|
||||
) . '", "5", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] Хозяин : [' . $cls . ']", "' . $user['id'] . '")'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '" WHERE `id` = "' . $id . '" LIMIT 1'
|
||||
@ -8649,7 +8606,8 @@ LIMIT 1'
|
||||
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '", `data` = "' . $pl['data'] . '" WHERE `id` = "' . $pl['id'] . '"'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "' . $type . '", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
|
||||
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time(
|
||||
) . '", "' . $type . '", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
|
||||
);
|
||||
} elseif ($pl['uid'] == $user['id']) {
|
||||
$col = $this->itemsX(((int)$pl['id']));
|
||||
@ -8660,7 +8618,8 @@ LIMIT 1'
|
||||
'UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $user['clan'] . '" WHERE `id` = "' . $pl['id'] . '"'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "9", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
|
||||
'INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time(
|
||||
) . '", "9", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user