Jump to content

Recommended Posts

Posted

Hello Ladies i want to share guide about how to write php script.it's very easy. so let's start. say for example we need top pvp kills script.

first create config.php and write there this:

 

<?php
$L2JBS_config["mysql_host"]="localhost";	// MySQL Host 	["localhost"]
$L2JBS_config["mysql_port"]="3306";		// MySQL Port			["3306"]
$L2JBS_config["mysql_db"]="l2jdb";		// MySQL Database	["l2jdb"]
$L2JBS_config["mysql_login"]="root";		// MySQL User			["root"]	
$L2JBS_config["mysql_password"]="root";	// MySQL Password			["root"]
include("_config_procs.php");
error_reporting(0);
?>

 

now create _config_procs.php

 

<?php
  $link = mysql_connect($L2JBS_config['mysql_host'].":".$L2JBS_config['mysql_port'], $L2JBS_config['mysql_login'], $L2JBS_config['mysql_password']);
  if (!$link)
die("Couldn't connect to MySQL");
  @mysql_select_db($L2JBS_config['mysql_db'], $link);
error_reporting(0);

?>

 

now create toppvp.php and write there this:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>TOP PvP Script By Leki</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style type="text/css">

<!--

body,td,th {

color: #CCCCCC;

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

}

body {

background-color: #000000;

}

-->

</style>

</head>

<body>

<table style="border: 1px solid; border-color: #444444; background-color:#222222;" align="center" width="100%">

  <tr>

    <th class='Stil7' colspan="5" align="center" width="100%">Top 100 PvP</th>

  </tr>

  <tr>

    <th width="1%" style="border: 1px solid; border-color: #444444; background-color:#222222;">ID</th>

    <th width="10%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> Character </th>

    <th width="2%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> Level </th>

    <th width="6%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> PvP </th>

    <th width="6%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> Status </th>

  </tr>

 

  <?php

require("Config.php");

$activity = mysql_query("MySQL Query");

$i = 1;

 

while($row = mysql_fetch_array($activity))

 

{

if (!($i%2)) echo "<tr bgcolor='#000000' align='center'>";

else

echo "<tr bgcolor='#161616' align='center'>";

echo "<td>"."<center>".$i."</center>"."</td>";

echo "<td>"."<center>".$row['char_name']."</center>"."</td>";

echo "<td>"."<center>".$row['level']."</center>"."</td>";

echo "<td>"."<center>".$row['pvpkills']."</center>"."</td>";

echo "<td>"."<center>".$row['online']."</center>"."</td>";

$i++;

}

?>

</table>

</body>

</html>

 

now we need MySQL query. so open Navicat. go to your database and then open characters table.now click File -> Query Table. Then Query Builder.now we need to select fields. we need 4 field. character name,character object id, character pvpkills , characters level and of course character online status.

So for my database(La2Base Interlude) i have this fields: obj_id,char_name,level,pvpkills,online.

 

when you select your fields, again click on Query Editor. you see your sql script

i have this

 

SELECT

characters.obj_Id,

characters.char_name,

characters.level,

characters.pvpkills,

characters.online

FROM characters

 

now we need to specify now many player must be in top script and how to order.. so add this to your sql script

 

ORDER BY characters.pvpkills DESC LIMIT 10

 

so we have

 

SELECT

characters.obj_Id,

characters.char_name,

characters.level,

characters.pvpkills,

characters.online

FROM characters

ORDER BY characters.pvpkills DESC LIMIT 10

 

so copy and paste in our php script this sql query

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>TOP PvP Script By Leki</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style type="text/css">

<!--

body,td,th {

color: #CCCCCC;

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

}

body {

background-color: #000000;

}

-->

</style>

</head>

<body>

<table style="border: 1px solid; border-color: #444444; background-color:#222222;" align="center" width="100%">

  <tr>

    <th class='Stil7' colspan="5" align="center" width="100%">Top 100 PvP</th>

  </tr>

  <tr>

    <th width="1%" style="border: 1px solid; border-color: #444444; background-color:#222222;">ID</th>

    <th width="10%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> Character </th>

    <th width="2%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> Level </th>

    <th width="6%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> PvP </th>

    <th width="6%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> Status </th>

  </tr>

 

  <?php

require("Config.php");

