Jump to content

ThelwHelpRePaidia

Members
  • Posts

    269
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by ThelwHelpRePaidia

  1. solved with this if anyone have the same problem just copy paste it /* * $Header: PlayerClass.java, 24/11/2005 12:56:01 luisantonioa Exp $ * * $Author: luisantonioa $ * $Date: 24/11/2005 12:56:01 $ * $Revision: 1 $ * $Log: PlayerClass.java,v $ * Revision 1 24/11/2005 12:56:01 luisantonioa * Added copyright notice * * * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package com.l2jfrozen.gameserver.model.base; import static com.l2jfrozen.gameserver.model.base.ClassLevel.First; import static com.l2jfrozen.gameserver.model.base.ClassLevel.Fourth; import static com.l2jfrozen.gameserver.model.base.ClassLevel.Second; import static com.l2jfrozen.gameserver.model.base.ClassLevel.Third; import static com.l2jfrozen.gameserver.model.base.ClassType.Fighter; import static com.l2jfrozen.gameserver.model.base.ClassType.Mystic; import static com.l2jfrozen.gameserver.model.base.ClassType.Priest; import static com.l2jfrozen.gameserver.model.base.PlayerRace.DarkElf; import static com.l2jfrozen.gameserver.model.base.PlayerRace.Dwarf; import static com.l2jfrozen.gameserver.model.base.PlayerRace.Human; import static com.l2jfrozen.gameserver.model.base.PlayerRace.LightElf; import static com.l2jfrozen.gameserver.model.base.PlayerRace.Orc; import java.util.EnumMap; import java.util.EnumSet; import java.util.Set; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; /** * This class ... * * @author programmos, l2jfrozen dev * @version $Revision: 1.2.1 $ $Date: 2009/04/13 02:01:21 $ */ public enum PlayerClass { HumanFighter(Human, Fighter, First), Warrior(Human, Fighter, Second), Gladiator(Human, Fighter, Third), Warlord(Human, Fighter, Third), HumanKnight(Human, Fighter, Second), Paladin(Human, Fighter, Third), DarkAvenger(Human, Fighter, Third), Rogue(Human, Fighter, Second), TreasureHunter(Human, Fighter, Third), Hawkeye(Human, Fighter, Third), HumanMystic(Human, Mystic, First), HumanWizard(Human, Mystic, Second), Sorceror(Human, Mystic, Third), Necromancer(Human, Mystic, Third), Warlock(Human, Mystic, Third), Cleric(Human, Priest, Second), Bishop(Human, Priest, Third), Prophet(Human, Priest, Third), ElvenFighter(LightElf, Fighter, First), ElvenKnight(LightElf, Fighter, Second), TempleKnight(LightElf, Fighter, Third), Swordsinger(LightElf, Fighter, Third), ElvenScout(LightElf, Fighter, Second), Plainswalker(LightElf, Fighter, Third), SilverRanger(LightElf, Fighter, Third), ElvenMystic(LightElf, Mystic, First), ElvenWizard(LightElf, Mystic, Second), Spellsinger(LightElf, Mystic, Third), ElementalSummoner(LightElf, Mystic, Third), ElvenOracle(LightElf, Priest, Second), ElvenElder(LightElf, Priest, Third), DarkElvenFighter(DarkElf, Fighter, First), PalusKnight(DarkElf, Fighter, Second), ShillienKnight(DarkElf, Fighter, Third), Bladedancer(DarkElf, Fighter, Third), Assassin(DarkElf, Fighter, Second), AbyssWalker(DarkElf, Fighter, Third), PhantomRanger(DarkElf, Fighter, Third), DarkElvenMystic(DarkElf, Mystic, First), DarkElvenWizard(DarkElf, Mystic, Second), Spellhowler(DarkElf, Mystic, Third), PhantomSummoner(DarkElf, Mystic, Third), ShillienOracle(DarkElf, Priest, Second), ShillienElder(DarkElf, Priest, Third), OrcFighter(Orc, Fighter, First), OrcRaider(Orc, Fighter, Second), Destroyer(Orc, Fighter, Third), OrcMonk(Orc, Fighter, Second), Tyrant(Orc, Fighter, Third), OrcMystic(Orc, Mystic, First), OrcShaman(Orc, Mystic, Second), Overlord(Orc, Mystic, Third), Warcryer(Orc, Mystic, Third), DwarvenFighter(Dwarf, Fighter, First), DwarvenScavenger(Dwarf, Fighter, Second), BountyHunter(Dwarf, Fighter, Third), DwarvenArtisan(Dwarf, Fighter, Second), Warsmith(Dwarf, Fighter, Third), dummyEntry1(null, null, null), dummyEntry2(null, null, null), dummyEntry3(null, null, null), dummyEntry4(null, null, null), dummyEntry5(null, null, null), dummyEntry6(null, null, null), dummyEntry7(null, null, null), dummyEntry8(null, null, null), dummyEntry9(null, null, null), dummyEntry10(null, null, null), dummyEntry11(null, null, null), dummyEntry12(null, null, null), dummyEntry13(null, null, null), dummyEntry14(null, null, null), dummyEntry15(null, null, null), dummyEntry16(null, null, null), dummyEntry17(null, null, null), dummyEntry18(null, null, null), dummyEntry19(null, null, null), dummyEntry20(null, null, null), dummyEntry21(null, null, null), dummyEntry22(null, null, null), dummyEntry23(null, null, null), dummyEntry24(null, null, null), dummyEntry25(null, null, null), dummyEntry26(null, null, null), dummyEntry27(null, null, null), dummyEntry28(null, null, null), dummyEntry29(null, null, null), dummyEntry30(null, null, null), /* * (3rd classes) */ duelist(Human, Fighter, Fourth), dreadnought(Human, Fighter, Fourth), phoenixKnight(Human, Fighter, Fourth), hellKnight(Human, Fighter, Fourth), sagittarius(Human, Fighter, Fourth), adventurer(Human, Fighter, Fourth), archmage(Human, Mystic, Fourth), soultaker(Human, Mystic, Fourth), arcanaLord(Human, Mystic, Fourth), cardinal(Human, Mystic, Fourth), hierophant(Human, Mystic, Fourth), evaTemplar(LightElf, Fighter, Fourth), swordMuse(LightElf, Fighter, Fourth), windRider(LightElf, Fighter, Fourth), moonlightSentinel(LightElf, Fighter, Fourth), mysticMuse(LightElf, Mystic, Fourth), elementalMaster(LightElf, Mystic, Fourth), evaSaint(LightElf, Mystic, Fourth), shillienTemplar(DarkElf, Fighter, Fourth), spectralDancer(DarkElf, Fighter, Fourth), ghostHunter(DarkElf, Fighter, Fourth), ghostSentinel(DarkElf, Fighter, Fourth), stormScreamer(DarkElf, Mystic, Fourth), spectralMaster(DarkElf, Mystic, Fourth), shillienSaint(DarkElf, Mystic, Fourth), titan(Orc, Fighter, Fourth), grandKhauatari(Orc, Fighter, Fourth), dominator(Orc, Mystic, Fourth), doomcryer(Orc, Mystic, Fourth), fortuneSeeker(Dwarf, Fighter, Fourth), maestro(Dwarf, Fighter, Fourth); private PlayerRace _race; private ClassLevel _level; private ClassType _type; private static final Set<PlayerClass> mainSubclassSet; private static final EnumMap<PlayerClass, Set<PlayerClass>> subclassSetMap = new EnumMap<PlayerClass, Set<PlayerClass>>(PlayerClass.class); static { Set<PlayerClass> subclasses = getSet(null, Third); mainSubclassSet = subclasses; } PlayerClass(PlayerRace pRace, ClassType pType, ClassLevel pLevel) { _race = pRace; _level = pLevel; _type = pType; } public final Set<PlayerClass> getAvailableSubclasses(L2PcInstance player) { Set<PlayerClass> subclasses = null; if(_level == Third) { subclasses = EnumSet.copyOf(mainSubclassSet); subclasses.remove(this); } return subclasses; } public static final EnumSet<PlayerClass> getSet(PlayerRace race, ClassLevel level) { EnumSet<PlayerClass> allOf = EnumSet.noneOf(PlayerClass.class); for(PlayerClass playerClass : EnumSet.allOf(PlayerClass.class)) { if(race == null || playerClass.isOfRace(race)) { if(level == null || playerClass.isOfLevel(level)) { allOf.add(playerClass); } } } return allOf; } public final boolean isOfRace(PlayerRace pRace) { return _race == pRace; } public final boolean isOfType(ClassType pType) { return _type == pType; } public final boolean isOfLevel(ClassLevel pLevel) { return _level == pLevel; } public final ClassLevel getLevel() { return _level; } }
  2. Hello i have a problem with Cave of trials some times ppl can hit other players and some times ppl cant hit it says peaceful zone.
  3. Hello i have this error when i put more ram on my game server i have 8g ram on my computer Invalid maximum heap size: -Xmx6024m The specified size exceeds the maximum representable size. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. here is my game server settings @echo off title L2J-Frozen: Game Server Console :start echo Starting L2J-Frozen Core Game Server. echo Official website : http://www.l2jfrozen.com echo Enjoy by server core. Bee happy! echo ------------------------------ echo. REM ------------------------------------- REM Default parameters for a basic server. java -Dfile.encoding=UTF8 -Xms4024m -Xmx6024m -cp ./lib/*;l2jfrozen-core.jar com.l2jfrozen.gameserver.GameServer REM REM If you have a big server and lots of memory, you could experiment for example with REM java -server -Xms4024m -Xmx6024m -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts REM ------------------------------------- if ERRORLEVEL 7 goto telldown if ERRORLEVEL 6 goto tellrestart if ERRORLEVEL 5 goto taskrestart if ERRORLEVEL 4 goto taskdown REM 3 - abort if ERRORLEVEL 2 goto restart if ERRORLEVEL 1 goto error goto end :tellrestart echo. echo Telnet server Restart ... echo Send you bug to : http://www.l2jfrozen.com echo. goto start :taskrestart echo. echo Auto Task Restart ... echo Send you bug to : http://www.l2jfrozen.com echo. goto start :restart echo. echo Admin Restart ... echo Send you bug to : http://www.l2jfrozen.com echo. goto start :taskdown echo . echo Server terminated (Auto task) echo Send you bug to : http://www.l2jfrozen.com echo . :telldown echo . echo Server terminated (Telnet) echo Send you bug to : http://www.l2jfrozen.com echo . :error echo. echo Server terminated abnormally echo Send you bug to : http://www.l2jfrozen.com echo. :end echo. echo server terminated echo Send you bug to : http://www.l2jfrozen.com echo. :question set choix=q set /p choix=Restart(r) or Quit(q) if /i %choix%==r goto start if /i %choix%==q goto exit :exit exit pause
  4. Hello i have a problem with some classes i cant see some class example if im dark elf mage i cant see sps and sorcer here is my playerclass.java /* * $Header: PlayerClass.java, 24/11/2005 12:56:01 luisantonioa Exp $ * * $Author: luisantonioa $ * $Date: 24/11/2005 12:56:01 $ * $Revision: 1 $ * $Log: PlayerClass.java,v $ * Revision 1 24/11/2005 12:56:01 luisantonioa * Added copyright notice * * * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package com.l2jfrozen.gameserver.model.base; import static com.l2jfrozen.gameserver.model.base.ClassLevel.First; import static com.l2jfrozen.gameserver.model.base.ClassLevel.Fourth; import static com.l2jfrozen.gameserver.model.base.ClassLevel.Second; import static com.l2jfrozen.gameserver.model.base.ClassLevel.Third; import static com.l2jfrozen.gameserver.model.base.ClassType.Fighter; import static com.l2jfrozen.gameserver.model.base.ClassType.Mystic; import static com.l2jfrozen.gameserver.model.base.ClassType.Priest; import static com.l2jfrozen.gameserver.model.base.PlayerRace.DarkElf; import static com.l2jfrozen.gameserver.model.base.PlayerRace.Dwarf; import static com.l2jfrozen.gameserver.model.base.PlayerRace.Human; import static com.l2jfrozen.gameserver.model.base.PlayerRace.LightElf; import static com.l2jfrozen.gameserver.model.base.PlayerRace.Orc; import java.util.EnumMap; import java.util.EnumSet; import java.util.Set; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; /** * This class ... * * @author programmos, l2jfrozen dev * @version $Revision: 1.2.1 $ $Date: 2009/04/13 02:01:21 $ */ public enum PlayerClass { HumanFighter(Human, Fighter, First), Warrior(Human, Fighter, Second), Gladiator(Human, Fighter, Third), Warlord(Human, Fighter, Third), HumanKnight(Human, Fighter, Second), Paladin(Human, Fighter, Third), DarkAvenger(Human, Fighter, Third), Rogue(Human, Fighter, Second), TreasureHunter(Human, Fighter, Third), Hawkeye(Human, Fighter, Third), HumanMystic(Human, Mystic, First), HumanWizard(Human, Mystic, Second), Sorceror(Human, Mystic, Third), Necromancer(Human, Mystic, Third), Warlock(Human, Mystic, Third), Cleric(Human, Priest, Second), Bishop(Human, Priest, Third), Prophet(Human, Priest, Third), ElvenFighter(LightElf, Fighter, First), ElvenKnight(LightElf, Fighter, Second), TempleKnight(LightElf, Fighter, Third), Swordsinger(LightElf, Fighter, Third), ElvenScout(LightElf, Fighter, Second), Plainswalker(LightElf, Fighter, Third), SilverRanger(LightElf, Fighter, Third), ElvenMystic(LightElf, Mystic, First), ElvenWizard(LightElf, Mystic, Second), Spellsinger(LightElf, Mystic, Third), ElementalSummoner(LightElf, Mystic, Third), ElvenOracle(LightElf, Priest, Second), ElvenElder(LightElf, Priest, Third), DarkElvenFighter(DarkElf, Fighter, First), PalusKnight(DarkElf, Fighter, Second), ShillienKnight(DarkElf, Fighter, Third), Bladedancer(DarkElf, Fighter, Third), Assassin(DarkElf, Fighter, Second), AbyssWalker(DarkElf, Fighter, Third), PhantomRanger(DarkElf, Fighter, Third), DarkElvenMystic(DarkElf, Mystic, First), DarkElvenWizard(DarkElf, Mystic, Second), Spellhowler(DarkElf, Mystic, Third), PhantomSummoner(DarkElf, Mystic, Third), ShillienOracle(DarkElf, Priest, Second), ShillienElder(DarkElf, Priest, Third), OrcFighter(Orc, Fighter, First), OrcRaider(Orc, Fighter, Second), Destroyer(Orc, Fighter, Third), OrcMonk(Orc, Fighter, Second), Tyrant(Orc, Fighter, Third), OrcMystic(Orc, Mystic, First), OrcShaman(Orc, Mystic, Second), Overlord(Orc, Mystic, Third), Warcryer(Orc, Mystic, Third), DwarvenFighter(Dwarf, Fighter, First), DwarvenScavenger(Dwarf, Fighter, Second), BountyHunter(Dwarf, Fighter, Third), DwarvenArtisan(Dwarf, Fighter, Second), Warsmith(Dwarf, Fighter, Third), dummyEntry1(null, null, null), dummyEntry2(null, null, null), dummyEntry3(null, null, null), dummyEntry4(null, null, null), dummyEntry5(null, null, null), dummyEntry6(null, null, null), dummyEntry7(null, null, null), dummyEntry8(null, null, null), dummyEntry9(null, null, null), dummyEntry10(null, null, null), dummyEntry11(null, null, null), dummyEntry12(null, null, null), dummyEntry13(null, null, null), dummyEntry14(null, null, null), dummyEntry15(null, null, null), dummyEntry16(null, null, null), dummyEntry17(null, null, null), dummyEntry18(null, null, null), dummyEntry19(null, null, null), dummyEntry20(null, null, null), dummyEntry21(null, null, null), dummyEntry22(null, null, null), dummyEntry23(null, null, null), dummyEntry24(null, null, null), dummyEntry25(null, null, null), dummyEntry26(null, null, null), dummyEntry27(null, null, null), dummyEntry28(null, null, null), dummyEntry29(null, null, null), dummyEntry30(null, null, null), /* * (3rd classes) */ duelist(Human, Fighter, Fourth), dreadnought(Human, Fighter, Fourth), phoenixKnight(Human, Fighter, Fourth), hellKnight(Human, Fighter, Fourth), sagittarius(Human, Fighter, Fourth), adventurer(Human, Fighter, Fourth), archmage(Human, Mystic, Fourth), soultaker(Human, Mystic, Fourth), arcanaLord(Human, Mystic, Fourth), cardinal(Human, Mystic, Fourth), hierophant(Human, Mystic, Fourth), evaTemplar(LightElf, Fighter, Fourth), swordMuse(LightElf, Fighter, Fourth), windRider(LightElf, Fighter, Fourth), moonlightSentinel(LightElf, Fighter, Fourth), mysticMuse(LightElf, Mystic, Fourth), elementalMaster(LightElf, Mystic, Fourth), evaSaint(LightElf, Mystic, Fourth), shillienTemplar(DarkElf, Fighter, Fourth), spectralDancer(DarkElf, Fighter, Fourth), ghostHunter(DarkElf, Fighter, Fourth), ghostSentinel(DarkElf, Fighter, Fourth), stormScreamer(DarkElf, Mystic, Fourth), spectralMaster(DarkElf, Mystic, Fourth), shillienSaint(DarkElf, Mystic, Fourth), titan(Orc, Fighter, Fourth), grandKhauatari(Orc, Fighter, Fourth), dominator(Orc, Mystic, Fourth), doomcryer(Orc, Mystic, Fourth), fortuneSeeker(Dwarf, Fighter, Fourth), maestro(Dwarf, Fighter, Fourth); private PlayerRace _race; private ClassLevel _level; private ClassType _type; private static final Set<PlayerClass> mainSubclassSet; private static final Set<PlayerClass> subclasseSet1 = EnumSet.of(DarkAvenger, Paladin, TempleKnight, ShillienKnight); private static final Set<PlayerClass> subclasseSet2 = EnumSet.of(TreasureHunter, AbyssWalker, Plainswalker); private static final Set<PlayerClass> subclasseSet3 = EnumSet.of(Hawkeye, SilverRanger, PhantomRanger); private static final Set<PlayerClass> subclasseSet4 = EnumSet.of(Warlock, ElementalSummoner, PhantomSummoner); private static final Set<PlayerClass> subclasseSet5 = EnumSet.of(Sorceror, Spellsinger, Spellhowler); private static final EnumMap<PlayerClass, Set<PlayerClass>> subclassSetMap = new EnumMap<PlayerClass, Set<PlayerClass>>(PlayerClass.class); static { Set<PlayerClass> subclasses = getSet(null, Third); mainSubclassSet = subclasses; subclassSetMap.put(DarkAvenger, subclasseSet1); subclassSetMap.put(Paladin, subclasseSet1); subclassSetMap.put(TempleKnight, subclasseSet1); subclassSetMap.put(ShillienKnight, subclasseSet1); subclassSetMap.put(TreasureHunter, subclasseSet2); subclassSetMap.put(AbyssWalker, subclasseSet2); subclassSetMap.put(Plainswalker, subclasseSet2); subclassSetMap.put(Hawkeye, subclasseSet3); subclassSetMap.put(SilverRanger, subclasseSet3); subclassSetMap.put(PhantomRanger, subclasseSet3); subclassSetMap.put(Warlock, subclasseSet4); subclassSetMap.put(ElementalSummoner, subclasseSet4); subclassSetMap.put(PhantomSummoner, subclasseSet4); subclassSetMap.put(Sorceror, subclasseSet5); subclassSetMap.put(Spellsinger, subclasseSet5); subclassSetMap.put(Spellhowler, subclasseSet5); subclasses = null; } PlayerClass(PlayerRace pRace, ClassType pType, ClassLevel pLevel) { _race = pRace; _level = pLevel; _type = pType; } public final Set<PlayerClass> getAvailableSubclasses(L2PcInstance player) { Set<PlayerClass> subclasses = null; if(_level == Third) { subclasses = EnumSet.copyOf(mainSubclassSet); subclasses.remove(this); Set<PlayerClass> unavailableClasses = subclassSetMap.get(this); if(unavailableClasses != null) { subclasses.removeAll(unavailableClasses); } unavailableClasses = null; } return subclasses; } public static final EnumSet<PlayerClass> getSet(PlayerRace race, ClassLevel level) { EnumSet<PlayerClass> allOf = EnumSet.noneOf(PlayerClass.class); for(PlayerClass playerClass : EnumSet.allOf(PlayerClass.class)) { if(race == null || playerClass.isOfRace(race)) { if(level == null || playerClass.isOfLevel(level)) { allOf.add(playerClass); } } } return allOf; } public final boolean isOfRace(PlayerRace pRace) { return _race == pRace; } public final boolean isOfType(ClassType pType) { return _type == pType; } public final boolean isOfLevel(ClassLevel pLevel) { return _level == pLevel; } public final ClassLevel getLevel() { return _level; } }
  5. okay then added credits Edit: It would be better if you add with what scroll he did the enchant:P
  6. You can take them from here http://www.mediafire.com/download/7m2ga5u7eb6niu8/L2Finest+Package.rar
  7. Einai teleios axrista ayta ta files kalhtera pare kana custom apo ekei kai valta se alla files para na xrhshmopihsis ayta
  8. στειλε μου μηνυμα αμα θες να σε βοηθησω με TV
  9. Hello here is a code for olympiad with A grade Index: I:/workspace/L2_GameServer/java/com/l2jstep/gameserver/network/clientpackets/UseItem.java =================================================================== --- I:/workspace/L2_GameServer/java/com/l2jstep/gameserver/network/clientpackets/UseItem.java (revision 4167) +++ I:/workspace/L2_GameServer/java/com/l2jstep/gameserver/network/clientpackets/UseItem.java (working copy) @@ -97,6 +97,14 @@ if (activeChar.getActiveTradeList() != null) activeChar.cancelActiveTrade(); + + int weaponGrade = activeChar.getActiveWeaponItem().getCrystalType(); + int armorGrade = activeChar.getActiveChestArmorItem().getCrystalType(); + if (activeChar.isInOlympiadMode() && (weaponGrade == L2Item.CRYSTAL_S || armorGrade == L2Item.CRYSTAL_S)) + { + activeChar.sendMessage("You cannot use S grade equipment at the Grand Olympiad games."); + return; + } // NOTE: disabled due to deadlocks // synchronized (activeChar.getInventory()) Index: I:/workspace/L2_GameServer/java/com/l2jstep/gameserver/model/olympiad/Olympiad.java =================================================================== --- I:/workspace/L2_GameServer/java/com/l2jstep/gameserver/model/olympiad/Olympiad.java (revision 4167) +++ I:/workspace/L2_GameServer/java/com/l2jstep/gameserver/model/olympiad/Olympiad.java (working copy) @@ -50,6 +50,7 @@ import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; import com.l2jserver.gameserver.templates.StatsSet; +import com.l2jserver.gameserver.templates.L2Item; import com.l2jserver.util.L2FastList; import javolution.util.FastMap; @@ -482,6 +483,14 @@ * return false; } */ + int weaponGrade = noble.getActiveWeaponItem().getCrystalType(); + int armorGrade = noble.getActiveChestArmorItem().getCrystalType(); + if (weaponGrade == L2Item.CRYSTAL_S || armorGrade == L2Item.CRYSTAL_S) + { + noble.sendMessage("You cannot join the grand olympiad games using S grade equipment."); + return false; + } + if (!_inCompPeriod) { sm = new SystemMessage(SystemMessageId.THE_OLYMPIAD_GAME_IS_NOT_CURRENTLY_IN_PROGRESS); Code is not mine!
  10. Hello here is a gode for this http://postimg.org/image/gk2nw63l3/ #P L2jFrozen_GameServer Index: head-src/com/l2jfrozen/Config.java =================================================================== --- head-src/com/l2jfrozen/Config.java (revision 986) +++ head-src/com/l2jfrozen/Config.java (working copy) @@ -2891,6 +2891,8 @@ public static int GM_OVER_ENCHANT; public static int MAX_ITEM_ENCHANT_KICK; + public static boolean ENABLE_ENCHANT_ANNOUNCE; + public static int ENCHANT_ANNOUNCE_LEVEL; //============================================================ public static void loadEnchantConfig() @@ -3196,6 +3198,8 @@ MAX_ITEM_ENCHANT_KICK = Integer.parseInt(ENCHANTSetting.getProperty("EnchantKick", "0")); GM_OVER_ENCHANT = Integer.parseInt(ENCHANTSetting.getProperty("GMOverEnchant", "0")); + ENABLE_ENCHANT_ANNOUNCE = Boolean.parseBoolean(ENCHANTSetting.getProperty("EnableEnchantAnnounce", "False")); + ENCHANT_ANNOUNCE_LEVEL = Integer.parseInt(ENCHANTSetting.getProperty("EnchantAnnounceLevel", "16")); } catch(Exception e) { Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java (working copy) @@ -25,6 +25,7 @@ import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.base.Race; +import com.l2jfrozen.gameserver.model.entity.Announcements; import com.l2jfrozen.gameserver.network.SystemMessageId; import com.l2jfrozen.gameserver.network.serverpackets.EnchantResult; import com.l2jfrozen.gameserver.network.serverpackets.InventoryUpdate; @@ -301,6 +302,7 @@ int chance = 0; int maxEnchantLevel = 0; int minEnchantLevel = 0; + int nextEnchantLevel = item.getEnchantLevel() + 1; if(item.getItem().getType2() == L2Item.TYPE2_WEAPON) { @@ -565,6 +567,9 @@ sm = new SystemMessage(SystemMessageId.S1_SUCCESSFULLY_ENCHANTED); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); + + if(Config.ENABLE_ENCHANT_ANNOUNCE && Config.ENCHANT_ANNOUNCE_LEVEL == 0) + Announcements.getInstance().gameAnnounceToAll("Congratulations to " + activeChar.getName() + "! Your " + item.getItem() + " has been successfully enchanted to +" + nextEnchantLevel); } else { @@ -572,6 +577,9 @@ sm.addNumber(item.getEnchantLevel()); sm.addItemName(item.getItemId()); activeChar.sendPacket(sm); + + if(Config.ENABLE_ENCHANT_ANNOUNCE && Config.ENCHANT_ANNOUNCE_LEVEL <= item.getEnchantLevel()) + Announcements.getInstance().gameAnnounceToAll("Congratulations to " + activeChar.getName() + "! Your " + item.getItem() + " has been successfully enchanted to +" + nextEnchantLevel); } item.setEnchantLevel(item.getEnchantLevel() + Config.CUSTOM_ENCHANT_VALUE); Index: config/head/enchant.properties =================================================================== --- config/head/enchant.properties (revision 986) +++ config/head/enchant.properties (working copy) @@ -131,4 +131,14 @@ # HOW WORKS: if you set it to 20, and player have an item > 20 # he will be kicked and the item will disappear! # Enchant amount at which a player gets punished (0 disabled) -EnchantKick = 0 \ No newline at end of file +EnchantKick = 0 + +# ---------------------- +# Enchant Announce - +# ---------------------- +# Announce when a player successfully enchant an item to x +# Default: False +EnableEnchantAnnounce = False + +# The value of x is... set it here (No have default value) +EnchantAnnounceLevel = 16 credits: RedHot
  11. Δεν νομιζω να ειναι δυσκολο να φτιαξεις το sql και το xml απο την στιγμη που εχεις τα αλλα..
  12. αν δεν το βρεις μπορω να σε helparo :ρ
  13. like this? /* * 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.powerpak.Buffer; import java.util.ArrayList; import java.util.logging.Logger; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.model.L2Character; import com.l2jfrozen.gameserver.model.L2Object; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.powerpak.Buffer.BuffTable.Buff; public class L2BufferInstance { static L2PcInstance selfBuffer; static L2NpcInstance npcBuffer; /** * Apply Buffs onto a player. * @param player * @param _templateId * @param efector * @param paymentRequired */ public static void makeBuffs(L2PcInstance player, int _templateId, L2Object efector, boolean paymentRequired) { if (player == null) { return; } L2NpcInstance buffer = null; if (player.getTarget() != null) { if (player.getTarget() instanceof L2NpcInstance) { buffer = (L2NpcInstance) getbufferType(efector); } } if (buffer == null) { return; } buffer.setTarget(player); ArrayList<Buff> _templateBuffs = new ArrayList<Buff>(); _templateBuffs = BuffTable.getInstance().getBuffsForID(_templateId); if ((_templateBuffs == null) || (_templateBuffs.size() == 0)) { return; } int _priceTotal = 0; for (Buff _buff : _templateBuffs) { if (paymentRequired) { if (!_buff.checkPrice(player)) { player.sendMessage("Not enough Adena"); return; } _priceTotal += _buff._price; } if (_buff._force || (player.getFirstEffect(_buff._skill) == null)) { buffer.setBusy(true); buffer.setCurrentMp(buffer.getMaxMp()); buffer.setTarget(player); buffer.doCast(_buff._skill); buffer.setBusy(false); } else { _buff._skill.getEffects(player, player, false, false, false); } } if (paymentRequired && (_priceTotal > 0)) { player.reduceAdena("NpcBuffer", _priceTotal, player.getLastFolkNPC(), true); } } private static L2Character getbufferType(L2Object efector) { if (efector instanceof L2PcInstance) { selfBuffer = (L2PcInstance) efector; efector = selfBuffer; } if (efector instanceof L2NpcInstance) { npcBuffer = (L2NpcInstance) efector; efector = npcBuffer; } return (L2Character) efector; } static Logger _log = Logger.getLogger(Config.class.getName()); }
×
×
  • 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