|
Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo. Caso seja registrado, efetue login. Esqueceu sua senha? Clique aqui Recomendamos o uso do Mozilla Firefox para uma melhor visualização. |
|
| Início | Postados Hoje | Marcar Fóruns Como Lidos | Álbums | Banidos | SE Team | Medalhas |
|
|||||||
| Registrar | Loteria VIP | Staff SE | Regras do fórum | Comunidade | Arcade | Postados Hoje | Pesquisar | Experience |
|
|
|
||||||||||||||||||||||||
|
|
|
|
Ferramentas do Tópico | Modos de Exibição |
|
|
#1 |
|
Amigo SE
![]() Registrado em: Feb 2010
Localização: Caxias do Sul - RS
Posts: 644
Agradeceu: 405
Agradecido 582 Vezes em 224 Posts
Nome Real: Henrique Galafassi Dalssaso
|
Bom galera outro mod ae pra voces...
Esse aqui faz com que quando o player digitar .hero ele virará hero... Você pode mudar o item que voce quer que o player "Pague" para se tornar hero... Segue abaixo a Diff em forma de Code e depois vai anexada =) Código:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
Index: Trunk/L2JStep_CORE/config/Custom/L2JMods.properties
===================================================================
--- Trunk/L2JStep_CORE/config/Custom/L2JMods.properties (revision 1)
+++ TTrunk/L2JStep_CORE/config/Custom/L2JMods.properties (working copy)
@@ -881,6 +881,18 @@
+#--------------------------------------------------
+# Set this to True to enable .hero voiced command #
+#--------------------------------------------------
+AllowHeroCommand = False
+# Item id that it will take and make you hero
+HeroItemId = 3481
+# How many of this item will it take?
+HeroItemCount = 1
Index: Trunk/java/com/l2jstep/Config.java
===================================================================
--- Trunk/java/com/l2jstep/Config.java (revision 1)
+++ Trunk/java/com/l2jstep/Config.java (working copy)
@@ -881,6 +881,18 @@
public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE;
+ public static boolean ALLOW_HERO_COMMAND;
+ public static int HERO_ITEM_ID;
+ public static int HERO_ITEM_COUNT;
public static boolean L2JMOD_CHAMPION_ENABLE;
@@ -881,6 +881,18 @@
+ ALLOW_HERO_COMMAND = Boolean.parseBoolean(L2JModSettings.getProperty("AllowHeroCommand", "false"));
+ HERO_ITEM_ID = Integer.parseInt(L2JModSettings.getProperty("HeroItemId", "3481"));
+ HERO_ITEM_COUNT = Integer.parseInt(L2JModSettings.getProperty("HeroItemCount", "1"));
L2JMOD_CHAMPION_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("ChampionEnable", "false"));
L2JMOD_CHAMPION_FREQUENCY = Integer.parseInt(L2JModSettings.getProperty("ChampionFrequency", "0"));
L2JMOD_CHAMP_MIN_LVL = Integer.parseInt(L2JModSettings.getProperty("ChampionMinLevel", "20"));
Index: Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/handler/voicedcommandhandlers/hero.java
===================================================================
--- Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/handler/voicedcommandhandlers/hero.java (revision 1)
+++ Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/handler/voicedcommandhandlers/hero.java (working copy)
+/*
+ * 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.it.br.gameserver.handler.voicedcommandhandlers;
+
+import com.l2jstep.Config;
+import com.l2jstep.gameserver.handler.IVoicedCommandHandler;
+import com.l2jstep.gameserver.model.actor.instance.L2PlayableInstance;
+import com.l2jstep.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jstep.gameserver.model.L2ItemInstance;
+import com.l2jstep.gameserver.serverpackets.ActionFailed;
+import com.l2jstep.gameserver.serverpackets.SocialAction;
+
+/**
+ * @author Kinho!
+ */
+public class hero implements IVoicedCommandHandler
+{
+ private static final String[] VOICED_COMMANDS = {"hero"};
+
+ public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+ {
+ if (command.equalsIgnoreCase("hero"))
+ {
+ if(activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID) != null && activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID).getCount() >= Config.HERO_ITEM_COUNT)
+ {
+ activeChar.getInventory().destroyItemByItemId("GoldDragon", Config.HERO_ITEM_ID, Config.HERO_ITEM_COUNT, activeChar, activeChar.getTarget());
+ activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16));
+ activeChar.setHero(true);
+ activeChar.sendMessage("You became hero untill restart and gave 1 gold dragon");
+ activeChar.broadcastUserInfo();
+ }
+ else
+ {
+ activeChar.sendMessage("You need 1 gold dragon to become hero.");
+ return true;
+ }
+ }
+ return false;
+ }
+ public String[] getVoicedCommandList()
+ {
+ return VOICED_COMMANDS;
+ }
+}
Index: Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/handler/voicedcommandhandlers.java
===================================================================
--- Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/handler/voicedcommandhandlers.java (revision 1)
+++ Trunk/L2JStep_CORE/java/com/l2jstep/gameserver/handler/voicedcommandhandlers.java (working copy)
@@ -881,6 +881,18 @@
import com.l2jstep.gameserver.handler.voicedcommandhandlers.BuyRec;
+import com.l2jstep.gameserver.handler.voicedcommandhandlers.hero;
import com.l2jstep.gameserver.handler.voicedcommandhandlers.OnlinePlayers;
@@ -881,6 +881,18 @@
+ if (Config.ALLOW_HERO_COMMAND)
+ registerVoicedCommandHandler(new hero());
registerVoicedCommandHandler(new stats());
Créditos pelo MOD: Kinho! e Mazokista Vlw's
__________________
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
|
|
|
| O seguinte membro ao lado disse Obrigado(a) a : C.Bartowski por gostar deste Post : |
FULL_LOL (08-07-2013)
|
| Links Patrocinados |