l2jkain Posted January 30, 2018 Posted January 30, 2018 (edited) Hello, I'm creating a code to not enchant next to some npcs. But I have this error and I do not see any error in my code. is giving this on gameserver List<Creature> knowns = activeChar.getKnownTypeInRadius(Creature.class, 400); for (WorldObject wh1 : knowns) { String mobtype = ((Npc) knowns).getTemplate().getType(); <!--line 57 is--> if (wh1 instanceof Npc && Config.ENCHANT_PROTECTOR) { if (!Config.LIST_ALLOWED_NPC_TYPES_NOT_ENCHANT.contains(mobtype)) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_S2); sm.addString("Npc Type " + mobtype + " has Protection - Can not You can enchant!"); activeChar.sendPacket(sm); activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } } } sorry for the topic, I'm a customer of acis but do not help about custom mods Edited January 30, 2018 by l2jkain
0 SweeTs Posted January 30, 2018 Posted January 30, 2018 We are not in 2010 anymore, you don't need that code. Yeah, we do.
0 l2jkain Posted January 30, 2018 Author Posted January 30, 2018 7 minutes ago, SweeTs said: Já não estamos em 2010, você não precisa desse código. Sim, nós fazemos. and I saw this on WareHouse if (player.getActiveEnchantItem() != null) { player.setActiveEnchantItem(null); player.sendPacket(EnchantResult.CANCELLED); player.sendPacket(SystemMessageId.ENCHANT_SCROLL_CANCELLED); }
Question
l2jkain
Hello, I'm creating a code to not enchant next to some npcs. But I have this error and I do not see any error in my code.
is giving this on gameserver
List<Creature> knowns = activeChar.getKnownTypeInRadius(Creature.class, 400); for (WorldObject wh1 : knowns) { String mobtype = ((Npc) knowns).getTemplate().getType(); <!--line 57 is--> if (wh1 instanceof Npc && Config.ENCHANT_PROTECTOR) { if (!Config.LIST_ALLOWED_NPC_TYPES_NOT_ENCHANT.contains(mobtype)) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_S2); sm.addString("Npc Type " + mobtype + " has Protection - Can not You can enchant!"); activeChar.sendPacket(sm); activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } } }sorry for the topic, I'm a customer of acis but do not help about custom mods
Edited by l2jkain2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now