Перейти к содержанию

Asame_KekeRo

Пользователи
  • Публикаций

    57
  • Зарегистрирован

  • Посещение

  • Отзывы

    0%

Весь контент Asame_KekeRo

  1. Asame_KekeRo

    Хемет+шея

    а подсказать в чом может быть проблема трудно?=)хД дайте мануальчик где описано как дат в клиенте переделовать под ИТ желательно с СТ2,4=) или непередайте мне =) голд файр =)
  2. Asame_KekeRo

    Хемет+шея

    Кароче Вот ети шлемы когда надеваю в игре они мне надеваютсо на шеюа не на голову как нормальный хелмет....думал что ето из-за неверного hair\face но нет...подскажите в чом проблема....
  3. Asame_KekeRo

    Нпс

    Впадло делать тему на сайте ...вот смотрите...новые нпс от SHEV! l2jbrazil.com\shev
  4. Asame_KekeRo

    [help]высота

    Понимаешь....если я меняю текстуру валика у меня валик получаетсо в воздухе....я вот немогу найти где ето изменить
  5. Asame_KekeRo

    [help]высота

    понимаешь в самом сервере есть розмеры валика...какой он величыны и тд...я бы хотелбы ево уменьшить....как ето сделать??
  6. Asame_KekeRo

    [help]высота

    ну если выходит..плоховато=(а можна изменить розмери валика??не в клиенте а в сервере
  7. Asame_KekeRo

    [help]высота

    вот такая проблема...мне надо опустить валакаса...тоесть в в игре он стоит на ногах а мне надо опустить ево по голову...как ето сделать?=)
  8. Asame_KekeRo

    Куплю

    а за 40-50к рублей (9 к гривен) ктото может нормальный сервер сделать ?
  9. Asame_KekeRo

    Куплю

    ето не в рублях=)или в рублях ? =)
  10. Asame_KekeRo

    Куплю

    о ты мне нагадал етот сервер..а я мучился вспоминал что же за сервер...+ я играл на многих сервера 99.9 % похожих на оникс=)
  11. Asame_KekeRo

    Куплю

    я тут почитал...почему все делают сервера похожие??? чем он отличаетсо от всех серверов?? 3\4 серверов на л2топ на 1,8\3 такиеже
  12. Asame_KekeRo

    [help]l2rebirth.java

    какие?=)если мне ни там ни тут неотпписувают..тесли ты говориш что типо много тем делаю..дак вопрос нафига все на купу лепить...может комуто надо будет?
  13. Asame_KekeRo

    [help]l2rebirth.java

    а можна сделать следуйщий шаг...при перерождении давать скил(настроеный) который нормализует ето все + даст свои статы,?=-)
  14. Asame_KekeRo

    [help]l2rebirth.java

    да кстате а где класы находятсо?=)хД
  15. Asame_KekeRo

    [help]l2rebirth.java

    скоро у все главная пьянка=)но надо като мне будет попытатсо сделать етот ******* =)
  16. Asame_KekeRo

    [help]l2rebirth.java

    незнаю знают ли все что у фрозенов есть кастом нпс...ну вот..там есть менреджер перерождения ...проблема в следуйщем... при взятии перерождения спадает уровень, а самое главное статы (хп,мп, атака и тд...) и вот немогу найти в файле где же то место с етими найстройками... вот файл... Скрытый текст/* * 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.l2jfrozen.gameserver.model.entity; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.HashMap; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.datatables.SkillTable; import com.l2jfrozen.gameserver.datatables.sql.ItemTable; import com.l2jfrozen.gameserver.model.L2Skill; import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.base.Experience; import com.l2jfrozen.gameserver.network.serverpackets.CreatureSay; import com.l2jfrozen.gameserver.network.serverpackets.SocialAction; import com.l2jfrozen.util.CloseUtil; import com.l2jfrozen.util.database.L2DatabaseFactory; /** * <strong>This 'Custom Engine' was developed for L2J Forum Member 'sauron3256' on November 1st, 2008.</strong><br> * <br> * <strong>Quick Summary:</strong><br> * This engine will grant the player special bonus skills at the cost of reseting him to level 1.<br> * The -USER- can set up to X Rebirths, the skills received and their respective levels, and the item and price of each * rebirth.<br> * PLAYER's information is stored in an SQL Db under the table name: REBIRTH_MANAGER.<br> * * @author <strong>Beetle and Shyla</strong> */ public class L2Rebirth { /** The current instance - static repeller */ private static L2Rebirth _instance = null; /** Basically, this will act as a cache so it doesnt have to read DB information on relog. */ private HashMap<Integer, Integer> _playersRebirthInfo = new HashMap<Integer, Integer>(); /** Creates a new NON-STATIC instance */ private L2Rebirth() { //Do Nothing ^_- } /** Receives the non-static instance of the RebirthManager. */ public static L2Rebirth getInstance() { if(_instance == null) { _instance = new L2Rebirth(); } return _instance; } /** This is what it called from the Bypass Handler. (I think that's all thats needed here). */ public void handleCommand(L2PcInstance player, String command) { if(command.startsWith("custom_rebirth_requestrebirth")) { displayRebirthWindow(player); } else if(command.startsWith("custom_rebirth_confirmrequest")) { requestRebirth(player); } } /** Display's an HTML window with the Rebirth Options */ public void displayRebirthWindow(L2PcInstance player) { try { int currBirth = getRebirthLevel(player); //Returns the player's current birth level //Don't send html if player is already at max rebirth count. if(currBirth >= Config.REBIRTH_MAX) { player.sendMessage("You are currently at your maximum rebirth count!"); return; } //Returns true if BASE CLASS is a mage. boolean isMage = player.getBaseTemplate().classId.isMage(); //Returns the skill based on next Birth and if isMage. L2Skill skill = getRebirthSkill((currBirth + 1), isMage); String icon = "" + skill.getId();//Returns the skill's id. //Incase the skill is only 3 digits. if(icon.length() < 4) { icon = "0" + icon; } skill = null; icon = null; } catch(Exception e) { e.printStackTrace(); } } /** Checks to see if the player is eligible for a Rebirth, if so it grants it and stores information */ public void requestRebirth(L2PcInstance player) { //Check the player's level. if(player.getLevel() < Config.REBIRTH_MIN_LEVEL) { player.sendMessage("You do not meet the level requirement for a Rebirth!"); return; } else if(player.isSubClassActive()) { player.sendMessage("Please switch to your Main Class before attempting a Rebirth."); return; } int currBirth = getRebirthLevel(player); int itemNeeded = 0; int itemAmount = 0; if(currBirth >= Config.REBIRTH_MAX) { player.sendMessage("You are currently at your maximum rebirth count!"); return; } //Get the requirements int loopBirth = 0; for(String readItems : Config.REBIRTH_ITEM_PRICE) { String[] currItem = readItems.split(","); if (loopBirth == currBirth) { itemNeeded = Integer.parseInt(currItem[0]); itemAmount = Integer.parseInt(currItem[1]); break; } loopBirth++; } //Their is an item required if(itemNeeded != 0) { //Checks to see if player has required items, and takes them if so. if(!playerIsEligible(player, itemNeeded, itemAmount)) return; } //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); } /** Physically rewards player and resets status to nothing. */ public void grantRebirth(L2PcInstance player, int newBirthCount, boolean firstBirth) { try { double actual_hp = player.getCurrentHp(); double actual_cp = player.getCurrentCp(); int max_level = Experience.MAX_LEVEL; if(player instanceof L2PcInstance && ((L2PcInstance) player).isSubClassActive()) { max_level = Experience.MAX_SUBCLASS_LEVEL; } //Protections Integer returnToLevel = Config.REBIRTH_RETURN_TO_LEVEL; if (returnToLevel < 1) returnToLevel = 1; if (returnToLevel > max_level) returnToLevel = max_level; //Resets character to first class. player.setClassId(player.getBaseClass()); player.broadcastUserInfo(); final byte lvl = Byte.parseByte(returnToLevel+""); final long pXp = player.getStat().getExp(); final long tXp = Experience.getExp(lvl); if(pXp > tXp) { player.getStat().removeExpAndSp(pXp - tXp, 0); } else if(pXp < tXp) { player.getStat().addExpAndSp(tXp - pXp, 0); } //Remove the player's current skills. for(L2Skill skill : player.getAllSkills()) { player.removeSkill(skill); } //Give players their eligible skills. player.giveAvailableSkills(); //restore Hp-Mp-Cp player.setCurrentCpDirect(actual_cp); player.setCurrentMpDirect(player.getMaxMp()); player.setCurrentHpDirect(actual_hp); player.broadcastStatusUpdate(); //Updates the player's information in the Character Database. player.store(); if(firstBirth) { storePlayerBirth(player); } else { updatePlayerBirth(player, newBirthCount); } //Give the player his new Skills. grantRebirthSkills(player); //Displays a congratulation message to the player. displayCongrats(player); returnToLevel = null; } catch(Exception e) { e.printStackTrace(); } } /** Special effects when the player levels. */ public void displayCongrats(L2PcInstance player) { //Victory Social Action. player.setTarget(player); player.broadcastPacket(new SocialAction(player.getObjectId(), 3)); player.sendMessage("Congratulations " + player.getName() + ". You have been REBORN!"); } /** Check and verify the player DOES have the item required for a request. Also, remove the item if he has. */ public boolean playerIsEligible(L2PcInstance player, int itemId, int itemAmount) { String itemName = ItemTable.getInstance().getTemplate(itemId).getName(); L2ItemInstance itemNeeded = player.getInventory().getItemByItemId(itemId); if(itemNeeded == null || itemNeeded.getCount() < itemAmount) { player.sendMessage("You need atleast " + itemAmount + " [ " + itemName + " ] to request a Rebirth!"); return false; } //Player has the required items, so we're going to take them! player.getInventory().destroyItemByItemId("Rebirth Engine", itemId, itemAmount, player, null); player.sendMessage("Removed " + itemAmount + " " + itemName + " from your inventory!"); itemName = null; itemNeeded = null; return true; } /** Gives the available Bonus Skills to the player. */ public void grantRebirthSkills(L2PcInstance player) { //returns the current Rebirth Level int rebirthLevel = getRebirthLevel(player); //Returns true if BASE CLASS is a mage. boolean isMage = player.getBaseTemplate().classId.isMage(); //Simply return since no bonus skills are granted. if(rebirthLevel == 0) return; //Load the bonus skills unto the player. CreatureSay rebirthText = null; for(int i = 0; i < rebirthLevel; i++) { L2Skill bonusSkill = getRebirthSkill((i + 1), isMage); player.addSkill(bonusSkill, false); //If you'd rather make it simple, simply comment this out and replace with a simple player.sendmessage(); rebirthText = new CreatureSay(0, 18, "Rebirth Manager ", " Granted you [ " + bonusSkill.getName() + " ] level [ " + bonusSkill.getLevel() + " ]!"); player.sendPacket(rebirthText); } rebirthText = null; } /** Return the player's current Rebirth Level */ public int getRebirthLevel(L2PcInstance player) { int playerId = player.getObjectId(); if(_playersRebirthInfo.get(playerId) == null) { loadRebirthInfo(player); } return _playersRebirthInfo.get(playerId); } /** Return the L2Skill the player is going to be rewarded. */ public L2Skill getRebirthSkill(int rebirthLevel, boolean mage) { L2Skill skill = null; //Player is a Mage. if(mage) { int loopBirth = 0; for(String readSkill : Config.REBIRTH_MAGE_SKILL) { String[] currSkill = readSkill.split(","); if (loopBirth == (rebirthLevel-1)) { skill = SkillTable.getInstance().getInfo(Integer.parseInt(currSkill[0]), Integer.parseInt(currSkill[1])); break; } loopBirth++; } } //Player is a Fighter. else { int loopBirth = 0; for(String readSkill : Config.REBIRTH_FIGHTER_SKILL) { String[] currSkill = readSkill.split(","); if (loopBirth == (rebirthLevel-1)) { skill = SkillTable.getInstance().getInfo(Integer.parseInt(currSkill[0]), Integer.parseInt(currSkill[1])); break; } loopBirth++; } } return skill; } /** Database caller to retrieve player's current Rebirth Level */ public void loadRebirthInfo(L2PcInstance player) { int playerId = player.getObjectId(); int rebirthCount = 0; Connection con = null; try { ResultSet rset; con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement statement = con.prepareStatement("SELECT * FROM `rebirth_manager` WHERE playerId = ?"); statement.setInt(1, playerId); rset = statement.executeQuery(); while(rset.next()) { rebirthCount = rset.getInt("rebirthCount"); } rset.close(); statement.close(); statement = null; rset = null; } catch(Exception e) { e.printStackTrace(); } finally { CloseUtil.close(con); con = null; } _playersRebirthInfo.put(playerId, rebirthCount); } /** Stores the player's information in the DB. */ public void storePlayerBirth(L2PcInstance player) { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement statement = con.prepareStatement("INSERT INTO `rebirth_manager` (playerId,rebirthCount) VALUES (?,1)"); statement.setInt(1, player.getObjectId()); statement.execute(); statement = null; _playersRebirthInfo.put(player.getObjectId(), 1); } catch(Exception e) { e.printStackTrace(); } finally { CloseUtil.close(con); con = null; } } /** Updates the player's information in the DB. */ public void updatePlayerBirth(L2PcInstance player, int newRebirthCount) { Connection con = null; try { int playerId = player.getObjectId(); con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement statement = con.prepareStatement("UPDATE `rebirth_manager` SET rebirthCount = ? WHERE playerId = ?"); statement.setInt(1, newRebirthCount); statement.setInt(2, playerId); statement.execute(); statement = null; _playersRebirthInfo.put(playerId, newRebirthCount); } catch(Exception e) { e.printStackTrace(); } finally { CloseUtil.close(con); con = null; } } } или ето не то ?
  17. вот кароче агнумент ШОП я вот немогу понять как его поставь ...вродебы все как в мануале указано прописываю...но всероно нероботает...то он у меня просит ****.хтм то показывает розделы с типом скила и все....больше нечево...помогите.... сборка l2jfrozen rev.903
  18. Asame_KekeRo

    [help]9 Erors

    ну я вот прошу об*яснить ...просто я хз чо могу натворить=) и тыкнуть моей мордой где там написано =)
  19. Asame_KekeRo

    [help]9 Erors

    ето токо пример....я просто спрашиваю надо ли будет гдето прописовать к ниму код и куда его засунуть=)
  20. Asame_KekeRo

    [help]9 Erors

    Спосибо всем я токочто понял зачем исходники...=))там джава файлы и их можна менять =))и потом они сразу в джар =) спс всем=) и сразу что левой темы неделать ....вот я хочу добавить левый джава...там например свечение героя за пвп Скрытый текстПримечание: Это не будет давать геройские скиллы или давать возможность покупать геройское оружие,только ауру(свечение). Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 1901) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -488,6 +488,11 @@ private boolean _noble = false; private boolean _hero = false; + + /** Special hero aura values */ + private int heroConsecutiveKillCount = 0; + private boolean isPermaHero = false; + private boolean isPVPHero = false; /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */ private L2FolkInstance _lastFolkNpc = null; @@ -1971,6 +1976,13 @@ public void setPvpKills(int pvpKills) { _pvpKills = pvpKills; + + // Set hero aura if pvp kills > 100 + if (pvpKills > 100) + { + isPermaHero = true; + setHeroAura(true); + } } /** @@ -4678,6 +4690,14 @@ stopRentPet(); stopWaterTask(); + + // Remove kill count for special hero aura if total pvp < 100 + heroConsecutiveKillCount = 0; + if (!isPermaHero) + { + setHeroAura(false); + sendPacket(new UserInfo(this)); + } return true; } @@ -4897,6 +4917,13 @@ { // Add karma to attacker and increase its PK counter setPvpKills(getPvpKills() + 1); + + // Increase the kill count for a special hero aura + heroConsecutiveKillCount++; + + // If heroConsecutiveKillCount > 4 (5+ kills) give hero aura + if(heroConsecutiveKillCount > 4) + setHeroAura(true); // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); @@ -8715,6 +8742,22 @@ { return _blockList; } + + public void reloadPVPHeroAura() + { + sendPacket(new UserInfo(this)); + } + + public void setHeroAura (boolean heroAura) + { + isPVPHero = heroAura; + return; + } + + public boolean getIsPVPHero() + { + return isPVPHero; + } public void setHero(boolean hero) { Index: java/net/sf/l2j/gameserver/serverpackets/UserInfo.java =================================================================== --- java/net/sf/l2j/gameserver/serverpackets/UserInfo.java (revision 1901) +++ java/net/sf/l2j/gameserver/serverpackets/UserInfo.java (working copy) @@ -337,7 +337,7 @@ writeD(_activeChar.getClanCrestLargeId()); writeC(_activeChar.isNoble() ? 1 : 0); //0x01: symbol on char menu ctrl+I - writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); //0x01: Hero Aura + writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA) || _activeChar.getIsPVPHero()) ? 1 : 0); //0x01: Hero Aura writeC(_activeChar.isFishing() ? 1 : 0); //Fishing Mode writeD(_activeChar.getFishx()); //fishing x ...обясните куда как вставлять ...и надо ли прописовать путь к етому коду?
  21. Asame_KekeRo

    [help]9 Erors

    Вот кароче видео что и как я делаю....все как в видео мануале....но всеровно....Пффффффф
  22. Asame_KekeRo

    [help]9 Erors

    ну ладно ладно...но всеровно как из джава класс сделать?=)
  23. Asame_KekeRo

    [help]9 Erors

    дайте хотябы сылку на исходники самой последней ревизии=) ато вижу помощи мне недождатсо=)
  24. Asame_KekeRo

    [help]9 Erors

    Ну помогите ну реально...ну дайте подробное описание как скопилировать обратсо в класс!!!ну прошу... пожалусто
×
×
  • Создать...