2022-06-06 21:30:34 +00:00
< ?
if ( ! defined ( 'GAME' ))
{
die ();
}
$add_zb = 0 ;
$add_nas = 0 ;
$refer = mysql_fetch_array ( mysql_query ( 'SELECT `id`,`login`,`banned`,`admin`,`level` FROM `users` WHERE `id` = "' . mysql_real_escape_string ( $this -> info [ 'host_reg' ]) . '" LIMIT 1' ));
if ( $tr [ 'var_id' ] == 1 ) {
2023-01-10 16:29:32 +00:00
// Н а б о р [0]
2022-06-06 21:30:34 +00:00
$add_zb = 5 ;
$add_nas = 1 ;
2023-01-10 16:29:32 +00:00
//Накидка
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3200 , $this -> info [ 'id' ], '|nosale=1|noremont=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Эликсир
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 2418 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Новый сундук
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3201 , $this -> info [ 'id' ]);
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
if ( $io == '' ) {
2023-01-10 16:29:32 +00:00
$io = 'Снабжение воспитанника: 1 уровень, Накидка воспитанника, Эликсир Восстановления' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $tr [ 'var_id' ] == 2 ) {
2023-01-10 16:29:32 +00:00
// Н а б о р [1]
2022-06-06 21:30:34 +00:00
$add_zb = 10 ;
$add_nas = 1 ;
2023-01-10 16:29:32 +00:00
//Р у б а х а 3209
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3209 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Штаны 3210
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3210 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Эликсир
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 2418 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Новый сундук
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3202 , $this -> info [ 'id' ]);
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
if ( $io == '' ) {
2023-01-10 16:29:32 +00:00
$io = 'Снабжение воспитанника: 2 уровень, Р у б а х а воспитанника, Штаны воспитанника, Эликсир Восстановления' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $tr [ 'var_id' ] == 3 ) {
2023-01-10 16:29:32 +00:00
// Н а б о р [2]
2022-06-06 21:30:34 +00:00
$add_zb = 20 ;
$add_nas = 1 ;
2023-01-10 16:29:32 +00:00
//Перчатки 3211
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3211 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Наручи 3212
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3212 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Эликсир
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 2418 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Новый сундук
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3203 , $this -> info [ 'id' ]);
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
if ( $io == '' ) {
2023-01-10 16:29:32 +00:00
$io = 'Снабжение воспитанника: 3 уровень, Наручи воспитанника, Перчатки воспитанника, Эликсир Восстановления' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $tr [ 'var_id' ] == 4 ) {
2023-01-10 16:29:32 +00:00
// Н а б о р [3]
2022-06-06 21:30:34 +00:00
$add_zb = 30 ;
$add_nas = 1 ;
2023-01-10 16:29:32 +00:00
//Сапоги 3213
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3213 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Шлем 3214
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3214 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Пояс 3215
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3215 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Эликсир
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 2418 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Новый сундук
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3204 , $this -> info [ 'id' ]);
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
if ( $io == '' ) {
2023-01-10 16:29:32 +00:00
$io = 'Снабжение воспитанника: 4 уровень, Сапоги воспитанника, Шапка воспитанника, Пояс воспитанника, Эликсир Восстановления' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $tr [ 'var_id' ] == 5 ) {
2023-01-10 16:29:32 +00:00
// Н а б о р [4]
2022-06-06 21:30:34 +00:00
$add_zb = 40 ;
$add_nas = 1 ;
2023-01-10 16:29:32 +00:00
//Серьги 3216
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3216 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Амулет 3217
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3217 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Кольца 3218
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3218 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
$i3 = $this -> addItem ( 3218 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
$i3 = $this -> addItem ( 3218 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Эликсир
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 2418 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Новый сундук
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3205 , $this -> info [ 'id' ]);
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
if ( $io == '' ) {
2023-01-10 16:29:32 +00:00
$io = 'Снабжение воспитанника: 5 уровень, Серьги воспитанника, Амулет воспитанника, Кольцо воспитанника (х 3), Эликсир Восстановления' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $tr [ 'var_id' ] == 6 ) {
2023-01-10 16:29:32 +00:00
// Н а б о р [5]
2022-06-06 21:30:34 +00:00
$add_zb = 50 ;
$add_nas = 1 ;
2023-01-10 16:29:32 +00:00
//Броня 4002
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 4002 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Учебник воспитанника 4004
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 4004 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Сумка воспитанника 4003
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 4003 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Образы
2022-06-06 21:30:34 +00:00
mysql_query ( 'DELETE FROM `obraz` WHERE `uid` = "' . $this -> info [ 'id' ] . '" AND `img` = "ref_obr1.gif" LIMIT 2' );
mysql_query ( 'INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("0","ref_obr1.gif","5","' . $this -> info [ 'id' ] . '","' . time () . '")' );
mysql_query ( 'INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("1","ref_obr1.gif","5","' . $this -> info [ 'id' ] . '","' . time () . '")' );
2023-01-10 16:29:32 +00:00
//Новый сундук
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3206 , $this -> info [ 'id' ]);
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
if ( $io == '' ) {
2023-01-10 16:29:32 +00:00
$io = 'Снабжение воспитанника: 6 уровень, Броня воспитанника, Образ воспитанника, Учебник воспитанника, Сумка воспитанника' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $tr [ 'var_id' ] == 7 ) {
2023-01-10 16:29:32 +00:00
// Н а б о р [6]
2022-06-06 21:30:34 +00:00
$add_zb = 60 ;
$add_nas = 2 ;
2023-01-10 16:29:32 +00:00
//Учебник воспитанника 4004
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 4004 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Сумка воспитанника 4003
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 4003 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Нападалка
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 865 , $this -> info [ 'id' ], '|nosale=1' , NULL , 50 );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Новый сундук
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 3207 , $this -> info [ 'id' ]);
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
if ( $io == '' ) {
2023-01-10 16:29:32 +00:00
$io = 'Снабжение воспитанника: 7 уровень, Учебник воспитанника, Сумка воспитанника, Нападение' ;
2022-06-06 21:30:34 +00:00
}
} elseif ( $tr [ 'var_id' ] == 8 ) {
2023-01-10 16:29:32 +00:00
// Н а б о р [7]
2022-06-06 21:30:34 +00:00
$add_zb = 70 ;
$add_nas = 3 ;
2023-01-10 16:29:32 +00:00
//Учебник воспитанника 4004
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 4004 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Сумка воспитанника 4003
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 4003 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Нападалка
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 865 , $this -> info [ 'id' ], '|nosale=1' , NULL , 50 );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Восстановление
2022-06-06 21:30:34 +00:00
$i3 = $this -> addItem ( 2712 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
$i3 = $this -> addItem ( 2712 , $this -> info [ 'id' ], '|nosale=1' );
if ( $i3 > 0 ) {
2023-01-10 16:29:32 +00:00
mysql_query ( 'UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "' . $i3 . '" LIMIT 1' );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Образы
2022-06-06 21:30:34 +00:00
mysql_query ( 'DELETE FROM `obraz` WHERE `uid` = "' . $this -> info [ 'id' ] . '" AND `img` = "ref_obr2.gif" LIMIT 2' );
mysql_query ( 'INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("0","ref_obr2.gif","7","' . $this -> info [ 'id' ] . '","' . time () . '")' );
mysql_query ( 'INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("1","ref_obr2.gif","7","' . $this -> info [ 'id' ] . '","' . time () . '")' );
if ( $io == '' ) {
2023-01-10 16:29:32 +00:00
$io = 'Учебник воспитанника, Сумка воспитанника, Нападение, Образ воспитанника, Восстановление энергии 900HP (х 2)' ;
2022-06-06 21:30:34 +00:00
}
}
if ( $add_zb > 0 && $this -> info [ 'level' ] < 8 ) {
$this -> info [ 'money4' ] += $add_zb ;
mysql_query ( 'UPDATE `users` SET `money4` = "' . $this -> info [ 'money4' ] . '" WHERE `id` = "' . $this -> info [ 'id' ] . '" LIMIT 1' );
2023-01-10 16:29:32 +00:00
mysql_query ( " INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','',' " . $this -> info [ 'login' ] . " ',' В "Снабжение воспитанника" Вы обнаружили зубы: <small> " . $this -> zuby ( $add_zb , 1 ) . " </small>. ','-1','6','0') " );
2022-06-06 21:30:34 +00:00
}
if ( $add_nas > 0 && $this -> info [ 'level' ] < 8 && isset ( $refer [ 'id' ])) {
$ino = 0 ;
while ( $ino < $add_nas ) {
$this -> addItem ( 4005 , $refer [ 'id' ]);
$ino ++ ;
}
2023-01-10 16:29:32 +00:00
mysql_query ( " INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','',' " . $refer [ 'login' ] . " ',' Ваш воспитанник " " . $this -> info [ 'login' ] . " " приносит жетоны <b>Талант Наставника</b> (<small>x " . ( 0 + $add_nas ) . " </small>). ','-1','6','0') " );
2022-06-06 21:30:34 +00:00
}
unset ( $i3 , $add_zb , $refer , $add_nas );
?>