Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Problema con Modulo Reset Mucore 1.6  (Visto 1055 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline Nexus Posteado: January 25, 2017, 11:08:57 PM | Modificado: January 26, 2017, 12:11:33 AM by Nexus



Hola gente, bueno tengo un problema con el modulo de resets, el modulo resetea el personaje y todo bien, lo configuro en admincp para que no borre skill, no borre inventario, borre los stats y de 300 puntos de resets, pero el problema es que al hacer reset, no le borra los puntos que quedan para repartir. ejemplo

el usuario es nivel 400 y tiene 2000 puntos aumentados en niveles, pero no reparte esos puntos en sus stats. Al hacer reset el sistema lo deja nivel 1, borra sus stats, pero le deja : 2000 puntos que le quedaron sin repartir de sus resets anterior + los 300 puntos que se entregan por reset, total = 2300 puntos.

Si hacen esto constantemente, serian full stats en en 90% menos tiempo y resets que lo solicitado.

Necesito una ayuda con este tema, ya que necesito que le quite los puntos que no ha repartido y solo le de los puntos de resets.

Uso files MuEMu Season 8 , y en esta season el sistema de reset no funciona correctamente que yo tenga entendido, si no es asi me gustaría mas información.

agradezco cualquier ayuda de su parte.

dejo codigo php de modulo de reset

Reset_character.php

Code: [Select]
<?
$load_reset_settings = simplexml_load_file('engine/config_mods/reset_character_settings.xml');
$active = trim($load_reset_settings->active);
if($active == '0'){
echo msg('0',text_sorry_feature_disabled);
}else{
$reset_level = trim($load_reset_settings->level);
$reset_zen  = trim($load_reset_settings->zen);
$reset_points = trim($load_reset_settings->bpoints);
$reset_points_formula = trim($load_reset_settings->bpoints_formula);
$reset_clear_skills = trim($load_reset_settings->clear_skills);
$reset_clear_inv = trim($load_reset_settings->clear_inv);
$reset_stats = trim($load_reset_settings->reset_stats);
$reset_limit = trim($load_reset_settings->reset_limit);

if(isset($_GET['rid'])){
echo '<div style="margin-top: 10px;">';
$id = safe_input($_GET['rid'],'');
if(empty($id) || !is_numeric($id)){
header('Location: '.$core_run_script.'');
exit();
}else{
if(character_and_account($id,$user_auth_id) === false){
header('Location: '.$core_run_script.'');
exit();
}else {
if(account_online($user_auth_id) === true){
echo msg('0',text_resetcharacter_t1);
}else{
$select_req = $core_db->Execute("select clevel,money,resets,leveluppoint from character where mu_id=? and accountid=?",array($id,$user_auth_id));
if($select_req->fields[0] < $reset_level){
echo msg('0',str_replace("{levels}",($reset_level - $select_req->fields[0]),text_resetcharacter_t2));
$no_reset = 1;
}
if($select_req->fields[1] < $reset_zen){
echo msg('0',str_replace("{zen}",number_format($reset_zen - $select_req->fields[1]),text_resetcharacter_t3));
$no_reset = 1;
}
if($select_req->fields[2] >= $reset_limit){
echo msg('0',str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t4));
$no_reset = 1;
}
if($no_reset != '1'){
$new_money = $select_req->fields[1] - $reset_zen;
switch ($reset_points_formula){
case '0': $new_bpoints = ($select_req->fields[3]+$reset_points); break;
case '1': $new_bpoints = ($reset_points*($select_req->fields[2]+1)); break;
}
switch ($reset_stats){
case '1':
if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
$reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
}elseif ($reset_clear_inv == '1'){
$reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
}elseif ($reset_clear_skills == '1'){
$reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
}elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
$reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25' where mu_id=?";
}
break;
case '0':
if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
$reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
}elseif ($reset_clear_inv == '1'){
$reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
}elseif ($reset_clear_skills == '1'){
$reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
}elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
$reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=? where mu_id=?";
}
break;
}
$exc_reset_formula=$core_db->Execute($reset_formula,array($new_bpoints,$new_money,$id));
if($exc_reset_formula){
echo msg('1',text_resetcharacter_t5);
}else{
echo msg('0',text_resetcharacter_t6);
}
}
}
}
}
echo '</div>';
}

echo '<div style="margin-top: 20px;">
<fieldset><legend>'.text_resetcharacter_t7.'</legend>
<table border="0" cellspacing="4" cellpadding="0" width="100%" style="padding-left: 10px;">
<tr>
<td align="left"><b>'.text_resetcharacter_t12.':</b></td>
<td align="left" width="100%">'.$reset_level.'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t11.':</b></td>
<td align="left" width="100%">'.number_format($reset_zen).'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t10.':</b></td>
<td align="left" width="100%">'.number_format($reset_limit).'</td>
</tr>
</table>
</fieldset>
</div>

<div style="margin-top: 10px;">
<fieldset><legend>'.text_resetcharacter_t8.'</legend>
<table border="0" cellspacing="4" cellpadding="0"  style="padding-left: 10px; padding-right: 10px;">
<tr>
<td align="left" width="130" valign="top"><b>'.text_resetcharacter_t9.':</b></td>
<td align="left">';
switch ($reset_points_formula){
case '0': echo number_format($reset_points);  break;
case '1':

$bonus_info_points = str_replace("{reset_points}",number_format($reset_points),text_resetcharacter_t_levelupbonusinfo);
echo $bonus_info_points; break;
}

echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t13.':</b></td>
<td align="left">';
switch ($reset_clear_skills){
case '0': echo 'No'; break;
case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t14.':</b></td>
<td align="left">';
switch ($reset_clear_inv){
case '0': echo 'No'; break;
case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t15.':</b></td>
<td align="left">';
switch ($reset_stats){
case '0': echo 'No'; break;
case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
</table>
</fieldset>
</div>
';

$select_characters = $core_db->Execute("Select mu_id,name,clevel,class,resets,money,leveluppoint from character where accountid=? order by clevel desc ",array($user_auth_id));

echo '<table border="0" cellspacing="4" cellpadding="0" width="100%" style="margin-top: 10px; margin-bottom: 10px;">';
while (!$select_characters->EOF){
if($select_characters->fields[2] < $reset_level && $select_characters->fields[5] < $reset_zen){
$lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t16)).'</span>';

}elseif ($select_characters->fields[2] < $reset_level){
$lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),text_resetcharacter_t17).'</span>';
}elseif ($select_characters->fields[5] < $reset_zen){
$lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t18).'</span>';
}elseif ($select_characters->fields[4] >= $reset_limit){
$lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t19).'</span>';
}else{

$lacking_error = '<input type="button" value="'.button_reset_character.'" onclick="location.href=\''.$core_run_script.'&rid='.$select_characters->fields[0].'\'">';
}

