Jump to content

Mazoul

Members
  • Posts

    16
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

About Mazoul

Profile Information

  • Gender
    Male

Mazoul's Achievements

Newbie

Newbie (1/16)

0

Reputation

  1. If you want go to L2J_DataPack/data/scripts/handlers/admincommandhandlers Search AdminGmChat.java and follow the code for Freya - for remove + for add /* * 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 handlers.admincommandhandlers; + +import java.util.Collection; -import com.l2jserver.gameserver.GmListTable; import com.l2jserver.gameserver.handler.IAdminCommandHandler; import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.Say2; import com.l2jserver.gameserver.network.serverpackets.CreatureSay; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; /** * This class handles following admin commands: * - gmchat text = sends text to all online GM's * - gmchat_menu text = same as gmchat, displays the admin panel after chat * * @version $Revision: 1.2.4.3 $ $Date: 2005/04/11 10:06:06 $ */ public class AdminGmChat implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "admin_gmchat", "admin_snoop", "admin_gmchat_menu" }; public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (command.startsWith("admin_gmchat")) handleGmChat(command, activeChar); else if (command.startsWith("admin_snoop")) snoop(command, activeChar); if (command.startsWith("admin_gmchat_menu")) AdminHelpPage.showHelpPage(activeChar, "gm_menu.htm"); return true; } /** * @param command * @param activeChar */ private void snoop(String command, L2PcInstance activeChar) { L2Object target = null; if (command.length() > 12) { target = L2World.getInstance().getPlayer(command.substring(12)); } if (target == null) target = activeChar.getTarget(); if (target == null) { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.SELECT_TARGET)); return; } if (!(target instanceof L2PcInstance)) { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.INCORRECT_TARGET)); return; } L2PcInstance player = (L2PcInstance) target; player.addSnooper(activeChar); activeChar.addSnooped(player); } public String[] getAdminCommandList() { return ADMIN_COMMANDS; } /** * @param command * @param activeChar */ private void handleGmChat(String command, L2PcInstance activeChar) { try { int offset = 0; String text; if (command.startsWith("admin_gmchat_menu")) offset = 18; else offset = 13; text = command.substring(offset); - CreatureSay cs = new CreatureSay(0, Say2.ALLIANCE, activeChar.getName(), text); - GmListTable.broadcastToGMs(cs); + CreatureSay cs = new CreatureSay(0, Say2.PARTYROOM_COMMANDER, "[staff]"+activeChar.getName(), text); + Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values(); + for (L2PcInstance player : pls) + { + player.sendPacket(cs); + } } catch (StringIndexOutOfBoundsException e) { // empty message.. ignore } } } For High Five Unstable /* * 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 handlers.admincommandhandlers; -import com.l2jserver.gameserver.GmListTable; import com.l2jserver.gameserver.handler.IAdminCommandHandler; import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.Say2; import com.l2jserver.gameserver.network.serverpackets.CreatureSay; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; /** * This class handles following admin commands: * - gmchat text = sends text to all online GM's * - gmchat_menu text = same as gmchat, displays the admin panel after chat * * @version $Revision: 1.2.4.3 $ $Date: 2005/04/11 10:06:06 $ */ public class AdminGmChat implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "admin_gmchat", "admin_snoop", "admin_gmchat_menu" }; public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (command.startsWith("admin_gmchat")) handleGmChat(command, activeChar); else if (command.startsWith("admin_snoop")) snoop(command, activeChar); if (command.startsWith("admin_gmchat_menu")) AdminHelpPage.showHelpPage(activeChar, "gm_menu.htm"); return true; } /** * @param command * @param activeChar */ private void snoop(String command, L2PcInstance activeChar) { L2Object target = null; if (command.length() > 12) { target = L2World.getInstance().getPlayer(command.substring(12)); } if (target == null) target = activeChar.getTarget(); if (target == null) { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.SELECT_TARGET)); return; } if (!(target instanceof L2PcInstance)) { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.INCORRECT_TARGET)); return; } L2PcInstance player = (L2PcInstance) target; player.addSnooper(activeChar); activeChar.addSnooped(player); } public String[] getAdminCommandList() { return ADMIN_COMMANDS; } /** * @param command * @param activeChar */ private void handleGmChat(String command, L2PcInstance activeChar) { try { int offset = 0; String text; if (command.startsWith("admin_gmchat_menu")) offset = 18; else offset = 13; text = command.substring(offset); - CreatureSay cs = new CreatureSay(0, Say2.ALLIANCE, activeChar.getName(), text); - GmListTable.broadcastToGMs(cs); + CreatureSay cs = new CreatureSay(0, Say2.PARTYROOM_COMMANDER, "[staff]"+activeChar.getName(), text); + for (L2PcInstance player : L2World.getInstance().getAllPlayersArray()) + { + player.sendPacket(cs); + } } catch (StringIndexOutOfBoundsException e) { // empty message.. ignore } } } For L2brick follow the code of Freya L2J Use command //gmchat_menu and have fun
  2. change ((L2PcInstance) character).startPvPFlag(); To ((L2PcInstance) character).updatePvPFlag(1); and ((L2PcInstance) character).stopPvPFlag(); to ((L2PcInstance) character).updatePvPFlag(0);
  3. Sql Mode: easy and fast Exemple: all new character spawn Einhasad Temple of Giran UPDATE char_templates SET x=84079; UPDATE char_templates SET y=148618; UPDATE char_templates SET z=-3401;
  4. Blue: back="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Water" fore="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Water_bg" Green: back="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Windr" fore="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Wind_bg" Red: back="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Fire" fore="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Fire_bg" Brown: back="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Earth" fore="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Earth_bg" White: back="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Divine" fore="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Divine_bg" Purple: back="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Dark" fore="L2UI_CT1.Button_DF.Gauge_DF_Attribute_Dark_bg"
  5. Really oO Why working for me ? http://img708.imageshack.us/img708/2013/shot00007u.jpg Credit L2J http://www.l2jserver.com/forum/viewtopic.php?f=73&t=19526
  6. # Created by Zoey76 # Version 0.2 # Added check to avoid skill overenchanting. # Based on Starter's idea/work to cutoff skill enchanting. # Based on Lineage's Work to avoid skill overenchanting. # Thanks SolidSnake for time and tips. #P L2_GameServer Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 4422) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -14970,6 +14970,65 @@ for (int id : _skills.keySet()) { int level = getSkillLevel(id); + + if (Config.ENABLE_SKILL_MAX_ENCHANT_LIMIT) + { + L2Skill fixedSkill = null; + int oldLevel = level; + if (Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL > 0) + { + if ((level > (100 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)) && (level < 131)) + { + level = (100 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL); + fixedSkill = SkillTable.getInstance().getInfo(id, level); + } + else if ((level > (200 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)) && (level < 231)) + { + level = (200 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL); + fixedSkill = SkillTable.getInstance().getInfo(id, level); + } + else if ((level > (300 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)) && (level < 331)) + { + level = (300 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL); + fixedSkill = SkillTable.getInstance().getInfo(id, level); + } + else if ((level > (400 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)) && (level < 431)) + { + level = (400 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL); + fixedSkill = SkillTable.getInstance().getInfo(id, level); + } + else if ((level > (500 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)) && (level < 531)) + { + level = (500 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL); + fixedSkill = SkillTable.getInstance().getInfo(id, level); + } + else if ((level > (600 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)) && (level < 631)) + { + level = (600 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL); + fixedSkill = SkillTable.getInstance().getInfo(id, level); + } + else if ((level > (700 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)) && (level < 731)) + { + level = (700 + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL); + fixedSkill = SkillTable.getInstance().getInfo(id, level); + } + } + else if (Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL == 0) + { + level = SkillTable.getInstance().getMaxLevel(id); + fixedSkill = SkillTable.getInstance().getInfo(id, level); + } + //Setting the new level enchat for the skill. + if (fixedSkill != null) + { + oldLevel = oldLevel % 100; + level = level % 100; + _log.info("Decreasing skill enchantment from " + oldLevel + " to " + level + " on skill " + id + " from Player: " + getName() + "!"); + addSkill(fixedSkill, true); + level = getSkillLevel(id);//updating skill level for next checks + } + } + if (level >= 100) // enchanted skill level = SkillTable.getInstance().getMaxLevel(id); L2SkillLearn learn = SkillTreeTable.getInstance().getSkillLearnBySkillIdLevel(getClassId(), id, level); Index: java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkill.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkill.java (revision 4420) +++ java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkill.java (working copy) @@ -73,6 +73,20 @@ if (player == null) return; + if (Config.ENABLE_SKILL_ENCHANT) + { + if ((_skillLvl % 100) >= Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL) + { + player.sendMessage("You have reached max skill enchant level. Allowed on this server up to " + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL + "."); + return; + } + } + else + { + player.sendMessage("You cannot use the skill enchanting function, it's currently turned off."); + return; + } + if (player.getClassId().level() < 3) // requires to have 3rd class quest completed { player.sendPacket(SystemMessageId.YOU_CANNOT_USE_SKILL_ENCHANT_IN_THIS_CLASS); Index: java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkillSafe.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkillSafe.java (revision 4420) +++ java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkillSafe.java (working copy) @@ -71,6 +71,23 @@ if (player == null) return; + if (Config.ENABLE_SKILL_ENCHANT) + { + if (Config.ENABLE_SKILL_MAX_ENCHANT_LIMIT) + { + if ((_skillLvl % 100) >= Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL) + { + player.sendMessage("You have reached max skill enchant level. Allowed on this server up to " + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL + "."); + return; + } + } + } + else + { + player.sendMessage("You cannot use the skill enchanting function, it's currently turned off."); + return; + } + if (player.getClassId().level() < 3) // requires to have 3rd class quest completed { player.sendPacket(SystemMessageId.YOU_CANNOT_USE_SKILL_ENCHANT_IN_THIS_CLASS); Index: java/com/l2jserver/Config.java =================================================================== --- java/com/l2jserver/Config.java (revision 4422) +++ java/com/l2jserver/Config.java (working copy) @@ -216,6 +216,9 @@ public static boolean STORE_RECIPE_SHOPLIST; public static boolean STORE_UI_SETTINGS; public static String[] FORBIDDEN_NAMES; + public static boolean ENABLE_SKILL_ENCHANT; + public static boolean ENABLE_SKILL_MAX_ENCHANT_LIMIT; + public static int SKILL_MAX_ENCHANT_LIMIT_LEVEL; //-------------------------------------------------- // ClanHall Settings @@ -1645,6 +1648,9 @@ STORE_RECIPE_SHOPLIST = Boolean.parseBoolean(Character.getProperty("StoreRecipeShopList", "False")); STORE_UI_SETTINGS = Boolean.parseBoolean(Character.getProperty("StoreCharUiSettings", "False")); FORBIDDEN_NAMES = Character.getProperty("ForbiddenNames", "").split(","); + ENABLE_SKILL_ENCHANT = Boolean.parseBoolean(Character.getProperty("EnableSkillEnchant", "True")); + ENABLE_SKILL_MAX_ENCHANT_LIMIT = Boolean.parseBoolean(Character.getProperty("EnableSkillMaxEnchantLimit", "False")); + SKILL_MAX_ENCHANT_LIMIT_LEVEL = Integer.parseInt(Character.getProperty("SkillMaxEnchantLimitLevel", "30")); } catch (Exception e) { Index: java/config/Character.properties =================================================================== --- java/config/Character.properties (revision 4422) +++ java/config/Character.properties (working copy) @@ -88,7 +88,18 @@ # Default: False AutoLearnSkills = False +# Turn this off to avoid skill enchanting. +# Default: True +EnableSkillEnchant = True +# When this is enabled it will read the "SkillMaxEnchantLimitLevel" option. # Default: False +EnableSkillMaxEnchantLimit = False +# When this is over 0, it will cutoff the skill enchant level to it's value. +# When it's 0 it will removed the current skill enchant. +# Default: 30 +SkillMaxEnchantLimitLevel = 30 + +# Default: False AutoLootHerbs = False # Maximum number of buffs and songs/dances.
  7. test him <set name="equip_condition" val="{{ec_race;{0;1;2;3;4}};{ec_social_class;1}}" /> <cond msgId="1518"> <player pledgeClass="1" /> </cond>
  8. CriticalError, Problem solved ? Is not, check your database the Gameserver.sql and verify your hexid and Id is correct with the hexid if you put in gameserver/config PS: Sorry for my English
  9. for only the clan leader check in exemple The Lord's Crown condition <set name="equip_condition" val="{{ec_castle;1};{ec_clan_leader;1}}" /> <cond msgId="1518"> <and> <player castle="-1" /> <player pledgeClass="-1" /> <!-- Clan Leader --> </and> </cond> and for other member just a circlet, exemple. <set name="equip_condition" val="{{ec_castle;1};{ec_castle_num;{5}}}" /> <cond msgId="1518"> <and> <player castle="5" /> <player pledgeClass="2" /> <!-- Heir --> </and> </cond> </item>
  10. Update Classmaster htm Added. Have Fun ;)
  11. Lucky ;) http://www.megaupload.com/?d=CLMQZ4WQ
  12. Npc Info for Freya (L2J) Screenshot Dowload link 4Shared Megaupload Ps: Rules in French Language. ----------------------------------------------------------------- ClassMaster for Freya (L2J) Screenshot Dowload link 4Shared Multiupload Credits: Me = VashTheStampede
  13. Gatekeeper for Freya (L2J) Screenshot Dowload link 4Shared Megaupload Credits: Me
×
×
  • Create New...