PDA

View Full Version : cho mình hỏi về web mrhau



supberman
28-02-11, 07:10 PM
<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/

include_once( "security.php" );
include( "config.php" );
include( "config/config_reset.php" );
include( "config/config_resetvip.php" );
include( "config/config_hotrotanthu.php" );
include( "config/config_gioihanrs.php" );
include( "config/config_relife.php" );
include( "function.php" );
$login = $_GET['login'];
$name = $_GET['name'];
$tiente = $_GET['tiente'];
$passtransfer = $_GET['passtransfer'];
if ( $passtransfer == $transfercode )
{
$inventory_query = "SELECT Inventory FROM Character WHERE AccountID = '".$login."' AND Name='{$name}'";
kiemtra_doinv( $login, $name );
kiemtra_online( $login );
$inventory_result_sql = $db->Execute( $inventory_query );
$inventory_result = $inventory_result_sql->fetchrow( );
$sql_PkLevel_check = $db->Execute( "SELECT PkLevel FROM Character WHERE PkLevel > 3 and Name='".$name."'" );
$PkLevel_check = $sql_PkLevel_check->numrows( );
$sql_char_back_reged_check = $db->Execute( "SELECT Name FROM Character_back WHERE Name='".$name."' and AccountID = '{$login}'" );
$char_back_reged_check = $sql_char_back_reged_check->numrows( );
$result = $db->Execute( "Select Clevel,Resets,Money,LevelUpPoint,Class,Relifes,NoR esetInDay,Resets_Time,SCFMasterLevel From Character where Name='".$name."'" );
$row = $result->fetchrow( );
$vpoint_result = $db->Execute( "Select vpoint From MEMB_INFO where memb___id='".$login."'" );
$vpoint = $vpoint_result->fetchrow( );
$vpointnew = $vpoint[0];
$gcoin_result = $db->Execute( "Select gcoin From MEMB_INFO where memb___id='".$login."'" );
$gcoin = $gcoin_result->fetchrow( );
$gcoinnew = $gcoin[0];
$inventory = $inventory_result[0];
$inventory = bin2hex( $inventory );
$inventory3 = substr( $inventory, 2432, 1024 );
$inventory3 = strtoupper( $inventory3 );
$no_item = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
$i = 0;
for ( ; $i < 32; ++$i )
{
$shop_empty .= $no_item;
}
if ( $inventory3 != $shop_empty )
{
echo "Cửa hàng cá nhân có vật phẩm. Vui lòng bỏ ra khỏi cửa hàng cá nhân để tránh bị mất đồ.";
exit( );
}
if ( 0 < $PkLevel_check )
{
echo "Bạn đang là Sát thủ. Phải rửa tội trước khi Reset.";
exit( );
}
$CountNoResetInDay = $row[6] + 1;
if ( $use_gioihanrs == 1 )
{
include( "gioihanrs.php" );
if ( $gioihanrs <= $row[6] )
{
echo "Bạn đã Reset hết số lần Reset trong ngày. Xin vui lòng Ủy thác và đợi Reset tiếp vào ngày mai";
exit( );
}
}
if ( $reset_cap_0 <= $row[1] && $row[1] < $reset_cap_1 )
{
$level = $level_cap_1_vip;
$gcoin_reset_vip = $gcoin_cap_1_vip;
$time_reset_next = $time_reset_next_1;
}
else if ( $reset_cap_1 <= $row[1] && $row[1] < $reset_cap_2 )
{
$level = $level_cap_2_vip;
$gcoin_reset_vip = $gcoin_cap_2_vip;
$time_reset_next = $time_reset_next_2;
}
else if ( $reset_cap_2 <= $row[1] && $row[1] < $reset_cap_3 )
{
$level = $level_cap_3_vip;
$gcoin_reset_vip = $gcoin_cap_3_vip;
$time_reset_next = $time_reset_next_3;
}
else if ( $reset_cap_3 <= $row[1] && $row[1] < $reset_cap_4 )
{
$level = $level_cap_4_vip;
$gcoin_reset_vip = $gcoin_cap_4_vip;
$time_reset_next = $time_reset_next_4;
}
else if ( $reset_cap_4 <= $row[1] && $row[1] < $reset_cap_5 )
{
$level = $level_cap_5_vip;
$gcoin_reset_vip = $gcoin_cap_5_vip;
$time_reset_next = $time_reset_next_5;
}
else if ( $reset_cap_5 <= $row[1] && $row[1] < $reset_cap_6 )
{
$level = $level_cap_6_vip;
$gcoin_reset_vip = $gcoin_cap_6_vip;
$time_reset_next = $time_reset_next_6;
}
else if ( $reset_cap_6 <= $row[1] && $row[1] < $reset_cap_7 )
{
$level = $level_cap_7_vip;
$gcoin_reset_vip = $gcoin_cap_7_vip;
$time_reset_next = $time_reset_next_7;
}
else if ( $reset_cap_7 <= $row[1] && $row[1] < $reset_cap_8 )
{
$level = $level_cap_8_vip;
$gcoin_reset_vip = $gcoin_cap_8_vip;
$time_reset_next = $time_reset_next_8;
}
else if ( $reset_cap_8 <= $row[1] && $row[1] < $reset_cap_9 )
{
$level = $level_cap_9_vip;
$gcoin_reset_vip = $gcoin_cap_9_vip;
$time_reset_next = $time_reset_next_9;
}
else if ( $reset_cap_9 <= $row[1] && $row[1] < $reset_cap_10 )
{
$level = $level_cap_10_vip;
$gcoin_reset_vip = $gcoin_cap_10_vip;
$time_reset_next = $time_reset_next_10;
}
else if ( $reset_cap_10 <= $row[1] && $row[1] < $reset_cap_11 )
{
$level = $level_cap_11_vip;
$gcoin_reset_vip = $gcoin_cap_11_vip;
$time_reset_next = $time_reset_next_11;
}
else if ( $reset_cap_11 <= $row[1] && $row[1] < $reset_cap_12 )
{
$level = $level_cap_12_vip;
$gcoin_reset_vip = $gcoin_cap_12_vip;
$time_reset_next = $time_reset_next_12;
}
else if ( $reset_cap_12 <= $row[1] && $row[1] < $reset_cap_13 )
{
$level = $level_cap_13_vip;
$gcoin_reset_vip = $gcoin_cap_13_vip;
$time_reset_next = $time_reset_next_13;
}
else if ( $reset_cap_13 <= $row[1] && $row[1] < $reset_cap_14 )
{
$level = $level_cap_14_vip;
$gcoin_reset_vip = $gcoin_cap_14_vip;
$time_reset_next = $time_reset_next_14;
}
else if ( $reset_cap_14 <= $row[1] && $row[1] < $reset_cap_15 )
{
$level = $level_cap_15_vip;
$gcoin_reset_vip = $gcoin_cap_15_vip;
$time_reset_next = $time_reset_next_15;
}
else if ( $reset_cap_15 <= $row[1] && $row[1] < $reset_cap_16 )
{
$level = $level_cap_16_vip;
$gcoin_reset_vip = $gcoin_cap_16_vip;
$time_reset_next = $time_reset_next_16;
}
else if ( $reset_cap_16 <= $row[1] && $row[1] < $reset_cap_17 )
{
$level = $level_cap_17_vip;
$gcoin_reset_vip = $gcoin_cap_17_vip;
$time_reset_next = $time_reset_next_17;
}
else if ( $reset_cap_17 <= $row[1] && $row[1] < $reset_cap_18 )
{
$level = $level_cap_18_vip;
$gcoin_reset_vip = $gcoin_cap_18_vip;
$time_reset_next = $time_reset_next_18;
}
else if ( $reset_cap_18 <= $row[1] && $row[1] < $reset_cap_19 )
{
$level = $level_cap_19_vip;
$gcoin_reset_vip = $gcoin_cap_19_vip;
$time_reset_next = $time_reset_next_19;
}
else if ( $reset_cap_19 <= $row[1] && $row[1] < $reset_cap_20 )
{
$level = $level_cap_20_vip;
$gcoin_reset_vip = $gcoin_cap_20_vip;
$time_reset_next = $time_reset_next_20;
}
if ( $tiente == "gcoin" )
{
if ( $gcoin[0] < $gcoin_reset_vip )
{
echo "Không có đủ gcoin yêu cầu Reset. Bạn đang Reset ";
echo $row['1'];
echo " lần. Bạn cần có ";
echo $gcoin_reset_vip;
echo " gcoin chi phí Reset VIP";
exit( );
}
$gcoinnew = $gcoin[0] - $gcoin_reset_vip;
}
else if ( $tiente == "vpoint" )
{
$vpoint_reset_vip = $gcoin_reset_vip * ( 1 + $vpoint_extra / 100 );
if ( $vpointnew < $vpoint_reset_vip )
{
echo "Không có đủ Vpoint yêu cầu Reset. Bạn đang Reset ";
echo $row['1'];
echo " lần. Bạn cần có ";
echo $vpoint_reset_vip;
echo " Vpoint chi phí Reset VIP";
exit( );
}
$vpointnew -= $vpoint_reset_vip;
}
else
{
echo "Sai loại tiền tệ";
exit( );
}
if ( $hotrotanthu == 1 )
{
if ( 1 <= $capsudung && $cap1_reset_min <= $row[1] && $row[1] <= $cap1_reset_max && $cap1_relife_min <= $row[5] && $row[5] <= $cap1_relife_max )
{
$level -= $cap1_levelgiam;
}
else if ( 2 <= $capsudung && $cap2_reset_min <= $row[1] && $row[1] <= $cap2_reset_max && $cap2_relife_min <= $row[5] && $row[5] <= $cap2_relife_max )
{
$level -= $cap2_levelgiam;
}
else if ( 3 <= $capsudung && $cap3_reset_min <= $row[1] && $row[1] <= $cap3_reset_max && $cap3_relife_min <= $row[5] && $row[5] <= $cap3_relife_max )
{
$level -= $cap3_levelgiam;
}
else if ( 4 <= $capsudung && $cap4_reset_min <= $row[1] && $row[1] <= $cap4_reset_max && $cap4_relife_min <= $row[5] && $row[5] <= $cap4_relife_max )
{
$level -= $cap4_levelgiam;
}
else if ( 5 <= $capsudung && $cap5_reset_min <= $row[1] && $row[1] <= $cap5_reset_max && $cap5_relife_min <= $row[5] && $row[5] <= $cap5_relife_max )
{
$level -= $cap5_levelgiam;
}
}
$resetup = $row[1] + 1;
if ( $row[0] < $level )
{
echo $name;
echo " cần ";
echo $level;
echo " level để Reset lần ";
echo $resetup;
echo ".";
exit( );
}
$time_reset_next = $row[7] + $time_reset_next * 60;
if ( $timestamp < $time_reset_next )
{
$time_free = $time_reset_next - $timestamp;
echo $name;
echo " cần ";
echo $time_free;
echo " giây nữa để Reset lần tiếp theo.";
exit( );
}
switch ( $row[5] )
{
case 0 :
$reset_relifes = $rl_reset_relife1;
$point_relifes = 0;
$ml_relifes = 0;
break;
case 1 :
$reset_relifes = $rl_reset_relife2;
$point_relifes = $rl_point_relife1;
$ml_relifes = $rl_ml_relife1;
break;
case 2 :
$reset_relifes = $rl_reset_relife3;
$point_relifes = $rl_point_relife2;
$ml_relifes = $rl_ml_relife2;
break;
case 3 :
$reset_relifes = $rl_reset_relife4;
$point_relifes = $rl_point_relife3;
$ml_relifes = $rl_ml_relife3;
break;
case 4 :
$reset_relifes = $rl_reset_relife5;
$point_relifes = $rl_point_relife4;
$ml_relifes = $rl_ml_relife4;
break;
case 5 :
$reset_relifes = $rl_reset_relife6;
$point_relifes = $rl_point_relife5;
$ml_relifes = $rl_ml_relife5;
break;
case 6 :
$reset_relifes = $rl_reset_relife7;
$point_relifes = $rl_point_relife6;
$ml_relifes = $rl_ml_relife6;
break;
case 7 :
$reset_relifes = $rl_reset_relife8;
$point_relifes = $rl_point_relife7;
$ml_relifes = $rl_ml_relife7;
break;
case 8 :
$reset_relifes = $rl_reset_relife9;
$point_relifes = $rl_point_relife8;
$ml_relifes = $rl_ml_relife8;
break;
case 9 :
$reset_relifes = $rl_reset_relife10;
$point_relifes = $rl_point_relife9;
$ml_relifes = $rl_ml_relife9;
break;
case 10 :
$reset_relifes = $rl_reset_relife11;
$point_relifes = $rl_point_relife10;
$ml_relifes = $rl_ml_relife10;
}
if ( $reset_relifes <= $row[1] )
{
echo $name;
echo " đang ReLife: ";
echo $row['5'];
echo " - Reset: ";
echo $row['1'];
echo ". Để Reset tiếp bạn cần phải ReLife.";
exit( );
}
if ( $row[1] == $reset_cap_0 )
{
$resetpoint = $point_relifes + $point_cap_1_vip;
$leadership = $ml_relifes + $ml_cap_1_vip;
}
else if ( $row[1] < $reset_cap_1 )
{
$resetpoint = $point_relifes + $point_cap_1_vip + $row[1] * $point_cap_1_vip;
$leadership = $ml_relifes + $ml_relifes + $ml_cap_1_vip + $row[1] * $ml_cap_1_vip;
}
else if ( $reset_cap_1 <= $row[1] && $row[1] < $reset_cap_2 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + ( $row[1] - ( $reset_cap_1 - 1 ) ) * $point_cap_2_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + ( $row[1] - ( $reset_cap_1 - 1 ) ) * $ml_cap_2_vip;
}
else if ( $reset_cap_2 <= $row[1] && $row[1] < $reset_cap_3 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + ( $row[1] - ( $reset_cap_2 - 1 ) ) * $point_cap_3_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + ( $row[1] - ( $reset_cap_2 - 1 ) ) * $ml_cap_3_vip;
}
else if ( $reset_cap_3 <= $row[1] && $row[1] < $reset_cap_4 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + ( $row[1] - ( $reset_cap_3 - 1 ) ) * $point_cap_4_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + ( $row[1] - ( $reset_cap_3 - 1 ) ) * $ml_cap_4_vip;
}
else if ( $reset_cap_4 <= $row[1] && $row[1] < $reset_cap_5 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + ( $row[1] - ( $reset_cap_4 - 1 ) ) * $point_cap_5_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + ( $row[1] - ( $reset_cap_4 - 1 ) ) * $ml_cap_5_vip;
}
else if ( $reset_cap_5 <= $row[1] && $row[1] < $reset_cap_6 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + ( $row[1] - ( $reset_cap_5 - 1 ) ) * $point_cap_6_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + ( $row[1] - ( $reset_cap_5 - 1 ) ) * $ml_cap_6_vip;
}
else if ( $reset_cap_6 <= $row[1] && $row[1] < $reset_cap_7 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + ( $row[1] - ( $reset_cap_6 - 1 ) ) * $point_cap_7_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + ( $row[1] - ( $reset_cap_6 - 1 ) ) * $ml_cap_7_vip;
}
else if ( $reset_cap_7 <= $row[1] && $row[1] < $reset_cap_8 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + ( $row[1] - ( $reset_cap_7 - 1 ) ) * $point_cap_8_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + ( $row[1] - ( $reset_cap_7 - 1 ) ) * $ml_cap_8_vip;
}
else if ( $reset_cap_8 <= $row[1] && $row[1] < $reset_cap_9 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + ( $row[1] - ( $reset_cap_8 - 1 ) ) * $point_cap_9_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + ( $row[1] - ( $reset_cap_8 - 1 ) ) * $ml_cap_9_vip;
}
else if ( $reset_cap_9 <= $row[1] && $row[1] < $reset_cap_10 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + ( $row[1] - ( $reset_cap_9 - 1 ) ) * $point_cap_10_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + ( $row[1] - ( $reset_cap_9 - 1 ) ) * $ml_cap_10_vip;
}
else if ( $reset_cap_10 <= $row[1] && $row[1] < $reset_cap_11 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + ( $row[1] - ( $reset_cap_10 - 1 ) ) * $point_cap_11_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + ( $row[1] - ( $reset_cap_10 - 1 ) ) * $ml_cap_11_vip;
}
else if ( $reset_cap_11 <= $row[1] && $row[1] < $reset_cap_12 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + ( $row[1] - ( $reset_cap_11 - 1 ) ) * $point_cap_12_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + ( $row[1] - ( $reset_cap_11 - 1 ) ) * $ml_cap_12_vip;
}
else if ( $reset_cap_12 <= $row[1] && $row[1] < $reset_cap_13 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + ( $row[1] - ( $reset_cap_12 - 1 ) ) * $point_cap_13_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + ( $row[1] - ( $reset_cap_12 - 1 ) ) * $ml_cap_13_vip;
}
else if ( $reset_cap_13 <= $row[1] && $row[1] < $reset_cap_14 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + ( $row[1] - ( $reset_cap_13 - 1 ) ) * $point_cap_14_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + ( $row[1] - ( $reset_cap_13 - 1 ) ) * $ml_cap_14_vip;
}
else if ( $reset_cap_14 <= $row[1] && $row[1] < $reset_cap_15 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + ( $row[1] - ( $reset_cap_14 - 1 ) ) * $point_cap_15_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + ( $row[1] - ( $reset_cap_14 - 1 ) ) * $ml_cap_15_vip;
}
else if ( $reset_cap_15 <= $row[1] && $row[1] < $reset_cap_16 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + ( $row[1] - ( $reset_cap_15 - 1 ) ) * $point_cap_16_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + ( $row[1] - ( $reset_cap_15 - 1 ) ) * $ml_cap_16_vip;
}
else if ( $reset_cap_16 <= $row[1] && $row[1] < $reset_cap_17 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + $point_cap_16_vip * ( $reset_cap_16 - $reset_cap_15 ) + ( $row[1] - ( $reset_cap_16 - 1 ) ) * $point_cap_17_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + $ml_cap_16_vip * ( $reset_cap_16 - $reset_cap_15 ) + ( $row[1] - ( $reset_cap_16 - 1 ) ) * $ml_cap_17_vip;
}
else if ( $reset_cap_17 <= $row[1] && $row[1] < $reset_cap_18 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + $point_cap_16_vip * ( $reset_cap_16 - $reset_cap_15 ) + $point_cap_17_vip * ( $reset_cap_17 - $reset_cap_16 ) + ( $row[1] - ( $reset_cap_17 - 1 ) ) * $point_cap_18_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + $ml_cap_16_vip * ( $reset_cap_16 - $reset_cap_15 ) + $ml_cap_17_vip * ( $reset_cap_17 - $reset_cap_16 ) + ( $row[1] - ( $reset_cap_17 - 1 ) ) * $ml_cap_18_vip;
}
else if ( $reset_cap_18 <= $row[1] && $row[1] < $reset_cap_19 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + $point_cap_16_vip * ( $reset_cap_16 - $reset_cap_15 ) + $point_cap_17_vip * ( $reset_cap_17 - $reset_cap_16 ) + $point_cap_18_vip * ( $reset_cap_18 - $reset_cap_17 ) + ( $row[1] - ( $reset_cap_18 - 1 ) ) * $point_cap_19_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + $ml_cap_16_vip * ( $reset_cap_16 - $reset_cap_15 ) + $ml_cap_17_vip * ( $reset_cap_17 - $reset_cap_16 ) + $ml_cap_18_vip * ( $reset_cap_18 - $reset_cap_17 ) + ( $row[1] - ( $reset_cap_18 - 1 ) ) * $ml_cap_19_vip;
}
else if ( $reset_cap_19 <= $row[1] && $row[1] < $reset_cap_20 )
{
$resetpoint = $point_relifes + $point_cap_1_vip * $reset_cap_1 + $point_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + $point_cap_16_vip * ( $reset_cap_16 - $reset_cap_15 ) + $point_cap_17_vip * ( $reset_cap_17 - $reset_cap_16 ) + $point_cap_18_vip * ( $reset_cap_18 - $reset_cap_17 ) + $point_cap_19_vip * ( $reset_cap_19 - $reset_cap_18 ) + ( $row[1] - ( $reset_cap_19 - 1 ) ) * $point_cap_20_vip;
$leadership = $ml_relifes + $ml_cap_1_vip * $reset_cap_1 + $ml_cap_2_vip * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3_vip * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4_vip * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5_vip * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6_vip * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7_vip * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8_vip * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9_vip * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10_vip * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11_vip * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12_vip * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13_vip * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14_vip * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15_vip * ( $reset_cap_15 - $reset_cap_14 ) + $ml_cap_16_vip * ( $reset_cap_16 - $reset_cap_15 ) + $ml_cap_17_vip * ( $reset_cap_17 - $reset_cap_16 ) + $ml_cap_18_vip * ( $reset_cap_18 - $reset_cap_17 ) + $ml_cap_19_vip * ( $reset_cap_19 - $reset_cap_18 ) + ( $row[1] - ( $reset_cap_19 - 1 ) ) * $ml_cap_20_vip;
}
if ( 64000 < $leadership )
{
$leadership = 64000;
}
$Strength = 25;
$Dexterity = 25;
$Vitality = 25;
$Energy = 25;
$Life = 60;
$MaxLife = 60;
$Mana = 60;
$MaxMana = 60;
$MapNumber = 0;
$MapPosX = 143;
$MapPosY = 134;
$Mapdir = 0;
if ( $row[4] == $class_sum_1 || $row[4] == $class_sum_2 || $row[4] == $class_sum_3 )
{
$MapNumber = 3;
$MapPosX = 51;
$MapPosY = 215;
$Mapdir = 51;
if ( 1500 < $resetpoint )
{
$Energy = 25;
}
else
{
$Energy = 1500;
}
}
$all_quest = "Update character set Quest=0xaaeaffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffff ffffff where name='".$name."'";
$point_event_qr = $db->Execute( "SELECT point_event FROM Character WHERE Name='".$name."'" );
$point_event = $point_event_qr->fetchrow( );
$resetpoint += $point_event[0];
if ( $row[4] == 64 || $row[4] == 65 || $row[4] == 66 )
{
$sql_reset_script = "Update dbo.character set [clevel]='1',[experience]='0',[LevelUpPoint]='0',[pointdutru]='".$resetpoint."',[resets]='{$resetup}',[strength]='26',[dexterity]='26',[vitality]='26',[energy]='26',[Life]='110',[MaxLife]='110',[Mana]='60',[MaxMana]='60',[MapNumber]='0',[MapPosX]='143',[MapPosY]='134',[MapDir]='0',[MagicList]= CONVERT(varbinary(180), null),[Leadership]='{$leadership}',[isThuePoint]='0',[NoResetInDay]={$CountNoResetInDay},[NoResetInMonth]=NoResetInMonth+1,[Resets_Time]='{$timestamp}',[ResetVIP]='1',[PointThue]='0' where name='{$name}'";
if ( !( $sql_reset_exec = $db->Execute( $sql_reset_script ) ) )
{
exit( "Lỗi Query: ".$sql_reset_script );
}
if ( 0 < $char_back_reged_check )
{
$msquery = "Update Character_back set [Resets]='".$resetup."',[LevelUpPoint]='{$resetpoint}',[Class]='{$row['4']}',[Leadership]='{$leadership}',[Relifes]='{$row['5']}' where name='{$name}'";
$msresults = $db->Execute( $msquery );
}
}
else
{
$sql_reset_script = "Update Character set [clevel]='1',[experience]='0',[LevelUpPoint]='0',[pointdutru]='".$resetpoint."',[resets]='{$resetup}',[strength]='{$Strength}',[dexterity]='{$Dexterity}',[vitality]='{$Vitality}',[energy]='{$Energy}',[Life]='{$Life}',[MaxLife]='{$MaxLife}',[Mana]='{$Mana}',[MaxMana]='{$MaxMana}',[MapNumber]='{$MapNumber}',[MapPosX]='{$MapPosX}',[MapPosY]='{$MapPosY}',[MapDir]='{$Mapdir}',[MagicList]= CONVERT(varbinary(180), null),[Leadership]='0',[isThuePoint]='0',[NoResetInDay]={$CountNoResetInDay},[NoResetInMonth]=NoResetInMonth+1,[Resets_Time]='{$timestamp}',[ResetVIP]='1',[PointThue]='0' where name='{$name}'";
if ( !( $sql_reset_exec = $db->Execute( $sql_reset_script ) ) )
{
exit( "Lỗi Query: ".$sql_reset_script );
}
if ( $row[4] == $class_dw_3 || $row[4] == $class_dk_3 || $row[4] == $class_elf_3 )
{
$sql_all_quest = $db->Execute( $all_quest );
}
// $add_xoaykiem = "Update character set MagicList=0x2c000043000044000045000046000047000029 0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff00 00ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000 ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff 0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff00 00ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000 ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff 0000ff0000ff0000ff0000 where name='".$name."'";
//$add_muitenvotan = "Update character set magiclist=0x2e00004300004400004500004600004700004d 0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff00 00ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000 ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff 0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff00 00ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000 ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff 0000ff0000ff0000ff0000 where name='".$name."'";
$add_skill_sum = "Update character set MagicList=0xda0000ff0000ff0000ff0000ff0000ff0000ff 0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff00 00ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000 ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff 0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff00 00ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000 ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff0000ff 0000ff0000ff0000ff0000 where name='".$name."'";
//if ( $row[4] == $class_dk_1 || $row[4] == $class_dk_2 || $row[4] == $class_dk_3 )
// {
// $sql_add_xoaykiem = $db->Execute( $add_xoaykiem );
//}
//if ( $row[4] == $class_elf_3 )
//{
// $sql_add_muitenvotan = $db->Execute( $add_muitenvotan );
//}
if ( $row[4] == 80 || $row[4] == 81 || $row[4] == 82 )
{
$sql_add_redstom = $db->Execute( $add_skill_sum );
}
if ( 0 < $char_back_reged_check )
{
$msquery = "Update Character_back set [Resets]='".$resetup."',[LevelUpPoint]='{$resetpoint}',[Class]='{$row['4']}',[Relifes]='{$row['5']}' where name='{$name}'";
$msresults = $db->Execute( $msquery );
}
}
//if ( $row[4] == $class_dw_3 || $row[4] == $class_dk_3 || $row[4] == $class_elf_3 || $row[4] == $class_mg_2 || $row[4] == $class_dl_2 || $row[4] == $class_sum_3 )
// {
// $sql_reset_master_point = "UPDATE Character SET SCFMasterPoints='".$row['8']."' WHERE Name='{$name}'";
// if ( !( $result_reset_matser_point = $db->Execute( $sql_reset_master_point ) ) )
//{
// exit( "Lỗi Query: ".$sql_reset_master_point );
// }
// }
$tru_vpoint = $db->Execute( "UPDATE MEMB_INFO SET [vpoint]=".$vpointnew." WHERE memb___id='{$login}'" );
$tru_gcoin = $db->Execute( "UPDATE MEMB_INFO SET [gcoin]=".$gcoinnew." WHERE memb___id='{$login}'" );
$Date = date( "h:iA, d/m/Y" );
$file = "log/modules/log_resetsvip.php";
$fp = fopen( $file, "a+" );
if ( $tiente == "vpoint" )
{
fputs( $fp, "<br>Lúc: ".$Date." <br> \r\n\t\tNhân vật <b>{$name}</b> đã <font color=#FF0000>Reset</font> lần thứ <b>{$resetup}</b>, Trước Reset: <b>{$row['1']}</b> Reset, <b>{$vpoint['0']}</b> V.Point . Sau Reset: <b>{$resetup}</b> Resets, <b>{$vpointnew}</b> V.Point . Relife: {$row['5']}.\r\n\t\t<br>\n" );
}
else if ( $tiente == "gcoin" )
{
fputs( $fp, "<br>Lúc: ".$Date." <br> \r\n\t\tNhân vật <b>{$name}</b> đã <font color=#FF0000>Reset</font> lần thứ <b>{$resetup}</b>, Trước Reset: <b>{$row['1']}</b> Reset, <b>{$gcoin['0']}</b> Gcoin . Sau Reset: <b>{$resetup}</b> Resets, <b>{$gcoinnew}</b> Gcoin . Relife: {$row['5']}.\r\n\t\t<br>\n" );
}
fclose( $fp );
include( "do_resetvip_nozen.php" );
check_resetday( );
check_resetmonth( );
kiemtra_topmonth( $resetup );
echo "OK<nbb>";
echo $gcoinnew;
echo "<nbb>";
echo $vpointnew;
echo "<nbb>";
echo $resetpoint;
echo "<netbanbe>";
echo $name;
echo " Reset lần thứ ";
echo $resetup;
echo " thành công! Sau khi Reset hãy vào phần <b>Rút Point</b> để lấy Point sử dụng";
}
?>
mình đã làm thế này nhưng chỉ với reset thường thì không mất skill và master piont,nhưng resetvip thì mất,mặt dù cấu trúc của hai bên khá giống nhau,coi giúp mình sai chỗ nào mà resetvip nó mất,còn reset thường thì không mất,nó mất masterspiont và skill!

supberman
28-02-11, 11:17 PM
up lên,anh em giúp mình phát đi nào

huuthao
17-04-11, 11:04 AM
bạn làm được chưa bạn cho mình xin do_reset không mất skill + skill master , master ponit với dc kog mình tim quài