ariane
Membro-
Total de itens
8 -
Registro em
-
Última visita
Sobre ariane
Últimos Visitantes
786 visualizações
ariane's Achievements
Aprendiz de Novato (1/14)
1
Reputação
-
onde encontro java mods pra revizao frozen alem daqui do foron
-
e quem tem o no ip mais tem um dominio .com como faz pra ligar em casa ?
-
[Hidden Content] essa soucer eu nao consigo enviar a foto do erro mais estou usando o eclipise e com outras soucer esta normal consigo compilar
-
SOURCE com interrogação azul e X vermelho não consigo compilar como resolver esse problema alguém pode me ajudar ?
-
[Hidden Content] eu upei ela ela da um erro e nao da pra compilar Um amigo testou aqui do foron ( e está dando erro mesmo, ta faltando uma parte do código do admingeodata, eu acho que ele removeu de proposito tem que procurar falar com ele pra saber o que está acontecendo isso que ele falou sera que tem alguem aqui que consegue da jeito ?
-
Index: config/functions/l2jfrozen.properties =================================================================== --- config/functions/l2jfrozen.properties (revision 1132) +++ config/functions/l2jfrozen.properties (working copy) @@ -69,6 +69,18 @@ # Hero for X days, 0 forever. HeroCustomDay = 0 +#-------------------------------------------------- +# Hero Command Configuration .hero | .renovar +#-------------------------------------------------- +# Enable / Disable Hero Command +AllowHeroCommand = False +# Item ID to make Hero +HeroItemId = 57 +# How many of this item will it take? +HeroItemCount = 1 +# Number of times you can become Hero +HeroMaxQuantityBuy = 2 + # -------------------------------------------- # Custom hero subclass skill - # -------------------------------------------- Index: head-src/com/l2jfrozen/Config.java =================================================================== --- head-src/com/l2jfrozen/Config.java (revision 1132) +++ head-src/com/l2jfrozen/Config.java (working copy) @@ -56,6 +56,10 @@ private static final Logger LOGGER = Logger.getLogger(Config.class); // ============================================================ + public static boolean ALLOW_HERO_COMMAND; + public static int HERO_ITEM_ID_NEED; + public static int HERO_ITEM_COUNT; + public static int HERO_QUANTITY; public static boolean EVERYBODY_HAS_ADMIN_RIGHTS; public static boolean SHOW_GM_LOGIN; public static boolean GM_STARTUP_INVISIBLE; @@ -2504,6 +2508,12 @@ HERO_CUSTOM_ITEM_ID = Integer.parseInt(L2JFrozenSettings.getProperty("HeroCustomItemId", "3481")); HERO_CUSTOM_DAY = Integer.parseInt(L2JFrozenSettings.getProperty("HeroCustomDay", "0")); + /** Hero Command */ + ALLOW_HERO_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowHeroCommand", "true")); + HERO_ITEM_ID_NEED = Integer.parseInt(L2JFrozenSettings.getProperty("HeroItemId", "57")); + HERO_ITEM_COUNT = Integer.parseInt(L2JFrozenSettings.getProperty("HeroItemCount", "100000")); + HERO_QUANTITY = Integer.parseInt(L2JFrozenSettings.getProperty("HeroMaxQuantityBuy", "2")); + ALLOW_CREATE_LVL = Boolean.parseBoolean(L2JFrozenSettings.getProperty("CustomStartingLvl", "False")); CHAR_CREATE_LVL = Integer.parseInt(L2JFrozenSettings.getProperty("CharLvl", "80")); SPAWN_CHAR = Boolean.parseBoolean(L2JFrozenSettings.getProperty("CustomSpawn", "false")); Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 1132) +++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy) @@ -33,6 +31,7 @@ import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.CTFCmd; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.DMCmd; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.FarmPvpCmd; +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Heroes; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.OfflineShop; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Online; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.StatsCmd; @@ -121,6 +122,11 @@ registerVoicedCommandHandler(new OfflineShop()); } + if (Config.ALLOW_HERO_COMMAND) + { + registerVoicedCommandHandler(new Heroes()); + } + LOGGER.info("VoicedCommandHandler: Loaded " + _datatable.size() + " handlers."); } Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Heroes.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Heroes.java (nonexistent) +++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Heroes.java (working copy) @@ -0,0 +1,287 @@ +package com.l2jfrozen.gameserver.handler.voicedcommandhandlers; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.HashMap; +import java.util.Map; + +import org.apache.log4j.Logger; + +import com.l2jfrozen.Config; +import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler; +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfrozen.gameserver.network.serverpackets.SocialAction; +import com.l2jfrozen.util.CloseUtil; +import com.l2jfrozen.util.database.DatabaseUtils; +import com.l2jfrozen.util.database.L2DatabaseFactory; + +/** + * @author Tayran.JavaDev + * @version 1 + */ +public class Heroes implements IVoicedCommandHandler +{ + protected static final Logger LOGGER = Logger.getLogger(Heroes.class); + private static final String INSERT_HEROES = "INSERT INTO character_heroes_custom (char_name,Obj_Id,quantity) VALUES (?,?,?)"; + private static final String SELECT_HEROE = "SELECT * FROM character_heroes_custom WHERE Obj_Id=?"; + private static final String SELECT_ALL_HEROES = "SELECT * FROM character_heroes_custom"; + private static final String UPDATE_HEROES = "UPDATE character_heroes_custom SET quantity=?"; + private Map<String, String> heroes; + private final int quantidadeVezesHero = Config.HERO_QUANTITY; + + public Heroes() + { + heroes = new HashMap<>(); + selectAllHeroes(); + } + + private void selectAllHeroes() + { + Connection con = null; + + try + { + con = L2DatabaseFactory.getInstance().getConnection(false); + PreparedStatement statement = null; + + statement = con.prepareStatement(SELECT_ALL_HEROES); + ResultSet rset = statement.executeQuery(); + while (rset.next()) + { + final String nome = rset.getString("char_name"); + final int objId = rset.getInt("Obj_Id"); + + heroes.put(nome, String.valueOf(objId)); + + } + DatabaseUtils.close(rset); + DatabaseUtils.close(statement); + } + catch (final Exception e) + { + if (Config.ENABLE_ALL_EXCEPTIONS) + e.printStackTrace(); + + LOGGER.warn("Error could not restore Heroes DB : " + e); + } + finally + { + CloseUtil.close(con); + } + } + + public boolean hasHeroes() + { + return heroes.size() > 0; + } + + public Map<String, String> getHeroes() + { + return heroes; + } + + private static final String[] VOICED_COMMANDS = + { + "hero", + "renovar" + }; + + @Override + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + if (command.equalsIgnoreCase("hero")) + { + if (activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID_NEED) != null && activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID_NEED).getCount() >= Config.HERO_ITEM_COUNT) + { + adicionaHero(activeChar); + } + else + { + activeChar.sendMessage("Desculpe, voce nao tem a quantia de itens para se tornar Hero."); + return true; + } + } + else if (command.equalsIgnoreCase("renovar")) + { + if (activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID_NEED) != null && activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID_NEED).getCount() >= Config.HERO_ITEM_COUNT) + { + renovaHero(activeChar); + } + else + { + activeChar.sendMessage("Desculpe, voce nao tem a quantia de itens para se tornar Hero."); + return true; + } + } + + return false; + } + + /** + * @author Tayran.JavaDev + * @param activeChar - Player requesting the Hero + * @return + */ + private boolean adicionaHero(L2PcInstance activeChar) + { + if (activeChar.isHero()) + { + activeChar.sendMessage("Voce ja e um Hero."); + return false; + } + else if (heroes.containsKey(activeChar.getName())) + { + activeChar.sendMessage("Voce ja se tornou Hero uma vez , use o comando .renovar para voltar a ser Hero."); + return false; + } + activeChar.getInventory().destroyItemByItemId("Hero Item ID", Config.HERO_ITEM_ID_NEED, Config.HERO_ITEM_COUNT, activeChar, activeChar.getTarget()); + activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16)); + activeChar.setHero(true); + activeChar.sendMessage("Parabens, Voce acabou de se tornar Hero ate seu proximo restart."); + activeChar.broadcastUserInfo(); + heroes.put(activeChar.getName(), String.valueOf(activeChar.getObjectId())); + + Connection con = null; + + try + { + con = L2DatabaseFactory.getInstance().getConnection(false); + PreparedStatement statement = null; + + statement = con.prepareStatement(INSERT_HEROES); + statement.setString(1, activeChar.getName()); + statement.setInt(2, activeChar.getObjectId()); + statement.setInt(3, quantidadeVezesHero); + statement.execute(); + DatabaseUtils.close(statement); + } + catch (final Exception e) + { + if (Config.ENABLE_ALL_EXCEPTIONS) + e.printStackTrace(); + + LOGGER.warn("Error could not store Hero : " + e); + return false; + } + finally + { + CloseUtil.close(con); + } + + return true; + } + + /** + * @author Tayran.JavaDev + * @param activeChar - Player requesting renewal hero + * @return + */ + private boolean renovaHero(L2PcInstance activeChar) + { + if (activeChar.isHero()) + { + activeChar.sendMessage("Voce ja e um Hero."); + return false; + } + else if (!heroes.containsKey(activeChar.getName())) + { + activeChar.sendMessage("Para renovar o Hero voce precisa usar o comando .hero primeiro."); + return false; + } + Connection con = null; + + try + { + con = L2DatabaseFactory.getInstance().getConnection(false); + PreparedStatement statement = null; + + statement = con.prepareStatement(SELECT_HEROE); + statement.setInt(1, activeChar.getObjectId()); + ResultSet rset = statement.executeQuery(); + while (rset.next()) + { + // final String nome = rset.getString("char_name"); + // final int objId = rset.getInt("Obj_Id"); + int quantidadesRestantes = rset.getInt("quantity"); + + if (quantidadesRestantes > 0) + { + quantidadesRestantes--; + renovaUpdateDB(activeChar, quantidadesRestantes); + activeChar.getInventory().destroyItemByItemId("Hero Item ID", Config.HERO_ITEM_ID_NEED, Config.HERO_ITEM_COUNT, activeChar, activeChar.getTarget()); + activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16)); + activeChar.setHero(true); + if (quantidadesRestantes > 0) + { + activeChar.sendMessage("Parabens, Voce acabou de renovar seu Hero ate seu proximo restart, voce ainda pode renovar por mais " + quantidadesRestantes + " vez."); + } + else + { + activeChar.sendMessage("Parabens, Voce acabou de renovar seu Hero ate seu proximo restart, aproveite essa sera a ultima vez."); + } + activeChar.broadcastUserInfo(); + } + else + { + activeChar.sendMessage("Voce ja atingiu o limite de vezes que pode se tornar Hero."); + } + } + DatabaseUtils.close(rset); + DatabaseUtils.close(statement); + } + catch (final Exception e) + { + if (Config.ENABLE_ALL_EXCEPTIONS) + e.printStackTrace(); + + LOGGER.warn("Error could not store Hero : " + e); + return false; + } + finally + { + CloseUtil.close(con); + } + + return true; + } + + /** + * @author Tayran.JavaDev + * @param activeChar - Player for update in DB + * @param quantidadesRestantes - Remaining quantities requests Hero + */ + private void renovaUpdateDB(L2PcInstance activeChar, int quantidadesRestantes) + { + Connection con = null; + + try + { + con = L2DatabaseFactory.getInstance().getConnection(false); + PreparedStatement statement = null; + + statement = con.prepareStatement(UPDATE_HEROES); + statement.setInt(1, quantidadesRestantes); + statement.execute(); + DatabaseUtils.close(statement); + } + catch (final Exception e) + { + if (Config.ENABLE_ALL_EXCEPTIONS) + e.printStackTrace(); + + LOGGER.warn("Error could not store Hero : " + e); + } + finally + { + CloseUtil.close(con); + } + + } + + @Override + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +}
-
Index: config/functions/l2jfrozen.properties =================================================================== --- config/functions/l2jfrozen.properties (revision 1132) +++ config/functions/l2jfrozen.properties (working copy) @@ -69,6 +69,18 @@ # Hero for X days, 0 forever. HeroCustomDay = 0 +#-------------------------------------------------- +# Hero Command Configuration .hero | .renovar +#-------------------------------------------------- +# Enable / Disable Hero Command +AllowHeroCommand = False +# Item ID to make Hero +HeroItemId = 57 +# How many of this item will it take? +HeroItemCount = 1 +# Number of times you can become Hero +HeroMaxQuantityBuy = 2 + # -------------------------------------------- # Custom hero subclass skill - # -------------------------------------------- Index: head-src/com/l2jfrozen/Config.java =================================================================== --- head-src/com/l2jfrozen/Config.java (revision 1132) +++ head-src/com/l2jfrozen/Config.java (working copy) @@ -56,6 +56,10 @@ private static final Logger LOGGER = Logger.getLogger(Config.class); // ============================================================ + public static boolean ALLOW_HERO_COMMAND; + public static int HERO_ITEM_ID_NEED; + public static int HERO_ITEM_COUNT; + public static int HERO_QUANTITY; public static boolean EVERYBODY_HAS_ADMIN_RIGHTS; public static boolean SHOW_GM_LOGIN; public static boolean GM_STARTUP_INVISIBLE; @@ -2504,6 +2508,12 @@ HERO_CUSTOM_ITEM_ID = Integer.parseInt(L2JFrozenSettings.getProperty("HeroCustomItemId", "3481")); HERO_CUSTOM_DAY = Integer.parseInt(L2JFrozenSettings.getProperty("HeroCustomDay", "0")); + /** Hero Command */ + ALLOW_HERO_COMMAND = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowHeroCommand", "true")); + HERO_ITEM_ID_NEED = Integer.parseInt(L2JFrozenSettings.getProperty("HeroItemId", "57")); + HERO_ITEM_COUNT = Integer.parseInt(L2JFrozenSettings.getProperty("HeroItemCount", "100000")); + HERO_QUANTITY = Integer.parseInt(L2JFrozenSettings.getProperty("HeroMaxQuantityBuy", "2")); + ALLOW_CREATE_LVL = Boolean.parseBoolean(L2JFrozenSettings.getProperty("CustomStartingLvl", "False")); CHAR_CREATE_LVL = Integer.parseInt(L2JFrozenSettings.getProperty("CharLvl", "80")); SPAWN_CHAR = Boolean.parseBoolean(L2JFrozenSettings.getProperty("CustomSpawn", "false")); Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 1132) +++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy) @@ -33,6 +31,7 @@ import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.CTFCmd; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.DMCmd; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.FarmPvpCmd; +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Heroes; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.OfflineShop; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Online; import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.StatsCmd; @@ -121,6 +122,11 @@ registerVoicedCommandHandler(new OfflineShop()); } + if (Config.ALLOW_HERO_COMMAND) + { + registerVoicedCommandHandler(new Heroes()); + } + LOGGER.info("VoicedCommandHandler: Loaded " + _datatable.size() + " handlers."); } Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Heroes.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Heroes.java (nonexistent) +++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Heroes.java (working copy) @@ -0,0 +1,287 @@ +package com.l2jfrozen.gameserver.handler.voicedcommandhandlers; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.HashMap; +import java.util.Map; + +import org.apache.log4j.Logger; + +import com.l2jfrozen.Config; +import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler; +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfrozen.gameserver.network.serverpackets.SocialAction; +import com.l2jfrozen.util.CloseUtil; +import com.l2jfrozen.util.database.DatabaseUtils; +import com.l2jfrozen.util.database.L2DatabaseFactory; + +/** + * @author Tayran.JavaDev + * @version 1 + */ +public class Heroes implements IVoicedCommandHandler +{ + protected static final Logger LOGGER = Logger.getLogger(Heroes.class); + private static final String INSERT_HEROES = "INSERT INTO character_heroes_custom (char_name,Obj_Id,quantity) VALUES (?,?,?)"; + private static final String SELECT_HEROE = "SELECT * FROM character_heroes_custom WHERE Obj_Id=?"; + private static final String SELECT_ALL_HEROES = "SELECT * FROM character_heroes_custom"; + private static final String UPDATE_HEROES = "UPDATE character_heroes_custom SET quantity=?"; + private Map<String, String> heroes; + private final int quantidadeVezesHero = Config.HERO_QUANTITY; + + public Heroes() + { + heroes = new HashMap<>(); + selectAllHeroes(); + } + + private void selectAllHeroes() + { + Connection con = null; + + try + { + con = L2DatabaseFactory.getInstance().getConnection(false); + PreparedStatement statement = null; + + statement = con.prepareStatement(SELECT_ALL_HEROES); + ResultSet rset = statement.executeQuery(); + while (rset.next()) + { + final String nome = rset.getString("char_name"); + final int objId = rset.getInt("Obj_Id"); + + heroes.put(nome, String.valueOf(objId)); + + } + DatabaseUtils.close(rset); + DatabaseUtils.close(statement); + } + catch (final Exception e) + { + if (Config.ENABLE_ALL_EXCEPTIONS) + e.printStackTrace(); + + LOGGER.warn("Error could not restore Heroes DB : " + e); + } + finally + { + CloseUtil.close(con); + } + } + + public boolean hasHeroes() + { + return heroes.size() > 0; + } + + public Map<String, String> getHeroes() + { + return heroes; + } + + private static final String[] VOICED_COMMANDS = + { + "hero", + "renovar" + }; + + @Override + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + if (command.equalsIgnoreCase("hero")) + { + if (activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID_NEED) != null && activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID_NEED).getCount() >= Config.HERO_ITEM_COUNT) + { + adicionaHero(activeChar); + } + else + { + activeChar.sendMessage("Desculpe, voce nao tem a quantia de itens para se tornar Hero."); + return true; + } + } + else if (command.equalsIgnoreCase("renovar")) + { + if (activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID_NEED) != null && activeChar.getInventory().getItemByItemId(Config.HERO_ITEM_ID_NEED).getCount() >= Config.HERO_ITEM_COUNT) + { + renovaHero(activeChar); + } + else + { + activeChar.sendMessage("Desculpe, voce nao tem a quantia de itens para se tornar Hero."); + return true; + } + } + + return false; + } + + /** + * @author Tayran.JavaDev + * @param activeChar - Player requesting the Hero + * @return + */ + private boolean adicionaHero(L2PcInstance activeChar) + { + if (activeChar.isHero()) + { + activeChar.sendMessage("Voce ja e um Hero."); + return false; + } + else if (heroes.containsKey(activeChar.getName())) + { + activeChar.sendMessage("Voce ja se tornou Hero uma vez , use o comando .renovar para voltar a ser Hero."); + return false; + } + activeChar.getInventory().destroyItemByItemId("Hero Item ID", Config.HERO_ITEM_ID_NEED, Config.HERO_ITEM_COUNT, activeChar, activeChar.getTarget()); + activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16)); + activeChar.setHero(true); + activeChar.sendMessage("Parabens, Voce acabou de se tornar Hero ate seu proximo restart."); + activeChar.broadcastUserInfo(); + heroes.put(activeChar.getName(), String.valueOf(activeChar.getObjectId())); + + Connection con = null; + + try + { + con = L2DatabaseFactory.getInstance().getConnection(false); + PreparedStatement statement = null; + + statement = con.prepareStatement(INSERT_HEROES); + statement.setString(1, activeChar.getName()); + statement.setInt(2, activeChar.getObjectId()); + statement.setInt(3, quantidadeVezesHero); + statement.execute(); + DatabaseUtils.close(statement); + } + catch (final Exception e) + { + if (Config.ENABLE_ALL_EXCEPTIONS) + e.printStackTrace(); + + LOGGER.warn("Error could not store Hero : " + e); + return false; + } + finally + { + CloseUtil.close(con); + } + + return true; + } + + /** + * @author Tayran.JavaDev + * @param activeChar - Player requesting renewal hero + * @return + */ + private boolean renovaHero(L2PcInstance activeChar) + { + if (activeChar.isHero()) + { + activeChar.sendMessage("Voce ja e um Hero."); + return false; + } + else if (!heroes.containsKey(activeChar.getName())) + { + activeChar.sendMessage("Para renovar o Hero voce precisa usar o comando .hero primeiro."); + return false; + } + Connection con = null; + + try + { + con = L2DatabaseFactory.getInstance().getConnection(false); + PreparedStatement statement = null; + + statement = con.prepareStatement(SELECT_HEROE); + statement.setInt(1, activeChar.getObjectId()); + ResultSet rset = statement.executeQuery(); + while (rset.next()) + { + // final String nome = rset.getString("char_name"); + // final int objId = rset.getInt("Obj_Id"); + int quantidadesRestantes = rset.getInt("quantity"); + + if (quantidadesRestantes > 0) + { + quantidadesRestantes--; + renovaUpdateDB(activeChar, quantidadesRestantes); + activeChar.getInventory().destroyItemByItemId("Hero Item ID", Config.HERO_ITEM_ID_NEED, Config.HERO_ITEM_COUNT, activeChar, activeChar.getTarget()); + activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16)); + activeChar.setHero(true); + if (quantidadesRestantes > 0) + { + activeChar.sendMessage("Parabens, Voce acabou de renovar seu Hero ate seu proximo restart, voce ainda pode renovar por mais " + quantidadesRestantes + " vez."); + } + else + { + activeChar.sendMessage("Parabens, Voce acabou de renovar seu Hero ate seu proximo restart, aproveite essa sera a ultima vez."); + } + activeChar.broadcastUserInfo(); + } + else + { + activeChar.sendMessage("Voce ja atingiu o limite de vezes que pode se tornar Hero."); + } + } + DatabaseUtils.close(rset); + DatabaseUtils.close(statement); + } + catch (final Exception e) + { + if (Config.ENABLE_ALL_EXCEPTIONS) + e.printStackTrace(); + + LOGGER.warn("Error could not store Hero : " + e); + return false; + } + finally + { + CloseUtil.close(con); + } + + return true; + } + + /** + * @author Tayran.JavaDev + * @param activeChar - Player for update in DB + * @param quantidadesRestantes - Remaining quantities requests Hero + */ + private void renovaUpdateDB(L2PcInstance activeChar, int quantidadesRestantes) + { + Connection con = null; + + try + { + con = L2DatabaseFactory.getInstance().getConnection(false); + PreparedStatement statement = null; + + statement = con.prepareStatement(UPDATE_HEROES); + statement.setInt(1, quantidadesRestantes); + statement.execute(); + DatabaseUtils.close(statement); + } + catch (final Exception e) + { + if (Config.ENABLE_ALL_EXCEPTIONS) + e.printStackTrace(); + + LOGGER.warn("Error could not store Hero : " + e); + } + finally + { + CloseUtil.close(con); + } + + } + + @Override + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +}
-
Atualizações Recentes de Status
-
Por favor, compartilhe a fonte da versão revisada do Orion. Obrigado.· 0 respostas
please...
-
The Event - Team vs Team· 0 respostas
The Event - Team vs Team
The event cannot be terminated when participating in the event.
The event does not end.
The event starts and does not end after teleporting.
Please tell me how. Please.
Even if the event is held for 2 minutes, it will not end.
I don't know how to proceed...
-