Jump to content
  • 0

"Best Player" doesn't show up. Using Ghosts' pvp ladder.


Mistique

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  09/15/12
  • Last Seen:  

Hello everyone, I have a request.

 

I'm using a website design of WePrioritize. Along with the website came a "Best player" ranking. Which, I think, was based on Annie's Dota PVP script. That script however doesn't work on Hercules so I went with Ghosts PVP script.

 

But apparently Ghosts ladder doesn't work with the ranking.php I got from WePrioritize...

 

Can someone please take a look at it? Here is the table the pvp script is using (pvp_rank table in my SQL)

2pru2aw.png

 

 

Thank you, I appreciate it greatly!

 

And here is the ranking.php from WePriortize:

Removed

Edited by Mistique
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

Hello everyone, I have a request.

 

I'm using a website design of WePrioritize. Along with the website came a "Best player" ranking. Which, I think, was based on Annie's Dota PVP script. That script however doesn't work on Hercules so I went with Ghosts PVP script.

 

But apparently Ghosts ladder doesn't work with the ranking.php I got from WePrioritize...

 

Can someone please take a look at it? Here is the table the pvp script is using (pvp_rank table in my SQL)

2pru2aw.png

 

 

Thank you, I appreciate it greatly!

 

And here is the ranking.php from WePriortize:

 

<?php if (!defined('FLUX_ROOT')) exit;     
    if($params->get('action') == 'login')
    {
        $chars = array();
        $guilds = array();
        $sex = array();
        $bsex = 'F';
        $bclass = 0;
    }  else {
        $sex = "<img src='".$this->themePath('img/potm/M/0.gif')."' alt=\"Sex\"/>";
        $sqlpvp  = "SELECT pvpladder.name AS char_name, pvpladder.kills AS kills, pvpladder.deaths AS deaths, char.char_id, char.class AS bclass, login.sex, 
 
guild.name as gname 
                    FROM pvpladder
                    LEFT JOIN  `char` ON pvpladder.char_id = char.char_id
                    LEFT JOIN  `login` ON char.account_id = login.account_id
                    LEFT JOIN  `guild` ON char.guild_id = guild.guild_id
                    ORDER BY kills DESC 
                    LIMIT 1";
        $sthpvp  = $server->connection->getStatement($sqlpvp);
        $sthpvp->execute();
        
        if (empty($chars[0]->sex)) {
            $bsex = $chars[0]->sex;
            $bclass = $chars[0]->bclass;
            $sex = "<img src='".$this->themePath('./img/potm/'.$bsex.'/'.$bclass.'.gif')."' alt=\"Sex\"/>";
        } else {
            $bsex = 'F';
            $bclass = 0;        $chars = $sthpvp->fetchAll();
 
        }
 
        $sqlgvg  = "SELECT g.guild_id, g.name AS gname, g.emblem_len, (
                    SELECT COUNT( c.castle_id ) 
                    FROM guild_castle c
                    WHERE c.guild_id = g.guild_id
                    ) AS castles, g.master, ( 
                    SELECT COUNT( char_id ) 
                    FROM  `char` 
                    WHERE  `char`.guild_id = g.guild_id
                    ) AS members 
                    FROM guild AS g 
                    LEFT JOIN  `char` AS ch ON ch.char_id = g.char_id 
                    LEFT JOIN login ON login.account_id = ch.account_id 
                    ORDER BY castles DESC, members DESC , g.max_member DESC , g.next_exp ASC 
                    LIMIT 1";
        $sthgvg  = $server->connection->getstatement($sqlgvg);
        $sthgvg->execute();
        $guilds = $sthgvg->fetchall();
    }
?>
<div class="toughest_player">
    <?php if ( $chars ): ?>
        <div class="ranking">
            <div class="left">
                <table cellspacing="0" cellpadding="0">
                    <tr><td><?php echo htmlspecialchars(substr($chars[0]->char_name,0, 12)) ?></td></tr>
                    <tr><td><?php echo number_format($chars[0]->kills) ?></td></tr>
                    <tr><td><?php echo number_format($chars[0]->deaths) ?></td></tr>
                </table>
            </div>
            <div class="right_player">
                <?php echo $sex; ?>
            </div>
            <div class="clear"></div>
        </div>
        
    <?php endif; ?>
</div>
<div class="dominant_guild">
    <?php if( $guilds ): ?>
        <div class="ranking">
            <div class="left">
                <table cellspacing="0" cellpadding="0">
                    <tr><td><?php echo htmlspecialchars(substr($guilds[0]->gname,0 ,15)) ?></td></tr>
                    <tr><td><?php echo htmlspecialchars(substr($guilds[0]->master,0 ,15)) ?></td></tr>
                    <tr><td><?php echo $guilds[0]->castles ?></td></tr>
                </table>
            </div>
            <div class="right_guild">
                <?php if ($guilds[0]->emblem_len): ?>
                    <img width="24" src="<?php echo $this->emblem($guilds[0]->guild_id) ?>" />
                <?php else: ?>
                    <b>No Emblem</b>
                <?php endif ?>
            </div>
            <div class="clear"></div>
        </div>        
    <?php endif ?>
</div>

i think you should contact the scripter of that website. so he can assist you more easily.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

your ranking.php use this query pvpladder while the script use pvp_rank.

 

So all pvp_rank in ghost pvp script change it into pvpladder.

if still didn't work ask the WePrioritize to fix it for your or get their working script for their ranking if you purchase it

 

Thats all i can do for you.Cause if you purchase WePrioritize design's they will provide working script for their ranking.

 

 

 

Good luck

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  09/15/12
  • Last Seen:  

Thanks for trying to help guys.

 

Mootie; I've already changed all the pvpladder into pvp_rank, and other stuff too, like kills into kill.

It still doesn't function unfortunately. :(

 

I suppose I'll contact WePrioritize.

 

If someone comes up with a solution anyway, I'll still appreciate it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

Thanks for trying to help guys.

 

Mootie; I've already changed all the pvpladder into pvp_rank, and other stuff too, like kills into kill.

It still doesn't function unfortunately. :(

 

I suppose I'll contact WePrioritize.

 

If someone comes up with a solution anyway, I'll still appreciate it.

That's the best solution you ever had contact wepriritize.

Link to comment
Share on other sites

×
×
  • Create New...