Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 3427)
- +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy)
- -2724,7 +2730,7 @@
- * Give all available skills to the player.<br><br>
- *
- */
- - private void giveAvailableSkills()
- + public void giveAvailableSkills()
- {
- int unLearnable = 0;
- int skillCounter = 0;
- Index: java/config/l2jmods.properties
- ===================================================================
- --- java/config/l2jmods.properties (revision 3427)
- +++ java/config/l2jmods.properties (working copy)
- -248,4 +248,47 @@
- # This option will enable core support for:
- # Mana Drug (item ID 726), using skill ID 9007.
- # Mana Potion (item ID 728), using skill ID 9008.
- -EnableManaPotionSupport = False
- \ No newline at end of file
- +EnableManaPotionSupport = False
- +
- +RebirthAllow = True
- +RebirthMin = 80
- +
- +# Items required per rebirth level #
- +RebirthItem1Needed = 57
- +RebirthItem1Amount = 1000
- +RebirthItem2Needed = 57
- +RebirthItem2Amount = 2000
- +RebirthItem3Needed = 57
- +RebirthItem3Amount = 3000
- +
- +# Bonus skills and levels for Mages or Fighters #
- +REBIRTH_MAGE_SKILL1_ID = 1062
- +REBIRTH_MAGE_SKILL1_LEVEL = 2
- +REBIRTH_MAGE_SKILL2_ID = 1085
- +REBIRTH_MAGE_SKILL2_LEVEL = 3
- +REBIRTH_MAGE_SKILL3_ID = 1059
- +REBIRTH_MAGE_SKILL3_LEVEL = 3
- +REBIRTH_FIGHTER_SKILL1_ID = 1045
- +REBIRTH_FIGHTER_SKILL1_LEVEL = 6
- +REBIRTH_FIGHTER_SKILL2_ID = 1048
- +REBIRTH_FIGHTER_SKILL2_LEVEL = 6
- +REBIRTH_FIGHTER_SKILL3_ID = 1086
- +REBIRTH_FIGHTER_SKILL3_LEVEL = 2
- +
- Index: java/net/sf/l2j/gameserver/handler/WorldHandler.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/handler/WorldHandler.java (revision 0)
- +++ java/net/sf/l2j/gameserver/handler/WorldHandler.java (revision 0)
- -0,0 +1,38 @@
- +package net.sf.l2j.gameserver.handler;
- +
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +import net.sf.l2j.gameserver.model.entity.RebirthManager;
- +
- +/**
- + *This will simply manage any custom 'Enter World callers' needed.<br>
- + *Rather then having to add them to the core's. (yuck!)
- + *
- + * @author JStar
- + */
- +public class WorldHandler{
- +
- + private static WorldHandler _instance = null;
- +
- + private WorldHandler(){
- + //Do Nothing ^_-
- + }
- +
- + /** Receives the non-static instance of the RebirthManager.*/
- + public static WorldHandler getInstance(){
- + if(_instance == null){
- + _instance = new WorldHandler();
- + }
- + return _instance;
- + }
- +
- + /** Requests entry into the world - manages appropriately. */
- + public void enterWorld(L2PcInstance player){
- + RebirthManager.getInstance().grantRebirthSkills(player);
- + }
- +
- + /** Requests removal from the world - manages appropriately. */
- + public void exitWorld(L2PcInstance player){
- + }
- +
- +}
- Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 3427)
- +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (working copy)
- -18,6 +18,7 @@
- import java.util.logging.Level;
- import java.util.logging.Logger;
- +import net.sf.l2j.gameserver.handler.BypassHandler;
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.ai.CtrlIntention;
- import net.sf.l2j.gameserver.communitybbs.CommunityBoard;
- -200,6 +218,10 @@
- else
- player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());
- }
- + else if(_command.startsWith("custom_")){
- + L2PcInstance player = getClient().getActiveChar();
- + BypassHandler.getInstance().handleBypass(player, _command);
- + }
- else if (_command.startsWith("OlympiadArenaChange"))
- {
- Olympiad.bypassChangeArena(_command, activeChar);
- Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (revision 3427)
- +++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (working copy)
- -81,6 +83,7 @@
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- import net.sf.l2j.gameserver.network.serverpackets.UserInfo;
- import net.sf.l2j.gameserver.util.StringUtil;
- +import net.sf.l2j.gameserver.handler.WorldHandler;
- /**
- * Enter World Packet Handler<p>
- -252,6 +257,9 @@
- showClanNotice = activeChar.getClan().isNoticeEnabled();
- }
- +
- +
- + GmListTable.getInstance().addGm(activeChar, true);
- // Updating Seal of Strife Buff/Debuff
- if (SevenSigns.getInstance().isSealValidationPeriod() && SevenSigns.getInstance().getSealOwner(SevenSigns.SEAL_STRIFE) != SevenSigns.CABAL_NULL)
- {
- -412,6 +425,7 @@
- if (activeChar.getClanJoinExpiryTime() > System.currentTimeMillis())
- activeChar.sendPacket(new SystemMessage(SystemMessageId.CLAN_MEMBERSHIP_TERMINATED));
- +
- // remove combat flag before teleporting
- if (activeChar.getInventory().getItemByItemId(9819) != null)
- {
- -438,6 +452,9 @@
- RegionBBSManager.getInstance().changeCommunityBoard();
- TvTEvent.onLogin(activeChar);
- + WorldHandler.getInstance().enterWorld(activeChar);
- }
- /**
- Index: java/net/sf/l2j/gameserver/handler/BypassHandler.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/handler/BypassHandler.java (revision 0)
- +++ java/net/sf/l2j/gameserver/handler/BypassHandler.java (revision 0)
- -0,0 +1,29 @@
- +package net.sf.l2j.gameserver.handler;
- +
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +import net.sf.l2j.gameserver.model.entity.RebirthManager;
- +
- +
- +public class BypassHandler{
- + private static BypassHandler _instance = null;
- +
- + private BypassHandler(){
- + //Do Nothing ^_-
- + }
- +
- + /** Receives the non-static instance of the RebirthManager.*/
- + public static BypassHandler getInstance(){
- + if(_instance == null){
- + _instance = new BypassHandler();
- + }
- + return _instance;
- + }
- +
- + /** Handles player's Bypass request to the Custom Content. */
- + public void handleBypass(L2PcInstance player, String command){
- + if(command.startsWith("custom_rebirth")){//Rebirth Manager and Engine Caller
- + RebirthManager.getInstance().handleCommand(player, command);
- + }
- + }
- +}
- Index: java/net/sf/l2j/gameserver/model/entity/RebirthManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/entity/RebirthManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/model/entity/RebirthManager.java (revision 0)
- -0,0 +1,361 @@
- +/*
- + * 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.entity;
- +
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.util.HashMap;
- +import javolution.text.TextBuilder;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.datatables.SkillTable;
- +import net.sf.l2j.gameserver.datatables.ItemTable;
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +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.network.serverpackets.CreatureSay;
- +import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;
- +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
- +import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- +import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
- +
- +
- + /**
- + *
- + * @author TheEnd
- + *
- + *
- + **/
- +public class RebirthManager
- +{
- + private static RebirthManager _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 RebirthManager(){
- + //Do Nothing ^_-
- + }
- +
- + /** Receives the non-static instance of the RebirthManager.*/
- + public static RebirthManager getInstance(){
- + if(_instance == null){
- + _instance = new RebirthManager();
- + }
- + 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
- + if(currBirth >= 3){//Don't send html if player is already at max rebirth count.
- + player.sendMessage("You are currently at your maximum rebirth count!");
- + return;
- + }
- + boolean isMage = player.getBaseTemplate().classId.isMage(); //Returns true if BASE CLASS is a mage.
- + L2Skill skill = getRebirthSkill((currBirth + 1), isMage);//Returns the skill based on next Birth and if isMage.
- +
- + String icon = ""+skill.getId();//Returns the skill's id.
- + if(icon.length() < 4){
- + icon = "0"+icon;
- + }
- +
- + String playerName = "<font color=FF9900>"+player.getName()+"</font>";//return the player's name.
- +
- + TextBuilder text = new TextBuilder();
- + text.append("<html>");
- + text.append("<body>");
- + text.append("<center>");
- + text.append("<title>- Rebirth Request Menu -</title>");
- + text.append("<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32>");
- + text.append("<br>");
- + text.append("<table border=1 cellspacing=1 cellpadding=1 height=37><tr><td valign=top>");
- + text.append("<img src=\"icon.skill3123\" width=32 height=32>");//Cool rebirth icon 'logo' :P
- + text.append("</td></tr></table>");
- + text.append("<br>");
- + text.append("<table width=240 bgcolor=555555 border=1 cellpadding=1 cellspacing=0><tr>");
- + text.append("<td height=40 width=35><img src=\"icon.skill"+icon+"\" width=32 height=32 align=left></td>");
- + text.append("<td height=40 width=140><center><font color=\"FFFFCC\">Bonus Skill Recieved</font><br1><font color=\"FF9900\">"+skill.getName()+"</font></td>");
- + text.append("<td height=40 width=100><center><font color=\"66CC66\">Skill Lvl</font><br1><font color=\"FFFF99\">"+skill.getLevel()+"</font></center></td>");
- + text.append("</tr></table>");
- + text.append("<br>");
- + text.append("<img src=\"L2UI.SquareWhite\" width=\"280\" height=\"1\"><br1>");
- + text.append("<table bgcolor=555555 width=270 height=80><tr><td valign=center align=center>- [ <font color=\"66CC66\">Rebirth Information</font> ] -<br1>");
- + text.append("<table bgcolor=555555 width=250 height=150><tr><td valign=top align=center><center>");
- + text.append("So, "+playerName+", you wish to be <font color=Level>Reborn</font>? ");
- + text.append("Being <font color=Level>Reborn</font> has it's advantages, and it's disadvantages you know. ");
- + text.append("When you are <font color=Level>Reborn</font> you are granted a new bonus skill (listed above), ");
- + text.append("but your character is reset to level 1 and returned to his starting class. So ");
- + text.append("<font color=LEVEL>choose wisely</font> "+playerName+".<br1>");
- + text.append("</center></td></tr></table>");
- + text.append("</td></tr></table>");
- + text.append("<img src=\"L2UI.SquareWhite\" width=\"280\" height=\"1\"><br>");
- + text.append("<center><button value=\" Request Rebirth \" action=\"bypass -h custom_rebirth_confirmrequest\" width=250 height=36 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
- + text.append("</center>");
- + text.append("</body>");
- + text.append("</html>");
- +
- + NpcHtmlMessage html = new NpcHtmlMessage(1);
- + html.setHtml(text.toString());
- + player.sendPacket(html);
- + }
- + 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){
- + if(!Config.REBIRTH_ALLOW_REBIRTH){ //See if the Rebirth Engine is currently allowed.
- + player.sendMessage("The 'Rebirth Engine' is disabled!");
- + return;
- + }
- +
- + else if(player.getLevel() < Config.REBIRTH_MIN_LEVEL){ //Check the player's 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;
- + }
- + else if(player.isAlikeDead()){
- + return;
- + }
- + else if(player.isAttackingNow()){
- + return;
- + }
- + else if(player.isCastingNow()){
- + return;
- + }
- + else if(player.isInDuel()){
- + return;
- + }
- +
- +
- + int currBirth = getRebirthLevel(player);
- + int itemNeeded = 0;
- + int itemAmount = 0;
- +
- + if(currBirth >= 3){
- + player.sendMessage("You are currently at your maximum rebirth count!");
- + return;
- + }
- +
- + switch(currBirth){//Get the requirements
- + case 0: itemNeeded = Config.REBIRTH_ITEM1_NEEDED; itemAmount = Config.REBIRTH_ITEM1_AMOUNT; break;
- + case 1: itemNeeded = Config.REBIRTH_ITEM2_NEEDED; itemAmount = Config.REBIRTH_ITEM2_AMOUNT; break;
- + case 2: itemNeeded = Config.REBIRTH_ITEM3_NEEDED; itemAmount = Config.REBIRTH_ITEM3_AMOUNT; break;
- + }
- +
- + if(itemNeeded != 0){//Their is an item required
- + if(!playerIsEligible(player, itemNeeded, itemAmount)){//Checks to see if player has required items, and takes them if so.
- + return;
- + }
- + }
- +
- + boolean firstBirth = currBirth == 0;//Check and see if its the player's first Rebirth calling.
- + grantRebirth(player,(currBirth + 1), firstBirth); //Player meets requirements and starts Rebirth Process.
- + }
- +
- + /** Physically rewards player and resets status to nothing. */
- + public void grantRebirth(L2PcInstance player, int newBirthCount, boolean firstBirth){
- + try{
- +
- + player.removeExpAndSp(player.getExp() - Experience.LEVEL[1], 0);//Set player to level 1.
- + player.setClassId(player.getBaseClass());//Resets character to first class.
- + for (L2Skill skill : player.getAllSkills()){//Remove the player's current skills.
- + player.removeSkill(skill);
- + }
- + player.giveAvailableSkills();//Give players their eligible skills.
- + player.store(); //Updates the player's information in the Character Database.
- +
- + if(firstBirth) storePlayerBirth(player);
- + else updatePlayerBirth(player,newBirthCount);
- +
- + grantRebirthSkills(player);//Give the player his new Skills.
- + displayCongrats(player);//Displays a congratulation message to the player.
- + }
- + catch(Exception e){
- + e.printStackTrace();
- + }
- + }
- +
- + /** Special effects when the player levels. */
- + public void displayCongrats(L2PcInstance player){
- + player.broadcastPacket(new SocialAction(player.getObjectId(), 3));//Victory Social Action.
- + MagicSkillUse MSU = new MagicSkillUse(player, player, 2024, 1, 1, 0);//Fireworks Display
- + player.broadcastPacket(MSU);
- + ExShowScreenMessage screen = new ExShowScreenMessage("Congratulations "+player.getName()+"! You have been Reborn!", 15000);
- + player.sendPacket(screen);
- + }
- +
- + /** 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().destroyItem("Rebirth Engine", itemNeeded, itemAmount, player, null);
- + player.sendMessage("Removed "+itemAmount+" "+itemName+" from your inventory!");
- + return true;
- + }
- +
- + /** Gives the available Bonus Skills to the player. */
- + public void grantRebirthSkills(L2PcInstance player){
- + int rebirthLevel = getRebirthLevel(player); //returns the current Rebirth Level
- + boolean isMage = player.getBaseTemplate().classId.isMage(); //Returns true if BASE CLASS is a mage.
- +
- + //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);
- + }
- + }
- +
- + /** 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;
- + if(mage){ //Player is a Mage.
- + switch(rebirthLevel){
- + case 1:skill = SkillTable.getInstance().getInfo(Config.REBIRTH_MAGE_SKILL1_ID, Config.REBIRTH_MAGE_SKILL1_LEVEL) ; break;
- + case 2:skill = SkillTable.getInstance().getInfo(Config.REBIRTH_MAGE_SKILL2_ID, Config.REBIRTH_MAGE_SKILL2_LEVEL) ; break;
- + case 3:skill = SkillTable.getInstance().getInfo(Config.REBIRTH_MAGE_SKILL3_ID, Config.REBIRTH_MAGE_SKILL3_LEVEL) ; break;
- + }
- + }
- + else{ //Player is a Fighter.
- + switch(rebirthLevel){
- + case 1:skill = SkillTable.getInstance().getInfo(Config.REBIRTH_FIGHTER_SKILL1_ID, Config.REBIRTH_FIGHTER_SKILL1_LEVEL) ; break;
- + case 2:skill = SkillTable.getInstance().getInfo(Config.REBIRTH_FIGHTER_SKILL2_ID, Config.REBIRTH_FIGHTER_SKILL2_LEVEL) ; break;
- + case 3:skill = SkillTable.getInstance().getInfo(Config.REBIRTH_FIGHTER_SKILL3_ID, Config.REBIRTH_FIGHTER_SKILL3_LEVEL) ; break;
- + }
- + }
- + return skill;
- + }
- +
- + /** Database caller to retrieve player's current Rebirth Level */
- + public void loadRebirthInfo(L2PcInstance player){
- + int playerId = player.getObjectId();
- + int rebirthCount = 0;
- +
- + java.sql.Connection con = null;
- + try {
- + ResultSet rset;
- + con = L2DatabaseFactory.getInstance().getConnection();
- + 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();
- +
- + } catch(Exception e) {
- + e.printStackTrace();
- + }
- + finally {
- + try{con.close();}
- + catch (Exception e){}
- + }
- + _playersRebirthInfo.put(playerId, rebirthCount);
- + }
- +
- + /** Stores the player's information in the DB. */
- + public void storePlayerBirth(L2PcInstance player){
- + java.sql.Connection con = null;
- + try {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement
- + ("INSERT INTO `rebirth_manager` (playerId,rebirthCount) VALUES (?,1)");
- + statement.setInt(1, player.getObjectId());
- + statement.execute();
- +
- + _playersRebirthInfo.put(player.getObjectId(), 1);
- +
- + } catch(Exception e) {
- + e.printStackTrace();
- + }
- + finally {
- + try{con.close();}
- + catch (Exception e){}
- + }
- + }
- +
- + /** Updates the player's information in the DB. */
- + public void updatePlayerBirth(L2PcInstance player,int newRebirthCount){
- + java.sql.Connection con = null;
- + try {
- + int playerId = player.getObjectId();
- +
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement
- + ("UPDATE `rebirth_manager` SET rebirthCount = ? WHERE playerId = ?");
- + statement.setInt(1, newRebirthCount);
- + statement.setInt(2, playerId);
- + statement.execute();
- +
- + _playersRebirthInfo.put(playerId, newRebirthCount);
- +
- + } catch(Exception e) {
- + e.printStackTrace();
- + }
- + finally {
- + try{con.close();}
- + catch (Exception e){}
- + }
- + }
- +}
- Index: java/net/sf/l2j/Config.java
- ===================================================================
- --- java/net/sf/l2j/Config.java (revision 3427)
- +++ java/net/sf/l2j/Config.java (working copy)
- -594,7 +594,38 @@
- public static boolean OFFLINE_SET_NAME_COLOR;
- public static int OFFLINE_NAME_COLOR;
- public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT;
- -
- + public static boolean REBIRTH_ALLOW_REBIRTH;
- + public static int REBIRTH_MIN_LEVEL;
- +
- + /* Items required per rebirth level */
- + public static int REBIRTH_ITEM1_NEEDED;
- + public static int REBIRTH_ITEM1_AMOUNT;
- + public static int REBIRTH_ITEM2_NEEDED;
- + public static int REBIRTH_ITEM2_AMOUNT;
- + public static int REBIRTH_ITEM3_NEEDED;
- + public static int REBIRTH_ITEM3_AMOUNT;
- +
- + /* Bonus skills and levels for Mages or Fighters */
- + public static int REBIRTH_MAGE_SKILL1_ID;
- + public static int REBIRTH_MAGE_SKILL1_LEVEL;
- + public static int REBIRTH_MAGE_SKILL2_ID;
- + public static int REBIRTH_MAGE_SKILL2_LEVEL;
- + public static int REBIRTH_MAGE_SKILL3_ID;
- + public static int REBIRTH_MAGE_SKILL3_LEVEL;
- + public static int REBIRTH_FIGHTER_SKILL1_ID;
- + public static int REBIRTH_FIGHTER_SKILL1_LEVEL;
- + public static int REBIRTH_FIGHTER_SKILL2_ID;
- + public static int REBIRTH_FIGHTER_SKILL2_LEVEL;
- + public static int REBIRTH_FIGHTER_SKILL3_ID;
- + public static int REBIRTH_FIGHTER_SKILL3_LEVEL;
- //--------------------------------------------------
- // NPC Settings
- -1953,13 +1993,36 @@
- BANKING_SYSTEM_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("BankingEnabled", "false"));
- BANKING_SYSTEM_GOLDBARS = Integer.parseInt(L2JModSettings.getProperty("BankingGoldbarCount", "1"));
- BANKING_SYSTEM_ADENA = Integer.parseInt(L2JModSettings.getProperty("BankingAdenaCount", "500000000"));
- OFFLINE_TRADE_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("OfflineTradeEnable", "false"));
- OFFLINE_CRAFT_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("OfflineCraftEnable", "false"));
- OFFLINE_SET_NAME_COLOR = Boolean.parseBoolean(L2JModSettings.getProperty("OfflineSetNameColor", "false"));
- - OFFLINE_NAME_COLOR = Integer.decode("0x" + L2JModSettings.getProperty("OfflineNameColor", "808080"));
- + OFFLINE_NAME_COLOR = Integer.decode("0x" + L2JModSettings.getProperty("OfflineNameColor", "808080"));
- L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = Boolean.parseBoolean(L2JModSettings.getProperty("EnableManaPotionSupport", "false"));
- + REBIRTH_ALLOW_REBIRTH = Boolean.parseBoolean(L2JModSettings.getProperty("RebirthAllow", "False"));
- + REBIRTH_MIN_LEVEL = Integer.parseInt(L2JModSettings.getProperty("RebirthMin","80"));
- +
- + REBIRTH_ITEM1_NEEDED = Integer.parseInt(L2JModSettings.getProperty("RebirthItem1Needed","0"));
- + REBIRTH_ITEM1_AMOUNT = Integer.parseInt(L2JModSettings.getProperty("RebirthItem1Amount","0"));
- + REBIRTH_ITEM2_NEEDED = Integer.parseInt(L2JModSettings.getProperty("RebirthItem2Needed","0"));
- + REBIRTH_ITEM2_AMOUNT = Integer.parseInt(L2JModSettings.getProperty("RebirthItem2Amount","0"));
- + REBIRTH_ITEM3_NEEDED = Integer.parseInt(L2JModSettings.getProperty("RebirthItem3Needed","0"));
- + REBIRTH_ITEM3_AMOUNT = Integer.parseInt(L2JModSettings.getProperty("RebirthItem3Amount","0"));
- +
- + REBIRTH_MAGE_SKILL1_ID = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_MAGE_SKILL1_ID","0"));
- + REBIRTH_MAGE_SKILL1_LEVEL = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_MAGE_SKILL1_LEVEL","0"));
- + REBIRTH_MAGE_SKILL2_ID = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_MAGE_SKILL2_ID","0"));
- + REBIRTH_MAGE_SKILL2_LEVEL = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_MAGE_SKILL2_LEVEL","0"));
- + REBIRTH_MAGE_SKILL3_ID = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_MAGE_SKILL3_ID","0"));
- + REBIRTH_MAGE_SKILL3_LEVEL = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_MAGE_SKILL3_LEVEL","0"));
- + REBIRTH_FIGHTER_SKILL1_ID = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_FIGHTER_SKILL1_ID","0"));
- + REBIRTH_FIGHTER_SKILL1_LEVEL = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_FIGHTER_SKILL1_LEVEL","0"));
- + REBIRTH_FIGHTER_SKILL2_ID = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_FIGHTER_SKILL2_ID","0"));
- + REBIRTH_FIGHTER_SKILL2_LEVEL = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_FIGHTER_SKILL2_LEVEL","0"));
- + REBIRTH_FIGHTER_SKILL3_ID = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_FIGHTER_SKILL3_ID","0"));
- + REBIRTH_FIGHTER_SKILL3_LEVEL = Integer.parseInt(L2JModSettings.getProperty("REBIRTH_FIGHTER_SKILL3_LEVEL","0"));
- }
- catch (Exception e)
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement