-
Posts
212 -
Credits
0 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by StarSCreams
-
WTS Grind-Team Rev. 650 Stable
StarSCreams replied to iPWNZ's topic in Marketplace [L2Packs & Files]
you can sell mod (система персонажей, управляемых компьютером - фантомы) i have ru files.. like your files.. -
Share L2Off Interlude(Il) Geodata (Depmax64)!
StarSCreams replied to Vagrancy™'s topic in Server Shares & Files [L2OFF]
password please i make for first time an interlude off -
i solve for my self a little fix my mistake thanks
-
WTS L2J Freya High Modded Pack
StarSCreams replied to ČυяŞŀŅğ's topic in Marketplace [L2Packs & Files]
This files based on? l2jserver, etc? other this files is FREYA or FREYA HIGH FIVE? thanks -
Hi, i need a developer to make a code for my project. i have fandc files, but i need a mod for new gmshop system. please contact me for skype for further explanation about the mod skype: for now no more developer need.
-
i, i need smf theme what is the price for this? thanks
-
[Services]Server Recreate
StarSCreams replied to Napster321's topic in Marketplace [L2Packs & Files]
only lineage 2? or other games? -
WTS Donate System Automatic !
StarSCreams replied to Gustavoloko's topic in Marketplace [L2Packs & Files]
trusted seller -
yes ... WTB hopzone/topzone script.
-
Hi I have seen out there that offer the script but not responding messages so I wonder who does want to buy it thanks pm me for skype id sorry use google translat
-
[Help] Check players for non-allowed skills
StarSCreams posted a question in Request Server Development Help [L2J]
Hi!! I need check player for non allowed skill but only skill in this list. 227,231,232,233,234,235,236,251,252,253,258 (Heavy, Light and Robe) Example: if characters class id=55(Bounty Hunter) get the skillid=227(LightArmor) is correct, but character change class to 36(Abyss Walker) get the skillid=233(LightArmor) and check this skill and delete non allowed skill in this case 227(LightArmor) is remove. how to do this? sorry for my english. i have this for learn normal skill public boolean isSkillPossible(Player player, Skill skill, AcquireType type) { Clan clan = null; List<SkillLearn> skills; switch(type) { case NORMAL: skills = _normalSkillTree.get(player.getActiveClassId()); break; case COLLECTION: skills = _collectionSkillTree; break; case TRANSFORMATION: skills = _transformationSkillTree.get(player.getRace().ordinal()); break; case FISHING: skills = _fishingSkillTree.get(player.getRace().ordinal()); break; case TRANSFER_CARDINAL: case TRANSFER_EVA_SAINTS: case TRANSFER_SHILLIEN_SAINTS: int transferId = type.transferClassId(); if(player.getActiveClassId() != transferId) return false; skills = _transferSkillTree.get(transferId); break; case CLAN: clan = player.getClan(); if(clan == null) return false; skills = _pledgeSkillTree; break; case SUB_UNIT: clan = player.getClan(); if(clan == null) return false; skills = _subUnitSkillTree; break; case CERTIFICATION: skills = _certificationSkillTree; break; default: return false; } return isSkillPossible(skills, skill); } private boolean isSkillPossible(Collection<SkillLearn> skills, Skill skill) { for(SkillLearn learn : skills) if(learn.getId() == skill.getId() && learn.getLevel() <= skill.getLevel()) return true; return false; } public boolean isSkillPossible(Player player, Skill skill) { for(AcquireType aq : AcquireType.VALUES) if(isSkillPossible(player, skill, aq)) return true; return false; } -
Code Mob Drop Panel Freya/h5 L2Jserver
StarSCreams replied to LioNa's topic in Server Shares & Files [L2J]
same problem, i cannot find fix for this, crash in allgrandboss, allmobs dragon valley (h5) -
[HELP]On EnterWorld Character Creation Date
StarSCreams replied to StarSCreams's question in Request Server Development Help [L2J]
i find this :P Calendar date = activeChar.getCreateDate(); SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_BIRTHDAY_IS_S3_S4_S2); sm.addPcName(activeChar); sm.addString(Integer.toString(date.get(Calendar.YEAR))); sm.addString(Integer.toString(date.get(Calendar.MONTH)+1)); sm.addString(Integer.toString(date.get(Calendar.DATE))); activeChar.sendPacket(sm); -
[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!