Index:Config.java =================================================================== ---Config.java (revisão 1118) +++Config.java (cópia de trabalho) @@-2169,6+2201,10@@ publicstaticString PM_TEXT1; publicstaticString PM_TEXT2; publicstaticboolean NEW_PLAYER_EFFECT; +publicstaticboolean CUSTON_ONLINETIME; +publicstaticint ID_REWARD; +publicstaticint MIN_PVP; + // ============================================================ publicstaticvoid loadFrozenConfig() @@-2181,7+2217,10@@ finalInputStreamis=newFileInputStream(newFile(Frozen)); frozenSettings.load(is); is.close(); - + + CUSTON_ONLINETIME =Boolean.parseBoolean(frozenSettings.getProperty("OnlineReward","true")); + ID_REWARD =Integer.parseInt(frozenSettings.getProperty("IdReward","57")); + MIN_PVP =Integer.parseInt(frozenSettings.getProperty("MinPvp","200")); GM_TRADE_RESTRICTED_ITEMS =Boolean.parseBoolean(frozenSettings.getProperty("GMTradeRestrictedItems","False")); GM_RESTART_FIGHTING =Boolean.parseBoolean(frozenSettings.getProperty("GMRestartFighting","False")); PM_MESSAGE_ON_START =Boolean.parseBoolean(frozenSettings.getProperty("PMWelcomeShow","False")); Index: gameserver/handler/VoicedCommandHandler.java =================================================================== --- gameserver/handler/VoicedCommandHandler.java (revisão 1118) +++ gameserver/handler/VoicedCommandHandler.java (cópia de trabalho) @@-36,11+34,14@@ import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.OfflineShop; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Online; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.StatsCmd; +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.TimeCmd; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.TvTCmd; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.VersionCmd; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Voting; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Wedding; @@-68,6+69,7@@ _datatable =newFastMap<>(); registerVoicedCommandHandler(newVoting()); + registerVoicedCommandHandler(newTimeCmd()); if(Config.BANKING_SYSTEM_ENABLED) { Index: gameserver/handler/voicedcommandhandlers/TimeCmd.java =================================================================== --- gameserver/handler/voicedcommandhandlers/TimeCmd.java (revisão 0) +++ gameserver/handler/voicedcommandhandlers/TimeCmd.java (cópia de trabalho) @@-0,0+1,92@@ +/* + * 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 <
O conteúdo está oculto, favor efetuar login ou se cadastrar!
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
GOSTARIA DOS ICONES DAS TATTOS , TODOS ICONES , COM ESSE LV , ATÉ O LVL 6 POR FAVOR , PARA INTERLUDE , ESSES DO PRINT NAO SAO INTERLUDE E NAO TENHO ! OBRIGADO!
Olá, seu tópico se encontra com um ou mais links offline. Caso ainda possua o conteúdo, favor postar aqui mesmo no tópico ou mandar MP para algum staff que estaremos normalizando o tópico.
Grato pela atenção!
Voce usar a conta de admin q vc tem no server, vai em accounts e define o acess_level la. e vc entra auto.
Eu tenho uma versão desse votesystem q tentei atualizar e com tutorial so acessar o link na minha assinatura em baixo.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Pergunta
gleyce123
Alguem saberia por
quantidade de item nesse mod ?
Index: Config.java
O conteúdo está oculto, favor efetuar login ou se cadastrar!
-
Entre
- ou
-
Cadastre-se
===================================================================
--- Config.java (revisão 1118)
+++ Config.java (cópia de trabalho)
@@ -2169,6 +2201,10 @@
public static String PM_TEXT1;
public static String PM_TEXT2;
public static boolean NEW_PLAYER_EFFECT;
+ public static boolean CUSTON_ONLINETIME;
+ public static int ID_REWARD;
+ public static int MIN_PVP;
+
// ============================================================
public static void loadFrozenConfig()
@@ -2181,7 +2217,10 @@
final InputStream is = new FileInputStream(new File(Frozen));
frozenSettings.load(is);
is.close();
-
+
+ CUSTON_ONLINETIME = Boolean.parseBoolean(frozenSettings.getProperty("OnlineReward", "true"));
+ ID_REWARD = Integer.parseInt(frozenSettings.getProperty("IdReward", "57"));
+ MIN_PVP = Integer.parseInt(frozenSettings.getProperty("MinPvp", "200"));
GM_TRADE_RESTRICTED_ITEMS = Boolean.parseBoolean(frozenSettings.getProperty("GMTradeRestrictedItems", "False"));
GM_RESTART_FIGHTING = Boolean.parseBoolean(frozenSettings.getProperty("GMRestartFighting", "False"));
PM_MESSAGE_ON_START = Boolean.parseBoolean(frozenSettings.getProperty("PMWelcomeShow", "False"));
Index: gameserver/handler/VoicedCommandHandler.java
===================================================================
--- gameserver/handler/VoicedCommandHandler.java (revisão 1118)
+++ gameserver/handler/VoicedCommandHandler.java (cópia de trabalho)
@@ -36,11 +34,14 @@
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.OfflineShop;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Online;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.StatsCmd;
+import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.TimeCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.TvTCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.VersionCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Voting;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Wedding;
@@ -68,6 +69,7 @@
_datatable = new FastMap<>();
registerVoicedCommandHandler(new Voting());
+ registerVoicedCommandHandler(new TimeCmd());
if (Config.BANKING_SYSTEM_ENABLED)
{
Index: gameserver/handler/voicedcommandhandlers/TimeCmd.java
===================================================================
--- gameserver/handler/voicedcommandhandlers/TimeCmd.java (revisão 0)
+++ gameserver/handler/voicedcommandhandlers/TimeCmd.java (cópia de trabalho)
@@ -0,0 +1,92 @@
+/*
+ * 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 <
+ */
+package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
+
+import java.math.BigDecimal;
+
+import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.network.serverpackets.InventoryUpdate;
+
+/**
+ * @author Admin
+ */
+public class TimeCmd implements IVoicedCommandHandler
+{
+ private static String[] VOICED_COMMANDS =
+ {
+ "trocar_tempo",
+ "tempo_online"
+ };
+
+ @Override
+ public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+ {
+ int _calcule = (int) arredondaValor(1, activeChar.getOnlineTime() / 3600);
+
+ if (command.startsWith("trocar_tempo"))
+ {
+ if ((_calcule >= 1) && (activeChar.getPvpKills() >= Config.MIN_PVP))
+ {
+ InventoryUpdate iu = new InventoryUpdate();
+ activeChar.addItem("Squash Coins", Config.ID_REWARD, _calcule, activeChar, true);
+ activeChar.sendPacket(iu);
+ activeChar.setOnlineTime(0);
+ }
+ else
+ {
+ if (activeChar.getPvpKills() < Config.MIN_PVP)
+ {
+ activeChar.sendMessage("Sao necessarios " + Config.MIN_PVP + " pvp's para proceder a troca.Voce tem apenas" + activeChar.getPvpKills() + " PVP'S");
+ }
+ if (_calcule < 1)
+ {
+ activeChar.sendMessage("Voce nao tem 1 hora online atualmente.");
+ }
+ }
+ }
+ else if (command.startsWith("tempo_online"))
+ {
+ if (_calcule >= 1)
+ {
+ activeChar.sendMessage("Voce tem atualmente " + _calcule + " horas online.");
+ }
+ else if (_calcule < 1)
+ {
+ activeChar.sendMessage("Voce tem atualmente " + activeChar.getOnlineTime() / 60 + " minutos online.");
+
+ }
+ }
+ return false;
+ }
+
+ public static double arredondaValor(int casasDecimais, double valor)
+ {
+ BigDecimal decimal = new BigDecimal(valor);
+ return decimal.setScale(casasDecimais, 3).doubleValue();
+ }
+
+ public boolean useVoicedCommand(String command, String all, L2PcInstance activeChar, String text)
+ {
+ return false;
+ }
+
+ @Override
+ public String[] getVoicedCommandList()
+ {
+ return VOICED_COMMANDS;
+ }
+}
\ No newline at end of file
Link para o comentário
Compartilhar em outros sites
3 respostass a esta questão
Posts recomendados
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.