Galera seguinte tenho um arquivo salvo .jar executado eu acho … Blz até ai .
Extrai isso e com isso surgiu varios pastas arquivos Class e etc…
E queria editar apenas um arquivo adicionar o seguinte
Tem algum jeito de pegar o código-fonte desse jogo? É nele que você deveria inserir essa modificação.
S
sommer
Entao vo por aqui o Codigo Fonte do Jogo e nao Onde eu adiciono aquilo que postei acima??
// Decompiled by DJ v3.9.9.91 Copyright 2005 Atanas Neshkov Date: 16/6/2008 18:57:42// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!// Decompiler options: packimports(3) // Source File Name: EnterWorld.javapackagenet.sf.l2j.gameserver.clientpackets;importjava.io.UnsupportedEncodingException;importjava.sql.*;importjava.util.*;importjava.util.logging.Logger;importjavolution.util.FastList;importnet.sf.l2j.*;importnet.sf.l2j.gameserver.*;importnet.sf.l2j.gameserver.cache.HtmCache;importnet.sf.l2j.gameserver.communitybbs.Manager.RegionBBSManager;importnet.sf.l2j.gameserver.datatables.MapRegionTable;importnet.sf.l2j.gameserver.datatables.PcColorTable;importnet.sf.l2j.gameserver.handler.AdminCommandHandler;importnet.sf.l2j.gameserver.instancemanager.*;importnet.sf.l2j.gameserver.model.*;importnet.sf.l2j.gameserver.model.actor.appearance.PcAppearance;importnet.sf.l2j.gameserver.model.actor.instance.L2PcInstance;importnet.sf.l2j.gameserver.model.actor.stat.PcStat;importnet.sf.l2j.gameserver.model.entity.*;importnet.sf.l2j.gameserver.model.entity.L2JOneoEvents.*;importnet.sf.l2j.gameserver.model.quest.Quest;importnet.sf.l2j.gameserver.network.L2GameClient;importnet.sf.l2j.gameserver.network.SystemMessageId;importnet.sf.l2j.gameserver.serverpackets.*;importnet.sf.l2j.gameserver.services.WindowService;importnet.sf.l2j.gameserver.util.FloodProtector;// Referenced classes of package net.sf.l2j.gameserver.clientpackets:// L2GameClientPacketpublicclassEnterWorldextendsL2GameClientPacket{publicEnterWorld(){}publicTaskPrioritygetPriority(){returnTaskPriority.PR_URGENT;}protectedvoidreadImpl(){}protectedvoidrunImpl(){L2PcInstanceactiveChar=((L2GameClient)getClient()).getActiveChar();if(activeChar==null){_log.warning("EnterWorld failed! activeChar is null...");((L2GameClient)getClient()).closeNow();return;}FloodProtector.getInstance().registerNewPlayer(activeChar.getObjectId());if(L2World.getInstance().findObject(activeChar.getObjectId())!=null&&Config.DEBUG)_log.warning((newStringBuilder()).append("User already exist in OID map! User ").append(activeChar.getName()).append(" is character clone").toString());if(activeChar.isGM()){if(Config.GM_STARTUP_INVULNERABLE&&(!Config.ALT_PRIVILEGES_ADMIN&&activeChar.getAccessLevel()>=Config.GM_GODMODE||Config.ALT_PRIVILEGES_ADMIN&&AdminCommandHandler.getInstance().checkPrivileges(activeChar,"admin_invul")))activeChar.setIsInvul(true);if(Config.GM_STARTUP_INVISIBLE&&(!Config.ALT_PRIVILEGES_ADMIN&&activeChar.getAccessLevel()>=Config.GM_GODMODE||Config.ALT_PRIVILEGES_ADMIN&&AdminCommandHandler.getInstance().checkPrivileges(activeChar,"admin_invisible")))activeChar.getAppearance().setInvisible();if(Config.GM_STARTUP_SILENCE&&(!Config.ALT_PRIVILEGES_ADMIN&&activeChar.getAccessLevel()>=Config.GM_MENU||Config.ALT_PRIVILEGES_ADMIN&&AdminCommandHandler.getInstance().checkPrivileges(activeChar,"admin_silence")))activeChar.setMessageRefusal(true);if(Config.GM_STARTUP_AUTO_LIST&&(!Config.ALT_PRIVILEGES_ADMIN&&activeChar.getAccessLevel()>=Config.GM_MENU||Config.ALT_PRIVILEGES_ADMIN&&AdminCommandHandler.getInstance().checkPrivileges(activeChar,"admin_gmliston")))GmListTable.getInstance().addGm(activeChar,false);elseGmListTable.getInstance().addGm(activeChar,true);if(Config.GM_NAME_COLOR_ENABLED){if(activeChar.getAccessLevel()>=100)activeChar.getAppearance().setNameColor(Config.ADMIN_NAME_COLOR);elseif(activeChar.getAccessLevel()>=75)activeChar.getAppearance().setNameColor(Config.GM_NAME_COLOR);if(Config.SHOW_GM_LOGIN){Stringname=activeChar.getName();Stringtext=(newStringBuilder()).append("GameMaster ").append(name).append(" Is Currently Online.").toString();Announcements.getInstance().announceToAll(text);}}}if(Config.PLAYER_SPAWN_PROTECTION>0)activeChar.setProtection(true);activeChar.spawnMe(activeChar.getX(),activeChar.getY(),activeChar.getZ());if(L2Event.active&&L2Event.connectionLossData.containsKey(activeChar.getName())&&L2Event.isOnEvent(activeChar))L2Event.restoreChar(activeChar);elseif(L2Event.connectionLossData.containsKey(activeChar.getName()))L2Event.restoreAndTeleChar(activeChar);if(SevenSigns.getInstance().isSealValidationPeriod())sendPacket(newSignsSky());if(Config.STORE_SKILL_COOLTIME)activeChar.restoreEffects();activeChar.sendPacket(newEtcStatusUpdate(activeChar));if(Config.ALLOW_WEDDING){engage(activeChar);notifyPartner(activeChar,activeChar.getPartnerId());if(!activeChar.isMaried()){L2ItemInstanceitem=activeChar.getInventory().getItemByItemId(9140);if(item!=null){activeChar.destroyItem("Removing Cupid's Bow",item,activeChar,true);activeChar.getInventory().updateDatabase();_log.info((newStringBuilder()).append("Character ").append(activeChar.getName()).append(" of account ").append(activeChar.getAccountName()).append(" got Cupid's Bow removed.").toString());}}}L2ItemInstancearr$[];intlen$;if(activeChar.getAllEffects()!=null){arr$=activeChar.getAllEffects();len$=arr$.length;for(inti$=0;i$<len$;i$++){L2Effecte=arr$[i$];if(e.getEffectType()==net.sf.l2j.gameserver.model.L2Effect.EffectType.HEAL_OVER_TIME){activeChar.stopEffects(net.sf.l2j.gameserver.model.L2Effect.EffectType.HEAL_OVER_TIME);activeChar.removeEffect(e);}if(e.getEffectType()==net.sf.l2j.gameserver.model.L2Effect.EffectType.COMBAT_POINT_HEAL_OVER_TIME){activeChar.stopEffects(net.sf.l2j.gameserver.model.L2Effect.EffectType.COMBAT_POINT_HEAL_OVER_TIME);activeChar.removeEffect(e);}}}arr$=activeChar.getInventory().getAugmentedItems();len$=arr$.length;for(inti$=0;i$<len$;i$++){L2ItemInstancetemp=arr$[i$];if(temp!=null&&temp.isEquipped())temp.getAugmentation().applyBoni(activeChar);}ExStorageMaxCountesmc=newExStorageMaxCount(activeChar);activeChar.sendPacket(esmc);activeChar.getMacroses().sendUpdate();if(Config.DONATOR_DELETE_RENTED_ITEMS)activeChar.donatorDeleteDelayedRentedItems();sendPacket(newUserInfo(activeChar));sendPacket(newHennaInfo(activeChar));sendPacket(newFriendList(activeChar));sendPacket(newItemList(activeChar,false));sendPacket(newShortCutInit(activeChar));SystemMessagesm=newSystemMessage(SystemMessageId.WELCOME_TO_LINEAGE);sendPacket(sm);if(Config.SHOW_L2J_LICENSE){sm=newSystemMessage(SystemMessageId.S1_S2);sm.addString(getText("VGhpcyBzZXJ2ZXIgaXMgcnVubmluZyB0aGUgTDJKT25lbyBkaXN0cmlidXRpb24gb2YgTDJqLg=="));sendPacket(sm);sm=newSystemMessage(SystemMessageId.S1_S2);sm.addString(getText("TDJKT25lbyBEZXYgVGVhbTpEYVJrUmFHZSwgc2NodXJzaW4sIEFobWVkLA=="));sm.addString(getText("bmVvRGV2aWwsIFNseWNlciwgQmFvcmMsIFZpY2UsIEV6RXJhbCwgTGlxdWlkSWNlLg=="));sendPacket(sm);sm=newSystemMessage(SystemMessageId.S1_S2);sm.addString(getText("TDJKIHdhcyBmb3VuZGVkIGJ5IEwyQ2hlZiBhbmQgdGhlIEwySiBUZWFtLg=="));sm.addString(getText("IEwySiB0ZWFtLg=="));sendPacket(sm);sm=newSystemMessage(SystemMessageId.S1_S2);sm.addString(getText("VmlzaXQgaHR0cDovL3d3dy5sMmpzZXJ2ZXIuY29t"));sm.addString(getText("ICBmb3Igc3VwcG9ydC4="));sendPacket(sm);sm=newSystemMessage(SystemMessageId.S1_S2);sm.addString(getText("V2VsY29tZSB0byA="));sm.addString(LoginServerThread.getInstance().getServerName());sendPacket(sm);if(Config.SERVER_VERSION!=null){sm=newSystemMessage(SystemMessageId.S1_S2);sm.addString((newStringBuilder()).append(getText("TDJKIFNlcnZlciBWZXJzaW9uOg==")).append(" ").append(Config.SERVER_VERSION).toString());sendPacket(sm);sm=newSystemMessage(SystemMessageId.S1_S2);sm.addString((newStringBuilder()).append(getText("TDJKIFNlcnZlciBCdWlsZCBEYXRlOg==")).append(" ").append(Config.SERVER_BUILD_DATE).toString());sendPacket(sm);}}sm=null;SevenSigns.getInstance().sendCurrentPeriodMsg(activeChar);Announcements.getInstance().showAnnouncements(activeChar);activeChar.checkBanChat(false);if(Config.ALLOW_AUTOHERBS_CMD)activeChar.getAutoLootHerbs();if(Config.ALLOW_WITHDRAW_CWH_CMD)activeChar.getCanWithdrawCWH();if(activeChar.isDonator()){activeChar.getAppearance().setNameColor(Config.DONATOR_NAME_COLOR);activeChar.sendMessage((newStringBuilder()).append("Welcome ").append(activeChar.getName()).append(" to our L][ Server!").toString());activeChar.sendMessage("Enjoy your Stay Donator!");}if(activeChar.isKoof()&&Config.ENABLE_FACTION_KOOFS_NOOBS){activeChar.getAppearance().setNameColor(Config.KOOFS_NAME_COLOR);activeChar.sendMessage((newStringBuilder()).append("Welcome ").append(activeChar.getName()).append(" u Are fighiting for ").append(Config.KOOFS_NAME_TEAM).append(" Faction").toString());activeChar.setTitle(Config.KOOFS_NAME_TEAM);}if(activeChar.isNoob()&&Config.ENABLE_FACTION_KOOFS_NOOBS){activeChar.getAppearance().setNameColor(Config.NOOBS_NAME_COLOR);activeChar.sendMessage((newStringBuilder()).append("Welcome ").append(activeChar.getName()).append(" u Are fighiting for ").append(Config.NOOBS_NAME_TEAM).append(" Faction").toString());activeChar.setTitle(Config.NOOBS_NAME_TEAM);}if(Config.ONLINE_PLAYERS_AT_STARTUP){intPLAYERS_ONLINE=L2World.getInstance().getAllPlayers().size()+Config.PLAYERS_ONLINE_TRICK;sm=newSystemMessage(SystemMessageId.S1_S2);sm.addString("Players online: ");sm.addNumber(PLAYERS_ONLINE);sendPacket(sm);}Quest.playerEnter(activeChar);activeChar.sendPacket(newQuestList());StringserverNews=HtmCache.getInstance().getHtm("data/html/servnews.htm");if(serverNews!=null)WindowService.sendWindow(activeChar,"data/html/","servnews.htm");PetitionManager.getInstance().checkPetitionMessages(activeChar);if(Config.SHOW_HTML_WELCOME)WindowService.sendWindow(activeChar,"data/html/","OneoInfo.htm");if(Config.SHOW_HTML_NEWBIE&&activeChar.getLevel()<Config.LEVEL_HTML_NEWBIE)WindowService.sendWindow(activeChar,"data/html/","newbie.htm");if(Config.CHECK_SKILLS_ON_ENTER&&!Config.ALT_GAME_SKILL_LEARN)activeChar.checkAllowedSkills();if(activeChar.getClanId()!=0&&activeChar.getClan()!=null){sendPacket(newPledgeShowMemberListAll(activeChar.getClan(),activeChar));sendPacket(newPledgeStatusChanged(activeChar.getClan()));}if(activeChar.isAlikeDead())sendPacket(newDie(activeChar));if(Config.ALLOW_WATER)activeChar.checkWaterState();if(Hero.getInstance().getHeroes()!=null&&Hero.getInstance().getHeroes().containsKey(Integer.valueOf(activeChar.getObjectId())))activeChar.setHero(true);setPledgeClass(activeChar);activeChar.setOnlineStatus(true);notifyFriends(activeChar);notifyClanMembers(activeChar);notifySponsorOrApprentice(activeChar);notifyCastleOwner(activeChar);activeChar.onPlayerEnter();checkCrown(activeChar);if(Olympiad.getInstance().playerInStadia(activeChar)){activeChar.teleToLocation(net.sf.l2j.gameserver.datatables.MapRegionTable.TeleportWhereType.Town);activeChar.sendMessage("You have been teleported to the nearest town due to you being in an Olympiad Stadium");}if(DimensionalRiftManager.getInstance().checkIfInRiftZone(activeChar.getX(),activeChar.getY(),activeChar.getZ(),false))DimensionalRiftManager.getInstance().teleportToWaitingRoom(activeChar);if(!activeChar.isGM()&&activeChar.getSiegeState()<2&&activeChar.isInsideZone(4)){activeChar.teleToLocation(net.sf.l2j.gameserver.datatables.MapRegionTable.TeleportWhereType.Town);activeChar.sendMessage("You have been teleported to the nearest town due to you being in siege zone");}if(Config.SET_LVL_ON_START&&activeChar.getLevel()>=1&&activeChar.getLevel()<80){if(!Config.HIGH_LEVEL_ON_START_FOR_SUBCLASS&&activeChar.isSubClassActive())return;activeChar.getStat().addExp(0x32116200L);activeChar.getStat().addExp(0x32116200L);activeChar.getStat().addExp(0x32116200L);activeChar.getStat().addExp(0x32116200L);activeChar.getStat().addExp(0x32116200L);activeChar.getStat().addExp(0x5f5e100L);activeChar.getStat().addSp(0x5f5e0ff);}if(activeChar.getClanJoinExpiryTime()>System.currentTimeMillis())activeChar.sendPacket(newSystemMessage(SystemMessageId.CLAN_MEMBERSHIP_TERMINATED));if(activeChar.getClan()!=null){activeChar.sendPacket(newPledgeSkillList(activeChar.getClan()));SiegeManager.getInstance().onEnterWorld(activeChar);FortSiegeManager.getInstance().onEnterWorld(activeChar);ClanHallclanHall=ClanHallManager.getInstance().getClanHallByOwner(activeChar.getClan());if(clanHall!=null&&!clanHall.getPaid())activeChar.sendPacket(newSystemMessage(SystemMessageId.PAYMENT_FOR_YOUR_CLAN_HALL_HAS_NOT_BEEN_MADE_PLEASE_MAKE_PAYMENT_TO_YOUR_CLAN_WAREHOUSE_BY_S1_TOMORROW));}RegionBBSManager.getInstance().changeCommunityBoard();TvTEvent.onLogin(activeChar);PcColorTable.getInstance().process(activeChar);if(VIP._playersVIP.contains(activeChar.getName()))VIP.addPlayerVIP(activeChar);if(VIP._playersNotVIP.contains(activeChar.getName()))VIP.addPlayerNotVIP(activeChar);if(CTF._savePlayers.contains(activeChar.getName()))CTF.addDisconnectedPlayer(activeChar);}privatevoidengage(L2PcInstancecha){int_chaid=cha.getObjectId();Iteratori$=CoupleManager.getInstance().getCouples().iterator();do{if(!i$.hasNext())break;Couplecl=(Couple)i$.next();if(cl.getPlayer1Id()==_chaid||cl.getPlayer2Id()==_chaid){if(cl.getMaried())cha.setMaried(true);cha.setCoupleId(cl.getId());if(cl.getPlayer1Id()==_chaid)cha.setPartnerId(cl.getPlayer2Id());elsecha.setPartnerId(cl.getPlayer1Id());}}while(true);}privatevoidnotifyPartner(L2PcInstancecha,intpartnerId){if(cha.getPartnerId()!=0){L2PcInstancepartner=(L2PcInstance)L2World.getInstance().findObject(cha.getPartnerId());if(partner!=null)partner.sendMessage("Your Partner has logged in");partner=null;}}privatevoidnotifyFriends(L2PcInstancecha){Connectioncon=null;con=L2DatabaseFactory.getInstance().getConnection();PreparedStatementstatement=con.prepareStatement("SELECT friend_name FROM character_friends WHERE char_id=?");statement.setInt(1,cha.getObjectId());ResultSetrset=statement.executeQuery();SystemMessagesm=newSystemMessage(SystemMessageId.FRIEND_S1_HAS_LOGGED_IN);sm.addString(cha.getName());do{if(!rset.next())break;StringfriendName=rset.getString("friend_name");L2PcInstancefriend=L2World.getInstance().getPlayer(friendName);if(friend!=null){friend.sendPacket(newFriendList(friend));friend.sendPacket(sm);}}while(true);sm=null;rset.close();statement.close();Exceptione;try{con.close();}// Misplaced declaration of an exception variablecatch(Exceptione){}breakMISSING_BLOCK_LABEL_206;e;_log.warning((newStringBuilder()).append("could not restore friend data:").append(e).toString());try{con.close();}// Misplaced declaration of an exception variablecatch(Exceptione){}breakMISSING_BLOCK_LABEL_206;Exceptionexception;exception;try{con.close();}catch(Exceptione){}throwexception;}privatevoidnotifyClanMembers(L2PcInstanceactiveChar){L2Clanclan=activeChar.getClan();if(clan!=null){clan.getClanMember(activeChar.getName()).setPlayerInstance(activeChar);SystemMessagemsg=newSystemMessage(SystemMessageId.CLAN_MEMBER_S1_LOGGED_IN);msg.addString(activeChar.getName());clan.broadcastToOtherOnlineMembers(msg,activeChar);msg=null;clan.broadcastToOtherOnlineMembers(newPledgeShowMemberListUpdate(activeChar),activeChar);}}privatevoidnotifyCastleOwner(L2PcInstanceactiveChar){if(Config.ANNOUNCE_CASTLE_LORDS){L2Clanclan=activeChar.getClan();if(clan!=null&&clan.getHasCastle()>0){Castlecastle=CastleManager.getInstance().getCastleById(clan.getHasCastle());if(castle!=null&&activeChar.getObjectId()==clan.getLeaderId())Announcements.getInstance().announceToAll((newStringBuilder()).append("Castle Lord ").append(activeChar.getName()).append(" Of ").append(castle.getName()).append(" Castle Is Currently Online.").toString());}}}privatevoidcheckCrown(L2PcInstanceactiveChar){if(activeChar.isClanLeader()&&activeChar.getClan().getHasCastle()!=0){if(activeChar.getInventory().getItemByItemId(6841)==null&&activeChar.getInventory().validateCapacity(1)){activeChar.getInventory().addItem("Crown",6841,1,activeChar,null);activeChar.getInventory().updateDatabase();}}elseif(activeChar.getInventory().getItemByItemId(6841)!=null)activeChar.getInventory().destroyItemByItemId("Crown",6841,1,activeChar,null);}privatevoidnotifySponsorOrApprentice(L2PcInstanceactiveChar){if(activeChar.getSponsor()!=0){L2PcInstancesponsor=(L2PcInstance)L2World.getInstance().findObject(activeChar.getSponsor());if(sponsor!=null){SystemMessagemsg=newSystemMessage(SystemMessageId.YOUR_APPRENTICE_S1_HAS_LOGGED_IN);msg.addString(activeChar.getName());sponsor.sendPacket(msg);}}elseif(activeChar.getApprentice()!=0){L2PcInstanceapprentice=(L2PcInstance)L2World.getInstance().findObject(activeChar.getApprentice());if(apprentice!=null){SystemMessagemsg=newSystemMessage(SystemMessageId.YOUR_SPONSOR_S1_HAS_LOGGED_IN);msg.addString(activeChar.getName());apprentice.sendPacket(msg);}}}privateStringgetText(Stringstring){Stringresult=newString(Base64.decode(string),"UTF-8");returnresult;UnsupportedEncodingExceptione;e;returnnull;}privatevoidsetPledgeClass(L2PcInstanceactiveChar){intpledgeClass=0;if(activeChar.getClan()!=null)pledgeClass=activeChar.getClan().getClanMember(activeChar.getObjectId()).calculatePledgeClass(activeChar);if(activeChar.isNoble()&&pledgeClass<5)pledgeClass=5;if(activeChar.isHero())pledgeClass=8;activeChar.setPledgeClass(pledgeClass);}publicStringgetType(){return"[C] 03 EnterWorld";}privatestaticfinalString_C__03_ENTERWORLD="[C] 03 EnterWorld";privatestaticLogger_log=Logger.getLogger(net/sf/l2j/gameserver/clientpackets/EnterWorld.getName());}
Tá ai ..!!
E algum sbe com ofaço pra salvar dpois em .jar ?
B
Bruno_Laturner
sommer:
Entao vo por aqui o Codigo Fonte do Jogo e nao Onde eu adiciono aquilo que postei acima??
Tá ai …!!
E algum sbe com ofaço pra salvar dpois em .jar ?
…
Um código do jogo é bem maior que isso. Não dá pra dizer numa olhada. Aconselho você à conversar com os criadores do jogo em http://l2j.sourceforge.net/ . Sem falar que lá deve ter o código aberto, comentado, e mais fácil de ler, sem precisar de um decompilador.
Para salvar em jar, você deve compilar o código e usar uma ferramenta p/ empacotá-lo em jar. Geralmente as próprias IDEs fazem isso, procure na documentação delas.
S
sommer
Nao teria como mostrar pra mim como que faço pra salvar no pacote jar? Tenho o Net Beans e Eclipse mostre-me como que faz que aprendo …!!
=D
S
sommer
… Tipo eu Modifico o Negocio com o DJ Compiler dai quero salva-lo novamente no .clss como que faço pois Gera um ARQUIVO em Java e não consigo compilar mais ¬¬. da uns erros tento pelo comando Javac tbm não da certo , alguem sabe como pod me ajuda ai ?
B
Bruno_Laturner
Você precisa do projeto inteiro p/ compilar as classes, mais outros jars de que o projeto pode depender. Vá até o site do L2J e baixe o projeto do SVN deles.
S
sommer
Então compilei um pack deles mais nao sei como que faz pra edita entende? consegui apenas editar fora … extraindo o pacote .jar e pegando os arquivos .Class …
poderia me explicar melhor?