echo '
  <tr>
    <td width="66" rowspan="2"><img src="template/'.$core['config']['template'].'/images/class/'.decode_class($select_characters->fields[3],'2').'" width="66" height="66" title="Class"></td>
    <td align="left" class="iR_name" width="100">'.htmlentities($select_characters->fields[1]).'</td>
    <td align="left" class="iR_stats">Level: '.$select_characters->fields[2].'</td>
    <td align="left" class="iR_stats">Zen: '.number_format($select_characters->fields[5]).'</td>
    <td align="left" class="iR_stats">Resets: '.$select_characters->fields[4].'</td>
  </tr>
  <tr>
    <td algin="left" class="iR_class">'.decode_class($select_characters->fields[3]).'</td>
    <td colspan="3" class="iR_func_status" align="left">'.$lacking_error.'</td>
  </tr>
  <tr>
    <td colspan="5" class="iRg_line_top">&nbsp;</td>
  </tr>



  ';

$select_characters->MoveNext();
}

echo '</table>';
}

?>
$get_max_online = mssql_query('SELECT max_online, max_date FROM Custom_Max_Online');
$row_max_online = mssql_fetch_array($get_max_online);

echo $row_max_online[0]; // maximo de conectados
echo date('d/m/Y h:i:s A',strtotime($row_max_online[0])); // fecha de ultima actualizacion del record.

Codigo reset_character_settings.xml

Code: [Select]
<?xml version="1.0" encoding="iso-8859-1"?>

<reset_settings>
<active>1</active>
<level>400</level>
<zen>10000000</zen>
<bpoints>300</bpoints>
<bpoints_formula>0</bpoints_formula>
<clear_skills>0</clear_skills>
<clear_inv>0</clear_inv>
<reset_stats>1</reset_stats>
<reset_limit>999</reset_limit>
</reset_settings>


Online mechaloco #1 Posteado: January 25, 2017, 11:15:02 PM

proba así
Citar
proba así:

<?
$load_reset_settings = simplexml_load_file('engine/config_mods/reset_character_settings.xml');
$active = trim($load_reset_settings->active);
if($active == '0'){
   echo msg('0',text_sorry_feature_disabled);
}else{
$reset_level = trim($load_reset_settings->level);
$reset_zen  = trim($load_reset_settings->zen);
$reset_points = trim($load_reset_settings->bpoints);
$reset_points_formula = trim($load_reset_settings->bpoints_formula);
$reset_clear_skills = trim($load_reset_settings->clear_skills);
$reset_clear_inv = trim($load_reset_settings->clear_inv);
$reset_stats = trim($load_reset_settings->reset_stats);
$reset_limit = trim($load_reset_settings->reset_limit);

if(isset($_GET['rid'])){
   echo '<div style="margin-top: 10px;">';
   $id = safe_input($_GET['rid'],'');
   if(empty($id) || !is_numeric($id)){
      header('Location: '.$core_run_script.'');
      exit();
   }else{
      if(character_and_account($id,$user_auth_id) === false){
         header('Location: '.$core_run_script.'');
         exit();
      }else {
         if(account_online($user_auth_id) === true){
            echo msg('0',text_resetcharacter_t1);      
         }else{
            $select_req = $core_db->Execute("select clevel,money,resets,leveluppoint from character where mu_id=? and accountid=?",array($id,$user_auth_id));
            if($select_req->fields[0] < $reset_level){
               echo msg('0',str_replace("{levels}",($reset_level - $select_req->fields[0]),text_resetcharacter_t2));
               $no_reset = 1;
            }
            if($select_req->fields[1] < $reset_zen){
               echo msg('0',str_replace("{zen}",number_format($reset_zen - $select_req->fields[1]),text_resetcharacter_t3));
               $no_reset = 1;
            }
            if($select_req->fields[2] >= $reset_limit){
               echo msg('0',str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t4));
               $no_reset = 1;
            }
            if($no_reset != '1'){
               $new_money = $select_req->fields[1] - $reset_zen;
               switch ($reset_points_formula){
                  case '0': $new_bpoints = ($select_req->fields[3]+$reset_points); break;
                  case '1': $new_bpoints = ($reset_points*($select_req->fields[2]+1)); break;
               }
               switch ($reset_stats){
                  case '1':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[LevelUpPoint]='0',[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25' where mu_id=?";
                     }
                  break;
                  case '0':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=? where mu_id=?";
                     }
                  break;
               }   
               $exc_reset_formula=$core_db->Execute($reset_formula,array($new_bpoints,$new_money,$id));
               if($exc_reset_formula){
                  echo msg('1',text_resetcharacter_t5);
               }else{
                  echo msg('0',text_resetcharacter_t6);
               }
            }
         }
      }
   }
   echo '</div>';
}

echo '<div style="margin-top: 20px;">
<fieldset><legend>'.text_resetcharacter_t7.'</legend>
<table border="0" cellspacing="4" cellpadding="0" width="100%" style="padding-left: 10px;">
<tr>
<td align="left"><b>'.text_resetcharacter_t12.':</b></td>
<td align="left" width="100%">'.$reset_level.'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t11.':</b></td>
<td align="left" width="100%">'.number_format($reset_zen).'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t10.':</b></td>
<td align="left" width="100%">'.number_format($reset_limit).'</td>
</tr>
</table>
</fieldset>
</div>

<div style="margin-top: 10px;">
<fieldset><legend>'.text_resetcharacter_t8.'</legend>
<table border="0" cellspacing="4" cellpadding="0"  style="padding-left: 10px; padding-right: 10px;">
<tr>
<td align="left" width="130" valign="top"><b>'.text_resetcharacter_t9.':</b></td>
<td align="left">';
switch ($reset_points_formula){
   case '0': echo number_format($reset_points);  break;
   case '1':
   
   $bonus_info_points = str_replace("{reset_points}",number_format($reset_points),text_resetcharacter_t_levelupbonusinfo);
   echo $bonus_info_points; break;
}

echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t13.':</b></td>
<td align="left">';
switch ($reset_clear_skills){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t14.':</b></td>
<td align="left">';
switch ($reset_clear_inv){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t15.':</b></td>
<td align="left">';
switch ($reset_stats){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
</table>
</fieldset>
</div>
';

$select_characters = $core_db->Execute("Select mu_id,name,clevel,class,resets,money,leveluppoint from character where accountid=? order by clevel desc ",array($user_auth_id));

echo '<table border="0" cellspacing="4" cellpadding="0" width="100%" style="margin-top: 10px; margin-bottom: 10px;">';
while (!$select_characters->EOF){
   if($select_characters->fields[2] < $reset_level && $select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t16)).'</span>';
      
   }elseif ($select_characters->fields[2] < $reset_level){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),text_resetcharacter_t17).'</span>';
   }elseif ($select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t18).'</span>';
   }elseif ($select_characters->fields[4] >= $reset_limit){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t19).'</span>';
   }else{
      
      $lacking_error = '<input type="button" value="'.button_reset_character.'" onclick="location.href=\''.$core_run_script.'&rid='.$select_characters->fields[0].'\'">';
   }
   
   echo '
  <tr>
    <td width="66" rowspan="2"><img src="template/'.$core['config']['template'].'/images/class/'.decode_class($select_characters->fields[3],'2').'" width="66" height="66" title="Class"></td>
    <td align="left" class="iR_name" width="100">'.htmlentities($select_characters->fields[1]).'</td>
    <td align="left" class="iR_stats">Level: '.$select_characters->fields[2].'</td>
    <td align="left" class="iR_stats">Zen: '.number_format($select_characters->fields[5]).'</td>
    <td align="left" class="iR_stats">Resets: '.$select_characters->fields[4].'</td>
  </tr>
  <tr>
    <td algin="left" class="iR_class">'.decode_class($select_characters->fields[3]).'</td>
    <td colspan="3" class="iR_func_status" align="left">'.$lacking_error.'</td>
  </tr>
  <tr>
    <td colspan="5" class="iRg_line_top">&nbsp;</td>
  </tr>
   
   
   
  ';
   
   $select_characters->MoveNext();
}

echo '</table>';
}

?>
$get_max_online = mssql_query('SELECT max_online, max_date FROM Custom_Max_Online');
$row_max_online = mssql_fetch_array($get_max_online);

echo $row_max_online[0]; // maximo de conectados
echo date('d/m/Y h:i:s A',strtotime($row_max_online[0])); // fecha de ultima actualizacion del record.

Offline Nexus #2 Posteado: January 25, 2017, 11:26:43 PM

proba así
Citar
proba así:

<?
$load_reset_settings = simplexml_load_file('engine/config_mods/reset_character_settings.xml');
$active = trim($load_reset_settings->active);
if($active == '0'){
   echo msg('0',text_sorry_feature_disabled);
}else{
$reset_level = trim($load_reset_settings->level);
$reset_zen  = trim($load_reset_settings->zen);
$reset_points = trim($load_reset_settings->bpoints);
$reset_points_formula = trim($load_reset_settings->bpoints_formula);
$reset_clear_skills = trim($load_reset_settings->clear_skills);
$reset_clear_inv = trim($load_reset_settings->clear_inv);
$reset_stats = trim($load_reset_settings->reset_stats);
$reset_limit = trim($load_reset_settings->reset_limit);

if(isset($_GET['rid'])){
   echo '<div style="margin-top: 10px;">';
   $id = safe_input($_GET['rid'],'');
   if(empty($id) || !is_numeric($id)){
      header('Location: '.$core_run_script.'');
      exit();
   }else{
      if(character_and_account($id,$user_auth_id) === false){
         header('Location: '.$core_run_script.'');
         exit();
      }else {
         if(account_online($user_auth_id) === true){
            echo msg('0',text_resetcharacter_t1);      
         }else{
            $select_req = $core_db->Execute("select clevel,money,resets,leveluppoint from character where mu_id=? and accountid=?",array($id,$user_auth_id));
            if($select_req->fields[0] < $reset_level){
               echo msg('0',str_replace("{levels}",($reset_level - $select_req->fields[0]),text_resetcharacter_t2));
               $no_reset = 1;
            }
            if($select_req->fields[1] < $reset_zen){
               echo msg('0',str_replace("{zen}",number_format($reset_zen - $select_req->fields[1]),text_resetcharacter_t3));
               $no_reset = 1;
            }
            if($select_req->fields[2] >= $reset_limit){
               echo msg('0',str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t4));
               $no_reset = 1;
            }
            if($no_reset != '1'){
               $new_money = $select_req->fields[1] - $reset_zen;
               switch ($reset_points_formula){
                  case '0': $new_bpoints = ($select_req->fields[3]+$reset_points); break;
                  case '1': $new_bpoints = ($reset_points*($select_req->fields[2]+1)); break;
               }
               switch ($reset_stats){
                  case '1':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[LevelUpPoint]='0',[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25' where mu_id=?";
                     }
                  break;
                  case '0':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=? where mu_id=?";
                     }
                  break;
               }   
               $exc_reset_formula=$core_db->Execute($reset_formula,array($new_bpoints,$new_money,$id));
               if($exc_reset_formula){
                  echo msg('1',text_resetcharacter_t5);
               }else{
                  echo msg('0',text_resetcharacter_t6);
               }
            }
         }
      }
   }
   echo '</div>';
}

echo '<div style="margin-top: 20px;">
<fieldset><legend>'.text_resetcharacter_t7.'</legend>
<table border="0" cellspacing="4" cellpadding="0" width="100%" style="padding-left: 10px;">
<tr>
<td align="left"><b>'.text_resetcharacter_t12.':</b></td>
<td align="left" width="100%">'.$reset_level.'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t11.':</b></td>
<td align="left" width="100%">'.number_format($reset_zen).'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t10.':</b></td>
<td align="left" width="100%">'.number_format($reset_limit).'</td>
</tr>
</table>
</fieldset>
</div>

<div style="margin-top: 10px;">
<fieldset><legend>'.text_resetcharacter_t8.'</legend>
<table border="0" cellspacing="4" cellpadding="0"  style="padding-left: 10px; padding-right: 10px;">
<tr>
<td align="left" width="130" valign="top"><b>'.text_resetcharacter_t9.':</b></td>
<td align="left">';
switch ($reset_points_formula){
   case '0': echo number_format($reset_points);  break;
   case '1':
   
   $bonus_info_points = str_replace("{reset_points}",number_format($reset_points),text_resetcharacter_t_levelupbonusinfo);
   echo $bonus_info_points; break;
}

echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t13.':</b></td>
<td align="left">';
switch ($reset_clear_skills){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t14.':</b></td>
<td align="left">';
switch ($reset_clear_inv){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t15.':</b></td>
<td align="left">';
switch ($reset_stats){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
</table>
</fieldset>
</div>
';

$select_characters = $core_db->Execute("Select mu_id,name,clevel,class,resets,money,leveluppoint from character where accountid=? order by clevel desc ",array($user_auth_id));

echo '<table border="0" cellspacing="4" cellpadding="0" width="100%" style="margin-top: 10px; margin-bottom: 10px;">';
while (!$select_characters->EOF){
   if($select_characters->fields[2] < $reset_level && $select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t16)).'</span>';
      
   }elseif ($select_characters->fields[2] < $reset_level){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),text_resetcharacter_t17).'</span>';
   }elseif ($select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t18).'</span>';
   }elseif ($select_characters->fields[4] >= $reset_limit){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t19).'</span>';
   }else{
      
      $lacking_error = '<input type="button" value="'.button_reset_character.'" onclick="location.href=\''.$core_run_script.'&rid='.$select_characters->fields[0].'\'">';
   }
   
   echo '
  <tr>
    <td width="66" rowspan="2"><img src="template/'.$core['config']['template'].'/images/class/'.decode_class($select_characters->fields[3],'2').'" width="66" height="66" title="Class"></td>
    <td align="left" class="iR_name" width="100">'.htmlentities($select_characters->fields[1]).'</td>
    <td align="left" class="iR_stats">Level: '.$select_characters->fields[2].'</td>
    <td align="left" class="iR_stats">Zen: '.number_format($select_characters->fields[5]).'</td>
    <td align="left" class="iR_stats">Resets: '.$select_characters->fields[4].'</td>
  </tr>
  <tr>
    <td algin="left" class="iR_class">'.decode_class($select_characters->fields[3]).'</td>
    <td colspan="3" class="iR_func_status" align="left">'.$lacking_error.'</td>
  </tr>
  <tr>
    <td colspan="5" class="iRg_line_top">&nbsp;</td>
  </tr>
   
   
   
  ';
   
   $select_characters->MoveNext();
}

echo '</table>';
}

?>
$get_max_online = mssql_query('SELECT max_online, max_date FROM Custom_Max_Online');
$row_max_online = mssql_fetch_array($get_max_online);

echo $row_max_online[0]; // maximo de conectados
echo date('d/m/Y h:i:s A',strtotime($row_max_online[0])); // fecha de ultima actualizacion del record.

Sigue igual amigo, sigue dejandolos puntos de leveo y le suma los puntos de reset a los puntos de leveo. me refiero es que, borre los puntos de level o los puntos que están para repartir por subir de nivel y luego si le sume los puntos de reset

Online mechaloco #3 Posteado: January 25, 2017, 11:28:33 PM

Citar

<?
$load_reset_settings = simplexml_load_file('engine/config_mods/reset_character_settings.xml');
$active = trim($load_reset_settings->active);
if($active == '0'){
   echo msg('0',text_sorry_feature_disabled);
}else{
$reset_level = trim($load_reset_settings->level);
$reset_zen  = trim($load_reset_settings->zen);
$reset_points = trim($load_reset_settings->bpoints);
$reset_points_formula = trim($load_reset_settings->bpoints_formula);
$reset_clear_skills = trim($load_reset_settings->clear_skills);
$reset_clear_inv = trim($load_reset_settings->clear_inv);
$reset_stats = trim($load_reset_settings->reset_stats);
$reset_limit = trim($load_reset_settings->reset_limit);

if(isset($_GET['rid'])){
   echo '<div style="margin-top: 10px;">';
   $id = safe_input($_GET['rid'],'');
   if(empty($id) || !is_numeric($id)){
      header('Location: '.$core_run_script.'');
      exit();
   }else{
      if(character_and_account($id,$user_auth_id) === false){
         header('Location: '.$core_run_script.'');
         exit();
      }else {
         if(account_online($user_auth_id) === true){
            echo msg('0',text_resetcharacter_t1);      
         }else{
            $select_req = $core_db->Execute("select clevel,money,resets,leveluppoint from character where mu_id=? and accountid=?",array($id,$user_auth_id));
            if($select_req->fields[0] < $reset_level){
               echo msg('0',str_replace("{levels}",($reset_level - $select_req->fields[0]),text_resetcharacter_t2));
               $no_reset = 1;
            }
            if($select_req->fields[1] < $reset_zen){
               echo msg('0',str_replace("{zen}",number_format($reset_zen - $select_req->fields[1]),text_resetcharacter_t3));
               $no_reset = 1;
            }
            if($select_req->fields[2] >= $reset_limit){
               echo msg('0',str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t4));
               $no_reset = 1;
            }
            if($no_reset != '1'){
               $new_money = $select_req->fields[1] - $reset_zen;
               switch ($reset_points_formula){
                  case '0': $new_bpoints = ($select_req->fields[3]+$reset_points); break;
                  case '1': $new_bpoints = ($reset_points*($select_req->fields[2]+1)); break;
               }
               switch ($reset_stats){
                  case '1':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[LevelUpPoint]='0',[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25' where mu_id=?";
                     }
                  break;
                  case '0':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=? where mu_id=?";
                     }
                  break;
               }   
               $exc_reset_formula=$core_db->Execute($reset_formula,array($new_bpoints,$new_money,$id));
               if($exc_reset_formula){
                  echo msg('1',text_resetcharacter_t5);
               }else{
                  echo msg('0',text_resetcharacter_t6);
               }
            }
         }
      }
   }
   echo '</div>';
}

echo '<div style="margin-top: 20px;">
<fieldset><legend>'.text_resetcharacter_t7.'</legend>
<table border="0" cellspacing="4" cellpadding="0" width="100%" style="padding-left: 10px;">
<tr>
<td align="left"><b>'.text_resetcharacter_t12.':</b></td>
<td align="left" width="100%">'.$reset_level.'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t11.':</b></td>
<td align="left" width="100%">'.number_format($reset_zen).'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t10.':</b></td>
<td align="left" width="100%">'.number_format($reset_limit).'</td>
</tr>
</table>
</fieldset>
</div>

<div style="margin-top: 10px;">
<fieldset><legend>'.text_resetcharacter_t8.'</legend>
<table border="0" cellspacing="4" cellpadding="0"  style="padding-left: 10px; padding-right: 10px;">
<tr>
<td align="left" width="130" valign="top"><b>'.text_resetcharacter_t9.':</b></td>
<td align="left">';
switch ($reset_points_formula){
   case '0': echo number_format($reset_points);  break;
   case '1':
   
   $bonus_info_points = str_replace("{reset_points}",number_format($reset_points),text_resetcharacter_t_levelupbonusinfo);
   echo $bonus_info_points; break;
}

echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t13.':</b></td>
<td align="left">';
switch ($reset_clear_skills){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t14.':</b></td>
<td align="left">';
switch ($reset_clear_inv){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t15.':</b></td>
<td align="left">';
switch ($reset_stats){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
</table>
</fieldset>
</div>
';

$select_characters = $core_db->Execute("Select mu_id,name,clevel,class,resets,money,leveluppoint from character where accountid=? order by clevel desc ",array($user_auth_id));

echo '<table border="0" cellspacing="4" cellpadding="0" width="100%" style="margin-top: 10px; margin-bottom: 10px;">';
while (!$select_characters->EOF){
   if($select_characters->fields[2] < $reset_level && $select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t16)).'</span>';
      
   }elseif ($select_characters->fields[2] < $reset_level){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),text_resetcharacter_t17).'</span>';
   }elseif ($select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t18).'</span>';
   }elseif ($select_characters->fields[4] >= $reset_limit){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t19).'</span>';
   }else{
      
      $lacking_error = '<input type="button" value="'.button_reset_character.'" onclick="location.href=\''.$core_run_script.'&rid='.$select_characters->fields[0].'\'">';
   }
   
   echo '
  <tr>
    <td width="66" rowspan="2"><img src="template/'.$core['config']['template'].'/images/class/'.decode_class($select_characters->fields[3],'2').'" width="66" height="66" title="Class"></td>
    <td align="left" class="iR_name" width="100">'.htmlentities($select_characters->fields[1]).'</td>
    <td align="left" class="iR_stats">Level: '.$select_characters->fields[2].'</td>
    <td align="left" class="iR_stats">Zen: '.number_format($select_characters->fields[5]).'</td>
    <td align="left" class="iR_stats">Resets: '.$select_characters->fields[4].'</td>
  </tr>
  <tr>
    <td algin="left" class="iR_class">'.decode_class($select_characters->fields[3]).'</td>
    <td colspan="3" class="iR_func_status" align="left">'.$lacking_error.'</td>
  </tr>
  <tr>
    <td colspan="5" class="iRg_line_top">&nbsp;</td>
  </tr>
   
   
   
  ';
   
   $select_characters->MoveNext();
}

echo '</table>';
}

?>
$get_max_online = mssql_query('SELECT max_online, max_date FROM Custom_Max_Online');
$row_max_online = mssql_fetch_array($get_max_online);

echo $row_max_online[0]; // maximo de conectados
echo date('d/m/Y h:i:s A',strtotime($row_max_online[0])); // fecha de ultima actualizacion del record.

Sigue igual amigo, sigue dejandolos puntos de leveo y le suma los puntos de reset a los puntos de leveo. me refiero es que, borre los puntos de level o los puntos que están para repartir por subir de nivel y luego si le sume los puntos de reset
Tengo esa corazonada que ahora funcionara xD, si no funciona subí una captura de la tabla character. La verdad nunca use esos files no los conozco.

Offline Nexus #4 Posteado: January 25, 2017, 11:36:34 PM

Citar

<?
$load_reset_settings = simplexml_load_file('engine/config_mods/reset_character_settings.xml');
$active = trim($load_reset_settings->active);
if($active == '0'){
   echo msg('0',text_sorry_feature_disabled);
}else{
$reset_level = trim($load_reset_settings->level);
$reset_zen  = trim($load_reset_settings->zen);
$reset_points = trim($load_reset_settings->bpoints);
$reset_points_formula = trim($load_reset_settings->bpoints_formula);
$reset_clear_skills = trim($load_reset_settings->clear_skills);
$reset_clear_inv = trim($load_reset_settings->clear_inv);
$reset_stats = trim($load_reset_settings->reset_stats);
$reset_limit = trim($load_reset_settings->reset_limit);

if(isset($_GET['rid'])){
   echo '<div style="margin-top: 10px;">';
   $id = safe_input($_GET['rid'],'');
   if(empty($id) || !is_numeric($id)){
      header('Location: '.$core_run_script.'');
      exit();
   }else{
      if(character_and_account($id,$user_auth_id) === false){
         header('Location: '.$core_run_script.'');
         exit();
      }else {
         if(account_online($user_auth_id) === true){
            echo msg('0',text_resetcharacter_t1);      
         }else{
            $select_req = $core_db->Execute("select clevel,money,resets,leveluppoint from character where mu_id=? and accountid=?",array($id,$user_auth_id));
            if($select_req->fields[0] < $reset_level){
               echo msg('0',str_replace("{levels}",($reset_level - $select_req->fields[0]),text_resetcharacter_t2));
               $no_reset = 1;
            }
            if($select_req->fields[1] < $reset_zen){
               echo msg('0',str_replace("{zen}",number_format($reset_zen - $select_req->fields[1]),text_resetcharacter_t3));
               $no_reset = 1;
            }
            if($select_req->fields[2] >= $reset_limit){
               echo msg('0',str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t4));
               $no_reset = 1;
            }
            if($no_reset != '1'){
               $new_money = $select_req->fields[1] - $reset_zen;
               switch ($reset_points_formula){
                  case '0': $new_bpoints = ($select_req->fields[3]+$reset_points); break;
                  case '1': $new_bpoints = ($reset_points*($select_req->fields[2]+1)); break;
               }
               switch ($reset_stats){
                  case '1':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[LevelUpPoint]='0',[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25' where mu_id=?";
                     }
                  break;
                  case '0':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=?,[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]=?,[money]=? where mu_id=?";
                     }
                  break;
               }   
               $exc_reset_formula=$core_db->Execute($reset_formula,array($new_bpoints,$new_money,$id));
               if($exc_reset_formula){
                  echo msg('1',text_resetcharacter_t5);
               }else{
                  echo msg('0',text_resetcharacter_t6);
               }
            }
         }
      }
   }
   echo '</div>';
}

echo '<div style="margin-top: 20px;">
<fieldset><legend>'.text_resetcharacter_t7.'</legend>
<table border="0" cellspacing="4" cellpadding="0" width="100%" style="padding-left: 10px;">
<tr>
<td align="left"><b>'.text_resetcharacter_t12.':</b></td>
<td align="left" width="100%">'.$reset_level.'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t11.':</b></td>
<td align="left" width="100%">'.number_format($reset_zen).'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t10.':</b></td>
<td align="left" width="100%">'.number_format($reset_limit).'</td>
</tr>
</table>
</fieldset>
</div>

<div style="margin-top: 10px;">
<fieldset><legend>'.text_resetcharacter_t8.'</legend>
<table border="0" cellspacing="4" cellpadding="0"  style="padding-left: 10px; padding-right: 10px;">
<tr>
<td align="left" width="130" valign="top"><b>'.text_resetcharacter_t9.':</b></td>
<td align="left">';
switch ($reset_points_formula){
   case '0': echo number_format($reset_points);  break;
   case '1':
   
   $bonus_info_points = str_replace("{reset_points}",number_format($reset_points),text_resetcharacter_t_levelupbonusinfo);
   echo $bonus_info_points; break;
}

echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t13.':</b></td>
<td align="left">';
switch ($reset_clear_skills){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t14.':</b></td>
<td align="left">';
switch ($reset_clear_inv){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t15.':</b></td>
<td align="left">';
switch ($reset_stats){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
</table>
</fieldset>
</div>
';

$select_characters = $core_db->Execute("Select mu_id,name,clevel,class,resets,money,leveluppoint from character where accountid=? order by clevel desc ",array($user_auth_id));

echo '<table border="0" cellspacing="4" cellpadding="0" width="100%" style="margin-top: 10px; margin-bottom: 10px;">';
while (!$select_characters->EOF){
   if($select_characters->fields[2] < $reset_level && $select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t16)).'</span>';
      
   }elseif ($select_characters->fields[2] < $reset_level){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),text_resetcharacter_t17).'</span>';
   }elseif ($select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t18).'</span>';
   }elseif ($select_characters->fields[4] >= $reset_limit){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t19).'</span>';
   }else{
      
      $lacking_error = '<input type="button" value="'.button_reset_character.'" onclick="location.href=\''.$core_run_script.'&rid='.$select_characters->fields[0].'\'">';
   }
   
   echo '
  <tr>
    <td width="66" rowspan="2"><img src="template/'.$core['config']['template'].'/images/class/'.decode_class($select_characters->fields[3],'2').'" width="66" height="66" title="Class"></td>
    <td align="left" class="iR_name" width="100">'.htmlentities($select_characters->fields[1]).'</td>
    <td align="left" class="iR_stats">Level: '.$select_characters->fields[2].'</td>
    <td align="left" class="iR_stats">Zen: '.number_format($select_characters->fields[5]).'</td>
    <td align="left" class="iR_stats">Resets: '.$select_characters->fields[4].'</td>
  </tr>
  <tr>
    <td algin="left" class="iR_class">'.decode_class($select_characters->fields[3]).'</td>
    <td colspan="3" class="iR_func_status" align="left">'.$lacking_error.'</td>
  </tr>
  <tr>
    <td colspan="5" class="iRg_line_top">&nbsp;</td>
  </tr>
   
   
   
  ';
   
   $select_characters->MoveNext();
}

echo '</table>';
}

?>
$get_max_online = mssql_query('SELECT max_online, max_date FROM Custom_Max_Online');
$row_max_online = mssql_fetch_array($get_max_online);

echo $row_max_online[0]; // maximo de conectados
echo date('d/m/Y h:i:s A',strtotime($row_max_online[0])); // fecha de ultima actualizacion del record.

Sigue igual amigo, sigue dejandolos puntos de leveo y le suma los puntos de reset a los puntos de leveo. me refiero es que, borre los puntos de level o los puntos que están para repartir por subir de nivel y luego si le sume los puntos de reset
Tengo esa corazonada que ahora funcionara xD, si no funciona subí una captura de la tabla character. La verdad nunca use esos files no los conozco.

Nop, sigue dejando  los puntos que no se reparten + sumando los puntos de reset, dejo la captura de la tabla



a propósito muchas gracias por ayudarme

Online mechaloco #5 Posteado: January 25, 2017, 11:43:01 PM

Citar

<?
$load_reset_settings = simplexml_load_file('engine/config_mods/reset_character_settings.xml');
$active = trim($load_reset_settings->active);
if($active == '0'){
   echo msg('0',text_sorry_feature_disabled);
}else{
$reset_level = trim($load_reset_settings->level);
$reset_zen  = trim($load_reset_settings->zen);
$reset_points = trim($load_reset_settings->bpoints);
$reset_points_formula = trim($load_reset_settings->bpoints_formula);
$reset_clear_skills = trim($load_reset_settings->clear_skills);
$reset_clear_inv = trim($load_reset_settings->clear_inv);
$reset_stats = trim($load_reset_settings->reset_stats);
$reset_limit = trim($load_reset_settings->reset_limit);

if(isset($_GET['rid'])){
   echo '<div style="margin-top: 10px;">';
   $id = safe_input($_GET['rid'],'');
   if(empty($id) || !is_numeric($id)){
      header('Location: '.$core_run_script.'');
      exit();
   }else{
      if(character_and_account($id,$user_auth_id) === false){
         header('Location: '.$core_run_script.'');
         exit();
      }else {
         if(account_online($user_auth_id) === true){
            echo msg('0',text_resetcharacter_t1);      
         }else{
            $select_req = $core_db->Execute("select clevel,money,resets,leveluppoint from character where mu_id=? and accountid=?",array($id,$user_auth_id));
            if($select_req->fields[0] < $reset_level){
               echo msg('0',str_replace("{levels}",($reset_level - $select_req->fields[0]),text_resetcharacter_t2));
               $no_reset = 1;
            }
            if($select_req->fields[1] < $reset_zen){
               echo msg('0',str_replace("{zen}",number_format($reset_zen - $select_req->fields[1]),text_resetcharacter_t3));
               $no_reset = 1;
            }
            if($select_req->fields[2] >= $reset_limit){
               echo msg('0',str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t4));
               $no_reset = 1;
            }
            if($no_reset != '1'){
               $new_money = $select_req->fields[1] - $reset_zen;
               switch ($reset_points_formula){
                  case '0': $new_bpoints = ($select_req->fields[3]+$reset_points); break;
                  case '1': $new_bpoints = ($reset_points*($select_req->fields[2]+1)); break;
               }
               switch ($reset_stats){
                  case '1':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[LevelUpPoint]='0',[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0,[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25' where mu_id=?";
                     }
                  break;
                  case '0':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0,[money]=?,[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0,[money]=?,[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0,[money]=?,[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0,[money]=? where mu_id=?";
                     }
                  break;
               }   
               $exc_reset_formula=$core_db->Execute($reset_formula,array($new_bpoints,$new_money,$id));
               if($exc_reset_formula){
                  echo msg('1',text_resetcharacter_t5);
               }else{
                  echo msg('0',text_resetcharacter_t6);
               }
            }
         }
      }
   }
   echo '</div>';
}

echo '<div style="margin-top: 20px;">
<fieldset><legend>'.text_resetcharacter_t7.'</legend>
<table border="0" cellspacing="4" cellpadding="0" width="100%" style="padding-left: 10px;">
<tr>
<td align="left"><b>'.text_resetcharacter_t12.':</b></td>
<td align="left" width="100%">'.$reset_level.'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t11.':</b></td>
<td align="left" width="100%">'.number_format($reset_zen).'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t10.':</b></td>
<td align="left" width="100%">'.number_format($reset_limit).'</td>
</tr>
</table>
</fieldset>
</div>

<div style="margin-top: 10px;">
<fieldset><legend>'.text_resetcharacter_t8.'</legend>
<table border="0" cellspacing="4" cellpadding="0"  style="padding-left: 10px; padding-right: 10px;">
<tr>
<td align="left" width="130" valign="top"><b>'.text_resetcharacter_t9.':</b></td>
<td align="left">';
switch ($reset_points_formula){
   case '0': echo number_format($reset_points);  break;
   case '1':
   
   $bonus_info_points = str_replace("{reset_points}",number_format($reset_points),text_resetcharacter_t_levelupbonusinfo);
   echo $bonus_info_points; break;
}

echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t13.':</b></td>
<td align="left">';
switch ($reset_clear_skills){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t14.':</b></td>
<td align="left">';
switch ($reset_clear_inv){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t15.':</b></td>
<td align="left">';
switch ($reset_stats){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
</table>
</fieldset>
</div>
';

$select_characters = $core_db->Execute("Select mu_id,name,clevel,class,resets,money,leveluppoint from character where accountid=? order by clevel desc ",array($user_auth_id));

echo '<table border="0" cellspacing="4" cellpadding="0" width="100%" style="margin-top: 10px; margin-bottom: 10px;">';
while (!$select_characters->EOF){
   if($select_characters->fields[2] < $reset_level && $select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t16)).'</span>';
      
   }elseif ($select_characters->fields[2] < $reset_level){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),text_resetcharacter_t17).'</span>';
   }elseif ($select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t18).'</span>';
   }elseif ($select_characters->fields[4] >= $reset_limit){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t19).'</span>';
   }else{
      
      $lacking_error = '<input type="button" value="'.button_reset_character.'" onclick="location.href=\''.$core_run_script.'&rid='.$select_characters->fields[0].'\'">';
   }
   
   echo '
  <tr>
    <td width="66" rowspan="2"><img src="template/'.$core['config']['template'].'/images/class/'.decode_class($select_characters->fields[3],'2').'" width="66" height="66" title="Class"></td>
    <td align="left" class="iR_name" width="100">'.htmlentities($select_characters->fields[1]).'</td>
    <td align="left" class="iR_stats">Level: '.$select_characters->fields[2].'</td>
    <td align="left" class="iR_stats">Zen: '.number_format($select_characters->fields[5]).'</td>
    <td align="left" class="iR_stats">Resets: '.$select_characters->fields[4].'</td>
  </tr>
  <tr>
    <td algin="left" class="iR_class">'.decode_class($select_characters->fields[3]).'</td>
    <td colspan="3" class="iR_func_status" align="left">'.$lacking_error.'</td>
  </tr>
  <tr>
    <td colspan="5" class="iRg_line_top">&nbsp;</td>
  </tr>
   
   
   
  ';
   
   $select_characters->MoveNext();
}

