Rebirth System.

Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Pee Aitch Pee Dave is offline
    MemberRank
    Mar 2011 Join Date
    The NetherlandsLocation
    722Posts

    Re: Rebirth System

    You might want to change the query to:
    PHP Code:
    UPDATE Account SET Coins Coins ".$value." 
    Else if someone already has got some coins it will be set to 100, no matter what.

  2. #17
    Member sart123 is offline
    MemberRank
    Jun 2009 Join Date
    The NetherlandsLocation
    68Posts

    Re: Rebirth System

    Quote Originally Posted by Vusion View Post
    Updated the attachment, I had something wrong with it.

    As for the BlueB thing, here it is:

    templates/template_character.php
    PHP Code:
                <?php
                
    if(!$_SESSION['userid'])
                {
                  die();
                }
                
                
    $value 100;
                
                if(isset(
    $_POST['rebirth']))
                {
                    
    $q mssql_query("SELECT * FROM Character WHERE Name = '".clean($_POST['lul'])."'");
                    if(
    mssql_result($q0'Level') != 99)
                    {
                        
    alert"Character selected is not level 99." );
                        
    //return false;
                    
    }
                    else
                    {
                        
    $q mssql_query("UPDATE Character SET Level = 1, XP = 0 WHERE Name = '".clean($_POST['lul'])."'");
                        
    $q2 mssql_query("UPDATE Account SET Coins = ".$value."");
                        
                        
    alert"The character ".$_POST['lul']." successfully rebirthed." );
                        
    //return true;
                    
    }
                }
                
    ?>
                <div id="content5">
                    <h1><?php echo $gunzname?> - Character(s)</h1>
                    <p><br />
                        <table border="0" class="charhome">
                            <tr><td class="titlestrong" width="80px">Name</td><td class="titlestrong" width="50px">Level</td><td class="titlestrong" width="80px">EXP</td><td class="titlestrong" width="80px">Kill Count</td><td class="titlestrong" width="90px">Death count</td></tr>
                            <?php $sqlf->getchars($_SESSION['userid']); ?>
                        </table>
                        <p><strong>Change Gender:</strong>
                            <form action="" method="post" class="cgender">
                                <table border="0">
                                    <tr><td>Name:</td> <td><select name="char"><?php $sqlf->getcharscid($_SESSION['userid']); ?></select></td></tr>
                                    <tr><td>To:</td>   <td><select name="gender"><option value="male">Male</option><option value="female">Female</option></select></td></tr>
                                    <tr><td></td>      <td><input type="submit" name="changegender" value="Change" /></td></tr>
                                </table>
                            </form> </p>


                    </p>
                <?php
                
    if($_SESSION['userid'] != "")
                {
                    
    $aid_q mssql_query("SELECT * FROM Account WHERE UserID = '".$_SESSION['userid']."'");
                    
    $aid mssql_result($aid_q0'AID');
                    
                    
    $q mssql_query("SELECT * FROM Character WHERE AID = '".$aid."'");

                    echo 
    "<p><strong>Rebirth a Character:</strong><form method='post' action=''>";
                    echo  
    "<table border='0'><tr><td>Character:</td><td><select name='lul'>";

                    while(
    $fetch mssql_fetch_array($q))
                    {
                        echo 
    "<option value=".$fetch['Name'].">".$fetch['Name']." Lv.".$fetch['Level']."</option>";
                    }

                    echo 
    "</select></td></tr>";
                    echo 
    "<tr><td></td><td><input type='submit' name='rebirth' value='Rebirth' /></td></tr></table>";
                    echo 
    "</form></p>";
                }
                
    ?>
                </div>
    Quote Originally Posted by SuperWaffle View Post
    You might want to change the query to:
    PHP Code:
    UPDATE Account SET Coins Coins ".$value." 
    Else if someone already has got some coins it will be set to 100, no matter what.
    Thanks allot guys!!

  3. #18
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    Re: Rebirth System

    done this ages ago with lloyd but okay
    nice work..

  4. #19
    Hi, I'm Omar! Vusion is offline
    MemberRank
    Jan 2011 Join Date
    HereLocation
    1,658Posts

    Re: Rebirth System

    Quote Originally Posted by SuperWaffle View Post
    You might want to change the query to:
    PHP Code:
    UPDATE Account SET Coins Coins ".$value." 
    Else if someone already has got some coins it will be set to 100, no matter what.
    Oh yeah, I was in a rush uh :/. Well, the whole code is shit anyway xD..

    Quote Originally Posted by jur13n View Post
    done this ages ago with lloyd but okay
    nice work..
    It literally took me 10 minutes, it's no big deal.

    So, yeah, updated the attachment again.
    Last edited by Vusion; 16-08-12 at 02:20 AM.

  5. #20
    Novice RlyfPHP is offline
    MemberRank
    Jan 2012 Join Date
    2Posts

    Re: Rebirth System.

    good job.



Page 2 of 2 FirstFirst 12

Advertisement