Gold to points problem

Results 1 to 7 of 7
  1. #1
    Valued Member apocoly is offline
    MemberRank
    Aug 2011 Join Date
    120Posts

    Gold to points problem

    Guys help me how to fix this one, when i exchange my gold to points, its SUCCESSFUL show, but when i see the gold nothings changes and NO POINTS EARN.


    here is my SS
    Attached Thumbnails Attached Thumbnails gold1.jpg   gold2.jpg   gold3.jpg  


  2. #2
    Listed Ervs is offline
    MemberRank
    Jul 2011 Join Date
    /root/Location
    947Posts

    Re: Gold to points problem

    use search bro. dont be lazy to find ... i think your problem was already discussed just use search button and next button on every page... we have the same problem.

  3. #3
    Under The Sun Mr`Virus--- is offline
    MemberRank
    Oct 2009 Join Date
    Beside You!!Location
    444Posts

    Re: Gold to points problem

    Quote Originally Posted by apocoly View Post
    Guys help me how to fix this one, when i exchange my gold to points, its SUCCESSFUL show, but when i see the gold nothings changes and NO POINTS EARN.


    here is my SS
    Some Bug Fixed*

    *Exact Cost Decrease
    *Detecting no character
    *Detecting Enough Gold to Change to points no - gold.
    *Fresh Account Cannot be Change to points
    *Character Online Fixed
    *99.9% No bug:)

    Code:
     <?php 
    require("config.php"); 
    function getN ($int) { 
        if ($int == 0) { $char = "SG"; } 
        if ($int == 1) { $char = "MP"; } 
        if ($int == 2) { $char = "PHX"; } 
        if ($int == 4) { $char = "Trading Hole"; } 
    return $char; 
    } 
    echo" 
    <script type='text/javascript'> 
    
    function removeElement2(asd) 
    { 
    document.getElementById('bb').value=asd; 
    
    } 
    </script>"; 
    $error=1; 
    if($_POST['lostpassword']=='Buy') { 
         
        $error = 2; 
        $account_id = stripslashes($_SESSION['user']); 
        $Nation = stripslashes($_POST['nation']); 
        $name = stripslashes($_POST['name']); 
        $query = "SELECT store_inbox from RanUser.dbo.Web"; 
        $result = $db->Execute($query); 
        $row = $result->fetchrow(); 
        $Cost = $row[0]; 
    
    
        $result = mssql_query ("SELECT ChaMoney,ChaLevel,ChaReborn,ChaOnline FROM RanGame1.dbo.Chainfo Where ChaName = '$name'"); 
        $rows=mssql_num_rows($result); 
    
        if($rows>0) { 
            $rows=mssql_fetch_assoc($result);  
            extract($rows); 
            $reborn2 = ($ChaReborn); 
            $lev = ($ChaLevel); 
            $Gold = ($ChaMoney); 
            $type = ($ChaOnline); 
        if($Gold<$Cost*$Nation) { 
                echo "NOT ENOUGH GOLD TO CHANGE."; 
            $error = 1; 
            } 
    
        if($type>=1) { 
                echo "CHARACTER SELECTED IS ONLINE"; 
            $error = 1; 
                } 
        } else { 
                        echo "NO CHARACTER SELECTED."; 
            $error = 1;  
        } 
    } 
    if($error==1) { 
        $query = "SELECT store_inbox from RanUser.dbo.Web"; 
        $result = $db->Execute($query); 
        $row = $result->fetchrow(); 
    echo " 
    
    <table width=350 border=0 cellspacing=2 cellpadding=1> 
    
    "; 
    
      
    $login = stripslashes($_SESSION['user']); 
    $comanda1="SELECT UserNum from RanUser.dbo.UserInfo where Username = '$login' "; 
    $rezultat2=mssql_query($comanda1) or die("Can`t be executed"); 
    while($r2=mssql_fetch_array($rezultat2)){ 
    $Usernum = $r2["UserNum"]; 
    } 
                   
                    ; 
    
    echo "<br><br><center><div style='width:546px; margin:0 0 0 10px; padding:10px; border:1px solid #484848; background:#0099CC; color:white; text-align:center; line-height:18px'> 
        Welcome to you Gold to Points Exchange! You can exchange your gold to points here!</div> 
    <br><br> 
    <font color=black size=2><b><center>Exchange Rate $row[0] Gold per 1 Point</font><br><br> 
    <table width=480 border=0 cellspacing=0 cellpadding=0 bgcolor=white align=center> 
                        <tr height=19> 
                            <td align=center bgcolor=gray width=80 height=26 style='background: #0099CC; font: 11px verdana, sans-serif; color:#eee;'><font size=-1 color=#fbffff face=Helvetica, Geneva, Arial, SunSans-Regular, sans-serif><strong>ID</strong></font></td> 
                            <td align=left bgcolor=gray width=200 height=26 style='background: #0099CC; font: 11px verdana, sans-serif; color:#eee;'><font size=-1 color=#fbffff face=Helvetica, Geneva, Arial, SunSans-Regular, sans-serif><strong>Name</strong></font></td> 
                            <td align=center bgcolor=gray width=200 height=26 style='background: #0099CC; font: 11px verdana, sans-serif; color:#eee;'><font size=-1 color=#fbffff face=Helvetica, Geneva, Arial, SunSans-Regular, sans-serif><strong>Gold</strong></font></td> 
                            <td align=center bgcolor=gray width=200 height=26 style='background: #0099CC; font: 11px verdana, sans-serif; color:#eee;'><font size=-1 color=#fbffff face=Helvetica, Geneva, Arial, SunSans-Regular, sans-serif><strong>Level</strong></font></td> 
                             
                        </tr> 
    "; 
    
    
    $rezultat4=mssql_query("SELECT * from RanGame1.dbo.Chainfo where Usernum = '$Usernum' ") or die("Cant"); 
    
    while($r3=mssql_fetch_array($rezultat4)) 
    { 
    $b1 = $r3['ChaName']; 
    $b2 = $r3['ChaNum']; 
    $b3 = $r3['ChaReborn']; 
    $b4 = $r3['ChaMoney']; 
    $b5 = $r3['ChaLevel']; 
    
    
         
    
    
    
    
    echo"                     
                        <tr height=19> 
                            <td align=center width=80 height=19 style='border-bottom:#CCCCCC 1px dashed'><b><font color=black size=2>$b2</td> 
                            <td align=left width=200 height=19 style='border-bottom:#CCCCCC 1px dashed'><b><font color=black size=2>$b1</td> 
                            <td align=center width=200 height=19 style='border-bottom:#CCCCCC 1px dashed'><b><font color=black size=2>$b4</td> 
                            <td align=center width=200 height=19 style='border-bottom:#CCCCCC 1px dashed'><b><font color=black size=2>$b5</td> 
    
    </td> 
    </tr> 
    "; 
    } 
    echo "                    </table>"; 
    } 
    
    
    
    echo "<br><center><form name='lostpassword' action='' method='post' onsubmit='return checkform1()' autocomplete='off'> 
            <table CELLSPACING=0 BORDER=0 CELLPADDING=0 align=CENTER> 
                <tr> 
                    <td width=100 align=right> 
                    <font size=2 color=black><b>Character :&nbsp;&nbsp; 
                    </td> 
                    <td> 
                    <select name=name style='background: #0099CC; font: 11px verdana, sans-serif; color:#eee;'>"; 
                     
    
    
    
    $i=0; 
    $rezultat4=mssql_query("SELECT * from RanGame1.dbo.Chainfo where Usernum = '$Usernum' ") or die("Cant"); 
    
    while($r3=mssql_fetch_array($rezultat4)) 
    { 
    $r1 = $r3['ChaName']; 
    $r2 = $r3['ChaNum']; 
    $r2++; 
            echo" 
                <option value=$r1>$r1 
            "; 
         
    } 
    echo " 
                        </select>  
                    </td> 
                </tr> 
    
             
             
                <tr><td width=100 align=right><font size=2 color=black><b>Points : &nbsp;&nbsp;</td> 
                <td><select name=nation> 
                <option value=1 onclick='removeElement2(1*$row[0])'>1</option> 
                <option value=10 onclick='removeElement2(10*$row[0])'>10</option> 
                <option value=100 onclick='removeElement2(100*$row[0])'>100</option> 
                <option value=1000 onclick='removeElement2(1000*$row[0])'>1000(1k)</option> 
                <option value=10000 onclick='removeElement2(10000*$row[0])'>10000(10k)</option> 
                </select></td></tr> 
                <tr><td width=100 align=right><font size=2 color=black><b>Gold Cost : &nbsp;&nbsp;</td> 
                <td><input type=text name=bb id=bb value='' size=10 readonly></td></tr> 
                <tr align=center><td align=right><BR><input type=hidden name=lostpassword value='Buy'> 
                <input type=hidden name=Nation value='$r2'> 
                </td></tr><tr><td align=right><input type=submit name=Login value='   Exchange   '></td></tr> 
             
        </form> 
    
    
    "; 
    
    if($error==2) { 
        $query = "SELECT store_inbox from RanUser.dbo.Web"; 
        $result = $db->Execute($query); 
        $row = $result->fetchrow(); 
        $account_id = stripslashes($_SESSION['user']); 
        $Usernum = ($UserNum); 
        $Alz = ($Alz); 
        $Nation = stripslashes($_POST['nation']); 
        $name = stripslashes($_POST['name']); 
        $Cost = $row[0] * $Nation; 
         
        mssql_query ("UPDATE RanGame1.dbo.ChaInfo SET ChaMoney = ChaMoney - '$Cost' WHERE ChaName = '$name'"); 
        mssql_query ("UPDATE UserInfo SET UserPoint = UserPoint + '$Nation' WHERE UserName = '$account_id' "); 
    
        $result = mssql_query ("SELECT ChaMoney FROM RanGame1.dbo.ChaInfo Where ChaName = '$name'"); 
        $rows=mssql_num_rows($result); 
    
        if($rows>0) { 
            $rows=mssql_fetch_assoc($result);  
            extract($rows); 
             
            $Gold = ($ChaMoney); 
        } 
        echo "<center><br><font size=3 color=green>Exchange Succesfully</font><br><br><font size=2>Your Character <b>$name</b> have:</font> <font color=black size=2><b>$Gold</font></b><font size=2> Left</font><br><br><br>"; 
        delayedrefresh('user.php?op=user&option=reborn'); 
    } 
    ?>

  4. #4
    Valued Member apocoly is offline
    MemberRank
    Aug 2011 Join Date
    120Posts

    Re: Gold to points problem

    my problem now is, my gold amount shows that it decrease after exchanging gold to points, BUT STILL I DONT HAVE POINTS EARN.
    Attached Thumbnails Attached Thumbnails aa.jpg   bb.jpg  

  5. #5
    Account Upgraded | Title Enabled! dev02 is offline
    MemberRank
    Sep 2010 Join Date
    Ottawa OntarioLocation
    592Posts

    Re: Gold to points problem

    Hope this helps

    if($error==2) {
    $query = "SELECT store_inbox from RanUser.dbo.Web";
    $result = $db->Execute($query);
    $row = $result->fetchrow();
    $account_id = stripslashes($_SESSION['user']);
    $Usernum = ($UserNum);
    $Alz = ($Alz);
    $Nation = stripslashes($_POST['nation']);
    $name = stripslashes($_POST['name']);
    $Cost = $row[0] * $Nation;

    mssql_query ("UPDATE RanGame1.dbo.ChaInfo SET ChaMoney = ChaMoney - '$Cost' WHERE ChaName = '$name'");
    mssql_query ("UPDATE UserInfo SET UserPoint = UserPoint + (put E-point price here) '$Nation' WHERE UserName = '$account_id' ");

  6. #6
    Valued Member apocoly is offline
    MemberRank
    Aug 2011 Join Date
    120Posts

    Re: Gold to points problem

    Quote Originally Posted by dev02 View Post
    hope this helps
    sir where will i put this?

  7. #7
    Account Upgraded | Title Enabled! dev02 is offline
    MemberRank
    Sep 2010 Join Date
    Ottawa OntarioLocation
    592Posts

    Re: Gold to points problem

    mssql_query ("UPDATE RanGame1.dbo.ChaInfo SET ChaMoney = ChaMoney - '$Cost' WHERE ChaName = '$name'");
    mssql_query ("UPDATE UserInfo SET UserPoint = UserPoint + (put E-point price here) '$Nation' WHERE UserName = '$account_id' ");
    Find that on the goldtopoints php scrypt and make changes...



Advertisement