Jump to content

Recommended Posts

Posted

db.php

   1. <?php
   2. function db_connect()
   3. {
   4. if (mysql_connect('localhost', 'user','password'))
   5. {
   6. if(mysql_select_db('db_name')){
   7. return true;
   8. } else {
   9. return false;
  10. }
  11. } else {
  12. return false;
  13. }
  14. }
  15.  
  16. ?>

castles.php

    1.  
   2. <?php
   3. include_once('includes/db.php');
   4. include_once('header.php');
   5. echo ("<META HTTP-EQUIV=Refresh CONTENT='300; URL=castles.php'>");
   6. ?>
   7. <div id="page_content">
   8. <div class="spacer">
   9. <table align="center" id="tabel_continut">
  10. <tr>
  11. <td class="leftcol">
  12. <h1 align="center">Castle Control</h1><br><br>
  13. <p align="left">  <font color="red">Updated every 5 minutes</font></p>
  14. <br/><br/>
  15. <?php
  16. $rowdata = mysql_query("select a.clan_name, a.clan_level, a.clan_id, a.ally_name, a.leader_id, b.char_name, b.accesslevel, c.siegeDate, c.taxPercent, c.id as idcastel, c.name FROM clan_data as a, characters as b, castle as c WHERE ((a.clan_id = b.clanId) AND (b.accesslevel = 0) AND (c.id = a.hasCastle)) ORDER BY name ASC");
  17. //echo $rowdata;
  18.  
  19. $img_castele = array(1 => "Gludio.bmp",
  20. 2 => "Dion.bmp",
  21. 3 => "Giran.bmp",
  22. 4 => "Oren.bmp",
  23. 5 => "Aden.gif",
  24. 6 => "Innadril.gif",
  25. 7 => "Goddard.gif",
  26. 8 => "Rune.gif",
  27. 9 => "Schuttgart.gif");
  28. //print_r ($img_castele);
  29.  
  30. $i = 1;//set a variable to identify images
  31. if(mysql_num_rows($rowdata) > 0 ) {
  32. echo "<table id='castel_status' cellpadding='5'>";
  33. while($row = mysql_fetch_array($rowdata)) {
  34.  
  35.  
  36. echo "<tr><td style='width:230px;'><img src='images/castle/".$img_castele[$row['idcastel']]."' /></td>";
  37. echo "<td style='width:310px;'>";
  38. echo "<h2 style='font-size:14px; color:#F63; margin:0; padding:0; font-weight:bold; margin-bottom:5px;'>".$row['name']." Castle</h2>";
  39. echo "<strong>Next Siege : </strong>".date('D\ j M Y H\:i',$row['siegeDate']/1000)."<br />";
  40. echo "<strong>Clan Owner : </strong>". $row['clan_name']."<br />";
  41. echo "<strong>Clan Level : </strong>".$row['clan_level']."<br />";
  42. echo "<strong>Leader : </strong>". $row['char_name']."<br />";
  43. echo "<strong>Tax : </strong>".$row['taxPercent']."%<br />";
  44. echo "<strong>Alliance : </strong>". $row['ally_name']."<br /></td></tr>";
  45. $i++;
  46. }
  47. echo "</table>";
  48.  
  49. } else {
  50. echo "<br />No records in the database.";
  51. }
  52. ?>
  53. </table>
  54. </div>
  55. </div>
  56.  

Original Poster: nimeni from l2jforum

Elpizw na mn exei ksanaginei Share

  • 1 month later...
Posted

arning: include_once(includes/db.php) [function.include-once]: failed to open stream: No such file or directory in W:\www\castle\castles.php on line 2

 

Warning: include_once() [function.include]: Failed opening 'includes/db.php' for inclusion (include_path='.;/usr/local/PHP/includes;/usr/local/PHP/pear') in W:\www\castle\castles.php on line 2

 

Warning: include_once(header.php) [function.include-once]: failed to open stream: No such file or directory in W:\www\castle\castles.php on line 3

 

