hi how are things! I'm creating an npcclass I'm having an error calling the Hawkeye Action on my npc.
[npc_%objectId%_Hawkeye|Subclass Hawkeye]
If I do it with the administrator it does not generate errors and works fine.
When doing it with a normal character it generates this error, I think I must be missing some permission to use it.
Where do you think the error will be?

[npc_%objectId%_Hawkeye|Subclass Hawkeye]
If I do it with the administrator it does not generate errors and works fine.
When doing it with a normal character it generates this error, I think I must be missing some permission to use it.
Where do you think the error will be?

Code:
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package npc.model;
import l2.gameserver.Announcements;
import l2.gameserver.Config;
import l2.gameserver.model.Player;
import l2.gameserver.model.base.Race;
import l2.gameserver.model.instances.MerchantInstance;
import l2.gameserver.model.instances.WarehouseInstance;
import l2.gameserver.network.l2.components.SystemMsg;
import l2.gameserver.network.l2.s2c.Earthquake;
import l2.gameserver.network.l2.s2c.L2GameServerPacket;
import l2.gameserver.scripts.Functions;
import l2.gameserver.tables.SkillTable;
import l2.gameserver.templates.npc.NpcTemplate;
public class SubclassHelperInstance extends MerchantInstance {
private static final int xh = 4380;
public SubclassHelperInstance(int var1, NpcTemplate var2) {
super(var1, var2);
}
public void onBypassFeedback(Player var1, String var2) {
if (canBypassCheck(var1, this)) {
if (var1.isInPeaceZone() && !var1.isCursedWeaponEquipped() && !(var1.getLevel() < 75)) {
if (var2.startsWith("Hawkeye"))
{
if (Functions.getItemCount(var1, 6392) >= 3L){
var1.sendMessage("Ya sos fullsub");
return ;
}
if (Functions.getItemCount(var1, 6392) < 2L)
{
Functions.addItem(var1, 6392, 1);
var1.setTarget(var1);
this.doCast(SkillTable.getInstance().getInfo(4380, 1), var1, true);
var1.setLevel(40);
var1.setClassId(9, false, false);
var1.broadcastPacket(new L2GameServerPacket[]{new Earthquake(var1.getLoc(), 30, 12)});
Announcements.getInstance().announceToAll("Felicitaciones " + var1.getName() + " por hacer subclass!.");
var1.sendMessage("primera segunda sub");
this.showChatWindow(var1, "mods/pvp_event/subclass_completed.htm", new Object[0]);
return ;
}
if (Functions.getItemCount(var1, 6392) >= 2L) {
Functions.addItem(var1, 6392, 1);
this.doCast(SkillTable.getInstance().getInfo(4380, 1), var1, true);
var1.setLevel(40);
var1.setClassId(92, false, false);
var1.broadcastPacket(new L2GameServerPacket[]{new Earthquake(var1.getLoc(), 30, 12)});
Announcements.getInstance().announceToAll("Felicidades por completar tus subs");
var1.sendMessage("Your class has been changed by a GM");
this.showChatWindow(var1, "mods/pvp_event/allsubclass_completed.htm", new Object[0]);
return ;
}
} else {
super.onBypassFeedback(var1, var2);
}
}
}
}
}