Jump to content

remigas

Members
  • Posts

    133
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by remigas

  1. Hello how to disable without problems seven signs in acis? Tnx.
  2. Maybe anyone have good flood protection for acis? or new acis have it?
  3. Hi maybe someone have to share C,D,B,A Grade Armor/Weapon Shops? No SA? with multisell?
  4. yes but then that zone will be noshop zone, i make all towns no shop now but i need to make giran harbor (Not all just small space) like shop area..
  5. in one case now its pain in ass, because there is no STORE, in acis, so if i want to make special zone like store, i need to change JAVA ;/////
  6. Hi where to add shopzone in acis370? because i cant find it in Zones Folder. tnx for answers
  7. its looks like that <set name="type" val="L2Noblesse"/> with this part something wrong, because if i add to npc.xml random npc, all file show missing in console.
  8. OK hi Guys, so i try install trance Nobless and Rebirth system to Acis 369 patch, i done all Java part no mistakes, i add all parts in npc.xml and ect. and when i try to spawn manager nothing happens, non mistakes in console nothink i dont know what is wrong. does anyone was added this and can advise me please?
  9. Have anyone olympiad only a grade for acis?
  10. Hi, maybe someone have added trance rebirth system to acis 368? because i have some java error with getAllSkill command in L2RebirthInstance.java and SkillTreeTable.java. I try to change it to getSkill only but no help. can anyone explain me how to fix it? or add code here. :) tnx i mark problem red. /* * 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.item.instance.ItemInstance; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.network.SystemMessageId; 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.model.actor.template.NpcTemplate; /** * Rebirth Manager * @author Trance * @skype chr.trance */ public final class L2RebirthInstance extends Folk { private static HashMap<Integer, Integer> _rebirthInfo = new HashMap<>(); public L2RebirthInstance(int objectId, NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(Player 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) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/managers/rebirth-max.htm"); player.sendPacket(html); return; } // Level requirement for a rebirth. if (player.getLevel() < Config.REBIRTH_MIN_LEVEL) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/managers/rebirth-level.htm"); player.sendPacket(html); return; } int itemId = 0, itemCount = 0, 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. grantRebirth(player, (currBirth + 1), firstBirth); } else super.onBypassFeedback(player, command); } @Override public void showChatWindow(Player player) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/managers/rebirth.htm"); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%level%", + Config.REBIRTH_RETURN_TO_LEVEL); player.sendPacket(html); } /** * 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 grantRebirth(Player 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); // Displays a congratulation window to the player. NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/managers/rebirth-successfully.htm"); html.replace("%level%", + Config.REBIRTH_RETURN_TO_LEVEL); 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(Player player, int itemId, int itemCount) { // Incorrect amount. if (itemCount <= 0) return; final ItemInstance item = player.getInventory().addItem("Quest", itemId, itemCount, player, player); if (item == null) return; // Send message to the client. if (itemId == 57) { SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.EARNED_S1_ADENA); smsg.addItemNumber(itemCount); player.sendPacket(smsg); } else { if (itemCount > 1) { SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S); smsg.addItemName(itemId); smsg.addItemNumber(itemCount); player.sendPacket(smsg); } else { 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(Player 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(Player player) { int playerId = player.getObjectId(), 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(Player player) { try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { @SuppressWarnings("resource") 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(Player player, int newRebirthCount) { int playerId = player.getObjectId(); try (Connection con = L2DatabaseFactory.getInstance().getConnection()) { @SuppressWarnings("resource") 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(); } } }
  11. fixed needed new eclipse version.
  12. so can you please tell me how to fix this errors? rev 368 acis. http://www.part.lt/perziura/56a9f8c28fef49b1dd726660c6a615c9756.jpg http://www.part.lt/perziura/72ebc919c5f2d41ec48e4d2ffbeee015842.jpg http://www.part.lt/perziura/35b5b1e29bdf0b462baefb8f2462851b297.jpg http://www.part.lt/perziura/61d3804d152834b228624a8fce739ac1695.jpg
  13. which java for eclipse need to use on acis 368rev becouse i using jdk-8u144-windows-x64 this one and i get errors, and cant build.
  14. I have some places in Elven Fortress where ppl can go true the wall, how i need to edit geodata to fix that?
  15. Hi Boys, can anyone please tell me how to remove reuse delay form skills? i will attach foto below.
  16. Hi where i need to put some code? to keep enchants when you refine items? Because now when i refine item, the enchants are gone.
  17. Maybe someone have some protection code to fix duplicate bug? because now ppl are using some programs to make fake log in and dup item true warehouse or any npc. this is code which i get in console when it happen. pls help to fix it interlude client. [L2World] object: Adena (57) already exists in OID map! [L2World] object: Book of Rebirth (2822) already exists in OID map! [L2World] object: Adena (57) already exists in OID map! [L2World] object: Book of Rebirth (2822) already exists in OID map! [L2World] object: Adena (57) already exists in OID map! [L2World] object: Book of Rebirth (2822) already exists in OID map! [L2World] object: Adena (57) already exists in OID map! [L2World] object: Book of Rebirth (2822) already exists in OID map!
  18. my buffer when you press HEAL restores just HP, how ti make it to restore all HP,MP,CP? this is code in html. <td> <a action="bypass -h npc_%objectId%_restore"> Heal </a> </td>
  19. Can someone please share full working rebirth system code? Because i cant find it. for interlude.
  20. I think 315rev so i need source for this rev target bug, somethimes mobs are buged with target and ppl stuck till someone hit them.
×
×
  • Create New...