Warning: include_once() [function.include]: Failed opening 'header.php' for inclusion (include_path='.;/usr/local/PHP/includes;/usr/local/PHP/pear') in W:\www\castle\castles.php on line 3

Castle Control

 

 

 

  Updated every 5 minutes

 

 

 

 

Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in W:\www\castle\castles.php on line 15

 

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in W:\www\castle\castles.php on line 15

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in W:\www\castle\castles.php on line 30

 

No records in the database.

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

    • So dont plat that waste time&money server.   GM promises pie in the sky, but does nothing. It's all about money, money, money. And wipe.   SCAM server!
    • I'm looking for someone to remove GameGuard from a game that uses XTRAP. The game no longer uses XTRAP. I have a game server. But the client is kicked from the game after a few minutes of logging in. If I try to remove XTRAP (just by deleting it), the game opens and closes quickly.   Send me a PM. The game is Audition, a dance game.
    • 🎉 L2Dead StuckSub - GRAND OPENING 14 February 2026🎉 After beta, testing, mistakes, laughs and a lot of PvP, the moment has finally come. L2Dead StuckSub is officially opening its gates on 14 February 2026.   ⚔️What to expect: ✦Main Class +6 Stuck Sub system ✦Balanced PvP & custom party farm areas ✦Custom events, bosses and strong rewards ✦Competitive clan scene with castle rewards   📌Until the opening: ✦Create your clans and register them in the Clan-Register channel ✦Invite your friends / old parties / CPs ✦Stay tuned for more information (rates, events, siege times, etc.)   Get your setups ready, prepare your macros and your Discord/voice. On 14 February 2026 20:00 GMT+2, we write the first chapter of L2Dead together. 🔥 https://www.l2dead.com/ https://discord.gg/TGnATuZmdt
    • Here’s the **clean, L2jAcis-style way** to make **Auto Loot work ONLY for Premium players** on **Interlude**.   I’ll give you **two options** — pick what fits your server philosophy.   ---   ## ✅ OPTION 1 (BEST PRACTICE): Premium-Only Auto Loot (Code-based)   ### 🔹 Step 1: Add config option   **`config/Premium.properties`**   ```properties # Enable auto loot only for premium players PremiumAutoLoot = True ```   ---   ### 🔹 Step 2: Read config   **`Config.java`**   ```java public static boolean PREMIUM_AUTO_LOOT; ```   Load it:   ```java PREMIUM_AUTO_LOOT = Premium.getProperty("PremiumAutoLoot", false); ```   ---   ### 🔹 Step 3: Modify drop handling   **File:**   ``` net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance ```   Find **dropItems()** or **doItemDrop()** Replace / modify logic like this:   ```java if (player != null && player.isPremium() && Config.PREMIUM_AUTO_LOOT) {     for (ItemInstance item : items)         player.getInventory().addItem("AutoLoot", item, player, this); } else {     for (ItemInstance item : items)         dropItem(player, item); } ```   ✅ Result:   * **Premium players** → instant loot * **Normal players** → loot on ground   ---   ## ✅ OPTION 2: Auto Loot via Character Variable (More Flexible)   Useful if you want **GM control** per character.   ### 🔹 Premium activation   When premium is added:   ```java player.setVar("AUTO_LOOT", "1"); ```   ### 🔹 Drop check   ```java if (player != null && player.getVarB("AUTO_LOOT")) {     player.addItem("AutoLoot", item, player, true); } else {     dropItem(player, item); } ```   ---   ## 🎯 BONUS (Recommended Add-Ons)   ### 🔸 Adena always auto-loot (even non-premium)   ```java if (item.getItemId() == 57) {     player.addAdena("Loot", item.getCount(), this, true);     continue; } ```   ### 🔸 Party check (premium leader only)   ```java player.isInParty() && player.getParty().getLeader().isPremium() ```   ---   ## ⚠️ Notes (Interlude Safe)   ✔ Compatible with **L2jAcis Interlude** ✔ No client-side changes ✔ No exploit risk ✔ Retail-like behavior   ---      
  • 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..