NX

Discussion in 'Closed' started by Underdog, Aug 19, 2013.

Thread Status:
Not open for further replies.
  1. Underdog
    Offline

    Underdog Member

    Joined:
    Aug 17, 2013
    Messages:
    3
    Likes Received:
    0
    Location:
    California
    IGN:
    Underdog
    I vote and I am not receiving all the nx from voting I don't know if i only am suppose to vote once but if im suppose to get nx from both votes I am not receiving my 8000 nx each time

    Also I am not receiving all my in game nx I have collected over 50 card and I only have 650 nx to show for it

    plz give me and thx for your response

    Ign Underdog
     
  2. John
    Offline

    John Donator

    Joined:
    Aug 5, 2013
    Messages:
    15,134
    Likes Received:
    8,187
    Gender:
    Male
    Need your character name.
     
  3. Underdog
    Offline

    Underdog Member

    Joined:
    Aug 17, 2013
    Messages:
    3
    Likes Received:
    0
    Location:
    California
    IGN:
    Underdog
    In Game Name: Underdog

    thx for reply
     
  4. Matt
    Offline

    Matt Administrator

    Joined:
    May 8, 2013
    Messages:
    14,647
    Likes Received:
    18,776
    Gender:
    Male
    Location:
    United Kingdom
    Country Flag:
    IGN:
    Matt
    Level:
    N/A
    Guild:
    Staff
    When you vote for NX are you ensuring that you are entering your account name? Do you know the time that you attempted to vote for NX?
     
  5. Underdog
    Offline

    Underdog Member

    Joined:
    Aug 17, 2013
    Messages:
    3
    Likes Received:
    0
    Location:
    California
    IGN:
    Underdog
    Yes, because im receiving half of my nx from voting but a lot most none of my in game nx
     
  6. acsiang
    Offline

    acsiang Member

    Joined:
    Aug 24, 2013
    Messages:
    21
    Likes Received:
    0
    IGN:
    S2SkY
    Level:
    ~
    nx problem

    i voted but no cash in my account! :confused:

    the vote page show this
    "You have already voted. Please wait 232 minutes to vote."

    & the second vote link is
    "You have already voted. Please wait 878 minutes to vote."
    878 minute!!!:eek:


    is there a problem with the vote page, please fix for me! thanks.

    btw my account is = acsiang
    in game character is = Minion(rogue)
     
  7. John
    Offline

    John Donator

    Joined:
    Aug 5, 2013
    Messages:
    15,134
    Likes Received:
    8,187
    Gender:
    Male
    878 minutes = 14ish hours.
     
  8. Afee
    Offline

    Afee Donator

    Joined:
    Aug 6, 2013
    Messages:
    231
    Likes Received:
    83
    Gender:
    Male
    Location:
    Aux, Aotearoa
    Country Flag:
    IGN:
    Afee
    Sorry to hijack this thread, It's a similar issue but I didn't want to make a new thread. I believe the timer on the NX voting refreshes once it reaches 0? I don't know. Well, I am supposed to have voted at least in the last 24 hours. Instead, I get this:[​IMG]
     
  9. Tomex
    Offline

    Tomex Banned

    Joined:
    Aug 24, 2013
    Messages:
    59
    Likes Received:
    11
    Location:
    Croatia
    IGN:
    Tomex009
    Level:
    30
    Guild:
    Leaf
    Try use this vote.php,


    PHP:
    <div id="main">
    <div class="block">
    <h2>Vote for Rewards</h2>
    </br>

    <div class="box">
        
        

    <br/>
    <div align="center">
    <form action="?page=vote" method="POST">
                        <b>Welcome to the Vote page!</b><br /> 

        You can vote every 12 hours, and get rewards by voting.<br /><br /> 

        <b>Below, please fill in your login credentials.</b><br />Click submit once filled out to get confirmed.<br /> 

        2 Vote Point will be added to your account.
        <br>
        <br>
                    <input type="text" name="name" maxlength="12" class="input" placeholder="Username" required/><br/>
                    <input type="submit" class="btn" name="doVote" value="Vote" class="doVote">
                    <input type="hidden" class="button" name="doVote" value="1">
    </form>
    </div>
    <div align="center">
    <?php
        
    if (@$_POST["doVote"] != "1") {
    } else {
            
    $earnednx false;
            
    $account $_POST['name'];
            
    $account mysql_real_escape_string($account);
            
    mysql_select_db($host['database']);
            
    $query=mysql_query("SELECT * FROM accounts WHERE name='" mysql_real_escape_string($_POST["name"]) . "'");
            
    $info=mysql_fetch_assoc($query);
            if(
    $_POST["name"] == "") {
                echo 
    'Please fill in the correct account credentials.';
            } elseif(
    mysql_num_rows($query) < 1) {
                echo 
    'Please fill in the correct account credentials.';
            } elseif(
    $info["loggedin"] > 0) {
                echo 
    'You must be logged out to vote for rewards.';
            } else {
                
    $ip $_SERVER['REMOTE_ADDR'];
                
    $time time();
                
    $get "SELECT *, SUM(`times`) as amount FROM voterecords WHERE account='$account'";
                
    $query1 mysql_query($get);
                
    $lasttime mysql_fetch_array($query1);
                
    $amount $lasttime['amount'];
                
    $insertnew false;    
                if (
    $amount == "") {
                    
    $insertnew true;
                }
                
    $timecalc $time $lasttime['date'];
                if (!
    $insertnew) {
                    if (
    $timecalc 43200) {
                        
    date_default_timezone_set(''.$timezone.'');
                        
    $_SESSION['vote_date'] = date('M d\, h:i:s A'$lasttime['date']);
                        echo 
    'You\'ve already voted with this account in the past 6 hours!<br />Last time you voted was on: '.$_SESSION['vote_date'].'!';
                    } else {            
                        
    $update mysql_query("SELECT * from voterecords WHERE ip='$ip' AND account = '$account'");
                        if (
    $update) {
                            
    mysql_query("UPDATE voterecords SET account='$account', date='$time', times=times+1 WHERE account='$account'");
                            
    mysql_query("UPDATE voterecords SET account='$account', date='$time', times=times+1 WHERE ip='$ip'");
                            
    $earnednx true;
                        } elseif (!
    $update) {    
                            
    $ipinsert mysql_query("INSERT INTO voterecords (`account`, `ip`, `date`, `times`) VALUES ('$account', '$ip', '$time', 1)");
                            if (!
    $ipinsert) {
                                
    $message  'Invalid query: ' mysql_error() . "\n";
                                
    $message .= 'Whole query: ' $ipinsert;
                                die(
    $message);
                            } else {
                                
    $earnednx true;
                            }
                        } else {
                            
    $message  'Invalid query: ' mysql_error() . "\n";
                            
    $message .= 'Whole query: ' $update;
                            die(
    $message);
                        }
                    }
                } else {
                    
    $success mysql_query("INSERT INTO voterecords (`account`, `ip`, `date`, `times`) VALUES ('$account', '$ip', '$time', 1)");
                    if (!
    $success) {
                        
    $message  'Invalid query: ' mysql_error() . "\n";
                        
    $message .= 'Whole query: ' $success;
                        die(
    $message);
                    } else {
                        
    $earnednx true;
                    }
                }
                if (
    $earnednx) {
                    
    mysql_query("UPDATE accounts SET vpoints = vpoints + '2' WHERE name='" mysql_real_escape_string($_POST["name"]) . "'");
                    
    mysql_query("UPDATE accounts SET lastvote='" .time(). "' WHERE name='" mysql_real_escape_string($_POST["name"]) . "'");
                    
    mysql_close();
                    echo 
    '<html>';
                    echo 
    '<head>';
                    unset(
    $_SESSION['vote_err']);
                    echo 
    '<meta HTTP-EQUIV="REFRESH" content="0; url='.$gtop.'">';
                    echo 
    '</head>';
                    echo 
    '</html>';
                }
            }
    }
        if (@
    $_POST["doVote"] != "2") {
    } else {
            
    $earnednx false;
            
    $account $_POST['name'];
            
    $account mysql_real_escape_string($account);
            
    mysql_select_db($host['database']);
            
    $query=mysql_query("SELECT * FROM accounts WHERE name='" mysql_real_escape_string($_POST["name"]) . "'");
            
    $info=mysql_fetch_assoc($query);
            if(
    $_POST["name"] == "") {
                echo 
    'Please fill in the correct account credentials.';
            } elseif(
    mysql_num_rows($query) < 1) {
                echo 
    'Please fill in the correct account credentials.';
            } elseif(
    $info["loggedin"] > 0) {
                echo 
    'You must be logged out to vote for rewards.';
            } else {
                
    $ip $_SERVER['REMOTE_ADDR'];
                
    $time time();
                
    $get "SELECT *, SUM(`times`) as amount FROM voterecords WHERE account='$account'";
                
    $query1 mysql_query($get);
                
    $lasttime mysql_fetch_array($query1);
                
    $amount $lasttime['amount'];
                
    $insertnew false;    
                if (
    $amount == "") {
                    
    $insertnew true;
                }
                
    $timecalc $time $lasttime['date'];
                if (!
    $insertnew) {
                    if (
    $timecalc 43200) {
                        
    date_default_timezone_set(''.$timezone.'');
                        
    $_SESSION['vote_date'] = date('M d\, h:i:s A'$lasttime['date']);
                        echo 
    'You\'ve already voted with this account in the past 6 hours!<br />Last time you voted was on: '.$_SESSION['vote_date'].'!';
                    } else {            
                        
    $update mysql_query("SELECT * from voterecords WHERE ip='$ip' AND account = '$account'");
                        if (
    $update) {
                            
    mysql_query("UPDATE voterecords SET account='$account', date='$time', times=times+1 WHERE account='$account'");
                            
    mysql_query("UPDATE voterecords SET account='$account', date='$time', times=times+1 WHERE ip='$ip'");
                            
    $earnednx true;
                        } elseif (!
    $update) {    
                            
    $ipinsert mysql_query("INSERT INTO voterecords (`account`, `ip`, `date`, `times`) VALUES ('$account', '$ip', '$time', 1)");
                            if (!
    $ipinsert) {
                                
    $message  'Invalid query: ' mysql_error() . "\n";
                                
    $message .= 'Whole query: ' $ipinsert;
                                die(
    $message);
                            } else {
                                
    $earnednx true;
                            }
                        } else {
                            
    $message  'Invalid query: ' mysql_error() . "\n";
                            
    $message .= 'Whole query: ' $update;
                            die(
    $message);
                        }
                    }
                } else {
                    
    $success mysql_query("INSERT INTO voterecords (`account`, `ip`, `date`, `times`) VALUES ('$account', '$ip', '$time', 1)");
                    if (!
    $success) {
                        
    $message  'Invalid query: ' mysql_error() . "\n";
                        
    $message .= 'Whole query: ' $success;
                        die(
    $message);
                    } else {
                        
    $earnednx true;
                    }
                }
                if (
    $earnednx) {
                    
    mysql_query("UPDATE accounts SET vpoints = vpoints + '2' WHERE name='" mysql_real_escape_string($_POST["name"]) . "'");
                    
    mysql_query("UPDATE accounts SET lastvote='" .time(). "' WHERE name='" mysql_real_escape_string($_POST["name"]) . "'");
                    
    mysql_close();
                    echo 
    '<html>';
                    echo 
    '<head>';
                    unset(
    $_SESSION['vote_err']);
                    echo 
    '<meta HTTP-EQUIV="REFRESH" content="0; url='.$gtop.'">';
                    echo 
    '</head>';
                    echo 
    '</html>';
                }
            }
    }
    ?>



    </div>
    </div>
     
  10. John
    Offline

    John Donator

    Joined:
    Aug 5, 2013
    Messages:
    15,134
    Likes Received:
    8,187
    Gender:
    Male
    Can't just copy and paste code, that's not how our DB is structured. We are working on a solution. Thanks for understanding :)
     
  11. Tomex
    Offline

    Tomex Banned

    Joined:
    Aug 24, 2013
    Messages:
    59
    Likes Received:
    11
    Location:
    Croatia
    IGN:
    Tomex009
    Level:
    30
    Guild:
    Leaf
    umm how is you database structured?

    Do you have etc: accounts.nxcash or something?
     
  12. John
    Offline

    John Donator

    Joined:
    Aug 5, 2013
    Messages:
    15,134
    Likes Received:
    8,187
    Gender:
    Male
    The issue with voting has to do with us being behind DDOS Protection. The provider is not forwarding the client's actual IP address along, all we're getting is the IP of the DDOS protection server. Basically, it becomes a mad free for all for the first account to vote and receive NX after the 24 hour counter has elapsed.

    Good event idea, no? :p
     
  13. Matt
    Offline

    Matt Administrator

    Joined:
    May 8, 2013
    Messages:
    14,647
    Likes Received:
    18,776
    Gender:
    Male
    Location:
    United Kingdom
    Country Flag:
    IGN:
    Matt
    Level:
    N/A
    Guild:
    Staff
    I just spent at like 2 hours trying to figure out how to get "{X_FORWARDED_FOR}i" to work with mod_rpaf. Giving up now... plan B... Voting should be fixed in like < 1hr.
     
  14. Faye
    Offline

    Faye Donator

    Joined:
    Jul 25, 2013
    Messages:
    252
    Likes Received:
    6
    Location:
    Someone Else's House
    Guild:
    Staff
    Fixed now. Thanks for reporting!
     
Thread Status:
Not open for further replies.

Share This Page