- 0
[HELP]DeathCountManager Simple Bug.
-
Posts
-
L2GOLD LEGACY x45 THE ORIGINAL GOLD-STYLE EXPERIENCE Official L2OFF PTS • Chronicle C4 / Interlude • Long-Term Server GRAND OPENING 28 AUGUST 2026 WEBSITE SERVER INFO DOWNLOAD DISCORD OLD GOLD ORIGINAL THE LEGEND RETURNS L2Gold Legacy brings back the authentic Gold-style x45 experience on official L2OFF PTS files with custom systems, balanced progression, competitive PvP and a carefully protected long-term economy. NO WIPES — KEEP YOUR PROGRESS FOREVER SERVER INFORMATION SERVER CHARACTERISTICS EXP / SP x45 ADENA x1 DROP x1 SPOIL x1 RAID BOSS DROP x1 PLATFORM L2OFF PTS Custom Drop & Spoil rates can be checked directly in-game with SHIFT + CLICK on NPCs. GAMEPLAY MAIN FEATURES GAMEPLAY • Auto-learn Skills • Automatic Monster Loot • Shift + Click Droplist • Unlimited Offline Shop • 80 Inventory Slots • Weight Limit Disabled • Maximum 3 Clients per PC • Manual Raid / Epic Loot • Official L2OFF PTS Files PLAYER FRIENDLY • NPC Buffer • 27 Buff Slots • 2 Hour Buff Duration • Mana Potion restores 500 MP • No Mana Potion Cooldown • FREE 1st Profession • FREE 2nd Profession • 3rd Profession: 500,000 Adena • Solo & Party Friendly CLANS • Maximum 45 Clan Members • Maximum 2 Clans per Alliance • Clan Penalty: 1 Hour • Clan Skills for All Members • Castle Sieges • 9 Available Clan Halls PROGRESSION • Rebirth System • Noblesse Progression • Custom Tattoos • Daily Missions • Mining System • Custom Gold Equipment • S-Grade Weapons • Long-Term Economy RAID CONTENT RAID BOSSES & EPIC BOSSES Progressive boss loot, PvP-oriented encounters and controlled progression designed to protect the economy. BAIUM ANTHARAS VALAKAS EPIC BOSS SCHEDULE SERVER TIME — GMT+3 DAY BOSS TIME Monday Core 20:00 Monday Orfen 22:30 Tuesday Zaken 22:30 Wednesday Queen Ant 22:30 Thursday Antharas 22:30 Friday Baium 22:30 Saturday Valakas 22:30 Sunday Frintezza 22:30 CUSTOM EQUIPMENT S-GRADE & L2GOLD GEAR Custom weapons, shields and jewelry are an important part of L2Gold's long-term progression. Draconic Bow Guidance / Focus Angel Slayer Critical Damage / Haste Arcana Mace Acumen / Mana Up Heaven's Divider Haste / Health / Focus S-GRADE WEAPON PRICE 300 Fire Mantras + 1,000,000 Adena Available from Wilbrand, Mantra Manager at Giran Harbor. COMPETITIVE PVP OLYMPIAD CYCLE 7 DAYS WEAPON ENCHANT MAX +21 ARMOR ENCHANT MAX +8 Wednesday 21:00–22:00 • Friday 21:00–22:00 • Sunday 21:00–22:00 S-GRADE EQUIPMENT IS FORBIDDEN DAILY & WEEKEND CONTENT EVENTS CAPTURE THE FLAG 50 vs 50 competitive CTF battles. HIGH RATE EVENT Weekend farming and progression event. MINING EVENT Collect Minerals and earn special rewards. Death Match • Bandit Stronghold • TvT • Gold Arena 1v1–9v9 Korean Event • CTF • High Rate • Mining • Piggy • Squash • Discord Events TRANSPARENCY REAL-TIME SERVER STATISTICS Players can verify clans, characters, bosses, items, Olympiad, castles, Gold Weapons and the server economy. NO HIDDEN DROPS • NO SHADOW EDITS • FULL TRANSPARENCY L2GOLD LEGACY x45 • L2OFF PTS • NO WIPES 28 AUGUST 2026 The Original Gold-Style Experience Returns. PLAY L2GOLD JOIN DISCORD Website: https://l2gold.co Server Info: https://l2gold.co/server-info.php Discord: discord.com/invite/CBSqxqkhy2
-
This is a bump: https://databay.com/
-
Hello my wanna be designer....I see that u are still the same dumb kid u were before some years,takeing some brushes adding soem letters and call it design..Sad that u body might have grown up but ur wanna be brain is still the same shit.... No hard feelings,happens. Cheers
-
New Release Video demo: Platforms & recording Fermata is now available as an experimental Android preview for ARM64 devices running Android 13 or newer with Vulkan support. Players can import their own Interlude client from a ZIP or folder, configure their server, and play without modifying the source files. Android now has a dedicated mobile control profile with: A floating movement joystick Direct camera orbit and pinch zoom Camera-focused smart targeting A rotating shortcut selector A mobile HUD and compact window controls An optional Classic control profile Built-in video recording has also arrived on Windows and macOS. Press Shift+Alt+R, or Shift+Option+R on macOS, to open the recorder. Recordings support H.264 and HEVC, Native to 720p resolution, 30 or 60 FPS, configurable quality, game audio, and music. Recording continues across login, character selection, teleports, and window resizing. The recorder controls are excluded from the finished video, while the Fermata watermark is added directly to the MP4. Friends, chat & private stores The complete Interlude friends system is now implemented, including: Online and offline status Friend invitations Adding and removing friends Direct conversations Incoming-message notifications /friendlist Alt/Option+Y access The original blocking commands now work, including /block, /unblock, /blocklist, /allblock, and /allunblock. Private stores are now fully supported. Players can create sell, package-sale, and buy stores, configure their listings and message, receive abnormal-price warnings, and trade through another player's store. Active stores display their original-style sign and message above the seated character. Find Private Store is available from the Actions tab or through /findprivatestore. Entering part of a store message highlights matching store signs in green without contacting the server. Inventory & paperdoll The inventory has been completely remastered into a wider framed-doll layout with a ten-by-eight item grid and separate All, Weapon, Armor, Jewelry, Etc, and Quest tabs. The paperdoll now displays your complete live 3D character with equipped armor, weapons, enchant shells, and weapon enchant effects. Drag to rotate, use the wheel to zoom, and double-click to reset the view. Inventory improvements Holding Alt or Option over an equipment slot opens a quick-swap list containing every compatible item in your inventory. Items are ordered by enchantment, grade, and name, and can be equipped with one click. Dropping inventory items onto the ground has been restored. Drag an item outside the window and confirm the drop, with quantity selection for stackable items. Ground items now use their correct fall, landing, and sparkle effects. World, atmosphere & materials Volumetric fog volumes have been added. Authored banks of mist can drift with the wind, react to weather and time of day, and receive illumination from nearby lamps, torches, and other lights. Half and Full quality modes are available. Water has received a major presentation remaster. Lakes, rivers, wet ground, and puddles now mirror the sky and display a long HDR sun reflection at low angles. Half and Full reflection modes also mirror nearby terrain, trees, buildings, and shorelines. Off mode retains the sky reflection. A new light-particle system supports fireflies, embers, and drifting motes. The brightest particles become small moving light sources that illuminate the ground and nearby fog. Fog volumes and light-particle swarms can be placed through the Shift+Alt+L light editor. Lighting & material improvements Normal-map support has been added for authored stone, wood, terrain, buildings, and other world materials. Supported surfaces gain light-reactive relief, with controls for enabling the effect and adjusting its strength. Enhanced lighting now has smoother transitions, more accurate flame illumination, and additional remastered emissive surfaces across Giran and manor structures. Movement, characters & polish Corrected Strider and Wyvern rider placement, mounted animations, camera height, and nameplate positioning. Fixed Strider transparency and depth rendering so body parts no longer appear hollow or visible through themselves. NPCs now turn smoothly towards the local player when opening a conversation. Improved snowfall with denser flakes, wind-driven descent, varied flake sizes, and flakes that briefly settle before melting. Sounds produced by your own character remain at a stable volume regardless of camera distance. The O key once again starts typing in chat like every other unbound letter. Additional bug fixes and stability improvements. Documentation Fermata now has complete documentation covering installation, controls, settings, rendering, weather, interfaces, supported gameplay, server configuration, and troubleshooting. Documentation is available in English, Greek, Brazilian Portuguese, Russian, and Ukrainian at https://fermata.gg/docs. Download from the launcher you have installed, or at https://fermata.gg/ if you don't have the launcher.
-
Topics

