Kết quả 11 đến 20 của 24
-
26-02-11, 02:59 PM #11
Ðề: Cách add skill của sum sau khi reset vào web.
<?php
// Reset nhan vat la Darklord
if ($row[4] == 64 OR $row[4] == 65 OR $row[4] == 66)
{
$sql_reset_script="Update dbo.character set [clevel]='1',[experience]='0',[money]='$resetmoeny',[LevelUpPoint]='0',[pointdutru]='$resetpoint',[resets]='$resetup',[strength]='26',[dexterity]='26',[vitality]='26',[energy]=1000,[Life]='110',[MaxLife]='110',[Mana]='60',[MaxMana]='60',[MapNumber]='0',[MapPosX]='143',[MapPosY]='134',[MapDir]='0',[Leadership]='$leadership',[isThuePoint]='0',[NoResetInDay]=$CountNoResetInDay,[NoResetInMonth]=NoResetInMonth+1,[Resets_Time]='$timestamp' where name='$name'";
$sql_reset_exec = $db->Execute($sql_reset_script) or die("Lỗi Query: $sql_reset_script");
//Nhan vat dang ki tai sinh
if ($char_back_reged_check > 0) {
$msquery = "Update Character_back set [Resets]='$resetup',[LevelUpPoint]='$resetpoint',[Class]='$row[4]',[Leadership]='$leadership',[Relifes]='$row[5]' where name='$name'";
$msresults= $db->Execute($msquery);
}
}
//Reset nhan vat khong phai la DarkLord
else
{
$sql_reset_script="Update Character set [clevel]='1',[experience]='0',[money]='$resetmoeny',[LevelUpPoint]='0',[pointdutru]='$resetpoint',[resets]='$resetup',[strength]='$Strength',[dexterity]='$Dexterity',[vitality]='$Vitality',[energy]=1000,[Life]='$Life',[MaxLife]='$MaxLife',[Mana]='$Mana',[MaxMana]='$MaxMana',[MapNumber]='$MapNumber',[MapPosX]='$MapPosX',[MapPosY]='$MapPosY',[MapDir]='$Mapdir',[isThuePoint]='0',[NoResetInDay]=$CountNoResetInDay,[NoResetInMonth]=NoResetInMonth+1,[Resets_Time]='$timestamp' where name='$name'";
$sql_reset_exec = $db->Execute($sql_reset_script) or die("Lỗi Query: $sql_reset_script");
if ($char_back_reged_check > 0) {
$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] == 80 OR $row[4] == 81 OR $row[4] == 82){
$db->Execute("Update character set [magiclist]= CONVERT(varbinary(180), 0xFF0000FF0000FF0000FF0000FF0000FF0000D60000D70000 D80000D90000DA0000DB0000DC0000DE0000DF0000E00000FF 0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF 0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 FF0000FF0000 ) where name='$info[character]'");
}
}
//$reset_skilltree = $db->Execute("Update Character set [SCFMasterLevel]='0',[SCFMasterPoints]='0',[SCFMasterSkills]=CONVERT(varbinary(180), null) where name='$name'");
$tru_jewel = $db->Execute("UPDATE MEMB_INFO SET [jewel_chao]=jewel_chao-$chao,[jewel_cre]=jewel_cre-$cre,[jewel_blue]=jewel_blue-$blue,[vpoint]=$vpointnew WHERE memb___id='$login'");
//Ghi vào Log nhung nhan vàt Reset tren muc quy dinh
if ($row[1] >= $log_reset)
{
$Date = date("h:iA, d/m/Y");
$file = "log/modules/log_resets.php";
$fp = fopen($file, "a+");
fputs ($fp, "<br>Lúc: $Date <br>
Nhâ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].
<br>\n");
fclose($fp);
}
//End Ghi vào Log nhung nhan vàt Reset tren 0 lan
kiemtra_topmonth($name);
?>Server SCF Full Customs Wing, HP, SD, Antihack, Post Item, Fix Bug.......
Skype: hoangtu_eck94
-
26-02-11, 03:00 PM #12
Ðề: Cách add skill của sum sau khi reset vào web.
mình xài forest web bản cũ .....................
Server SCF Full Customs Wing, HP, SD, Antihack, Post Item, Fix Bug.......
Skype: hoangtu_eck94
-
26-02-11, 03:26 PM #13
- Ngày tham gia
- Aug 2006
- Bài viết
- 422
- Thanks
- 66
- Thanked 19 Times in 18 Posts
Ðề: Cách add skill của sum sau khi reset vào web.
cậu xem lại giúp mình nha mình add thế này không được
<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/
include_once( "security.php" );
include( "config.php" );
include( "config/config_reset.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'];
$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( );
$check_jewel = $db->Execute( "SELECT jewel_chao,jewel_cre,jewel_blue FROM MEMB_INFO WHERE memb___id='".$login."'" );
$jewel = $check_jewel->fetchrow( );
$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( );
}
$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 ( 0 < $PkLevel_check )
{
echo "Bạn đang là Sát thủ. Phải rửa tội trước khi Reset.";
exit( );
}
if ( $reset_cap_0 <= $row[1] && $row[1] < $reset_cap_1 )
{
$level = $level_cap_1;
$zen = $zen_cap_1;
$time_reset_next = $time_reset_next_1;
$chao = $chao_cap_1;
$cre = $cre_cap_1;
$blue = $blue_cap_1;
}
else if ( $reset_cap_1 <= $row[1] && $row[1] < $reset_cap_2 )
{
$level = $level_cap_2;
$zen = $zen_cap_2;
$time_reset_next = $time_reset_next_2;
$chao = $chao_cap_2;
$cre = $cre_cap_2;
$blue = $blue_cap_2;
}
else if ( $reset_cap_2 <= $row[1] && $row[1] < $reset_cap_3 )
{
$level = $level_cap_3;
$zen = $zen_cap_3;
$time_reset_next = $time_reset_next_3;
$chao = $chao_cap_3;
$cre = $cre_cap_3;
$blue = $blue_cap_3;
}
else if ( $reset_cap_3 <= $row[1] && $row[1] < $reset_cap_4 )
{
$level = $level_cap_4;
$zen = $zen_cap_4;
$time_reset_next = $time_reset_next_4;
$chao = $chao_cap_4;
$cre = $cre_cap_4;
$blue = $blue_cap_4;
}
else if ( $reset_cap_4 <= $row[1] && $row[1] < $reset_cap_5 )
{
$level = $level_cap_5;
$zen = $zen_cap_5;
$time_reset_next = $time_reset_next_5;
$chao = $chao_cap_5;
$cre = $cre_cap_5;
$blue = $blue_cap_5;
}
else if ( $reset_cap_5 <= $row[1] && $row[1] < $reset_cap_6 )
{
$level = $level_cap_6;
$zen = $zen_cap_6;
$time_reset_next = $time_reset_next_6;
$chao = $chao_cap_6;
$cre = $cre_cap_6;
$blue = $blue_cap_6;
}
else if ( $reset_cap_6 <= $row[1] && $row[1] < $reset_cap_7 )
{
$level = $level_cap_7;
$zen = $zen_cap_7;
$time_reset_next = $time_reset_next_7;
$chao = $chao_cap_7;
$cre = $cre_cap_7;
$blue = $blue_cap_7;
}
else if ( $reset_cap_7 <= $row[1] && $row[1] < $reset_cap_8 )
{
$level = $level_cap_8;
$zen = $zen_cap_8;
$time_reset_next = $time_reset_next_8;
$chao = $chao_cap_8;
$cre = $cre_cap_8;
$blue = $blue_cap_8;
}
else if ( $reset_cap_8 <= $row[1] && $row[1] < $reset_cap_9 )
{
$level = $level_cap_9;
$zen = $zen_cap_9;
$time_reset_next = $time_reset_next_9;
$chao = $chao_cap_9;
$cre = $cre_cap_9;
$blue = $blue_cap_9;
}
else if ( $reset_cap_9 <= $row[1] && $row[1] < $reset_cap_10 )
{
$level = $level_cap_10;
$zen = $zen_cap_10;
$time_reset_next = $time_reset_next_10;
$chao = $chao_cap_10;
$cre = $cre_cap_10;
$blue = $blue_cap_10;
}
else if ( $reset_cap_10 <= $row[1] && $row[1] < $reset_cap_11 )
{
$level = $level_cap_11;
$zen = $zen_cap_11;
$time_reset_next = $time_reset_next_11;
$chao = $chao_cap_11;
$cre = $cre_cap_11;
$blue = $blue_cap_11;
}
else if ( $reset_cap_11 <= $row[1] && $row[1] < $reset_cap_12 )
{
$level = $level_cap_12;
$zen = $zen_cap_12;
$time_reset_next = $time_reset_next_12;
$chao = $chao_cap_12;
$cre = $cre_cap_12;
$blue = $blue_cap_12;
}
else if ( $reset_cap_12 <= $row[1] && $row[1] < $reset_cap_13 )
{
$level = $level_cap_13;
$zen = $zen_cap_13;
$time_reset_next = $time_reset_next_13;
$chao = $chao_cap_13;
$cre = $cre_cap_13;
$blue = $blue_cap_13;
}
else if ( $reset_cap_13 <= $row[1] && $row[1] < $reset_cap_14 )
{
$level = $level_cap_14;
$zen = $zen_cap_14;
$time_reset_next = $time_reset_next_14;
$chao = $chao_cap_14;
$cre = $cre_cap_14;
$blue = $blue_cap_14;
}
else if ( $reset_cap_14 <= $row[1] && $row[1] < $reset_cap_15 )
{
$level = $level_cap_15;
$zen = $zen_cap_15;
$time_reset_next = $time_reset_next_15;
$chao = $chao_cap_15;
$cre = $cre_cap_15;
$blue = $blue_cap_15;
}
else if ( $reset_cap_15 <= $row[1] && $row[1] < $reset_cap_16 )
{
$level = $level_cap_16;
$zen = $zen_cap_16;
$time_reset_next = $time_reset_next_16;
$chao = $chao_cap_16;
$cre = $cre_cap_16;
$blue = $blue_cap_16;
}
else if ( $reset_cap_16 <= $row[1] && $row[1] < $reset_cap_17 )
{
$level = $level_cap_17;
$zen = $zen_cap_17;
$time_reset_next = $time_reset_next_17;
$chao = $chao_cap_17;
$cre = $cre_cap_17;
$blue = $blue_cap_17;
}
else if ( $reset_cap_17 <= $row[1] && $row[1] < $reset_cap_18 )
{
$level = $level_cap_18;
$zen = $zen_cap_18;
$time_reset_next = $time_reset_next_18;
$chao = $chao_cap_18;
$cre = $cre_cap_18;
$blue = $blue_cap_18;
}
else if ( $reset_cap_18 <= $row[1] && $row[1] < $reset_cap_19 )
{
$level = $level_cap_19;
$zen = $zen_cap_19;
$time_reset_next = $time_reset_next_19;
$chao = $chao_cap_19;
$cre = $cre_cap_19;
$blue = $blue_cap_19;
}
else if ( $reset_cap_19 <= $row[1] && $row[1] < $reset_cap_20 )
{
$level = $level_cap_20;
$zen = $zen_cap_20;
$time_reset_next = $time_reset_next_20;
$chao = $chao_cap_20;
$cre = $cre_cap_20;
$blue = $blue_cap_20;
}
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;
}
}
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( );
}
$resetup = $row[1] + 1;
if ( $jewel[0] < $chao || $jewel[1] < $cre || $jewel[2] < $blue )
{
echo "Bạn không đủ Jewel trong ngân hàng.<br>Số lần Reset hiện tại của bạn là ";
echo $row['1'];
echo ". Bạn cần ";
echo $chao;
echo " Chao , ";
echo $cre;
echo " Creation , ";
echo $blue;
echo " Blue Feather.";
exit( );
}
if ( $row[0] < $level )
{
echo $name;
echo " cần ";
echo $level;
echo " level để Reset lần ";
echo $resetup;
echo ".";
exit( );
}
if ( $row[2] < $zen )
{
echo $name;
echo " cần ";
echo $zen;
echo " Zen để Reset lần ";
echo $resetup;
echo ".";
exit( );
}
if ( $row[1] == $reset_cap_0 )
{
$resetpoint = $point_relifes + $point_cap_1;
$resetmoeny = $row[2] - $zen_cap_1;
$leadership = $ml_relifes + $ml_cap_1;
}
else if ( $row[1] < $reset_cap_1 )
{
$resetpoint = $point_relifes + $point_cap_1 + $row[1] * $point_cap_1;
$resetmoeny = $row[2] - $zen_cap_1;
$leadership = $ml_relifes + $ml_relifes + $ml_cap_1 + $row[1] * $ml_cap_1;
}
else if ( $reset_cap_1 <= $row[1] && $row[1] < $reset_cap_2 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + ( $row[1] - ( $reset_cap_1 - 1 ) ) * $point_cap_2;
$resetmoeny = $row[2] - $zen_cap_2;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + ( $row[1] - ( $reset_cap_1 - 1 ) ) * $ml_cap_2;
}
else if ( $reset_cap_2 <= $row[1] && $row[1] < $reset_cap_3 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + ( $row[1] - ( $reset_cap_2 - 1 ) ) * $point_cap_3;
$resetmoeny = $row[2] - $zen_cap_3;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + ( $row[1] - ( $reset_cap_2 - 1 ) ) * $ml_cap_3;
}
else if ( $reset_cap_3 <= $row[1] && $row[1] < $reset_cap_4 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + ( $row[1] - ( $reset_cap_3 - 1 ) ) * $point_cap_4;
$resetmoeny = $row[2] - $zen_cap_4;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + ( $row[1] - ( $reset_cap_3 - 1 ) ) * $ml_cap_4;
}
else if ( $reset_cap_4 <= $row[1] && $row[1] < $reset_cap_5 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + ( $row[1] - ( $reset_cap_4 - 1 ) ) * $point_cap_5;
$resetmoeny = $row[2] - $zen_cap_5;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + ( $row[1] - ( $reset_cap_4 - 1 ) ) * $ml_cap_5;
}
else if ( $reset_cap_5 <= $row[1] && $row[1] < $reset_cap_6 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + ( $row[1] - ( $reset_cap_5 - 1 ) ) * $point_cap_6;
$resetmoeny = $row[2] - $zen_cap_6;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + ( $row[1] - ( $reset_cap_5 - 1 ) ) * $ml_cap_6;
}
else if ( $reset_cap_6 <= $row[1] && $row[1] < $reset_cap_7 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + ( $row[1] - ( $reset_cap_6 - 1 ) ) * $point_cap_7;
$resetmoeny = $row[2] - $zen_cap_7;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + ( $row[1] - ( $reset_cap_6 - 1 ) ) * $ml_cap_7;
}
else if ( $reset_cap_7 <= $row[1] && $row[1] < $reset_cap_8 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + ( $row[1] - ( $reset_cap_7 - 1 ) ) * $point_cap_8;
$resetmoeny = $row[2] - $zen_cap_8;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + ( $row[1] - ( $reset_cap_7 - 1 ) ) * $ml_cap_8;
}
else if ( $reset_cap_8 <= $row[1] && $row[1] < $reset_cap_9 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + ( $row[1] - ( $reset_cap_8 - 1 ) ) * $point_cap_9;
$resetmoeny = $row[2] - $zen_cap_9;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + ( $row[1] - ( $reset_cap_8 - 1 ) ) * $ml_cap_9;
}
else if ( $reset_cap_9 <= $row[1] && $row[1] < $reset_cap_10 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + ( $row[1] - ( $reset_cap_9 - 1 ) ) * $point_cap_10;
$resetmoeny = $row[2] - $zen_cap_10;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + ( $row[1] - ( $reset_cap_9 - 1 ) ) * $ml_cap_10;
}
else if ( $reset_cap_10 <= $row[1] && $row[1] < $reset_cap_11 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + ( $row[1] - ( $reset_cap_10 - 1 ) ) * $point_cap_11;
$resetmoeny = $row[2] - $zen_cap_11;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + ( $row[1] - ( $reset_cap_10 - 1 ) ) * $ml_cap_11;
}
else if ( $reset_cap_11 <= $row[1] && $row[1] < $reset_cap_12 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + ( $row[1] - ( $reset_cap_11 - 1 ) ) * $point_cap_12;
$resetmoeny = $row[2] - $zen_cap_12;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + ( $row[1] - ( $reset_cap_11 - 1 ) ) * $ml_cap_12;
}
else if ( $reset_cap_12 <= $row[1] && $row[1] < $reset_cap_13 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + ( $row[1] - ( $reset_cap_12 - 1 ) ) * $point_cap_13;
$resetmoeny = $row[2] - $zen_cap_13;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + ( $row[1] - ( $reset_cap_12 - 1 ) ) * $ml_cap_13;
}
else if ( $reset_cap_13 <= $row[1] && $row[1] < $reset_cap_14 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + ( $row[1] - ( $reset_cap_13 - 1 ) ) * $point_cap_14;
$resetmoeny = $row[2] - $zen_cap_14;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + ( $row[1] - ( $reset_cap_13 - 1 ) ) * $ml_cap_14;
}
else if ( $reset_cap_14 <= $row[1] && $row[1] < $reset_cap_15 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + ( $row[1] - ( $reset_cap_14 - 1 ) ) * $point_cap_15;
$resetmoeny = $row[2] - $zen_cap_15;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + ( $row[1] - ( $reset_cap_14 - 1 ) ) * $ml_cap_15;
}
else if ( $reset_cap_15 <= $row[1] && $row[1] < $reset_cap_16 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + ( $row[1] - ( $reset_cap_15 - 1 ) ) * $point_cap_16;
$resetmoeny = $row[2] - $zen_cap_16;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + ( $row[1] - ( $reset_cap_15 - 1 ) ) * $ml_cap_16;
}
else if ( $reset_cap_16 <= $row[1] && $row[1] < $reset_cap_17 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + $point_cap_16 * ( $reset_cap_16 - $reset_cap_15 ) + ( $row[1] - ( $reset_cap_16 - 1 ) ) * $point_cap_17;
$resetmoeny = $row[2] - $zen_cap_17;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + $ml_cap_16 * ( $reset_cap_16 - $reset_cap_15 ) + ( $row[1] - ( $reset_cap_16 - 1 ) ) * $ml_cap_17;
}
else if ( $reset_cap_17 <= $row[1] && $row[1] < $reset_cap_18 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + $point_cap_16 * ( $reset_cap_16 - $reset_cap_15 ) + $point_cap_17 * ( $reset_cap_17 - $reset_cap_16 ) + ( $row[1] - ( $reset_cap_17 - 1 ) ) * $point_cap_18;
$resetmoeny = $row[2] - $zen_cap_18;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + $ml_cap_16 * ( $reset_cap_16 - $reset_cap_15 ) + $ml_cap_17 * ( $reset_cap_17 - $reset_cap_16 ) + ( $row[1] - ( $reset_cap_17 - 1 ) ) * $ml_cap_18;
}
else if ( $reset_cap_18 <= $row[1] && $row[1] < $reset_cap_19 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + $point_cap_16 * ( $reset_cap_16 - $reset_cap_15 ) + $point_cap_17 * ( $reset_cap_17 - $reset_cap_16 ) + $point_cap_18 * ( $reset_cap_18 - $reset_cap_17 ) + ( $row[1] - ( $reset_cap_18 - 1 ) ) * $point_cap_19;
$resetmoeny = $row[2] - $zen_cap_19;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + $ml_cap_16 * ( $reset_cap_16 - $reset_cap_15 ) + $ml_cap_17 * ( $reset_cap_17 - $reset_cap_16 ) + $ml_cap_18 * ( $reset_cap_18 - $reset_cap_17 ) + ( $row[1] - ( $reset_cap_18 - 1 ) ) * $ml_cap_19;
}
else if ( $reset_cap_19 <= $row[1] && $row[1] < $reset_cap_20 )
{
$resetpoint = $point_relifes + $point_cap_1 * $reset_cap_1 + $point_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $point_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $point_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $point_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $point_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $point_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $point_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $point_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $point_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $point_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $point_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $point_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $point_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $point_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + $point_cap_16 * ( $reset_cap_16 - $reset_cap_15 ) + $point_cap_17 * ( $reset_cap_17 - $reset_cap_16 ) + $point_cap_18 * ( $reset_cap_18 - $reset_cap_17 ) + $point_cap_19 * ( $reset_cap_19 - $reset_cap_18 ) + ( $row[1] - ( $reset_cap_19 - 1 ) ) * $point_cap_20;
$resetmoeny = $row[2] - $zen_cap_20;
$leadership = $ml_relifes + $ml_cap_1 * $reset_cap_1 + $ml_cap_2 * ( $reset_cap_2 - $reset_cap_1 ) + $ml_cap_3 * ( $reset_cap_3 - $reset_cap_2 ) + $ml_cap_4 * ( $reset_cap_4 - $reset_cap_3 ) + $ml_cap_5 * ( $reset_cap_5 - $reset_cap_4 ) + $ml_cap_6 * ( $reset_cap_6 - $reset_cap_5 ) + $ml_cap_7 * ( $reset_cap_7 - $reset_cap_6 ) + $ml_cap_8 * ( $reset_cap_8 - $reset_cap_7 ) + $ml_cap_9 * ( $reset_cap_9 - $reset_cap_8 ) + $ml_cap_10 * ( $reset_cap_10 - $reset_cap_9 ) + $ml_cap_11 * ( $reset_cap_11 - $reset_cap_10 ) + $ml_cap_12 * ( $reset_cap_12 - $reset_cap_11 ) + $ml_cap_13 * ( $reset_cap_13 - $reset_cap_12 ) + $ml_cap_14 * ( $reset_cap_14 - $reset_cap_13 ) + $ml_cap_15 * ( $reset_cap_15 - $reset_cap_14 ) + $ml_cap_16 * ( $reset_cap_16 - $reset_cap_15 ) + $ml_cap_17 * ( $reset_cap_17 - $reset_cap_16 ) + $ml_cap_18 * ( $reset_cap_18 - $reset_cap_17 ) + $ml_cap_19 * ( $reset_cap_19 - $reset_cap_18 ) + ( $row[1] - ( $reset_cap_19 - 1 ) ) * $ml_cap_20;
}
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',[money]='".$resetmoeny."',[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',[Leadership]='{$leadership}',[isThuePoint]='0',[NoResetInDay]={$CountNoResetInDay},[NoResetInMonth]=NoResetInMonth+1,[Resets_Time]='{$timestamp}',[ResetVIP]='0',[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',[money]='".$resetmoeny."',[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}',[Leadership]='0',[isThuePoint]='0',[NoResetInDay]={$CountNoResetInDay},[NoResetInMonth]=NoResetInMonth+1,[Resets_Time]='{$timestamp}',[ResetVIP]='0',[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_skill_sum = $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 );
}
}
if($row[4] == 80 OR $row[4] == 81 OR $row[4] == 82){
$db->Execute("Update character set [magiclist]= CONVERT(varbinary(180), 0xFF0000FF0000FF0000FF0000FF0000FF0000D60000D70000 D80000D90000DA0000DB0000DC0000DE0000DF0000E00000FF 0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF 0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00 00FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 FF0000FF0000 ) where name='$info[character]'");
}
$tru_jewel = $db->Execute( "UPDATE MEMB_INFO SET jewel_chao=jewel_chao-".$chao.",jewel_cre=jewel_cre-{$cre},jewel_blue=jewel_blue-{$blue} WHERE memb___id='{$login}'" );
if ( $log_reset <= $row[1] )
{
$Date = date( "h:iA, d/m/Y" );
$file = "log/modules/log_resets.php";
$fp = fopen( $file, "a+" );
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 . Sau Reset: <b>{$resetup}</b> Resets . Relife: {$row['5']}.\r\n\t\t<br>\n" );
fclose( $fp );
}
include( "do_reset_nozen.php" );
check_resetday( );
check_resetmonth( );
kiemtra_topmonth( $resetup );
echo "OK<nbb>";
echo $resetmoeny;
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";
}
?>Khách viếng thăm hãy cùng supberman xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
27-02-11, 08:06 AM #14
Ðề: Cách add skill của sum sau khi reset vào web.
pm yahoooooo tớ coi thử cái nào!
hẹn ngày trở lại,hoặc giả từ vũ khí !^!^
-
27-02-11, 03:32 PM #15
Ðề: Cách add skill của sum sau khi reset vào web.
FW bản cũ chắc chắn đc hả ếch ơi
Đến thì đón…
-
28-02-11, 03:01 PM #16
- Ngày tham gia
- Sep 2009
- Đang ở
- Đảo Đào Hoa
- Bài viết
- 1,063
- Thanks
- 133
- Thanked 398 Times in 216 Posts
Ðề: Cách add skill của sum sau khi reset vào web.
NBB 2.1.2 thì add thế nào vậy?>
Khách viếng thăm hãy cùng lieuthunguyet xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
28-02-11, 04:14 PM #17
- Ngày tham gia
- Jan 2009
- Bài viết
- 153
- Thanks
- 14
- Thanked 8 Times in 7 Posts
Ðề: Cách add skill của sum sau khi reset vào web.
web của BCS thì add sao vậy ??
Khách viếng thăm hãy cùng midou21093 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
28-02-11, 05:45 PM #18
Ðề: Cách add skill của sum sau khi reset vào web.
up các file reset của các bạn lên đây mình xem
Server SCF Full Customs Wing, HP, SD, Antihack, Post Item, Fix Bug.......
Skype: hoangtu_eck94
-
28-02-11, 05:48 PM #19
- Ngày tham gia
- Nov 2010
- Bài viết
- 24
- Thanks
- 5
- Thanked 2 Times in 1 Post
Ðề: Cách add skill của sum sau khi reset vào web.
ếch hoàng tử hôi nách ơi. giúp tớ cái vụ này nhé. Y!m phamtuantu271
thank ếchKhách viếng thăm hãy cùng TuanTuVD xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
07-03-11, 01:04 AM #20
Ðề: Cách add skill của sum sau khi reset vào web.
add vào sau khi rs có phải làm gì, có điều kiện gì cho SM thì mới có skill không
sao mình rs xong vào chả có skill nào cảĐến thì đón…
Các Chủ đề tương tự
-
reset ko mất skill nbb1.12
Bởi Axitsunfurit trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 3Bài viết cuối: 23-06-11, 12:10 AM -
Fix Reset xong mất skill
Bởi eva0001 trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 10Bài viết cuối: 20-06-11, 08:38 AM -
cach chỉnh reset ko mất skill đâu nhỉ ai chỉ em với
Bởi mrgacon trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 3Bài viết cuối: 30-08-10, 08:05 PM -
reset ko mất skill
Bởi Axitsunfurit trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 0Bài viết cuối: 22-08-10, 06:44 PM -
cách chỉnh reset ko mất skill
Bởi mrgacon trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 3Bài viết cuối: 21-08-10, 08:23 PM