Jump to content

oceeman

Members
  • Posts

    40
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by oceeman

  1. Hi! Where can I find magic damage given to a target (so I can use it for something else) on core files please? :)
  2. I created legend colomn on characters table if that is what you mean. And here is LegendSkillTable.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 net.sf.l2j.gameserver.datatables; import net.sf.l2j.gameserver.model.L2Skill; /** * * @author Stefoulis15 */ public class LegendSkillTable { private static L2Skill[] _legendSkills; private LegendSkillTable() { _legendSkills = new L2Skill[7]; _legendSkills[0] = SkillTable.getInstance().getInfo(1218, 230); _legendSkills[1] = SkillTable.getInstance().getInfo(1410, 1); _legendSkills[2] = SkillTable.getInstance().getInfo(1429, 1); _legendSkills[3] = SkillTable.getInstance().getInfo(60, 1); _legendSkills[4] = SkillTable.getInstance().getInfo(1374, 1); _legendSkills[5] = SkillTable.getInstance().getInfo(1375, 1); _legendSkills[6] = SkillTable.getInstance().getInfo(1376, 1); } public static LegendSkillTable getInstance() { return SingletonHolder._instance; } public static L2Skill[] getLegendSkills() { return _legendSkills; } public static boolean isLegendSkill(int skillid) { Integer[] _LegendSkillsId = new Integer[] { 1218, 1410, 1429, 60, 1374, 1375, 1376 }; for (int id : _LegendSkillsId) { if (id == skillid) return true; } return false; } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final LegendSkillTable _instance = new LegendSkillTable(); } }
  3. Hello! I tried to add Stefoulis15 Legend System but it seems it doesn't do anything :P Can someone help? Here is my patch: Index: java/config/l2jmods.properties =================================================================== --- java/config/l2jmods.properties (revision 1475) +++ java/config/l2jmods.properties (working copy) @@ -275,6 +275,28 @@ ManaPotionLevel = 1 # --------------------------------------------------------------------------- +# Legend System +# --------------------------------------------------------------------------- + +# Custom Legends Title? +LegendTitle = -Legend- + +# Custom Legends Title Color? +# Values are In RGB Format. Max For Very Int is 255 +LegendTitleColorRed = 0 +LegendTitleColorGreen = 0 +LegendTitleColorBlue = 0 + +# Custom Legends Name Color? +# Values are In RGB Format. Max For Very Int is 255 +LegendNameColorRed = 0 +LegendNameColorGreen = 0 +LegendNameColorBlue = 0 + +# Legends Vitality Level? +LegendVitalityLevel = 4 + +# --------------------------------------------------------------------------- # Welcome message # --------------------------------------------------------------------------- # Allow screen welcome message? Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 1475) +++ java/net/sf/l2j/Config.java (working copy) @@ -646,6 +646,14 @@ public static boolean OFFLINE_TRADE_ENABLE; public static boolean OFFLINE_CRAFT_ENABLE; public static boolean OFFLINE_SET_NAME_COLOR; + //public static String LEGEND_TITLE; + public static int LEGEND_TITLE_COLOR_RED; + public static int LEGEND_TITLE_COLOR_GREEN; + public static int LEGEND_TITLE_COLOR_BLUE; + public static int LEGEND_NAME_COLOR_RED; + public static int LEGEND_NAME_COLOR_GREEN; + public static int LEGEND_NAME_COLOR_BLUE; + //public static int LEGEND_VITALITY_LEVEL; public static int OFFLINE_NAME_COLOR; public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT; public static int MANA_POTION_LEVEL; @@ -1958,6 +1966,15 @@ L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True")); L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20")); + //LEGEND_TITLE = String.valueOf(L2JModSettings.getProperty("LegendTitle")); + LEGEND_TITLE_COLOR_RED = Integer.parseInt(L2JModSettings.getProperty("LegendTitleColorRed", "0")); + LEGEND_TITLE_COLOR_GREEN = Integer.parseInt(L2JModSettings.getProperty("LegendTitleColorGreen", "0")); + LEGEND_TITLE_COLOR_BLUE = Integer.parseInt(L2JModSettings.getProperty("LegendTitleColorBlue", "0")); + LEGEND_NAME_COLOR_RED = Integer.parseInt(L2JModSettings.getProperty("LegendNameColorRed", "0")); + LEGEND_NAME_COLOR_GREEN = Integer.parseInt(L2JModSettings.getProperty("LegendNameColorGreen", "0")); + LEGEND_NAME_COLOR_BLUE = Integer.parseInt(L2JModSettings.getProperty("LegendNameColorBlue", "0")); + //LEGEND_VITALITY_LEVEL = Integer.parseInt(L2JModSettings.getProperty("LegendVitalityLevel", "0")); + L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingClan", "False")); L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False")); L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingFreight", "False")); Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 1475) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -65,6 +65,7 @@ import net.sf.l2j.gameserver.datatables.HennaTable; import net.sf.l2j.gameserver.datatables.HeroSkillTable; import net.sf.l2j.gameserver.datatables.ItemTable; +import net.sf.l2j.gameserver.datatables.LegendSkillTable; import net.sf.l2j.gameserver.datatables.MapRegionTable; import net.sf.l2j.gameserver.datatables.NobleSkillTable; import net.sf.l2j.gameserver.datatables.NpcTable; @@ -262,8 +263,10 @@ // Character Character SQL String Definitions: private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,last_recom_date,vitality_points,createTime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; - private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=? WHERE charId=?"; - private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime FROM characters WHERE charId=?"; + //private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=? WHERE charId=?"; + //private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime FROM characters WHERE charId=?"; + private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,legend=? WHERE charId=?"; + private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime,legend FROM characters WHERE charId=?"; // Character Teleport Bookmark: private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)"; @@ -558,6 +561,7 @@ private boolean _noble = false; private boolean _hero = false; + private boolean _legend = false; /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */ private L2Npc _lastFolkNpc = null; @@ -2779,6 +2783,10 @@ // Add Hero skills if hero if (isHero()) setHero(true); + + // Add Legend Skills if legend + if (islegend()) + setlegend(true); // Add clan skills if (getClan() != null) @@ -7701,7 +7709,8 @@ statement.setLong(51, getDeathPenaltyBuffLevel()); statement.setInt(52, getBookMarkSlot()); statement.setInt(53, getVitalityPoints()); - statement.setInt(54, getObjectId()); + statement.setInt(54, islegend() ? 1 : 0); + statement.setInt(55, getObjectId()); statement.execute(); statement.close(); @@ -10136,7 +10145,8 @@ _OlympiadStart = b; } - public boolean isOlympiadStart(){ + public boolean isOlympiadStart() + { return _OlympiadStart; } @@ -10144,6 +10154,28 @@ { return _hero; } + + public boolean islegend() + { + return _legend; + } + + public void setlegend(boolean legend) + { + if (legend && _baseClass == _activeClass) + { + for (L2Skill s : LegendSkillTable.getLegendSkills()) + addSkill(s, false); //Dont Save Legend skills to database + } + else + { + for (L2Skill s : LegendSkillTable.getLegendSkills()) + super.removeSkill(s); //Just Remove skills from nonLegend characters + } + _legend = legend; + + sendSkillList(); + } public boolean isInOlympiadMode() { Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 1475) +++ java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy) @@ -963,6 +963,10 @@ if (weaponInst != null) weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_NONE); + if (player.islegend() && target instanceof L2PcInstance) + { + target.setCurrentCp(0); + } if (player != null) { @@ -971,7 +975,8 @@ // If hitted by a cursed weapon, Cp is reduced to 0 if (!target.isInvul()) target.setCurrentCp(0); - } else if (player.isHero()) + } + else if (player.isHero()) { if (target instanceof L2PcInstance && ((L2PcInstance)target).isCursedWeaponEquipped()) // If a cursed weapon is hitted by a Hero, Cp is reduced to 0 Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (revision 1475) +++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -338,6 +338,19 @@ engage(activeChar); notifyPartner(activeChar,activeChar.getPartnerId()); } + + if (activeChar.islegend()) + { + //activeChar.setTitle(Config.LEGEND_TITLE); + activeChar.getAppearance().setTitleColor(Config.LEGEND_TITLE_COLOR_RED, Config.LEGEND_TITLE_COLOR_GREEN, Config.LEGEND_TITLE_COLOR_BLUE); + activeChar.getAppearance().setNameColor(Config.LEGEND_NAME_COLOR_RED, Config.LEGEND_NAME_COLOR_GREEN, Config.LEGEND_NAME_COLOR_BLUE); + //activeChar.setVitalityLevel(Config.LEGEND_VITALITY_LEVEL); + activeChar.sendMessage("You are a Legend!"); + } + else + { + activeChar.sendMessage("You are not a Legend."); + } if (activeChar.isCursedWeaponEquipped()) {
  4. If you are using TortoiseSVN + Ant build and you get errors it is a pain to resolve them without having logs. Here is a patch that will solve the problem: Index: build.xml =================================================================== --- build.xml (revision 1475) +++ build.xml (working copy) @@ -43,7 +43,6 @@ <include name="trove-2.1.0.jar"/> </fileset> </path> - <target name="verifyRequirements" description="Checks if the necessary requirements for building L2J are fulfilled"> @@ -56,6 +55,16 @@ depends="clean, verifyRequirements" description="Create the output directories."> + <tstamp> + <format property="timestamp" pattern="yyyy-MM-dd_HH-mm-ss"/> + </tstamp> + <property name="build.log.dir" location="${basedir}/buildlogs"/> + <mkdir dir="${build.log.dir}"/> + <property name="build.log.filename" value="build_${timestamp}.log"/> + <record name="${build.log.dir}/${build.log.filename}" + loglevel="verbose" append="false"/> + <echo message="Build logged to ${build.log.filename}"/> + <mkdir dir="${build}"/> <mkdir dir="${build.classes}"/> <mkdir dir="${build.dist}" /> You can also open your build.xml with an editor (like Notepad), find <target name="init" and insert the following lines after description="Create the output directories.">: <tstamp> <format property="timestamp" pattern="yyyy-MM-dd_HH-mm-ss"/> </tstamp> <property name="build.log.dir" location="${basedir}/buildlogs"/> <mkdir dir="${build.log.dir}"/> <property name="build.log.filename" value="build_${timestamp}.log"/> <record name="${build.log.dir}/${build.log.filename}" loglevel="verbose" append="false"/> <echo message="Build logged to ${build.log.filename}"/>
  5. Hello! I tried to add Stefoulis15 Legend System but it seems it doesn't do anything :P I'm using L2joff. Can someone help? Here is my patch: Index: java/config/l2jmods.properties =================================================================== --- java/config/l2jmods.properties (revision 1475) +++ java/config/l2jmods.properties (working copy) @@ -275,6 +275,28 @@ ManaPotionLevel = 1 # --------------------------------------------------------------------------- +# Legend System +# --------------------------------------------------------------------------- + +# Custom Legends Title? +LegendTitle = -Legend- + +# Custom Legends Title Color? +# Values are In RGB Format. Max For Very Int is 255 +LegendTitleColorRed = 0 +LegendTitleColorGreen = 0 +LegendTitleColorBlue = 0 + +# Custom Legends Name Color? +# Values are In RGB Format. Max For Very Int is 255 +LegendNameColorRed = 0 +LegendNameColorGreen = 0 +LegendNameColorBlue = 0 + +# Legends Vitality Level? +LegendVitalityLevel = 4 + +# --------------------------------------------------------------------------- # Welcome message # --------------------------------------------------------------------------- # Allow screen welcome message? Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 1475) +++ java/net/sf/l2j/Config.java (working copy) @@ -646,6 +646,14 @@ public static boolean OFFLINE_TRADE_ENABLE; public static boolean OFFLINE_CRAFT_ENABLE; public static boolean OFFLINE_SET_NAME_COLOR; + //public static String LEGEND_TITLE; + public static int LEGEND_TITLE_COLOR_RED; + public static int LEGEND_TITLE_COLOR_GREEN; + public static int LEGEND_TITLE_COLOR_BLUE; + public static int LEGEND_NAME_COLOR_RED; + public static int LEGEND_NAME_COLOR_GREEN; + public static int LEGEND_NAME_COLOR_BLUE; + //public static int LEGEND_VITALITY_LEVEL; public static int OFFLINE_NAME_COLOR; public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT; public static int MANA_POTION_LEVEL; @@ -1958,6 +1966,15 @@ L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True")); L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20")); + //LEGEND_TITLE = String.valueOf(L2JModSettings.getProperty("LegendTitle")); + LEGEND_TITLE_COLOR_RED = Integer.parseInt(L2JModSettings.getProperty("LegendTitleColorRed", "0")); + LEGEND_TITLE_COLOR_GREEN = Integer.parseInt(L2JModSettings.getProperty("LegendTitleColorGreen", "0")); + LEGEND_TITLE_COLOR_BLUE = Integer.parseInt(L2JModSettings.getProperty("LegendTitleColorBlue", "0")); + LEGEND_NAME_COLOR_RED = Integer.parseInt(L2JModSettings.getProperty("LegendNameColorRed", "0")); + LEGEND_NAME_COLOR_GREEN = Integer.parseInt(L2JModSettings.getProperty("LegendNameColorGreen", "0")); + LEGEND_NAME_COLOR_BLUE = Integer.parseInt(L2JModSettings.getProperty("LegendNameColorBlue", "0")); + //LEGEND_VITALITY_LEVEL = Integer.parseInt(L2JModSettings.getProperty("LegendVitalityLevel", "0")); + L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingClan", "False")); L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False")); L2JMOD_ENABLE_WAREHOUSESORTING_FREIGHT = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingFreight", "False")); Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 1475) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -65,6 +65,7 @@ import net.sf.l2j.gameserver.datatables.HennaTable; import net.sf.l2j.gameserver.datatables.HeroSkillTable; import net.sf.l2j.gameserver.datatables.ItemTable; +import net.sf.l2j.gameserver.datatables.LegendSkillTable; import net.sf.l2j.gameserver.datatables.MapRegionTable; import net.sf.l2j.gameserver.datatables.NobleSkillTable; import net.sf.l2j.gameserver.datatables.NpcTable; @@ -262,8 +263,10 @@ // Character Character SQL String Definitions: private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,last_recom_date,vitality_points,createTime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; - private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=? WHERE charId=?"; - private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime FROM characters WHERE charId=?"; + //private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=? WHERE charId=?"; + //private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime FROM characters WHERE charId=?"; + private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,legend=? WHERE charId=?"; + private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime,legend FROM characters WHERE charId=?"; // Character Teleport Bookmark: private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)"; @@ -558,6 +561,7 @@ private boolean _noble = false; private boolean _hero = false; + private boolean _legend = false; /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */ private L2Npc _lastFolkNpc = null; @@ -2779,6 +2783,10 @@ // Add Hero skills if hero if (isHero()) setHero(true); + + // Add Legend Skills if legend + if (islegend()) + setlegend(true); // Add clan skills if (getClan() != null) @@ -7701,7 +7709,8 @@ statement.setLong(51, getDeathPenaltyBuffLevel()); statement.setInt(52, getBookMarkSlot()); statement.setInt(53, getVitalityPoints()); - statement.setInt(54, getObjectId()); + statement.setInt(54, islegend() ? 1 : 0); + statement.setInt(55, getObjectId()); statement.execute(); statement.close(); @@ -10136,7 +10145,8 @@ _OlympiadStart = b; } - public boolean isOlympiadStart(){ + public boolean isOlympiadStart() + { return _OlympiadStart; } @@ -10144,6 +10154,28 @@ { return _hero; } + + public boolean islegend() + { + return _legend; + } + + public void setlegend(boolean legend) + { + if (legend && _baseClass == _activeClass) + { + for (L2Skill s : LegendSkillTable.getLegendSkills()) + addSkill(s, false); //Dont Save Legend skills to database + } + else + { + for (L2Skill s : LegendSkillTable.getLegendSkills()) + super.removeSkill(s); //Just Remove skills from nonLegend characters + } + _legend = legend; + + sendSkillList(); + } public boolean isInOlympiadMode() { Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 1475) +++ java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy) @@ -963,6 +963,10 @@ if (weaponInst != null) weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_NONE); + if (player.islegend() && target instanceof L2PcInstance) + { + target.setCurrentCp(0); + } if (player != null) { @@ -971,7 +975,8 @@ // If hitted by a cursed weapon, Cp is reduced to 0 if (!target.isInvul()) target.setCurrentCp(0); - } else if (player.isHero()) + } + else if (player.isHero()) { if (target instanceof L2PcInstance && ((L2PcInstance)target).isCursedWeaponEquipped()) // If a cursed weapon is hitted by a Hero, Cp is reduced to 0 Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (revision 1475) +++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -338,6 +338,19 @@ engage(activeChar); notifyPartner(activeChar,activeChar.getPartnerId()); } + + if (activeChar.islegend()) + { + //activeChar.setTitle(Config.LEGEND_TITLE); + activeChar.getAppearance().setTitleColor(Config.LEGEND_TITLE_COLOR_RED, Config.LEGEND_TITLE_COLOR_GREEN, Config.LEGEND_TITLE_COLOR_BLUE); + activeChar.getAppearance().setNameColor(Config.LEGEND_NAME_COLOR_RED, Config.LEGEND_NAME_COLOR_GREEN, Config.LEGEND_NAME_COLOR_BLUE); + //activeChar.setVitalityLevel(Config.LEGEND_VITALITY_LEVEL); + activeChar.sendMessage("You are a Legend!"); + } + else + { + activeChar.sendMessage("You are not a Legend."); + } if (activeChar.isCursedWeaponEquipped()) {
  6. sry :D just made it for myself (took a long break of l2j so i didn't know of your tools) you can delete it
  7. Shift + Click is just to view / edit values of created npcs and then you need restart etc. With this tool you can create and compare multiple npcs with just few clicks.
  8. Simple, fast, easy to use | for both beginners and advanced developers. Can easy edit / add / delete npcs only by modifying values you want from other npcs (like when you want to add custom very strong moobs and you only want to modify name / patk / matk etc) Multilingual (you can also add more languages in .txt file :P) NPC Editor 1.2
  9. search on google for css style and try implement it with little php to make nicier menu and background. another think you could do is to download a shared website and try to understand it and edit it (change colors, images etc so you know what you need to do to change stuff)
  10. thanks bro but i think this russian version was already shared
  11. he doesn't know any php (0 experience) so you should encourage him and respect his work (no offense)
  12. it's your work so you should be proud of it. it can't to be perfect anyway :P but you can get close to it if you struggle on and on and learn more about php. you could create fantastic websites if you will learn it. as for this one i think it's nice for a someone that doesn't know php. by the way you should try choose a palette of 3-4 colors and "play" with them. try choosing a lighter background for your next website. it would be nicer. i'll give u a 6/10 ;) (don't judge me)
  13. I made a software to insert easier custom npcs. It's easier because you can make one and then edit only values you want (name, health, pdef, etc) then press insert. You can also view other existing npcs. Optionally you can also add more languages by editing languages.txt. V 1.1 - added edit option Download link (you need .net framework 2.0 to make it work)
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock