Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

[COMANDO] Clan Full

Iniciado por Swarlog, Ago 05, 2022, 01:25 AM

Tema anterior - Siguiente tema

Swarlog

Comando para hacer clan full skill lvl y ademas dar puntos de reputacion todo en un solo comando //clanfull

### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java (revision 1004)
+++ head-src/com/l2jfrozen/Config.java (working copy)
@@ -1140,6 +1140,11 @@
 
public static boolean ALT_MOBS_STATS_BONUS;
 public static boolean ALT_PETS_STATS_BONUS;
+ /** Clan Full **/
+ public static boolean ENABLE_CLAN_SYSTEM;
+ public static Map<Integer, Integer> CLAN_SKILLS;
+ public static byte CLAN_LEVEL;
+ public static int REPUTATION_QUANTITY;
 
//============================================================
 public static void loadAltConfig()
@@ -1304,8 +1309,41 @@
 MAX_SUBCLASS_LEVEL = Byte.parseByte(altSettings.getProperty("MaxSubclassLevel", "81"));
 
ALT_MOBS_STATS_BONUS = Boolean.parseBoolean(altSettings.getProperty("AltMobsStatsBonus", "True"));
- ALT_PETS_STATS_BONUS = Boolean.parseBoolean(altSettings.getProperty("AltPetsStatsBonus", "True"));
- }
+ ALT_PETS_STATS_BONUS = Boolean.parseBoolean(altSettings.getProperty("AltPetsStatsBonus", "True"));
+ /** Clan Full **/
+ ENABLE_CLAN_SYSTEM = Boolean.parseBoolean(altSettings.getProperty("EnableClanSystem", "True"));
+ if (ENABLE_CLAN_SYSTEM)
+ {
+ String AioSkillsSplit[] = altSettings.getProperty("ClanSkills", "").split(";");
+ CLAN_SKILLS = new FastMap<Integer, Integer>(AioSkillsSplit.length);
+ String arr[] = AioSkillsSplit;
+ int len = arr.length;
+ for (int i = 0; i < len; i++)
+ {
+ String skill = arr[i];
+ String skillSplit[] = skill.split(",");
+ if (skillSplit.length != 2)
+ {
+ System.out.println((new StringBuilder()).append("[Clan System]: invalid config property in Mods/L2JHellas.ini -> ClanSkills \"").append(skill).append("\"").toString());
+ continue;
+ }
+ try
+ {
+ CLAN_SKILLS.put(Integer.valueOf(Integer.parseInt(skillSplit[0])), Integer.valueOf(Integer.parseInt(skillSplit[1])));
+ continue;
+ }
+ catch (NumberFormatException nfe)
+ {
+ }
+ if (!skill.equals(""))
+ {
+ System.out.println((new StringBuilder()).append("[Clan System]: invalid config property in Mods/L2JHellas.ini -> ClanSkills \"").append(skillSplit[0]).append("\"").append(skillSplit[1]).toString());
+ }
+ }
+ }
+ CLAN_LEVEL = Byte.parseByte(altSettings.getProperty("ClanSetLevel", "8"));
+ REPUTATION_QUANTITY = Integer.parseInt(altSettings.getProperty("ReputationScore", "10000"));
+        }
 catch(Exception e)
 {
 e.printStackTrace();
Index: head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminClanFull.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminClanFull.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminClanFull.java (working copy)
@@ -0,0 +1,83 @@
+/*
+ * 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.handler.admincommandhandlers;
+
+import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
+import com.l2jfrozen.gameserver.model.L2Object;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.network.SystemMessageId;
+import com.l2jfrozen.gameserver.network.serverpackets.EtcStatusUpdate;
+import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
+
+public class AdminClanFull implements IAdminCommandHandler
+{
+ private static final String ADMIN_COMMANDS[] =
+ {
+ "admin_clanfull"
+ };
+
+ @Override
+ public boolean useAdminCommand(String command, L2PcInstance activeChar)
+ {
+ if (command.startsWith("admin_clanfull"))
+ {
+ try
+ {
+ adminAddClanSkill(activeChar);
+ activeChar.sendMessage("Sucessfull usage //clanfull !");
+ }
+ catch (Exception e)
+ {
+ activeChar.sendMessage("Usage: //clanfull");
+ }
+ }
+ return true;
+ }
+
+ private void adminAddClanSkill(L2PcInstance activeChar)
+ {
+ L2Object target = activeChar.getTarget();
+ L2PcInstance player = null;
+
+ if (target == null)
+ target = activeChar;
+
+ if (target instanceof L2PcInstance)
+ {
+ player = (L2PcInstance) target;
+ }
+ else
+ {
+ activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
+ return;
+ }
+
+ if (!player.isClanLeader())
+ {
+ player.sendPacket((new SystemMessage(SystemMessageId.S1_IS_NOT_A_CLAN_LEADER)).addString(player.getName()));
+ return;
+ }
+ player.getClan().changeLevel(Config.CLAN_LEVEL);
+ player.ClanSkills();
+ player.sendPacket(new EtcStatusUpdate(activeChar));
+ }
+
+ @Override
+ public String[] getAdminCommandList()
+ {
+ return ADMIN_COMMANDS;
+ }
+}
\ No newline at end of file
Index: config/head/altsettings.properties
===================================================================
--- config/head/altsettings.properties (revision 1004)
+++ config/head/altsettings.properties (working copy)
@@ -364,4 +364,21 @@
 # False: All Monster Instances have the Bonus of Stats. (Hard to kill)
 # We got the correct value on database, so disable it.
 # Default: True
-AltPetsStatsBonus = True
\ No newline at end of file
+AltPetsStatsBonus = True
+
+##############################################
+#                 Clan Full Comand           #
+##############################################
+
+# Enable and Disable Command //clanfull
+EnableClanSystem = True
+
+# List of Skills reward for clan usage //clanfull
+# Format : skillid,skilllvl;skillid2,skilllvl2;....skillidn,skilllvln
+ClanSkills = 370,3;371,3;372,3;373,3;374,3;375,3;376,3;377,3;378,3;379,3;380,3;381,3;382,3;383,3;384,3;385,3;386,3;387,3;388,3;389,3;390,3;391,3;
+
+# LvL Clan Reward Usage //clanfull
+ClanSetLevel = 8
+
+# Quantity Reputation Points Reward for usage //clanfull
+ReputationScore = 10000
\ No newline at end of file
Index: head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (working copy)
@@ -37,6 +37,7 @@
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminChangeAccessLevel;
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCharSupervision;
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminChristmas;
+import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminClanFull;
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCreateItem;
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCursedWeapons;
 import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminDMEngine;
@@ -120,6 +121,7 @@
 _datatable = new FastMap<String, IAdminCommandHandler>();
 registerAdminCommandHandler(new AdminAdmin());
 registerAdminCommandHandler(new AdminInvul());
+ registerAdminCommandHandler(new AdminClanFull());
 registerAdminCommandHandler(new AdminDelete());
 registerAdminCommandHandler(new AdminKill());
 registerAdminCommandHandler(new AdminTarget());
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 1004)
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -14815,6 +14815,27 @@
 {
 _fishing = fishing;
 }
+
+       public void ClanSkills()
+       {
+               for(Iterator i$ = Config.CLAN_SKILLS.keySet().iterator(); i$.hasNext(); broadcastUserInfo())
+               {
+                       Integer skillid = (Integer)i$.next();
+                       int skilllvl = ((Integer)Config.CLAN_SKILLS.get(skillid)).intValue();
+                       L2Skill skill = SkillTable.getInstance().getInfo(skillid.intValue(), skilllvl);
+                       if(skill != null)
+                               addSkill(skill, true);
+                       getClan().addNewSkill(skill);
+                       sendSkillList();
+               }
+
+               L2Clan clan = getClan();
+               clan.setReputationScore(clan.getReputationScore() + Config.REPUTATION_QUANTITY, true);
+               sendMessage((new StringBuilder()).append("Admin give to you ").append(Config.REPUTATION_QUANTITY).append(" Reputation Points.").toString());
+               sendMessage("GM give to you all Clan Skills");
+       }
 
/**
 * Sets the alliance with varka ketra.

By Cafi