Dulens. Posted August 3, 2012 Posted August 3, 2012 Hello, here is a simple code. When the blessed scroll failed to enchant your item then goes to safe enchant. - L2jFrozen_GameServer / head-src / com / l2jfrozen / gameserver / network / clientpackets / RequestEnchantItem.java if(blessedScroll) { - item.setEnchantLevel(Config.BREAK_ENCHANT); + item.setEnchantLevel(Config.ENCHANT_SAFE_MAX); item.updateDatabase(); } else if(crystalScroll) { item.setEnchantLevel(Config.CRYSTAL_ENCHANT_MIN); Coded on l2jfrozen. Best Regards. PS; Sorry for this way of code, but I wasn't home to make it by eclipse. Quote
Dulens. Posted August 3, 2012 Author Posted August 3, 2012 I don't know if already exist on l2jfrozen, it's for every project you want. Quote
Lucky Dice Posted August 3, 2012 Posted August 3, 2012 I don't know if already exist on l2jfrozen, it's for every project you want. ok , thanks for share. Quote
SkySkase Posted August 3, 2012 Posted August 3, 2012 When you will start making Something yours or alone? There is no point to Share Code from othere people .... Quote
Joκκєrino Posted August 3, 2012 Posted August 3, 2012 Config.ENCHANT_SAFE_MAX That code it's incomplete . You have to add something in configs . Personally , i can add it (i don't need it) , but if you post a share , post it all . Quote
Dulens. Posted August 3, 2012 Author Posted August 3, 2012 When you will start making Something yours or alone? There is no point to Share Code from othere people .... For 1 line, you believe this code is from another guy? Jez.. As I said, it's simple code. Please, cool. Quote
Dulens. Posted August 3, 2012 Author Posted August 3, 2012 Config.ENCHANT_SAFE_MAX That code it's incomplete . You have to add something in configs . Personally , i can add it (i don't need it) , but if you post a share , post it all . Most used projects, already have this config. But, I'm gonna add the option. Thanks. Quote
Trance Posted August 3, 2012 Posted August 3, 2012 Try something more, like: if (scrollTemplate.isBlessed()) { if (item.getEnchantLevel() >= 10) { activeChar.sendMessage("Failed in Blessed Enchant. The enchant value of the item became decreased by 1."); item.setEnchantLevel(item.getEnchantLevel() - 1); item.updateDatabase(); activeChar.sendPacket(new EnchantResult(3, 0, 0)); } else if (item.getEnchantLevel() < 10) { activeChar.sendMessage("Failed in Blessed Enchant. The enchant value of the item became " + Config.ENCHANT_SAFE_MAX + "."); item.setEnchantLevel(Config.ENCHANT_SAFE_MAX); item.updateDatabase(); activeChar.sendPacket(new EnchantResult(3, 0, 0)); } } Quote
Joκκєrino Posted August 3, 2012 Posted August 3, 2012 Try something more, like: if (scrollTemplate.isBlessed()) { if (item.getEnchantLevel() >= 10) { activeChar.sendMessage("Failed in Blessed Enchant. The enchant value of the item became decreased by 1."); item.setEnchantLevel(item.getEnchantLevel() - 1); item.updateDatabase(); activeChar.sendPacket(new EnchantResult(3, 0, 0)); } else if (item.getEnchantLevel() < 10) { activeChar.sendMessage("Failed in Blessed Enchant. The enchant value of the item became " + Config.ENCHANT_SAFE_MAX + "."); item.setEnchantLevel(Config.ENCHANT_SAFE_MAX); item.updateDatabase(); activeChar.sendPacket(new EnchantResult(3, 0, 0)); } } That's used on L2jFrozen , so already shared . Quote
Trance Posted August 3, 2012 Posted August 3, 2012 That's used on L2jFrozen , so already shared . I don't know, maybe, I use only L2JServer, but however show me. Quote
Trance Posted August 3, 2012 Posted August 3, 2012 Check L2jFrozen's SVN . Why don't you show me O.o? Quote
Recommended Posts
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.