-
Posts
292 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by xTakegawa
-
its ok but its not for grandboss
-
thanks
-
Help Login problem
xTakegawa replied to DealerDamge's question in Request Server Development Help [L2J]
you have to open the ports and change the l2.ini ip -
Cant Connect to GameServer - Acis
xTakegawa replied to tiguz's question in Request Server Development Help [L2J]
go here and read https://acis.i-live.eu/index.php?topic=10190.0 -
what project you use?
-
Help Delevel manager
xTakegawa replied to criss22's question in Request Server Development Help [L2J]
delevel you mean return to 1 lvl ? -
Help RequestSellItem.java
xTakegawa replied to HARDECORE's question in Request Server Development Help [L2J]
go to items.xml and remore the price line <set name="price" val="8680000" /> use notepad ++ to remove all together with mark -
what you mean? you want to pick up items with more time?
-
Help acis dont stuck skill normal player
xTakegawa replied to falcone2's question in Request Server Development Help [L2J]
you need code to do that -
long delay = RaidBossSpawnManager.getInstance().getRespawntime(rboss); (HERE) all ok exept getrespawntime :/ anyone know how to fix that?
-
Help l2jacis 370 Zaken
xTakegawa replied to xTakegawa's question in Request Server Development Help [L2J]
thanks you i will check it -
Help l2jacis 370 Zaken
xTakegawa replied to xTakegawa's question in Request Server Development Help [L2J]
there is any good project for interlude? -
Help l2jacis 370 Zaken
xTakegawa replied to xTakegawa's question in Request Server Development Help [L2J]
i have many error like addGameTimeNotify(); L2Skill skill = FrequentSkill.ZAKEN_DAY_TO_NIGHT.getSkill(); if (npc.getAI().getDesire().getIntention() == CtrlIntention.ATTACK && !_hasTeleported) if (mostHated != null && mostHated.isInsideRadius(_zakenLocation, 1500, true, false)) npc.doCast(FrequentSkill.ZAKEN_SELF_TELE.getSkill()); final Playable realBypasser = (isPet && player.getSummon() != null) ? player.getSummon() : player; -
hello guys i try to found something about zaken script but that pack l2jacis dont have zaken.java anyone here know how to put zaken script or code?
-
Code Automatic Potions Free Code For All L2J Packs!
xTakegawa replied to numl0ckas's topic in Server Shares & Files [L2J]
Thanks for share -
Code Password Manager For Acis 370
xTakegawa replied to thepsolartek's topic in Server Shares & Files [L2J]
Nice Share !! -
Help L2 Rebirth Manager by trance {HELP}
xTakegawa posted a question in Request Server Development Help [Greek]
Γεια σας παιδια θα ηθελα μια βοηθεια με το rebirth manager θελω οταν καποις παικτης κανει rebirth να αφερει ενα item απο το invetory ξερει κανεις κατι ?? εδω ειναι ο κωδικας: /* * 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 net.sf.l2j.gameserver.model.actor.instance; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.HashMap; import net.sf.l2j.Config; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.model.base.Experience; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate; /** * Rebirth Manager * @author Trance * @skype chr.trance */ public final class L2RebirthInstance extends L2NpcInstance { private static HashMap<Integer, Integer> _rebirthInfo = new HashMap<>(); public L2RebirthInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(L2PcInstance player, String command) { if (command.startsWith("performRebirth")) { // Maximum rebirth count. Return the player's current Rebirth Level. int currBirth = getRebirthLevel(player); if (currBirth >= Config.REBIRTH_MAX) { // Send a Server->Client NpcHtmlMessage containing the text of the L2Npc to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/gold/rebirth-max.htm"); player.sendPacket(html); return; } // Level requirement for a rebirth. if (player.getLevel() < Config.REBIRTH_MIN_LEVEL) { // Send a Server->Client NpcHtmlMessage containing the text of the L2Npc to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/gold/rebirth-level.htm"); player.sendPacket(html); return; } int itemId = 0; int itemCount = 0; int loopBirth = 0; for (String readItems : Config.REBIRTH_ITEMS) { String[] currItem = readItems.split(","); if (loopBirth == currBirth) { itemId = Integer.parseInt(currItem[0]); itemCount = Integer.parseInt(currItem[1]); break; } loopBirth++; } // Rewards the player with an item. rebirthItemReward(player, itemId, itemCount); // Check and see if its the player's first rebirth calling. boolean firstBirth = currBirth == 0; // Player meets requirements and starts Rebirth process. rebirthRequirements(player, (currBirth + 1), firstBirth); } else super.onBypassFeedback(player, command); } @Override public void showChatWindow(L2PcInstance player) { // Send a Server->Client NpcHtmlMessage containing the text of the L2Npc to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); // Html contents. html.setFile("data/html/gold/rebirth.htm"); html.replace("%objectId%", getObjectId()); html.replace("%level%", + Config.REBIRTH_RETURN_TO_LEVEL); // Send a packet to the L2PcInstance. player.sendPacket(html); // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet player.sendPacket(ActionFailed.STATIC_PACKET); } /** * Physically rewards player and resets status to nothing. * * @param player the player * @param newBirthCount the new birth count * @param firstBirth the first birth */ public void rebirthRequirements(L2PcInstance player, int newBirthCount, boolean firstBirth) { try { // Delevel. player.removeExpAndSp(player.getExp() - Experience.LEVEL[Config.REBIRTH_RETURN_TO_LEVEL], 0); // Back to the first class. player.setClassId(player.getClassId().getFirstClass().getId()); // Send the Server->Client packet StatusUpdate with current HP, MP and CP to this L2PcInstance player.broadcastStatusUpdate(); // Broadcast informations from a user to himself and his knownlist. player.broadcastUserInfo(); // Remove the player's current skills. for (L2Skill skill : player.getAllSkills()) player.removeSkill(skill); // Give all available skills to the player. player.giveAvailableSkills(); // Update L2PcInstance stats in the characters table of the database. player.store(); if (firstBirth) // Stores the player's information in the DB. storePlayerBirth(player); else // Updates the player's information in the DB. updatePlayerBirth(player, newBirthCount); // Send a Server->Client NpcHtmlMessage containing the text of the L2Npc to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); // Html contents. html.setFile("data/html/gold/rebirth-successfully.htm"); html.replace("%level%", + Config.REBIRTH_RETURN_TO_LEVEL); // Send a packet to the L2PcInstance. player.sendPacket(html); } catch (Exception e) { e.printStackTrace(); } } /** * Rewards the player with an item. * * @param player the player * @param itemId : Identifier of the item. * @param itemCount : Quantity of items to add. */ public static void rebirthItemReward(L2PcInstance player, int itemId, int itemCount) { // Incorrect amount. if (itemCount <= 0) return; final L2ItemInstance item = player.getInventory().addItem("Quest", itemId, itemCount, player, player); if (item == null) return; // Send message to the client. SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.EARNED_ITEM_S1); smsg.addItemName(itemId); player.sendPacket(smsg); // Send status update packet. StatusUpdate su = new StatusUpdate(player); su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad()); player.sendPacket(su); } /** * Return the player's current Rebirth Level. * * @param player the player * @return the rebirth level */ public static int getRebirthLevel(L2PcInstance player) { int playerId = player.getObjectId(); if (_rebirthInfo.get(playerId) == null) loadRebirthInfo(player); return _rebirthInfo.get(playerId); } /** * Database caller to retrieve player's current Rebirth Level. * * @param player the player */ public static void loadRebirthInfo(L2PcInstance player) { int playerId = player.getObjectId(); int rebirthCount = 0; try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { ResultSet rset; PreparedStatement statement = con.prepareStatement("SELECT * FROM `character_rebirths` WHERE playerId = ?"); statement.setInt(1, playerId); rset = statement.executeQuery(); while (rset.next()) { rebirthCount = rset.getInt("rebirthCount"); } rset.close(); statement.close(); } catch (Exception e) { e.printStackTrace(); } _rebirthInfo.put(playerId, rebirthCount); } /** * Stores the player's information in the DB. * * @param player the player */ public static void storePlayerBirth(L2PcInstance player) { try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("INSERT INTO `character_rebirths` (playerId,rebirthCount) VALUES (?,1)"); statement.setInt(1, player.getObjectId()); statement.execute(); _rebirthInfo.put(player.getObjectId(), 1); } catch (Exception e) { e.printStackTrace(); } } /** * Updates the player's information in the DB. * * @param player the player * @param newRebirthCount the new rebirth count */ public static void updatePlayerBirth(L2PcInstance player, int newRebirthCount) { int playerId = player.getObjectId(); try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("UPDATE `character_rebirths` SET rebirthCount = ? WHERE playerId = ?"); statement.setInt(1, newRebirthCount); statement.setInt(2, playerId); statement.execute(); _rebirthInfo.put(playerId, newRebirthCount); } catch (Exception e) { e.printStackTrace(); } } } -
LF L2gold project trance
xTakegawa replied to xTakegawa's question in Request Server Development Help [L2J]
i send you in pm -
LF L2gold project trance
xTakegawa replied to xTakegawa's question in Request Server Development Help [L2J]
Pegasos #5585 -
Hello guys have anyone the l2gold project by trance?
-
geia sas paidia kserei kaneis pws mporw na kanw to rebirth manager tou trance na mporei na sou kanei reset rebirth dld na pataw reset rebirth kai na mou vgazei ta eidi rebirth pou exw kai na dinei 3 book of rebirth /* * 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 net.sf.l2j.gameserver.model.actor.instance; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.HashMap; import net.sf.l2j.Config; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.model.base.Experience; import net.sf.l2j.gameserver.model.L2ItemInstance; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate; /** * Rebirth Manager * @author Trance * @skype chr.trance */ public final class L2RebirthInstance extends L2NpcInstance { private static HashMap<Integer, Integer> _rebirthInfo = new HashMap<>(); public L2RebirthInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(L2PcInstance player, String command) { if (command.startsWith("performRebirth")) { // Maximum rebirth count. Return the player's current Rebirth Level. int currBirth = getRebirthLevel(player); if (currBirth >= Config.REBIRTH_MAX) { // Send a Server->Client NpcHtmlMessage containing the text of the L2Npc to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/gold/rebirth-max.htm"); player.sendPacket(html); return; } // Level requirement for a rebirth. if (player.getLevel() < Config.REBIRTH_MIN_LEVEL) { // Send a Server->Client NpcHtmlMessage containing the text of the L2Npc to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/gold/rebirth-level.htm"); player.sendPacket(html); return; } int itemId = 0; int itemCount = 0; int loopBirth = 0; for (String readItems : Config.REBIRTH_ITEMS) { String[] currItem = readItems.split(","); if (loopBirth == currBirth) { itemId = Integer.parseInt(currItem[0]); itemCount = Integer.parseInt(currItem[1]); break; } loopBirth++; } // Rewards the player with an item. rebirthItemReward(player, itemId, itemCount); // Check and see if its the player's first rebirth calling. boolean firstBirth = currBirth == 0; // Player meets requirements and starts Rebirth process. rebirthRequirements(player, (currBirth + 1), firstBirth); } else super.onBypassFeedback(player, command); } @Override public void showChatWindow(L2PcInstance player) { // Send a Server->Client NpcHtmlMessage containing the text of the L2Npc to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); // Html contents. html.setFile("data/html/gold/rebirth.htm"); html.replace("%objectId%", getObjectId()); html.replace("%level%", + Config.REBIRTH_RETURN_TO_LEVEL); // Send a packet to the L2PcInstance. player.sendPacket(html); // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet player.sendPacket(ActionFailed.STATIC_PACKET); } /** * Physically rewards player and resets status to nothing. * * @param player the player * @param newBirthCount the new birth count * @param firstBirth the first birth */ public void rebirthRequirements(L2PcInstance player, int newBirthCount, boolean firstBirth) { try { // Delevel. player.removeExpAndSp(player.getExp() - Experience.LEVEL[Config.REBIRTH_RETURN_TO_LEVEL], 0); // Back to the first class. player.setClassId(player.getClassId().getFirstClass().getId()); // Send the Server->Client packet StatusUpdate with current HP, MP and CP to this L2PcInstance player.broadcastStatusUpdate(); // Broadcast informations from a user to himself and his knownlist. player.broadcastUserInfo(); // Remove the player's current skills. for (L2Skill skill : player.getAllSkills()) player.removeSkill(skill); // Give all available skills to the player. player.giveAvailableSkills(); // Update L2PcInstance stats in the characters table of the database. player.store(); if (firstBirth) // Stores the player's information in the DB. storePlayerBirth(player); else // Updates the player's information in the DB. updatePlayerBirth(player, newBirthCount); // Send a Server->Client NpcHtmlMessage containing the text of the L2Npc to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); // Html contents. html.setFile("data/html/gold/rebirth-successfully.htm"); html.replace("%level%", + Config.REBIRTH_RETURN_TO_LEVEL); // Send a packet to the L2PcInstance. player.sendPacket(html); } catch (Exception e) { e.printStackTrace(); } } /** * Rewards the player with an item. * * @param player the player * @param itemId : Identifier of the item. * @param itemCount : Quantity of items to add. */ public static void rebirthItemReward(L2PcInstance player, int itemId, int itemCount) { // Incorrect amount. if (itemCount <= 0) return; final L2ItemInstance item = player.getInventory().addItem("Quest", itemId, itemCount, player, player); if (item == null) return; // Send message to the client. SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.EARNED_ITEM_S1); smsg.addItemName(itemId); player.sendPacket(smsg); // Send status update packet. StatusUpdate su = new StatusUpdate(player); su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad()); player.sendPacket(su); } /** * Return the player's current Rebirth Level. * * @param player the player * @return the rebirth level */ public static int getRebirthLevel(L2PcInstance player) { int playerId = player.getObjectId(); if (_rebirthInfo.get(playerId) == null) loadRebirthInfo(player); return _rebirthInfo.get(playerId); } /** * Database caller to retrieve player's current Rebirth Level. * * @param player the player */ public static void loadRebirthInfo(L2PcInstance player) { int playerId = player.getObjectId(); int rebirthCount = 0; try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { ResultSet rset; PreparedStatement statement = con.prepareStatement("SELECT * FROM `character_rebirths` WHERE playerId = ?"); statement.setInt(1, playerId); rset = statement.executeQuery(); while (rset.next()) { rebirthCount = rset.getInt("rebirthCount"); } rset.close(); statement.close(); } catch (Exception e) { e.printStackTrace(); } _rebirthInfo.put(playerId, rebirthCount); } /** * Stores the player's information in the DB. * * @param player the player */ public static void storePlayerBirth(L2PcInstance player) { try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("INSERT INTO `character_rebirths` (playerId,rebirthCount) VALUES (?,1)"); statement.setInt(1, player.getObjectId()); statement.execute(); _rebirthInfo.put(player.getObjectId(), 1); } catch (Exception e) { e.printStackTrace(); } } /** * Updates the player's information in the DB. * * @param player the player * @param newRebirthCount the new rebirth count */ public static void updatePlayerBirth(L2PcInstance player, int newRebirthCount) { int playerId = player.getObjectId(); try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { PreparedStatement statement = con.prepareStatement("UPDATE `character_rebirths` SET rebirthCount = ? WHERE playerId = ?"); statement.setInt(1, newRebirthCount); statement.setInt(2, playerId); statement.execute(); _rebirthInfo.put(playerId, newRebirthCount); } catch (Exception e) { e.printStackTrace(); } } }
-
Help passive skill color name
xTakegawa replied to xTakegawa's question in Request Server Development Help [Greek]
auto ekana file gia auto ekana to post -
Help console error
xTakegawa replied to xTakegawa's question in Request Server Development Help [Greek]
ekana ena restore stin database kai estrwse lock pls -
paidia molis skwnonw ena char mesa sto game sto consolem ou vgazei auto L2PcInstance: callSkill() failed on skill id: 1234 null l2jacis pack