echo '</table>';
}

?>
$get_max_online = mssql_query('SELECT max_online, max_date FROM Custom_Max_Online');
$row_max_online = mssql_fetch_array($get_max_online);

echo $row_max_online[0]; // maximo de conectados
echo date('d/m/Y h:i:s A',strtotime($row_max_online[0])); // fecha de ultima actualizacion del record.

Sigue igual amigo, sigue dejandolos puntos de leveo y le suma los puntos de reset a los puntos de leveo. me refiero es que, borre los puntos de level o los puntos que están para repartir por subir de nivel y luego si le sume los puntos de reset
Tengo esa corazonada que ahora funcionara xD, si no funciona subí una captura de la tabla character. La verdad nunca use esos files no los conozco.

Nop, sigue dejando  los puntos que no se reparten + sumando los puntos de reset, dejo la captura de la tabla



a propósito muchas gracias por ayudarme
ahora tiene que funcionar... si es mi como io pienso xD

Offline Nexus #6 Posteado: January 25, 2017, 11:51:54 PM | Modificado: January 26, 2017, 12:53:18 AM by ZabiinoOo


ahora tiene que funcionar... si es mi como io pienso xD

No amigo ahora me lanza este error


Online mechaloco #7 Posteado: January 25, 2017, 11:59:37 PM | Modificado: January 26, 2017, 12:55:20 AM by ZabiinoOo


ahora tiene que funcionar... si es mi como io pienso xD

No amigo ahora me lanza este error


