Ir para conteúdo
  • Cadastre-se
  • 0

alguem poderia me ajuda a termina esse mod? ANTI_OVER_ENCHANT


cesinha

Pergunta

queria a ajuda da galera aqui do forum pra termina esse java mod que nao estou conseguindo se alguem conseguir ficarei muito grato pelo que sei muitos administradores estao atras dele tbm obrigado desde ja obs: esse trabalho esta sendo feito para um L2Jserver high five

 

 

==================================================================

AntiOverEnchant.properties

==================================================================

+#Enable Anti Over Enchant on Login
+EnableAntiOverEnchant = True

+MaxWeapon = 18
+MaxArmor = 18
+MaxJewel = 18

==================================================================

confing.java

==================================================================
+ public static final String ANTI_OVER_ENCHANT = "./config/InGame/AntiOverEnchant.properties";


+ public static boolean ENABLE_ANTI_OVER_ENCHANT;
+ public static int ENCHANT_MAX_WEAPON;
+ public static int ENCHANT_MAX_ARMOR;
+ public static int ENCHANT_MAX_JEWELRY;



+ }

+ overnechant = new File("./config/InGame/AntiOverEnchant.properties");
+ try { Object is = new FileInputStream(overnechant); localThrowable10 = null;
+ try {
+ L2Properties overnechant_mods = new L2Properties();
+ overnechant_mods.load((InputStream)is);
+ ENABLE_ANTI_OVER_ENCHANT = Boolean.parseBoolean(overnechant_mods.getProperty("EnableAntiOverEnchant", "False"));
+ ENCHANT_MAX_WEAPON = Integer.parseInt(overnechant_mods.getProperty("MaxWeapon", "25"));
+ ENCHANT_MAX_ARMOR = Integer.parseInt(overnechant_mods.getProperty("MaxArmor", "25"));
+ ENCHANT_MAX_JEWELRY = Integer.parseInt(overnechant_mods.getProperty("MaxJewel", "25"));
+ if (is != null) if (localThrowable10 != null) try { ((InputStream)is).close(); } catch (Throwable localThrowable201) { localThrowable10.addSuppressed(localThrowable201); } else ((InputStream)is).close();
+ }
+ catch (Throwable localThrowable202)
+ {
+ localThrowable10 = localThrowable202; throw localThrowable202;
+ }
+ finally
+ {
+ if (is != null) if (localThrowable10 != null) try { ((InputStream)is).close(); } catch (Throwable localThrowable14) { localThrowable10.addSuppressed(localThrowable14); } else ((InputStream)is).close();
+ }
+ }
+ catch (Exception e)
+ {
+ _log.warning("Config: " + e.getMessage());
+ throw new Error("Failed to Load ./config/InGame/AntiOverEnchant.properties File.");
+ }


=========================================================================================================
useItem.java
=========================================================================================================
+ if (item.isEquipable())
+ {
+ if ((activeChar.isCursedWeaponEquipped()) && (this._itemId == 6408))
+ {
+ return;
+ }
+ if (Config.ENABLE_ANTI_OVER_ENCHANT)
+ {
+ if (((!activeChar.isGM()) && (item.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON)) || (item.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR) || (item.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY))
+ {
+ activeChar.sendMessage("You have been kicked for using an item overenchanted!");
+ activeChar.logout();
+
+ return;
+ }
+
+ }



=================================================================================================================
enterworld.java

=================================================================================================================
+ if (Config.ENABLE_ANTI_OVER_ENCHANT)
+ {
+ msg3 = activeChar.getInventory().getItems(); id = msg3.length; for (obj = 0; obj < id; obj++) { L2ItemInstance i = msg3[obj];
+
+ if (!activeChar.isGM())
+ {
+ if (i.isEquipable())
+ {
+ if ((i.getEnchantLevel() > Config.ENCHANT_MAX_WEAPON) || (i.getEnchantLevel() > Config.ENCHANT_MAX_ARMOR) || (i.getEnchantLevel() > Config.ENCHANT_MAX_JEWELRY))
+ {
+ activeChar.getInventory().destroyItem(null, i, activeChar, null);
+
+ activeChar.sendMessage("[server]:You have Items over enchanted you will be kikked!");
+
+ activeChar.setPunishLevel(L2PcInstance.PunishLevel.JAIL, 1200);
+
+ Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " have item Overenchanted ", Config.DEFAULT_PUNISH);
+
+ _log.info("#### WARNING ####");
+ _log.info(i + " item has been removed from player.");
+ }
+ }
+ }
+ }
+ }
+

Editado por cesinha
Link para o comentário
Compartilhar em outros sites

Posts recomendados

Amigo o erro continua por causa do Java , faz igual te falei desinstala os recentes. estou por fora de revisões Interlude não sei te dizer por que não testo nenhuma...

"Tente ser uma pessoa de valor , não de sucesso" - Albert Einstein

 

 

Link para o comentário
Compartilhar em outros sites


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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...




×
×
  • Criar Novo...

Important Information

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.