<?php 



if($es>=1000 and $es <2500){

if($us['s_pet']==0){

$pet_buy = $dbc->query("SELECT * FROM `pets_tj` WHERE `id` = 5")->fetch_assoc();

$dbc->query("INSERT INTO `user_pets` SET 

`id_user` = '$us[id]', 
`id_pets` = '$pet_buy[id]', 
`name` = '$pet_buy[name]',
`str` = '$pet_buy[str]',
`vit` = '$pet_buy[vit]',
`def` = '$pet_buy[def]',
`img` = '$pet_buy[img]',
`level` = '1',
`arena_battle` = '10'") or die(mysql_error());  

$dbc->query("UPDATE `users` SET 
 
`s_pet` =  '1'
 WHERE `id` = '$us[id]'") or die(mysql_error());  }



if($us['brak']>0){  

if($brak['s_pet']==0){

$pet_buy = $dbc->query("SELECT * FROM `pets_tj` WHERE `id` = 5")->fetch_assoc();

$dbc->query("INSERT INTO `user_pets` SET 

`id_user` = '$brak[id]', 
`id_pets` = '$pet_buy[id]', 
`name` = '$pet_buy[name]',
`str` = '$pet_buy[str]',
`vit` = '$pet_buy[vit]',
`def` = '$pet_buy[def]',
`img` = '$pet_buy[img]',
`level` = '1',
`arena_battle` = '10'") or die(mysql_error());  

$dbc->query("UPDATE `users` SET 
 
`s_pet` =  '1'
 WHERE `id` = '$brak[id]'") or die(mysql_error());  }


}










}if($es>=2500 and $es<5000 ){


if($us['s_pet']==0){

$pet_buy = $dbc->query("SELECT * FROM `pets_tj` WHERE `id` = 6")->fetch_assoc();

$dbc->query("INSERT INTO `user_pets` SET 

`id_user` = '$us[id]', 
`id_pets` = '$pet_buy[id]', 
`name` = '$pet_buy[name]',
`str` = '$pet_buy[str]',
`vit` = '$pet_buy[vit]',
`def` = '$pet_buy[def]',
`img` = '$pet_buy[img]',
`level` = '1',
`arena_battle` = '10'") or die(mysql_error());  

$dbc->query("UPDATE `users` SET 
 
`s_pet` =  '1'
 WHERE `id` = '$us[id]'") or die(mysql_error());  }











$buy = $dbc->query("SELECT * FROM `dung_item` WHERE `id`=21 LIMIT 1")->fetch_assoc();



$dbc->query("INSERT INTO `artefact` (user_id,status,nik,strong,hp,prot,crit,regen,level,tip,class,lite,coin,img) values('".$us['id']."','".$buy['status']."','".$buy['nik']."','".$buy['strong']."','".$buy['hp']."','".$buy['prot']."','".$buy['crit']."','".$buy['regen']."','".$buy['level']."','".$buy['tip']."','".$us['pers']."','".$buy['lite']."','".$buy['coin']."','".$buy['img']."')");


if($us['brak']>0){

if($brak['s_pet']==0){

$pet_buy = $dbc->query("SELECT * FROM `pets_tj` WHERE `id` = 6")->fetch_assoc();

$dbc->query("INSERT INTO `user_pets` SET 

`id_user` = '$brak[id]', 
`id_pets` = '$pet_buy[id]', 
`name` = '$pet_buy[name]',
`str` = '$pet_buy[str]',
`vit` = '$pet_buy[vit]',
`def` = '$pet_buy[def]',
`img` = '$pet_buy[img]',
`level` = '1',
`arena_battle` = '10'") or die(mysql_error());  

$dbc->query("UPDATE `users` SET 
 
`s_pet` =  '1'
 WHERE `id` = '$brak[id]'") or die(mysql_error());  }











$buy = $dbc->query("SELECT * FROM `dung_item` WHERE `id`=21 LIMIT 1")->fetch_assoc();



$dbc->query("INSERT INTO `artefact` (user_id,status,nik,strong,hp,prot,crit,regen,level,tip,class,lite,coin,img) values('".$brak['id']."','".$buy['status']."','".$buy['nik']."','".$buy['strong']."','".$buy['hp']."','".$buy['prot']."','".$buy['crit']."','".$buy['regen']."','".$buy['level']."','".$buy['tip']."','".$brak['pers']."','".$buy['lite']."','".$buy['coin']."','".$buy['img']."')"); }



} 


if($es>=5000){


if($us['s_pet']==0){

$pet_buy = $dbc->query("SELECT * FROM `pets_tj` WHERE `id` = 7")->fetch_assoc();

$dbc->query("INSERT INTO `user_pets` SET 

`id_user` = '$us[id]', 
`id_pets` = '$pet_buy[id]', 
`name` = '$pet_buy[name]',
`str` = '$pet_buy[str]',
`vit` = '$pet_buy[vit]',
`def` = '$pet_buy[def]',
`img` = '$pet_buy[img]',
`level` = '1',
`arena_battle` = '10'") or die(mysql_error());  

$dbc->query("UPDATE `users` SET 
 
`s_pet` =  '1'
 WHERE `id` = '$us[id]'") or die(mysql_error());  }



$buy = $dbc->query("SELECT * FROM `dung_item` WHERE `id`=21 LIMIT 1")->fetch_assoc();



$dbc->query("INSERT INTO `artefact` (user_id,status,nik,strong,hp,prot,crit,regen,level,tip,class,lite,coin,img) values('".$us['id']."','".$buy['status']."','".$buy['nik']."','".$buy['strong']."','".$buy['hp']."','".$buy['prot']."','".$buy['crit']."','".$buy['regen']."','".$buy['level']."','".$buy['tip']."','".$us['pers']."','".$buy['lite']."','".$buy['coin']."','".$buy['img']."')");






$buy = $dbc->query("SELECT * FROM `dung_item` WHERE `id`=22 LIMIT 1")->fetch_assoc();



$dbc->query("INSERT INTO `artefact` (user_id,status,nik,strong,hp,prot,crit,regen,level,tip,class,lite,coin,img) values('".$us['id']."','".$buy['status']."','".$buy['nik']."','".$buy['strong']."','".$buy['hp']."','".$buy['prot']."','".$buy['crit']."','".$buy['regen']."','".$buy['level']."','".$buy['tip']."','".$us['pers']."','".$buy['lite']."','".$buy['coin']."','".$buy['img']."')");






if($us['brak']>0){


if($brak['s_pet']==0){

$pet_buy = $dbc->query("SELECT * FROM `pets_tj` WHERE `id` = 7")->fetch_assoc();

$dbc->query("INSERT INTO `user_pets` SET 

`id_user` = '$brak[id]', 
`id_pets` = '$pet_buy[id]', 
`name` = '$pet_buy[name]',
`str` = '$pet_buy[str]',
`vit` = '$pet_buy[vit]',
`def` = '$pet_buy[def]',
`img` = '$pet_buy[img]',
`level` = '1',
`arena_battle` = '10'") or die(mysql_error());  

$dbc->query("UPDATE `users` SET 
 
`s_pet` =  '1'
 WHERE `id` = '$brak[id]'") or die(mysql_error());  }



$buy = $dbc->query("SELECT * FROM `dung_item` WHERE `id`=21 LIMIT 1")->fetch_assoc();



$dbc->query("INSERT INTO `artefact` (user_id,status,nik,strong,hp,prot,crit,regen,level,tip,class,lite,coin,img) values('".$brak['id']."','".$buy['status']."','".$buy['nik']."','".$buy['strong']."','".$buy['hp']."','".$buy['prot']."','".$buy['crit']."','".$buy['regen']."','".$buy['level']."','".$buy['tip']."','".$brak['pers']."','".$buy['lite']."','".$buy['coin']."','".$buy['img']."')");






$buy = $dbc->query("SELECT * FROM `dung_item` WHERE `id`=22 LIMIT 1")->fetch_assoc();



$dbc->query("INSERT INTO `artefact` (user_id,status,nik,strong,hp,prot,crit,regen,level,tip,class,lite,coin,img) values('".$brak['id']."','".$buy['status']."','".$buy['nik']."','".$buy['strong']."','".$buy['hp']."','".$buy['prot']."','".$buy['crit']."','".$buy['regen']."','".$buy['level']."','".$buy['tip']."','".$brak['pers']."','".$buy['lite']."','".$buy['coin']."','".$buy['img']."')"); }









}








