game/_incl_data/class/quest/transferpilchar.php

76 lines
2.8 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?
/*
1 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
3 <EFBFBD><EFBFBD><EFBFBD>
4 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
5 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
6 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
7 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
8 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
9 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
10 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
11 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
12 --
13 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
14 <EFBFBD><EFBFBD><EFBFBD>
15 --
16 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
17 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
items_main items_users
SELECT `iu`.*, `im`.*
FROM `items_users` AS `iu`
LEFT JOIN `items_main` AS `im`
ON `iu`.`item_id`=`im`.`id`
WHERE `iu`.`data` LIKE '%frompisher=1%' AND `iu`.`uid` = "3" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `im`.`inslot` >0 AND `im`.`inslot` <18;
$u->info['money1'];
*/
$itmm = mysql_fetch_array(mysql_query('SELECT COUNT(*) as total FROM `items_users` WHERE `item_id` = "6168" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0"'));
if ($itmm['total']>=50)
{
mysql_query('UPDATE `items_users` SET `delete`="'.time().'" WHERE `uid`="'.$u->info['id'].'" AND `item_id` = "6168" AND `delete` = 0 LIMIT 50;');
$u->addItem(6167,$u->info['id'],'|sudba='.$u->info['login']);
$itmm = mysql_fetch_array(mysql_query('SELECT COUNT(*) as total FROM `items_users` WHERE `item_id` = "6168" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0"'));
$txt .= '<br><i><3E><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>.</i><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '.$itmm['total'].' <20><>.';
$u->addDelo(1,$u->info['id'],'&quot;<font color=green>Babka.'.$u->info['city'].'</font>&quot;: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!',time(),$u->info['city'],'Babka.'.$u->info['city'].'',1,0);
}
else
{
$txt .= '<br><i><3E><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></i><br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>! <20> <20><><EFBFBD><EFBFBD>: '.$itmm['total'].' <20><>. <20><><EFBFBD><EFBFBD><EFBFBD>.';
}
/*
$itmm=mysql_query('SELECT `iu`.`id` AS iid, `iu`.*, `im`.*
FROM `items_users` AS `iu`
LEFT JOIN `items_main` AS `im`
ON `iu`.`item_id`=`im`.`id`
WHERE `iu`.`data` LIKE "%frompisher=1%" AND `iu`.`uid` = "'.$u->info['id'].'" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `im`.`inslot` >0 AND `im`.`inslot` <18');
$sell=0;
$selli=0;
while( $itm = mysql_fetch_array($itmm))
{
$sell += $itm['price1'];
$u->info['money1'] + $itm['price1'];
mysql_query('UPDATE `items_users` SET `delete`="'.time().'" WHERE `id` = "'.$itm['iid'].'" LIMIT 1');
$selli++;
}
if ($sell>0)
{
mysql_query('UPDATE `users` SET `money`=`money`+"'.$sell.'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$txt .= '<br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <b><font color=#009999>'.$selli.'</b></font> <20><><EFBFBD><EFBFBD><EFBFBD>.';
$txt .= '<br><3E><><EFBFBD><EFBFBD><EFBFBD> <b><font color=#009999>'.$sell.'</b></font> <20><>. <20><><EFBFBD><EFBFBD><EFBFBD>.';
$txt .= '<br><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!';
$u->addDelo(1,$u->info['id'],'&quot;<font color=green>Babka.'.$u->info['city'].'</font>&quot;: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> &quot;<b>'.$selli.'</b>&quot; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <b>'.$sell.'</b> <20><>.',time(),$u->info['city'],'Babka.'.$u->info['city'].'',(int)$sell,0);
mysql_query('UPDATE `users_achiv` SET `bv`= `bv`+'.$selli.' WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}
else
{
$txt .= '<br><b><font color=red><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!</b></font>';
}
*/
unlink($sell,$itmm,$itm);
?>