Spoiler for Hiden:
<?
$load_reset_settings = simplexml_load_file('engine/config_mods/reset_character_settings.xml');
$active = trim($load_reset_settings->active);
if($active == '0'){
   echo msg('0',text_sorry_feature_disabled);
}else{
$reset_level = trim($load_reset_settings->level);
$reset_zen  = trim($load_reset_settings->zen);
$reset_points = trim($load_reset_settings->bpoints);
$reset_points_formula = trim($load_reset_settings->bpoints_formula);
$reset_clear_skills = trim($load_reset_settings->clear_skills);
$reset_clear_inv = trim($load_reset_settings->clear_inv);
$reset_stats = trim($load_reset_settings->reset_stats);
$reset_limit = trim($load_reset_settings->reset_limit);

if(isset($_GET['rid'])){
   echo '<div style="margin-top: 10px;">';
   $id = safe_input($_GET['rid'],'');
   if(empty($id) || !is_numeric($id)){
      header('Location: '.$core_run_script.'');
      exit();
   }else{
      if(character_and_account($id,$user_auth_id) === false){
         header('Location: '.$core_run_script.'');
         exit();
      }else {
         if(account_online($user_auth_id) === true){
            echo msg('0',text_resetcharacter_t1);      
         }else{
            $select_req = $core_db->Execute("select clevel,money,resets,leveluppoint from character where mu_id=? and accountid=?",array($id,$user_auth_id));
            if($select_req->fields[0] < $reset_level){
               echo msg('0',str_replace("{levels}",($reset_level - $select_req->fields[0]),text_resetcharacter_t2));
               $no_reset = 1;
            }
            if($select_req->fields[1] < $reset_zen){
               echo msg('0',str_replace("{zen}",number_format($reset_zen - $select_req->fields[1]),text_resetcharacter_t3));
               $no_reset = 1;
            }
            if($select_req->fields[2] >= $reset_limit){
               echo msg('0',str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t4));
               $no_reset = 1;
            }
            if($no_reset != '1'){
               $new_money = $select_req->fields[1] - $reset_zen;
               switch ($reset_points_formula){
                  case '0': $new_bpoints = ($select_req->fields[3]+$reset_points); break;
                  case '1': $new_bpoints = ($reset_points*($select_req->fields[2]+1)); break;
               }
               switch ($reset_stats){
                  case '1':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0',[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0',[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0',[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0',[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25' where mu_id=?";
                     }
                  break;
                  case '0':
                     if($reset_clear_inv == '1' and $reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0',[money]=?,[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0',[money]=?,[inventory]=CONVERT(varbinary(1080), null) where mu_id=?";
                     }elseif ($reset_clear_skills == '1'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0',[money]=?,[magiclist]=CONVERT(varbinary(180), null) where mu_id=?";
                     }elseif ($reset_clear_inv == '0' and $reset_clear_skills == '0'){
                        $reset_formula = "Update character set [resets]=(resets+1),[clevel]='1',[experience]='0',[leveluppoint]='0',[money]=? where mu_id=?";
                     }
                  break;
               }   
               $exc_reset_formula=$core_db->Execute($reset_formula,array($new_bpoints,$new_money,$id));
               if($exc_reset_formula){
                  echo msg('1',text_resetcharacter_t5);
               }else{
                  echo msg('0',text_resetcharacter_t6);
               }
            }
         }
      }
   }
   echo '</div>';
}

echo '<div style="margin-top: 20px;">
<fieldset><legend>'.text_resetcharacter_t7.'</legend>
<table border="0" cellspacing="4" cellpadding="0" width="100%" style="padding-left: 10px;">
<tr>
<td align="left"><b>'.text_resetcharacter_t12.':</b></td>
<td align="left" width="100%">'.$reset_level.'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t11.':</b></td>
<td align="left" width="100%">'.number_format($reset_zen).'</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t10.':</b></td>
<td align="left" width="100%">'.number_format($reset_limit).'</td>
</tr>
</table>
</fieldset>
</div>

<div style="margin-top: 10px;">
<fieldset><legend>'.text_resetcharacter_t8.'</legend>
<table border="0" cellspacing="4" cellpadding="0"  style="padding-left: 10px; padding-right: 10px;">
<tr>
<td align="left" width="130" valign="top"><b>'.text_resetcharacter_t9.':</b></td>
<td align="left">';
switch ($reset_points_formula){
   case '0': echo number_format($reset_points);  break;
   case '1':
   
   $bonus_info_points = str_replace("{reset_points}",number_format($reset_points),text_resetcharacter_t_levelupbonusinfo);
   echo $bonus_info_points; break;
}

echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t13.':</b></td>
<td align="left">';
switch ($reset_clear_skills){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t14.':</b></td>
<td align="left">';
switch ($reset_clear_inv){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
<tr>
<td align="left"><b>'.text_resetcharacter_t15.':</b></td>
<td align="left">';
switch ($reset_stats){
   case '0': echo 'No'; break;
   case '1': echo 'Yes'; break;
}
echo '</td>
</tr>
</table>
</fieldset>
</div>
';

$select_characters = $core_db->Execute("Select mu_id,name,clevel,class,resets,money,leveluppoint from character where accountid=? order by clevel desc ",array($user_auth_id));

echo '<table border="0" cellspacing="4" cellpadding="0" width="100%" style="margin-top: 10px; margin-bottom: 10px;">';
while (!$select_characters->EOF){
   if($select_characters->fields[2] < $reset_level && $select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t16)).'</span>';
      
   }elseif ($select_characters->fields[2] < $reset_level){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{levels}",($reset_level - $select_characters->fields[2]),text_resetcharacter_t17).'</span>';
   }elseif ($select_characters->fields[5] < $reset_zen){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{zen}",number_format($reset_zen - $select_characters->fields[5]),text_resetcharacter_t18).'</span>';
   }elseif ($select_characters->fields[4] >= $reset_limit){
      $lacking_error = '<span class="iR_func_status_lacking">'.str_replace("{resets_limit}",number_format($reset_limit),text_resetcharacter_t19).'</span>';
   }else{
      
      $lacking_error = '<input type="button" value="'.button_reset_character.'" onclick="location.href=\''.$core_run_script.'&rid='.$select_characters->fields[0].'\'">';
   }
   
   echo '
  <tr>
    <td width="66" rowspan="2"><img src="template/'.$core['config']['template'].'/images/class/'.decode_class($select_characters->fields[3],'2').'" width="66" height="66" title="Class"></td>
    <td align="left" class="iR_name" width="100">'.htmlentities($select_characters->fields[1]).'</td>
    <td align="left" class="iR_stats">Level: '.$select_characters->fields[2].'</td>
    <td align="left" class="iR_stats">Zen: '.number_format($select_characters->fields[5]).'</td>
    <td align="left" class="iR_stats">Resets: '.$select_characters->fields[4].'</td>
  </tr>
  <tr>
    <td algin="left" class="iR_class">'.decode_class($select_characters->fields[3]).'</td>
    <td colspan="3" class="iR_func_status" align="left">'.$lacking_error.'</td>
  </tr>
  <tr>
    <td colspan="5" class="iRg_line_top">&nbsp;</td>
  </tr>
   
   
   
  ';
   
   $select_characters->MoveNext();
}

echo '</table>';
}

?>
$get_max_online = mssql_query('SELECT max_online, max_date FROM Custom_Max_Online');
$row_max_online = mssql_fetch_array($get_max_online);

echo $row_max_online[0]; // maximo de conectados
echo date('d/m/Y h:i:s A',strtotime($row_max_online[0])); // fecha de ultima actualizacion del record.

si no funciona, estoy mal. Se que el reset se hace por una query, en este caso seria.

Code: [Select]
Update character set [resets]=(resets+1),[clevel]='1',[experience]='0'[color=red],[leveluppoint]='0'[/color],[money]=?,[strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[inventory]=CONVERT(varbinary(1080), null),[magiclist]=CONVERT(varbinary(180), null) where mu_id=?"

y la original viene con los leveluppoint sin definir, osea que no los borra. Entonces hay que suplantar el "=?" por "='0'".

Gracias:


Offline Nexus #8 Posteado: January 26, 2017, 12:10:12 AM

ya lo pude solucionar mi amigo, era en cofig mods, quedo de la siguiente manera por si alguien tiene el mismo problema

<?xml version="1.0" encoding="iso-8859-1"?>

<reset_settings>
<active>1</active>
<level>400</level>
<zen>10000000</zen>
<bpoints>300</bpoints>
<bpoints_formula>1</bpoints_formula>
<clear_skills>0</clear_skills>
<clear_inv>0</clear_inv>
<reset_stats>1</reset_stats>
<reset_limit>999</reset_limit>
</reset_settings>

muchas gracias por tu tiempo y ayuda !!

Gracias:


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
890 Views
Last post January 11, 2018, 03:59:09 PM
by ZTMarkz
10 Replies
2180 Views
Last post May 02, 2020, 01:02:16 AM
by therion250
7 Replies
769 Views
Last post July 24, 2018, 04:42:14 PM
by Cartman
0 Replies
129 Views
Last post January 08, 2020, 12:22:16 PM
by Ractor
0 Replies
135 Views
Last post May 13, 2020, 12:26:38 AM
by monitor1