Vsro Reset System + Add point for reset

Results 1 to 14 of 14
  1. #1
    Member irving1201 is offline
    MemberRank
    Jul 2012 Join Date
    85Posts

    thumbs up Vsro Reset System + Add point for reset

    It would be good to add to a server this system
    mostly because the players are most boring on servers

    PHP create such a website directly

    When you get the character to a level estimated to reset to level 1 again so adding points to int or str.

    I do not work very well with PHP codes if someone takes a good approach this systema and contribute it would be of very good help in this forum

    Remember that we are a community where every piece of us is worth a lot

    Sorry for my bad language use google translator
    Greetings.


  2. #2
    Enthusiast deja45vu is offline
    MemberRank
    May 2013 Join Date
    35Posts

    Re: Vsro Reset System + Add point for reset

    example:


    PHP Code:
    <?php

    /* Silkroad Re-born Script by Deja45Vu - deja45vu@gmail.com*/ 




    /*Connection to SQL*/ 


        
    $host     "...\SQLEXPRESS";
        
    $user     "sa";
        
    $pass     "12345";
        
    $Shard_DB     "SRO_VT_SHARD";
        
    $Account_DB     "SRO_VT_ACCOUNT";
        
        
    $shard odbc_connect("Driver={SQL Server};Server={".$host."}; Database={".$Shard_DB."}""".$user."""".$pass."");
        
    $account odbc_connect("Driver={SQL Server};Server={".$host."}; Database={".$Account_DB."}""".$user."""".$pass."");


    /* AntiSQL security */
    function anti_injection($sql){
       
    $sql             preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql);
       
    $sql             trim($sql);
       
    $sql             strip_tags($sql);
       
    $sql             addslashes($sql);
       
    $sql             stripslashes($sql);
       
    $sql                str_replace("'""''"$sql);


       return 
    $sql;
    }  


    /*Settings*/
    $level "110";   /* Req. Level to reset */
    $to "1";  /* Reset to ... Level */


    /*Reborn script */
    if(isset($_POST["submit"])){




            
    $charName    anti_injection($_POST["charName"]);
            
    $password    anti_injection($_POST["password"]);
            
    $mdpassword md5($password);
            
    $char odbc_exec($shard"select * from _Char where CharName16 = '$charName'");
            
    $info odbc_fetch_array($char);
            
    $charID $info['CharID'];
            
    $JID odbc_fetch_array(odbc_exec($shard"select * from _User where CharID = '$charID'"));
            
    $user $JID['UserJID'];
            
    $pwd odbc_fetch_array(odbc_exec($account"select * from TB_User where JID = '$user'"));
            
        if(
    $charName == "" || $password == ""){
        echo 
    "<div class='error'>Please fill all fields</div>";
        }else if(
    odbc_num_rows($char) == '0'){
        echo 
    "This Character does not exist";
        }else if(
    $info['CurLevel'] != $level){
        echo 
    "Character level is to low";
        }else if(
    $pwd['password'] != $mdpassword){
        echo 
    "Password is worng";
        }else{
        
        
    $update odbc_exec($shard"UPDATE dbo._Char SET CurLevel = '$to', MaxLevel = '$to' Where CharID = '$charID'");
        if(
    $update){
        echo 
    "Success";
        }else{
        echo 
    "error";
        }
                            
                            
                            }
    }


    ?>


      <form action="" method="post">  
      
               <table>
    <tr>
        <td>CharName</td>    <td><input type="text" name="charName" id="charName"  /> </td> 
    </tr>
    <tr>
        <td>Password</td>    <td><input type="password" name="password" id="password"  /> </td>     
    </tr>
    <tr>
        <td></td>    <td><input type="submit" name="submit" value="Reborn" /> </td>     
    </tr>




      </table>
        </form>
    Click LIKE :)
    Last edited by deja45vu; 15-10-13 at 06:01 PM.

  3. #3
    Member irving1201 is offline
    MemberRank
    Jul 2012 Join Date
    85Posts

    Re: Vsro Reset System + Add point for reset

    Thanks you

    OR reset logs for character you have ??
    For ranking reset

    How make recet max only 10 reset??
    Last edited by irving1201; 17-10-13 at 04:39 PM. Reason: edit text

  4. #4
    Enthusiast deja45vu is offline
    MemberRank
    May 2013 Join Date
    35Posts

    Re: Vsro Reset System + Add point for reset

    Add Column 'Reset' Type INT to _Char


    and php:

    PHP Code:
    <?php

    /* Silkroad Re-born Script by Deja45Vu - deja45vu@gmail.com*/ 








    /*Connection to SQL*/ 




        
    $host     "...\SQLEXPRESS";
        
    $user     "sa";
        
    $pass     "12345";
        
    $Shard_DB     "SRO_VT_SHARD";
        
    $Account_DB     "SRO_VT_ACCOUNT";
        
        
    $shard odbc_connect("Driver={SQL Server};Server={".$host."}; Database={".$Shard_DB."}""".$user."""".$pass."");
        
    $account odbc_connect("Driver={SQL Server};Server={".$host."}; Database={".$Account_DB."}""".$user."""".$pass."");




    /* AntiSQL security */
    function anti_injection($sql){
       
    $sql             preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql);
       
    $sql             trim($sql);
       
    $sql             strip_tags($sql);
       
    $sql             addslashes($sql);
       
    $sql             stripslashes($sql);
       
    $sql                str_replace("'""''"$sql);




       return 
    $sql;
    }  




    /*Settings*/
    $level "110";   /* Req. Level to reset */
    $to "1";  /* Reset to ... Level */
    $limit "10";  /* Reset limit */




    /*Reborn script */
    if(isset($_POST["submit"])){








            
    $charName    anti_injection($_POST["charName"]);
            
    $password    anti_injection($_POST["password"]);
            
    $mdpassword md5($password);
            
    $char odbc_exec($shard"select * from _Char where CharName16 = '$charName'");
            
    $info odbc_fetch_array($char);
            
    $charID $info['CharID'];
            
    $JID odbc_fetch_array(odbc_exec($shard"select * from _User where CharID = '$charID'"));
            
    $user $JID['UserJID'];
            
    $pwd odbc_fetch_array(odbc_exec($account"select * from TB_User where JID = '$user'"));
            
        if(
    $charName == "" || $password == ""){
        echo 
    "<div class='error'>Please fill all fields</div>";
        }else if(
    odbc_num_rows($char) == '0'){
        echo 
    "This Character does not exist";
        }else if(
    $info['CurLevel'] != $level){
        echo 
    "Character level is to low";
        }else if(
    $pwd['password'] != $mdpassword){
        echo 
    "Password is worng";
        }else if{
    $info['Reset'] == $limit){
        echo 
    "Max Resets is 10!";
        }else{
        
        
    $update odbc_exec($shard"UPDATE dbo._Char SET CurLevel = '$to', MaxLevel = '$to' Where CharID = '$charID'");
        if(
    $update){
        echo 
    "Success";
        }else{
        echo 
    "error";
        }
                            
                            
                            }
    }




    ?>




      <form action="" method="post">  
      
               <table>
    <tr>
        <td>CharName</td>    <td><input type="text" name="charName" id="charName"  /> </td> 
    </tr>
    <tr>
        <td>Password</td>    <td><input type="password" name="password" id="password"  /> </td>     
    </tr>
    <tr>
        <td></td>    <td><input type="submit" name="submit" value="Reborn" /> </td>     
    </tr>








      </table>

        </form>




    Should be Working, but i not tested :)

  5. #5
    Account Upgraded | Title Enabled! RevoLand is offline
    MemberRank
    Jan 2009 Join Date
    117Posts

    Re: Vsro Reset System + Add point for reset

    You can't add columns to tables randomly in vsro, even if you add a column to _PrivilegedIP gatewayserver will prevent you until you hex it.

  6. #6
    Enthusiast deja45vu is offline
    MemberRank
    May 2013 Join Date
    35Posts

    Re: Vsro Reset System + Add point for reset

    Code:
    Alter Table _Char 
    add Reset Int

    Add to _char no _PrivilegedIP, so should be good ;>

  7. #7
    Account Upgraded | Title Enabled! SupremeSRO is offline
    MemberRank
    Apr 2012 Join Date
    326Posts

    Re: Vsro Reset System + Add point for reset

    what privileged u got with the script u posted from sro reborn ? when u reach lv 100 max for example , reset to 1 again automat? .. and what u win o what u get.. extra points or smthng_

  8. #8
    Proficient Member Royalblade is offline
    MemberRank
    Jan 2013 Join Date
    167Posts

    Re: Vsro Reset System + Add point for reset

    Quote Originally Posted by deja45vu View Post
    example:


    PHP Code:
    <?php

    /* FAILED Silkroad Re-born Script by Deja45Vu - deja45vu@gmail.com*/


    /* AntiSQL security */
    function anti_injection($sql){
       
    $sql             preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql);
       
    $sql             trim($sql);
       
    $sql             strip_tags($sql);
       
    $sql             addslashes($sql);
       
    $sql             stripslashes($sql);
       
    $sql                str_replace("'""''"$sql);
       return 
    $sql;
    }
    Are you serious? Use this and you will get sql injected as fuck.

    Insane put the same thing into the devias website cuz he did it in like 90 seconds. That doesn't mean its perfect... Before you copy people be sure those ppl do it correct.

  9. #9
    Apprentice Phoenix 1337 is offline
    MemberRank
    Jul 2013 Join Date
    23Posts

    Re: Vsro Reset System + Add point for reset

    Or maybe do it like in-game item? would be better..

  10. #10
    Proficient Member pr0xy1337 is offline
    MemberRank
    Aug 2012 Join Date
    182Posts

    Re: Vsro Reset System + Add point for reset

    Why don't you make it SQL based ? You don't really need php to make it it could be fully automatic or as Phoenix 1337 said .. Item =)

    Ex. : Item that checks if you are Level MAX and EXP (for current level) MAX-1 (since the difference between curExp and maxExp is 1 at the end of the level) and if condition is true do >>>> blablabla

  11. #11
    Head Developer LogiN is offline
    MemberRank
    Mar 2012 Join Date
    SROTEAMLocation
    283Posts

    Re: Vsro Reset System + Add point for reset

    Lol!


    Mu?

  12. #12
    Enthusiast deja45vu is offline
    MemberRank
    May 2013 Join Date
    35Posts

    Re: Vsro Reset System + Add point for reset

    Quote Originally Posted by Royalblade View Post
    Are you serious? Use this and you will get sql injected as fuck.

    Insane put the same thing into the devias website cuz he did it in like 90 seconds. That doesn't mean its perfect... Before you copy people be sure those ppl do it correct.

    LOL, ?? this is simple anti injection available to everyone --> google.

    The rest of the script, is writed by me!

    this is only example. Want better?, write yourself ...
    Last edited by deja45vu; 23-10-13 at 06:37 PM.

  13. #13
    Apprentice Wynh is offline
    MemberRank
    Feb 2013 Join Date
    18Posts

    Re: Vsro Reset System + Add point for reset

    add point ??

  14. #14

    Re: Vsro Reset System + Add point for reset

    Was already implemented in SRCMS as far as I remember :).



Advertisement