$activity = mysql_query("SELECT

characters.obj_Id,

characters.char_name,

characters.level,

characters.pvpkills,

characters.online

FROM characters

ORDER BY characters.pvpkills DESC LIMIT 10");

$i = 1;

 

while($row = mysql_fetch_array($activity))

 

{

if (!($i%2)) echo "<tr bgcolor='#000000' align='center'>";

else

echo "<tr bgcolor='#161616' align='center'>";

echo "<td>"."<center>".$i."</center>"."</td>";

echo "<td>"."<center>".$row['char_name']."</center>"."</td>";

echo "<td>"."<center>".$row['level']."</center>"."</td>";

echo "<td>"."<center>".$row['pvpkills']."</center>"."</td>";

echo "<td>"."<center>".$row['online']."</center>"."</td>";

$i++;

}

?>

</table>

</body>

</html>

 

now we need to discuss online and offline characters yes?

so replace this

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>TOP PvP Script By Leki</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style type="text/css">

<!--

body,td,th {

color: #CCCCCC;

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

}

body {

background-color: #000000;

}

-->

</style>

</head>

<body>

<table style="border: 1px solid; border-color: #444444; background-color:#222222;" align="center" width="100%">

  <tr>

    <th class='Stil7' colspan="5" align="center" width="100%">Top 100 PvP</th>

  </tr>

  <tr>

    <th width="1%" style="border: 1px solid; border-color: #444444; background-color:#222222;">ID</th>

    <th width="10%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> Character </th>

    <th width="2%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> Level </th>

    <th width="6%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> PvP </th>

    <th width="6%" style="border: 1px solid; border-color: #444444; background-color:#222222;"> Status </th>

  </tr>

 

  <?php

require("Config.php");

$activity = mysql_query("SELECT

characters.obj_Id,

characters.char_name,

characters.level,

characters.pvpkills,

characters.online

FROM characters

ORDER BY characters.pvpkills DESC LIMIT 10");

$i = 1;

 

while($row = mysql_fetch_array($activity))

 

{

if (!($i%2)) echo "<tr bgcolor='#000000' align='center'>";

else

echo "<tr bgcolor='#161616' align='center'>";

echo "<td>"."<center>".$i."</center>"."</td>";

echo "<td>"."<center>".$row['char_name']."</center>"."</td>";

echo "<td>"."<center>".$row['level']."</center>"."</td>";

echo "<td>"."<center>".$row['pvpkills']."</center>"."</td>";

if ($row['online'] == 1)

echo "<td>"."<center>Online</center>"."</td>";

else

echo "<td>"."<center>Offline</center>"."</td>";

$i++;

}

?>

</table>

</body>

</html>

 

So it's look like this:

 

37668565.png

 

Finish. I think i deserve karma  :P

Posted

Man i think is wrong way to learn How to Write PHP Script.

 

If someone want to write php script let go to php.net to learn the basics for php language and after let read a tutorial for sql language and finaly lets write a php script.

 

This is my opinion...

  • 2 months later...
Posted

damn i know 000000 about this,whaen you say create config.php file,you mean how?Say i create a php file,i add the code in there?What i add to website...I dont undersatnd a thing,if anyone with video guide or else pls post..

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • L2-LORENA x100 MID RATE   Interlude Nostalgia Meets Modern Gameplay   OFFICIAL OPENING:  April 4 (Saturday)  19:00 UTC+1 ⸻  MAIN INFORMATION  Adena: x5  Drop: x10  Spoil: x10  Raid Boss: x10  Seal Stones: x2  Quests: x10 ⸻  FEATURES  GM Shop up to B-Grade  Full Buffer  Premium System (x2 bonuses)  AutoFarm – FREE for everyone ⸻  SERVER CONCEPT  Classic Interlude nostalgia  Enhanced with modern interface & mechanics  Balanced PvP & PvE gameplay  Active development & custom features ⸻  WHY JOIN L2-LORENA?  No Pay-to-Win  Smooth gameplay & stable server  Competitive PvP environment  Friendly & active community ⸻  JOIN US NOW L2-LORENA 100X <<< LINK Discord: https://discord.gg/TYZ88Tgx4b  Facebook: https://www.facebook.com/share/18kwbkaYZY/?mibextid=wwXIfr   L2-LORENA Link << Discord: https://discord.gg/TYZ88Tgx4b  Facebook: https://www.facebook.com/share/18kwbkaYZY/?mibextid=wwXIfr
    • https://web.archive.org/web/20260306183214/https://maxcheaters.com/topic/241828-l2j-l2damage/page/3/ https://l2topzone.com/forum/l2-server-support-problems/9/l2damage-stopped/30514 Also we will try to push longer seasons ever ! (1135-100)/9 = 115 online
    • ONE SIDE – AND EVERYTHING BREAKS ▪ Looks like a simple case: Florida DL, back side, barcode – “clean and minimal”. ▪ In reality, these are exactly the tasks that fail most often. – data provided as plain text – request only for the back side – focus on the barcode (PDF417) ▪ And here’s the key point: ▪ A barcode is not just a “picture on the back”. It’s compressed logic of the entire document. ▪ If it doesn’t match the front, format, and data structure – the system flags it instantly. ▪ Many create a “similar-looking” code. But systems don’t read “similar” – they read by specification. ▪ In cases like this, it’s not about design. It’s about correct data assembly and how it behaves inside the format. ▪ Today only – 15% off for verification cases. ▪ Want it to pass, not just look right? Describe your case – we’ll show where even clean files break. › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #editing #photoshop #documents #verification #case
    • Your anonymity is a corpse. Blockchain forgets nothing. Your transactions are direct footprints in the hands of anyone who takes an interest. [✘] Still believe in "mixing"? Forget it. Classic Bitcoin mixers are an illusion of security. For Chainalysis and Elliptic algorithms, any attempt to hide tracks in the ledger is transparent. Your "mixing" is an artifact that gets filtered out in seconds. Every transaction leaves a trail that leads to frozen assets or unwanted questions from exchanges.  We don't mix. We break the link. [-] Input: Your "dirty" coins (Dirty BTC/ETH) with all their history and digital markers stay with us. [+] Output: You receive absolutely clean assets (Clean Crypto) from our reserves, which have never intersected with your past. This isn't a game of hide and seek. This is the surgical removal of your financial history from the system.   ------------------------------------------------------------------- Technical indexing: Bitcoin Mixer, Crypto Mixer, Clean BTC, Clean ETH, Anti-Chainalysis, Best Bitcoin Mixer, Anonymous Crypto Exchange, NoLog Mixing Service.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..