[REQ] Secure TOP PVP/PK system for website

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Yuki
Posts: 12
Joined: Sun Feb 18, 2007 10:44 am

[REQ] Secure TOP PVP/PK system for website

Post 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.
oceeman
Posts: 22
Joined: Wed Jun 17, 2009 8:37 pm

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

Post 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..
just.. call me ice :P
StevenP
Posts: 90
Joined: Mon Jun 09, 2008 1:31 pm

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

Post 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
jamaica
Posts: 288
Joined: Sat Jan 24, 2009 5:44 pm

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

Post 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
Everybody L.I.E.S
neo25
Posts: 26
Joined: Sun Jul 09, 2006 7:53 pm

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

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
diablodoro
Posts: 67
Joined: Thu Oct 11, 2007 8:54 pm

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

Post 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 ?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

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

Post 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?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Post Reply