Your words are fantastic; I've never seen so much crap come out of just one mouth.
Every time you try to explain yourself, you show even more that you're nothing but a natural-born scammer, a deceiver of innocent people.
The worst part isn’t even that...
You go and buy a project that’s supposedly sold as 'premium,' paying several dollars or euros for crappy code made by his friends. Then, after 2 or 3 days, the fixes are leaked by those same friends.
There’s a rumor that this is done on purpose so that newcomers keep buying and continue being scammed.
That might be a lie, but it could also be true.
I prefer to believe it because there’s plenty of evidence against this lousy scammer.
If you pay attention to only one decompiler-compiler AiNasc, which was shared by Emca Eressea. A compiler that other developers want thousands of dollars for. This can already be fully considered a huge contribution to the development of the development community of our beloved great game Lineage 2.
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
Question
l2jkain
Hello I created this system to drop enchanted items but it drops 2 item even putting the amount 1. What can I do to improve the code ?
Index: java/net/sf/l2j/gameserver/model/actor/Attackable.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/Attackable.java (revision 3)
+++ java/net/sf/l2j/gameserver/model/actor/Attackable.java (working copy)
@@ -1184,6 +1184,28 @@
}
}
+ // Drop All Monsters Itens enchantados By Dev Williams
+ if ((Config.ENABLE_DROP_ITEM_ENCHANT) && ((this instanceof Monster)))
+ {
+ for (int i = 1; i < 81; i++)
+ {
+ if (i > 10)
+ {
+ if (player.getLevel() == i && getLevel() < player.getLevel() - 8)
+ return;
+ }
+ }
+ if (Rnd.get(100) < Config.DROP_ITEM_ENCHANT[3])
+ {
+ IntIntHolder item = new IntIntHolder(Config.DROP_ITEM_ENCHANT[0], Config.DROP_ITEM_ENCHANT[1]);
+ if (Config.AUTO_LOOT)
+ player.doAutoLoot(this, item);
+ else
+ dropItem(player, item);
+ player.getInventory().addEnchantedItem("Reward Enchant: ", Config.DROP_ITEM_ENCHANT[0], Config.DROP_ITEM_ENCHANT[1], Config.DROP_ITEM_ENCHANT[2], player, null);
+ }
+ }
+
Index: java/net/sf/l2j/gameserver/model/itemcontainer/PcInventory.java
===================================================================
--- java/net/sf/l2j/gameserver/model/itemcontainer/PcInventory.java (revision 2)
+++ java/net/sf/l2j/gameserver/model/itemcontainer/PcInventory.java (working copy)
@@ -17,9 +17,11 @@
import net.sf.l2j.gameserver.model.itemcontainer.listeners.ItemPassiveSkillsListener;
import net.sf.l2j.gameserver.model.tradelist.TradeItem;
import net.sf.l2j.gameserver.model.tradelist.TradeList;
+import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;
import net.sf.l2j.gameserver.network.serverpackets.ItemList;
import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate;
+import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.taskmanager.ShadowItemTaskManager;
public class PcInventory extends Inventory
@@ -439,6 +441,43 @@
return item;
}
+
+ public ItemInstance addEnchantedItem(String process, int itemId, int itemCount, int enchantLevel, Player actor, WorldObject reference)
+ {
+ ItemInstance item = super.addItem(process, itemId, itemCount, actor, reference);
+
+ if (item == null)
+ return null;
+
+ if (enchantLevel > 0)
+ item.setEnchantLevel(enchantLevel);
+
+ if (itemId == 57)
+ {
+ SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.EARNED_S1_ADENA);
+ smsg.addItemNumber(itemCount);
+ actor.sendPacket(smsg);
+ }
+ else if (itemCount > 1)
+ {
+ SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S);
+ smsg.addItemName(itemId);
+ smsg.addItemNumber(itemCount);
+ actor.sendPacket(smsg);
+ }
+ else
+ {
+ SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.ACQUIRED_S1_S2);
+ smsg.addNumber(enchantLevel);
+ smsg.addItemName(itemId);
+ actor.sendPacket(smsg);
+ }
+ StatusUpdate su = new StatusUpdate(actor);
+ su.addAttribute(14, actor.getCurrentLoad());
+ actor.sendPacket(su);
+
+ return item;
+ }
11 answers to this question
Recommended Posts