-
Posts
224 -
Credits
0 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by StarSCreams
-
[HELP]On EnterWorld Character Creation Date
StarSCreams replied to StarSCreams's question in Request Server Development Help [L2J]
i try to send message when character loggin with a date char creation in this format example: dd/mm/yyyy -
[HELP]On EnterWorld Character Creation Date
StarSCreams posted a question in Request Server Development Help [L2J]
how I can display the date character creation in enterworld.java? i want to show char creation date when char loggin. thanks -
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
i will test next day this last version i use 3.4.4 u.u keep working, i comeback later. -
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
matthe error? or not? the PKKills no update+1 never. this is my config file. #------------------------------------------------------------------------------------------# #===================== Config v3.4.2 for l2jserver Hi5 by Masterio ========================# #------------------------------------------------------------------------------------------# #========================== CUSTOM PVP/RANK/REWARD SYSTEM =================================# # Legal options for improve security. # Legal fields in database store data of legal kills on victim, # it's mean if CustomPvpLegalPkKillerAward = false and killer kill PK player, he don't rise kills_legal count. # INFO: Legal options dosen't matter for Reward/Rank options. # INFO: All legal fields created for Community Board info about real kills count. #---------------------------------------- # Enable PvP - #---------------------------------------- # Enable Custom PvP System CustomPvpEnabled = True # Enable legal counter in Alt+T window in game. It's mean all kills will be counted by CPS rulez. CustomPvpLegalCounterAltTEnabled = True # Minimum player level for rise legal kills. CustomPvpLegalMinLvl = 1 # If enabled each kill player with Karma will rise kills_legal and kills_today_legal in database. Default true. CustomPvpLegalPkKillerAward = True # If enabled each innocent players kills will rise kills_legal and kills_today_legal in database. Default false. CustomPvpLegalPkModeEnabled = True # Set time interval between kills the same victim (in minutes). # If CustomPvpRewardProtection = 0 then reset is working for rewards, # if CustomPvpRankProtection = 0 then reset is working for ranks. # Default: 1440, Preferred: 1440 [24h]. CustomPvpProtectionReset = 1440 # If enabled killer can't earn Rank Points, Rank Reward amount for kill higher rank Victim, than for kill hiself rank rp / rewards amount. # implementation soon... #---------------------------------------- # Enable Reward - #---------------------------------------- # INFO: CustomPvpRewardProtectionReset is used. # Enable Custom PvP Reward System # REQUIRE: CustomPvpEnabled = true CustomPvpRewardEnabled = True # If the same player kill victim many times, then after X times the reward will not increase (0 - Disabled) CustomPvpRewardProtection = 0 # Reward item id CustomPvpRewardItemId = 57 # Reward item amount CustomPvpRewardAmmount = 100 # Minimum player level to obtain reward. CustomPvpRewardMinLvl = 1 # Gives reward for kill PK player (player with red nick) CustomPvpRewardPkKillerAward = True # Gives reward for kill innocent players. (PK mode ON) CustomPvpRewardPkModeEnabled = False #---------------------------------------- # Enable Ranks - #---------------------------------------- # INFO: CustomPvpRewardProtectionReset is used. # INFO: CustomPvpRewardEnabled can be disabled. # INFO: CustomPvpRankName, # CustomPvpRankMinPoints, # CustomPvpRankPointsForKill, # CustomPvpRankRewardIds, # CustomPvpRankRewardAmounts # must have same size and cannot be empty. # REQUIRE: CustomPvpEnabled = true CustomPvpRankEnabled = True # Minimum player level to obtain Rank Points. CustomPvpRankMinLvl = 1 # Minimum player level to obtain Rank Points. CustomPvpRank = 1 # Rank names (first element is the higher rank): # Format: name1,name2,name3 # Example: CustomPvpRankName = custom rank name :P # INFO: Be careful with points. MySql database allow BIGINT(18) total rank points. # Rank require points (first element is points count for obtain 1st rank title, in example: Five Star General): # Format: count1,count2,count3 # (count1 > count2 > count3) >= 0, minimum points for first (lowest) rank must be 0! # Foramt: CustomPvpRankMinPoints = 10000,1000,400,0 # IMPORTANT: property elements count must be same like in CustomPvpRankName. # Example: if current points BETWEEN 10 000 AND 5 000 is Rank 2. CustomPvpRankMinPoints = custom rank :P # Example: For God finger kills reward is 100 points. # Format: count1,count2,count3 # IMPORTANT: properties count must be same like in CustomPvpRankName. CustomPvpRankPointsForKill = custom rank :P # If enabled each rank points earn will give reward by the Rank. CustomPvpRankRewardEnabled = False # Reward item id's. # IMPORTANT: properties elements count must be same like in CustomPvpRankName. CustomPvpRankRewardIds = custom rank :P # Reward item amount # IMPORTANT: properties elements count must be same like in CustomPvpRankItemIds. CustomPvpRankRewardAmounts = custom rank :P # If the same player kill victim many times, then after X times the points will not increase (0 - Disabled). # If CustomPvpRankFarmProtect = 3, then it return 0 Rank Points for kill 4 time the same player. # INFO: Protection is reseted every CustomPvpRewardProtectionReset. CustomPvpRankProtection = 0 # Enable alternative points counting for players. # If enabled then CustomPvpRankPointsForKill is ignored. # Example: CustomPvpRankKillPointsDown = 100,50,10,1,0 # For first daily kill awards 100, 2nd kill give 50, ... , 0. CustomPvpRankKillPointsDownEnabled = False CustomPvpRankKillPointsDown = 100,50,10,1,0 # Shout current Points info to killer & victim. CustomPvpRankShoutInfo = True # Enable Rank Points for kill PK. CustomPvpRankPkKillerAward = True # Enable Rank Points for kill innocent players. (PK mode ON) CustomPvpRankPkModeEnabled = False #-------------------------------------------- # Enable War Kills - #-------------------------------------------- # Enable war kills counter CustomPvpWarEnabled = True # Ratio for Rank Points when killed a player from WAR Clan. # Add to standard rank points for kill difference between ((points * ratio) - points). # 2.0 mean 2 times more points for kill. # Ratio must be > 1, if <= 1 points will be not awarded. CustomPvpWarRPRatio = 2.0 #--------------------------------------------------------------------- # .pvpinfo command, and death manager options - #--------------------------------------------------------------------- # If enabled allow use .pvpinfo command on targeted player. CustomPvpInfoCommandEnabled = True # If enabled .pvpinfo will be used by victim when Killer kill Victim. CustomPvpInfoCommandShowOnDeathEnabled = True # Show additional button in PvPWindow after death. # Button allow see more details about killer. HP/MP/CP, equipment (enchant) if enabled. # It shows killer status only for kill MOMENT. # Option requires CustomPvpInfoCommandShowOnDeathEnabled and CustomPvpInfoCommandEnabled set on True. CustomPvpDeathManagerDetailsEnabled = True # Show killer weapons, armors, jawels and enchant. CustomPvpDeathManagerShowItems = True # Enable Rewards for obtain RankPoints. # Rewards configuration in database table: custom_pvp_system_rank_reward. # If enabled button "Get Reward" appear in PvP Status Window. CustomPvpRankPointsRewardEnabled = True #------------------------------------------------------------ # PvP / Rank / Reward / DM zone option's - #------------------------------------------------------------ # Zone id's: # ZONE_PVP = 0; # ZONE_PEACE = 1; # ZONE_SIEGE = 2; # ZONE_MOTHERTREE = 3; # ZONE_CLANHALL = 4; # ZONE_LANDING = 5; # ZONE_NOLANDING = 6; # ZONE_WATER = 7; # ZONE_JAIL = 8; # ZONE_MONSTERTRACK = 9; # ZONE_CASTLE = 10; # ZONE_SWAMP = 11; # ZONE_NOSUMMONFRIEND = 12; # ZONE_FORT = 13; # ZONE_NOSTORE = 14; # ZONE_TOWN = 15; # ZONE_SCRIPT = 16; # ZONE_HQ = 17; # ZONE_DANGERAREA = 18; # ZONE_ALTERED = 19; # ZONE_NOBOOKMARK = 20; # ZONE_NOITEMDROP = 21; # ZONE_NORESTART = 22; # Custom PvP System Anti-Farm options (zones id): # Restricted zones id's. # It's mean if 'CustomPvpRestrictedZonesIds = 300003' , pvp/points counting is impossible here. # Format: zoneId,zoneId, ... ,zoneId,zoneId # Default: CustomPvpRestrictedZonesIds = 1,8,9 CustomPvpRestrictedZonesIds = 1,8,9 # Death Manager is disabled in this zones. CustomPvpDeathManagerRestrictedZonesIds = 1,8,9 # Rank Ponts Bonus Ratio Zones # Add to standard rank points for kill difference between ((points * ratio) - points). # FORMAT: zoneId,ratio; ... ;zoneId,ratio # Ratio must be > 1, if <= 1 points will be not awarded. # Example: 2,1.5;13,1.2 # It will multiply rank points for Killer by 1.5 in area 2 , if Killer is inside this area. CustomPvpRankPointsBonusZones = 2,1.5;13,1.2 #----------------------------------------- # Anti-Farm - #----------------------------------------- # INFO: Options to check farming players # (dualbox farming, party farming, clan farming). CustomPvpAntiFarmClanAllyEnabled = True CustomPvpAntiFarmPartyEnabled = True CustomPvpAntiFarmIpEnabled = False #------------------------------------------------------------------------------------- # Database - #------------------------------------------------------------------------------------- # DO NOT CHANGE IT IF YOU DON'T KNOW WHAT YOU DO! # Interval between PvpTable dump into database (in ms). # Value must be greather than 10000 or will be overrided for 10000. # Default: 60000 PvpTableUpdateInterval = 60000 # Interval between TopTable updates (in ms). # Value must be greather than 60000 or will be overrided for 60000. # Default: 600000 (10 min) Safe: 3600000 (1 h) TopTableUpdateInterval = 3600000 #----------------------------------------- # Community Board - #----------------------------------------- # Enable statistics system for community TOP LIST, data like top killers, top RP gatherers will be showed. # Default: True CommunityBoardTopListEnabled = True #==========================================================================================# tested in live server 150 players online. all player have 0 pk kills. only PvPkills. P/D: i want reward rank point only for flagged player no PK Player. # Gives reward for kill innocent players. (PK mode ON) CustomPvpRewardPkModeEnabled = False -
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
install in last rev l2jserver in clean proyect and give me this error in gs and no open .pvpinfo Client: [Character: test[253254184] - Account: test - IP: 127.0.0.1] - Failed running: [C] B3 BypassUserCmd - L2J Server Version: 5729M - DP Revision : 9341M ; null java.lang.NullPointerException at com.l2jserver.gameserver.custom.pvpsystem.CustomPvpSystemPlayerInfo.r ankImgTableHtml(CustomPvpSystemPlayerInfo.java:317) at com.l2jserver.gameserver.custom.pvpsystem.CustomPvpSystemPlayerInfo.p layerResponseHtml(CustomPvpSystemPlayerInfo.java:58) at com.l2jserver.gameserver.custom.pvpsystem.CustomPvpSystemPlayerInfo.s endPlayerResponse(CustomPvpSystemPlayerInfo.java:36) at com.l2jserver.gameserver.custom.pvpsystem.CustomPvpSystemCmd.useUserC ommand(CustomPvpSystemCmd.java:64) at com.l2jserver.gameserver.network.clientpackets.BypassUserCmd.runImpl( BypassUserCmd.java:57) at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run (L2GameClientPacket.java:66) at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1 088) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) EDIT: Fixed, the solution is -.-! in CustomPvpSystemConfig.properties CustomPvpRankMinPoints = 12345, 1234, 123, 12, 0 first rank must be have 0 not other value :( -
[HELP]DeathCountManager Simple Bug.
StarSCreams replied to StarSCreams's question in Request Server Development Help [L2J]
Thanks I will keep working -
[HELP]DeathCountManager Simple Bug.
StarSCreams replied to StarSCreams's question in Request Server Development Help [L2J]
thanks for you comments, read this rework of the code and now there is a different problem, just random 1 result not ORDER BY deaths DESC LIMIT 10 here update /* * 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\"><br>"); 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\"></td>"); 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; @SuppressWarnings("null") private void TopDeaths(L2PcInstance player) { Connection con = null; PreparedStatement statement = null; ResultSet result = null; try { pos = 1; con = L2DatabaseFactory.getInstance().getConnection(); statement = con.prepareStatement("SELECT char_name,pvpkills,deaths FROM characters WHERE accesslevel=0 ORDER BY deaths DESC LIMIT 10"); result = statement.executeQuery(); while (result.next()) { String name = result.getString("char_name"); int pvp = result.getInt("pvpkills"); int muertes = result.getInt("deaths"); float ratecalc = (float) pvp / muertes; 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("<table border=0 width=250><tr>"); sb.append("<td FIXWIDTH=25 align=\"center\">" + pos + ".</td>"); sb.append("<td FIXWIDTH=80 align=\"center\">" + name + "</td>"); sb.append("<td FIXWIDTH=50 align=\"center\">" + pvp + "</td>"); sb.append("<td FIXWIDTH=50 align=\"center\">" + muertes + "</td>"); if (ratecalc > 1) { sb.append("<td FIXWIDTH=60 align=\"center\"><font color=99FF00>" + ratecalc + "</font></td></tr></table>"); } else { sb.append("<td FIXWIDTH=60 align=\"center\"><font color=FF0000>" + ratecalc + "</font></td></tr></table>"); } 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) { } } } } -
[HELP]DeathCountManager Simple Bug.
StarSCreams posted a question in Request Server Development Help [L2J]
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 -
up, please helpme with null pointer? java.lang.NullPointerException at com.l2jserver.gameserver.model.zone.type.L2MultiFunctionZone.loadConf igs(L2MultiFunctionZone.java:288) at com.l2jserver.gameserver.model.zone.type.L2MultiFunctionZone.<init>(L 2MultiFunctionZone.java:62) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.l2jserver.gameserver.instancemanager.ZoneManager.parseDocument(Zo neManager.java:176) at com.l2jserver.gameserver.engines.DocumentParser.parseFile(DocumentPar ser.java:97) at com.l2jserver.gameserver.engines.DocumentParser.parseDirectory(Docume ntParser.java:172) at com.l2jserver.gameserver.engines.DocumentParser.parseDirectory(Docume ntParser.java:135) at com.l2jserver.gameserver.instancemanager.ZoneManager.load(ZoneManager .java:344) at com.l2jserver.gameserver.instancemanager.ZoneManager.<init>(ZoneManag er.java:62) at com.l2jserver.gameserver.instancemanager.ZoneManager$SingletonHolder. <clinit>(ZoneManager.java:678) at com.l2jserver.gameserver.instancemanager.ZoneManager.getInstance(Zone Manager.java:673) at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:268) at com.l2jserver.gameserver.GameServer.main(GameServer.java:484)
-
I have this problem, how fix?
-
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
sorry no speak english, only write (and translate.google.com) i revert version to 3.0.3, my community is small, thanks! -
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
Problem when type: .pvpinfo command Client: [Character: TEST[268452684] - Account: betatest - IP: 10.0.0.15] - Failed running: [C] B3 BypassUserCmd - L2J Server Version: 5720M - DP Revisio n: 9308 ; null java.lang.NullPointerException at com.l2jserver.gameserver.custom.pvpsystem.CustomPvpSystemPlayerInfo.r ankImgTableHtml(CustomPvpSystemPlayerInfo.java:309) at com.l2jserver.gameserver.custom.pvpsystem.CustomPvpSystemPlayerInfo.p layerResponseHtml(CustomPvpSystemPlayerInfo.java:58) at com.l2jserver.gameserver.custom.pvpsystem.CustomPvpSystemPlayerInfo.s endPlayerResponse(CustomPvpSystemPlayerInfo.java:36) at com.l2jserver.gameserver.custom.pvpsystem.CustomPvpSystemCmd.useUserC ommand(CustomPvpSystemCmd.java:63) at com.l2jserver.gameserver.network.clientpackets.BypassUserCmd.runImpl( BypassUserCmd.java:57) at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run (L2GameClientPacket.java:66) at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1 088) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) help please. -
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
you can make a diff from version 3.0.3 to 3.4.2? thanks -
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
thanks ^^ soon -
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
other question in this config CustomPvpWarRPRatio = 1.0 is posible this? CustomPvpWarRPRatio = 1.2 thanks! -
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
thanks this is solution for my problem and solved. i adapt this patch up to H5 Beta, and full work!. thanks matthewmaster04 keep working :D -
Code Rank Pvp System 3.8.9 [Il - H5]
StarSCreams replied to << Masterio >>'s topic in Server Shares & Files [L2J]
error in gameserver console and in game get reward everytime com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Mixing of GROUP colum ns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GRO UP BY clause at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2734) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja va:2155) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java: 2322) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewPr oxyPreparedStatement.java:108) at com.l2jserver.gameserver.custom.pvpsystem.CustomPvpSystemRankPointsRe ward.getRankPointsRewardToInventory(CustomPvpSystemRankPointsReward.java:102) at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer. runImpl(RequestBypassToServer.java:365) at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run (L2GameClientPacket.java:66) at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1 088) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) -
I already pay at the following link http://maxcheaters.com/forum/index.php?action=profile;area=subscriptions 20EU for vip member :P I even send a private message to maxtor?
-
hi! how long it takes to activate vip member? sorry for my spanglish xD
-
[Hidden post: You need reply to this topic to see it.]
-
xD!! nice test
-
Stackable SubClass Npc (Need Help)
StarSCreams posted a question in Request Server Development Help [L2J]
i use last rev l2jserver. i have this script Stackable Skills. http://pastebin.com/MjPS9FxW upload for me. created by Allen. and this post in MaxCheaters its same. http://maxcheaters.com/forum/index.php?topic=80123.0 SQL_PART: DROP TABLE IF EXISTS `subclass_list`; CREATE TABLE `subclass_list` ( `player_id` varchar(40) NOT NULL, `currentsub` int(3) NOT NULL DEFAULT '0', `sub_index` int(3) NOT NULL DEFAULT '0', `subclassid0` int(3) NOT NULL DEFAULT '-1', `subclassid1` int(3) NOT NULL DEFAULT '-1', `subclassid2` int(3) NOT NULL DEFAULT '-1', `subclassid3` int(3) NOT NULL DEFAULT '-1' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Problems: 1.- When delete any subclass (ex: Paladin) skills not remove, only remove ID of Class from (SQLTABLE: subclass_list), and the character continues with these skills (ex: Paladin) (Not Solved) 2.-when first character get subclass (ex: Overlord) , other character no see in list subclass overlord, warsmith and others disappear (temporarily solved) 3.-Can not see the name of the class (Unknow Class) (Solved Thanks Zoey76) 4.- When character rise level (ex: 76), get subclass and back to level 40, but problem with expertise skills, (S-Grade Expertise for reach to level 76), when character back to level 40 Expertise is not remove, and character not get grade penalty. (Not Soved minor importance) my list of fixes to work in the last revision: Solution for problem (2) i think so is not correct solution :P but work @@ -411,1 +411,1 @@ def FORBBIDEN_LIST(st,data): - val = CONFIG_FORBBIDEN_SUBCLASSES + val = [] val.append(st.player.getClassId().getId()) if data == None: data = DATA(st) for i in range(CONFIG_MAX_SUBS_IN_DB + 1): if data[i+2] != -1: val.append(data[i+2]) if not CONFIG_ALLOW_SUBCLASS_DUPLICATION: if st.player.getBaseClass() not in val: val.append(st.player.getBaseClass()) for subClass in st.player.getSubClasses().values(): val.append(subClass.getClassId()) return val Solution for problem (3) Thanks Zoey76 @@ -15 +15 @@ - from com.l2jserver.gameserver.datatables import CharTemplateTable + from com.l2jserver.gameserver.datatables import ClassListData @@ -493,1 +493,1 @@ def CLASS_NAME(case): val = "Unknow Class" - try: val = CharTemplateTable.getInstance().getClassNameById(int(case)) + try: val = ClassListData.getInstance().getClass(int(case)).getClassName() except: val = "Unknow Class" return val And the problem (1) I think in these lines is the solution. @@ -655, +655 @@ elif event == "delete": info = DATA(st) if not ALLOW_ACTION(st): return elif not SLOT_ALLOWED(info,event2): return ERRORS_HTML(st,"11","0") elif info[1]!= player.getClassIndex(): return ERRORS_HTML(st,"13",event1) elif st.getPlayer().getClassId().level() < CONFIG_CLASS_TRANSFER_LEVEL: return ERRORS_HTML(st,"5","0") elif st.getQuestItemsCount(CONFIG_DELETE_ITEM_REQUIRED) < CONFIG_DELETE_ITEM_A-beep-T and CONFIG_ENABLE_FEE_FOR_SUBCLASS: return ERRORS_HTML(st,"3","0") elif event2 == "0" and not CONFIG_ALLOW_DELETE_MAIN_CLASS: return ERRORS_HTML(st,"9","0") else: conn=L2DatabaseFactory.getInstance().getConnection() pcid = player.getClassId() upd=conn.prepareStatement("UPDATE subclass_list SET subclassid%s=%s WHERE player_id=%s" % (info[0],pcid.getId(),STRING_PART(st))) try : upd.executeUpdate() upd.close() conn.close() except : try : conn.close() except : pass if event2 == `info[0]` and SUB_COUNT(info) > 0: j=0 for i in range(CONFIG_MAX_SUBS_IN_DB + 1): if CID_LEVEL(info[i+2]) >= Math.min(2,CONFIG_CLASS_TRANSFER_LEVEL) and j == 0 and i != info[0]: j+=1; temp = info[i+2]; info[0] = i player.setTarget(player) player.setClassId(temp) if not player.isSubClassActive(): player.setBaseClass(temp) player.sendMessage("Your class has changed to " + player.getTemplate().className) if not CONFIG_ENABLE_RESTART_PROTECTION: player.store() player.broadcastUserInfo() con=L2DatabaseFactory.getInstance().getConnection() if SUB_COUNT(info) <= 1: rem=con.prepareStatement("DELETE FROM subclass_list WHERE player_id=%s" % STRING_PART(st)) else: rem = con.prepareStatement("UPDATE subclass_list SET subclassid%s=-1 ,currentsub=%s WHERE player_id=%s" % (event2,info[0],STRING_PART(st))) try : rem.executeUpdate() except : pass try : rem.close() con.close() except : pass if RESET_SKILLS(st) == 1: pass if CONFIG_ENABLE_FEE_FOR_SUBCLASS: st.takeItems(CONFIG_DELETE_ITEM_REQUIRED,CONFIG_DELETE_ITEM_A-beep-T) if CONFIG_ENABLE_RESTART_PROTECTION and BLOCK_TIME(st,CONFIG_RESTART_TIME_PROTECTION): self.startQuestTimer("dorestart 0 0", CONFIG_RESTART_TIME_PROTECTION*1000, npc, player) AttackStanceTaskManager.getInstance().addAttackStanceTask(player) elif CONFIG_ENABLE_FLOOD_PROTECTION and BLOCK_TIME(st,CONFIG_FLOOD_PROTECTION_TIME): pass return COMPLETE_HTML(st,event1,`pcid.getId()`) thanks for you help -
please upload other host :/
-
[Share] Normal Players Can Equip Hero Weapons
StarSCreams replied to `Rοmeο's topic in Server Shares & Files [L2J]
thanks i need this xD for my server :D -
[Share] Color Manager [H5] - java
StarSCreams replied to Gladicek's topic in Server Shares & Files [L2J]
very nice thanks gladicek :D