Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Modulo reset master skil  (Visto 938 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline gianoaa Posteado: November 02, 2017, 08:32:40 PM | Modificado: November 03, 2017, 03:14:29 AM by gianoaa

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 60
  • Gracias recibida: 51
  • pe
Hola alquien me puede ayudar  a modificar el modulo master skill reset para que al momento de usarlo me 2 puntos por cada nivel ya que todos los modulos me restauran solo 1 punto por nivel.
Code: [Select]
$config = simplexml_load_file('engine/config_mods/clear_skill_tree_settings.xml');
$active = trim($config->active);
if($active == '0'){
echo msg('0',text_sorry_feature_disabled);
}else{
if(isset($_GET['sid'])){
echo '<div style="margin-top: 10px;">';
$id = safe_input($_GET['sid'],'');
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_clearskills_t1);
}else{
$clear = $core_db->Execute("Update Character set [SCFMasterLevel]='1',[MagicList]=CONVERT(varbinary(180), null) where mu_id=?",array($id));

$char_name_sql = mssql_query('SELECT Name from Character where mu_id = \''.$id.'\'');
$char_name = mssql_fetch_assoc($char_name_sql);
$clear2 = mssql_query('Update T_SkillTree_Info set [ML_POINT]=[MASTER_LEVEL] where CHAR_NAME = \''.$char_name['Name'].'\'');

if($clear and $clear2){
echo msg('1',text_clearskills_t7);
}else{
echo msg('0',text_clearskills_t3);
}
}
}
}
}
echo '<div style="margin-top: 20px;">
<fieldset><legend>'.text_clearskills_t9.'</legend>
<table width="100%" border="0" cellpadding="0" cellspacing="4"  style="padding-left: 10px; padding-right: 10px;" class="iR_stats">
<tr>
<td align="left">'.text_clearskills_t8.'
</td>
</tr>
</table>
</fieldset>
</div>';
$characters = $core_db->Execute("Select mu_id,Name,Class 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 (!$characters->EOF){
echo '  <tr>
    <td width="66" rowspan="2"><img src="template/'.$core['config']['template'].'/images/class/'.decode_class($characters->fields[2],'2').'" width="66" height="66" title="Class"></td>
     <td align="left" class="iR_name" width="100">'.htmlentities($characters->fields[1]).'</td>
    <td rowspan="2" class="iR_func_status" align="left"><input type="button" value="'.button_clear_skill_tree.'" onclick="ask_url(\''.text_clearskills_t10.'\',\''.$core_run_script.'&sid='.$characters->fields[0].'\');"></td>
  </tr>
  <tr>
    <td algin="left" class="iR_class">'.decode_class($characters->fields[2]).'</td>
  </tr>
      <tr>
    <td colspan="3" class="iRg_line_top">&nbsp;</td>
  </tr>
  ';

$characters->MoveNext();
}
echo '</table>';


}


Offline dulex #1 Posteado: November 02, 2017, 11:20:06 PM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 62
  • Gracias recibida: 18
  • mx
En esta linea
Code: [Select]
$clear = $core_db->Execute("Update Character set [SCFMasterLevel]='1',[MagicList]=CONVERT(varbinary(180), null) where mu_id=?",array($id));// [SCFMasterLevel]='[color=red]1[/color]' aquĆ­ pones la cantidad que quieras. 


Offline gianoaa #2 Posteado: November 03, 2017, 03:12:11 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 60
  • Gracias recibida: 51
  • pe
Ya lo solucione, debi solo aumentarle despues de  [ML_POINT]=[MASTER_LEVEL] * 2
Code: [Select]
 $clear2 = mssql_query('Update T_SkillTree_Info set [ML_POINT]=[MASTER_LEVEL] * 2 where CHAR_NAME = \''.$char_name['Name'].'\''); 


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
6 Replies
2367 Views
Last post June 27, 2019, 10:14:09 PM
by JavixFer
0 Replies
786 Views
Last post March 18, 2018, 05:24:03 PM
by kaizer94
1 Replies
1809 Views
Last post September 30, 2018, 07:32:17 AM
by Marote
0 Replies
665 Views
Last post October 20, 2018, 01:22:17 AM
by tinchostaf
3 Replies
858 Views
Last post October 06, 2021, 09:12:42 PM
by javiertyu