Reset Master skill zteam s8

Results 1 to 12 of 12
  1. #1
    Enthusiast banlawan is offline
    MemberRank
    Jan 2013 Join Date
    45Posts

    Reset Master skill zteam s8

    Hello!

    this code will not add ML_POINT. what is wrong with this? anyone can help. thanks in advance.

    PHP Code:
    <?php
    $config 
    simplexml_load_file"engine/config_mods/clear_skills_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_resetstats_t1 );
            }
            else
            {                        
    $update_stats $core_db->Execute("Update Character set [MagicList]=CONVERT(varbinary(450), null) where mu_id=?", array( $id) );

                            
    $check_for_memb_id $core_db2->Execute("Select Name from Character where AccountID=?",array($user_auth_id));
    if(
    $check_for_memb_id->EOF){
    $set_credits $core_db2->Execute("insert into T_MasterLevelSystem (CHAR_NAME,ML_POINT)VALUES(?,?)",array($user_auth_id));
                        }else{
    $set_credits $core_db2->Execute("Update T_MasterLevelSystem set ML_POINT=ML_POINT+1000 where CHAR_NAME=?",array($user_auth_id));
                        }
                                         
        if(
    $update_stats && $set_credits)
                    {
                        echo 
    msg"1"'Master Skill successfully reseted.');
                    }
                    else
                    {
                        echo 
    msg"0"'Unable to reset master skill, reason: system error, please contact administrator.');
                    }
                    
                
                
            }
        }

    ?>


  2. #2
    Account Upgraded | Title Enabled! Maddox is offline
    MemberRank
    Feb 2014 Join Date
    937Posts

    Re: Reset Master skill zteam s8

    Quote Originally Posted by banlawan View Post
    Hello!

    this code will not add ML_POINT. what is wrong with this? anyone can help. thanks in advance.

    PHP Code:
    <?php
    $config 
    simplexml_load_file"engine/config_mods/clear_skills_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_resetstats_t1 );
            }
            else
            {                        
    $update_stats $core_db->Execute("Update Character set [MagicList]=CONVERT(varbinary(450), null) where mu_id=?", array( $id) );

                            
    $check_for_memb_id $core_db2->Execute("Select Name from Character where AccountID=?",array($user_auth_id));
    if(
    $check_for_memb_id->EOF){
    $set_credits $core_db2->Execute("insert into T_MasterLevelSystem (CHAR_NAME,ML_POINT)VALUES(?,?)",array($user_auth_id));
                        }else{
    $set_credits $core_db2->Execute("Update T_MasterLevelSystem set ML_POINT=ML_POINT+1000 where CHAR_NAME=?",array($user_auth_id));
                        }
                                         
        if(
    $update_stats && $set_credits)
                    {
                        echo 
    msg"1"'Master Skill successfully reseted.');
                    }
                    else
                    {
                        echo 
    msg"0"'Unable to reset master skill, reason: system error, please contact administrator.');
                    }
                    
                
                
            }
        }

    ?>
    it doesnt clear all ML Skills of Character :)

  3. #3
    Enthusiast banlawan is offline
    MemberRank
    Jan 2013 Join Date
    45Posts

    Re: Reset Master skill zteam s8

    @Maddox ML skill is fully clear. my point is the ML_Point at T_MasterLevelSystem table will not add points.

  4. #4
    Alpha Member 2009x2014 is offline
    MemberRank
    Dec 2009 Join Date
    2,765Posts

    Re: Reset Master skill zteam s8

    PHP Code:
    where CHAR_NAME=?",array($user_auth_id)); 
    You are trying add Master Level to Account Name not Character Name.

    PHP Code:
    insert into T_MasterLevelSystem (CHAR_NAME,ML_POINT)VALUES(?,?)",array($user_auth_id)); 
    You are trying to insert data into masterlevel table, expecting 2 values (only 1 given and again, it's wrong (account name))

    PHP Code:
    $check_for_memb_id $core_db2->Execute("Select Name from Character where AccountID=?",array($user_auth_id)); 
    You are checking if character exist? then wtf you requested? reset from no-where?

    Use some logic like you can see on example

    PHP Code:
    // Clear Skills (null won't be fine for every server files, so in case of problems use str-repeat or full code)
    $clear_skills $core_db->Execute("Update Character set [MagicList]=CONVERT(varbinary(450), null) where mu_id=?", array($id));
    // Retrieve Character Name for ML Data
    $character_name $core_db->Execute("Select Name from Character where mu_id = ?", array($id));
    $character $character_name->fields[0];
    // Check If ML Data exist
    $check_mldata $core_db->Execute("Select * from T_MasterLevelSystem where CHAR_NAME = ?",array($character));
    if(
    $check_mldata->EOF) {
    // Does not exist, so no need to update, let's set true
    $set_mldata true;
    } else {
    // Exist ? Let's restore ml points?
    $set_mldata $core_db->Execute("Update T_MasterLevelSystem set ML_POINT = MASTER_LEVEL where CHAR_NAME=?",array($character));
    }
        if(
    $clear_skills && $set_mldata

  5. #5
    Enthusiast banlawan is offline
    MemberRank
    Jan 2013 Join Date
    45Posts

    Re: Reset Master skill zteam s8

    @4FUNer very thankful man. you are the best.

  6. #6
    Account Upgraded | Title Enabled! Maddox is offline
    MemberRank
    Feb 2014 Join Date
    937Posts

    Re: Reset Master skill zteam s8

    Restore All SD in Master Skills not cleared :D

  7. #7
    Alpha Member 2009x2014 is offline
    MemberRank
    Dec 2009 Join Date
    2,765Posts

    Re: Reset Master skill zteam s8

    Quote Originally Posted by Maddox View Post
    Restore All SD in Master Skills not cleared :D
    Take code of clean character skills from sql (remove default one's) & update it with full code or using str_repeat

    Set MagicList = 0xCODE

    I've mentioned above
    Code:
    // Clear Skills (null won't be fine for every server files, so in case of problems use str-repeat or full code)
    Learn 2 read pls.


    zTeam s8 example
    PHP Code:
    Set MagicList 0xFF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 
    Last edited by 2009x2014; 10-11-14 at 04:27 AM.

  8. #8
    Account Upgraded | Title Enabled! Maddox is offline
    MemberRank
    Feb 2014 Join Date
    937Posts

    Re: Reset Master skill zteam s8

    Quote Originally Posted by 4FUNer View Post
    Take code of clean character skills from sql (remove default one's) & update it with full code or using str_repeat

    Set MagicList = 0xCODE

    I've mentioned above
    Code:
    // Clear Skills (null won't be fine for every server files, so in case of problems use str-repeat or full code)
    Learn 2 read pls.


    zTeam s8 example
    PHP Code:
    Set MagicList 0xFF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000 
    i see thanks., can you add Level Requirements in this Clear Skills? thanks :)

    God Bless as always :)

  9. #9
    Alpha Member 2009x2014 is offline
    MemberRank
    Dec 2009 Join Date
    2,765Posts

    Re: Reset Master skill zteam s8

    Quote Originally Posted by Maddox View Post
    i see thanks., can you add Level Requirements in this Clear Skills? thanks :)

    God Bless as always :)
    Don't be lazy, add yourself :D

  10. #10
    Account Upgraded | Title Enabled! Maddox is offline
    MemberRank
    Feb 2014 Join Date
    937Posts

    Re: Reset Master skill zteam s8

    Quote Originally Posted by 4FUNer View Post
    Don't be lazy, add yourself :D
    ill already try but its not working, im not so good in php, and in terms of this i know someone who can, its you, you help lots of people here thats why im here to ask for your help... thanks God bless :)

  11. #11
    Account Upgraded | Title Enabled! Maddox is offline
    MemberRank
    Feb 2014 Join Date
    937Posts

    Re: Reset Master skill zteam s8

    wews i cant put level requirements, im always get error...........



    it detects that my char is low level but script still reset mg char skills :D

    4FUNer can you give me some clue ,please :)

    Thanks :)
    Last edited by Maddox; 11-11-14 at 08:34 AM.

  12. #12
    Alpha Member 2009x2014 is offline
    MemberRank
    Dec 2009 Join Date
    2,765Posts

    Re: Reset Master skill zteam s8

    Quote Originally Posted by Maddox View Post
    wews i cant put level requirements, im always get error...........



    it detects that my char is low level but script still reset mg char skills :D

    4FUNer can you give me some clue ,please :)

    Thanks :)
    Add check there

    PHP Code:
    if (account_online($user_auth_id) === true) {
      echo 
    msg('0'text_clearskills_t1);
    } elseif (
    YOUR LEVEL CHECK) { // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      
    echo msg('0''Unable to reset, reason: you do no have required level.');
    } else { 
    but of course retrieve level before like

    PHP Code:
    $level_check $core_db->Execute("Select cLevel from Character where mu_id = ? and AccountID = ?",array($id,$user_auth_id)); 
    and call it like
    PHP Code:
    } elseif ($level_check->fields[0] < 666) { 
    666 = LEVEL_REQUIRED

    Hope you understand.



Advertisement