Question
StarSCreams
Freya HighFive 5 BETA
hello, could you help me with this code?
I talk to the npc -> click on "Visualizar" shows the list of characters correctly.
but when I close the window and open it again and talk to the npc -> click on "Visualizar" again doubles the list of characters and every time I do that increases the list of the same characters every 10 results
you can help me fix it? or better?
problem at L2TopDeathManagerInstance.java
FullPatch
### Eclipse Workspace Patch 1.0 #P L2J_LastShadowServer Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 5722) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -320,9 +325,9 @@ private static final String DELETE_ITEM_REUSE_SAVE = "DELETE FROM character_item_reuse_save WHERE charId=?"; // Character Character SQL String Definitions: - private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createDate) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; - private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=? WHERE charId=?"; - private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createDate,language FROM characters WHERE charId=?"; + private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createDate,deaths) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=?,deaths=? WHERE charId=?"; + private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createDate,language,deaths FROM characters WHERE charId=?"; // Character Teleport Bookmark: private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)"; @@ -541,6 +546,14 @@ private int _duelId = 0; private SystemMessageId _noDuelReason = SystemMessageId.THERE_IS_NO_OPPONENT_TO_RECEIVE_YOUR_CHALLENGE_FOR_A_DUEL; + /** Numero de pjs muertos en pvp suma una muerte */ + private int _deaths; + /** Boat and AirShip */ private L2Vehicle _vehicle = null; private Point3D _inVehiclePosition; @@ -2751,6 +2767,23 @@ } /** + * @return Las muertes que L2PcInstance recoje. + */ + public int getDeaths() + { + return _deaths; + } + + /** + * Setea las deaths en L2PcInstance durante el pvp flag. + * @param deaths + */ + public void setDeaths(int deaths) + { + _deaths = deaths; + } + + /** * @return the Fame of this L2PcInstance */ public int getFame() @@ -6188,6 +6236,7 @@ )) { increasePvpKills(target); + increaseDeaths(target); } else // Target player doesn't have pvp flag set @@ -6197,6 +6246,7 @@ { // 'Both way war' -> 'PvP Kill' increasePvpKills(target); + increaseDeaths(target); return; } @@ -6235,6 +6289,23 @@ } /** + * Incrementa las muertes y envia informacion al personaje + * @param target + */ + public void increaseDeaths(L2Character target) + { + if (!(target instanceof L2PcInstance) && AntiFeedManager.getInstance().check(this, target)) + { + // incrementa Deaths cuando el pj es matado en PvPMode + setDeaths(getDeaths() + 1); + + // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter + sendPacket(new UserInfo(this)); + sendPacket(new ExBrExtraUserInfo(this)); + } + } + + /** * Increase pk count, karma and send the info to the player * @param target */ @@ -7679,6 +7750,7 @@ statement.setInt(35, isNoble() ? 1 : 0); statement.setLong(36, 0); statement.setDate(37, new Date(getCreateDate().getTimeInMillis())); + statement.setInt(38, getDeaths()); statement.executeUpdate(); } catch (Exception e) @@ -7873,6 +7945,9 @@ // Language player.setLang(rset.getString("language")); + // Setea deaths No necesita restaurar + player.setDeaths(rset.getInt("deaths")); + // Retrieve the name and ID of the other characters assigned to this account. try (PreparedStatement stmt = con.prepareStatement("SELECT charId, char_name FROM characters WHERE account_name=? AND charId<>?")) { @@ -8316,7 +8391,8 @@ statement.setInt(50, getBookMarkSlot()); statement.setInt(51, getVitalityPoints()); statement.setString(52, getLang()); - statement.setInt(53, getObjectId()); + statement.setInt(53, getDeaths()); + statement.setInt(54, getObjectId()); statement.execute(); statement.close(); \ No newline at end of file Index: java/com/l2jserver/gameserver/model/actor/instance/L2TopDeathManagerInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2TopDeathManagerInstance.java (revision 0) +++ java/com/l2jserver/gameserver/model/actor/instance/L2TopDeathManagerInstance.java (working copy) @@ -0,0 +1,181 @@ +/* + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see <http://www.gnu.org/licenses/>. + */ +package com.l2jserver.gameserver.model.actor.instance; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; + +import javolution.text.TextBuilder; + +import com.l2jserver.L2DatabaseFactory; +import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate; +import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; + +/** + * @author DLjac + */ + +public class L2TopDeathManagerInstance extends L2NpcInstance +{ + public String filename; + + public L2TopDeathManagerInstance(int objectId, L2NpcTemplate template) + { + super(objectId, template); + } + + @Override + public void onBypassFeedback(L2PcInstance player, String command) + { + if ((player == null) || (player.getLastFolkNPC() == null) || (player.getLastFolkNPC().getObjectId() != this.getObjectId())) + { + return; + } + + if (command.startsWith("TopDeaths")) + { + TopDeaths(player); + } + } + + @Override + public void showChatWindow(L2PcInstance player, int val) + { + filename = (getHtmlPath(getNpcId(), val)); + NpcHtmlMessage msg = new NpcHtmlMessage(this.getObjectId()); + msg.setHtml(TopWindow(player)); + msg.replace("%objectId%", String.valueOf(this.getObjectId())); + player.sendPacket(msg); + } + + private String TopWindow(L2PcInstance player) + { + TextBuilder tb = new TextBuilder(); + tb.append("<html><title>Ranking Basado en K/D</title><body>"); + tb.append("<center>"); + tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=\"256\" height=\"32\"><tr>"); + tb.append("<font color=\"999999\">Top 10 Kills/Deaths</font><br><br>"); + tb.append("Hola! " + player.getName() + "<br>"); + tb.append("<br>"); + tb.append("<br>"); + tb.append("<tr>"); + tb.append("<td><button value=\"Visualizar\" action=\"bypass -h npc_%objectId%_TopDeaths\" width=\"100\" height=\"21\" back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></tr>"); + tb.append("</tr>"); + tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=\"256\" height=\"32\"><br>"); + tb.append("</center>"); + tb.append("</body></html>"); + return tb.toString(); + } + + private int pos; + private final TextBuilder _deathsList = new TextBuilder(); + + @SuppressWarnings("null") + private void TopDeaths(L2PcInstance player) + { + Connection con = null; + + try + { + pos = 1; + con = L2DatabaseFactory.getInstance().getConnection(); + PreparedStatement statement = con.prepareStatement("SELECT char_name,pvpkills,deaths FROM characters WHERE accesslevel=0 ORDER BY deaths LIMIT 10"); + + ResultSet result = statement.executeQuery(); + + while (result.next()) + { + addChar(pos, result.getString("char_name"), result.getInt("pvpkills"), result.getInt("deaths")); + pos++; + + NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); + TextBuilder sb = new TextBuilder(); + sb.append("<html><title>Ranking Basado en K/D</title><body>"); + sb.append("<center>"); + sb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32><br>"); + sb.append("<font color=\"999999\">Top 10 Kills/Deaths</font><br><br>"); + sb.append("<br>"); + sb.append("<table border=0 width=250><tr>"); + sb.append("<td FIXWIDTH=25 height=24 align=\"center\"><font color=\"ff0000\">No.</font></td>"); + sb.append("<td FIXWIDTH=80 height=24 align=\"center\"><font color=\"ae9977\">Nombre</font></td>"); + sb.append("<td FIXWIDTH=50 height=24 align=\"center\"><font color=\"ae9977\">Kills</font></td>"); + sb.append("<td FIXWIDTH=50 height=24 align=\"center\"><font color=\"ae9977\">Deaths</font></td>"); + sb.append("<td FIXWIDTH=60 height=24 align=\"center\"><font color=\"ea8b11\">K/D Ratio</font></td></tr></table>"); + sb.append(loadDeathList()); + sb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32><br>"); + sb.append("</center>"); + sb.append("</body></html>"); + html.setHtml(sb.toString()); + player.sendPacket(html); + } + + result.close(); + statement.close(); + } + catch (Exception e) + { + e.printStackTrace(); + } + finally + { + try + { + con.close(); + } + catch (Exception e) + { + + } + } + } + + public String loadDeathList() + { + return _deathsList.toString(); + } + + /** + * @param pos + * @param name + * @param pvp + * @param muertes + */ + private void addChar(int pos, String name, int pvp, int muertes) + { + float ratecalc = (float) pvp / (float) muertes; + _deathsList.append("<table border=0 width=250><tr>"); + _deathsList.append("<td FIXWIDTH=25 align=\"center\">" + pos + ".</td>"); + _deathsList.append("<td FIXWIDTH=80 align=\"center\">" + name + "</td>"); + _deathsList.append("<td FIXWIDTH=50 align=\"center\">" + pvp + "</td>"); + _deathsList.append("<td FIXWIDTH=50 align=\"center\">" + muertes + "</td>"); + _deathsList.append("<td FIXWIDTH=60 align=\"center\"><font color=FF0000>" + ratecalc + "</font></td></tr></table>"); + } + } +} \ No newline at end of file DataPack ->characters.sql `language` varchar(2) DEFAULT NULL, + `deaths` decimal(11,0) DEFAULT NULL, PRIMARY KEY (`charId`),thank you very much
4 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now