Page 1 of 1

[REQ] Secure TOP PVP/PK system for website

Posted: Fri Jun 19, 2009 8:03 pm
by Yuki
Maybe anyone could share a secure PVP/PK system? It would be good if it is made in a seperate page, or just the script itself, I can make the design myself.

Thanks.

Re: [REQ] Secure TOP PVP/PK system for website

Posted: Fri Jun 19, 2009 8:43 pm
by oceeman
Make a file for connection to your mysql with db, user, pwd, port info and include it every time you connect to mysql (like this script).

I have a script for top PvP/PK but on another far away PC :D. It's easy to make it though..

Example:

<?php
//including the connection file
include 'connect.php';
//starting the table
echo "<table>";
//command string for query
$query = "SELECT * FROM characters ORDER BY pvpkills DESC";
//connection command
$result = mysql_query($query) or die(mysql_error());
//looping throw results
while ($row = mysql_fetch_array($result)) {
//setting the variables we need to isnert into the table
$temp_name = $row['char_name'];
$temp_lvl = $row['level'];
$temp_pvp = $row['pvpkills'];
//inserting data in the table
echo "
<tr>
<td>$temp_name</td>
<td>$temp_lvl</td>
<td>$temp_pvp</td>
</tr>";
}
//ending the table
echo "</table>";
//closing mysql connection opened in connect.php
mysql_close();
?>

You can also make it show more result than only name, level, and pvp kills :) You could also make the table look nicier by playing with borders etc (you said you design it). Just a simple example sorry if it is useless.

Keep in mind that for security reasons you should search on google how to prevent mysql injection and in your php.ini configuration file make sure you have register_globals = Off (this will prevent users from changing your variables from link).

Hope it helps you :) peace..

Re: [REQ] Secure TOP PVP/PK system for website

Posted: Sat Jun 20, 2009 11:52 am
by StevenP
Use a db user with read only privilege and on that table only, never use an user with write privilege and never with access accounts table. Better to make same views and give access on views only

Re: [REQ] Secure TOP PVP/PK system for website

Posted: Mon Oct 19, 2009 11:28 am
by jamaica
really only genious ideeas but nobody can post someting to help others....just make , do, bla bla bla or how that guy sez i have but on other pc...really u expect trust u? phatetic excuse

Re: [REQ] Secure TOP PVP/PK system for website

Posted: Mon Oct 19, 2009 4:07 pm
by neo25
jamaica wrote:really only genious ideeas but nobody can post someting to help others....just make , do, bla bla bla or how that guy sez i have but on other pc...really u expect trust u? phatetic excuse
Usually if you ask nicely for something, people are more likely to share and help out. Since I've helped others with status scripts, I'll share mine here. They are ones that I wrote a while back and they list the top 100 PvP'ers and PK'ers. If you want to change how many records are displayed, just change the "LIMIT" for each query from 100 to what ever number you want to display.
PvP-PK_Status.zip

Re: [REQ] Secure TOP PVP/PK system for website

Posted: Sun Mar 07, 2010 5:06 pm
by diablodoro
can i make this like a gm shop or buffer i mean NPC in the server that show the PVP and PK points of the player ?

Re: [REQ] Secure TOP PVP/PK system for website

Posted: Sun Mar 07, 2010 9:41 pm
by jurchiks
easily via jython script, but it seems like you don't know how, and writing that for you... i doubt anyone will do it
just use onFirstTalk, and in it >htmltext="yourhtml.htm", after that use htmltext=htmltext.replace("what to replace, for example %pvp%",with what to replace, for pvp it would be smth like str(player.getPvpScore())), you need to check that in source. Put the %pvp% in your htm file where you want it to be
but really, why would you need it when the player can just open Alt+T and check it there?