LoveYougurt 155 Опубликовано 26 июля, 2017 (изменено) Привет ребят проблема в гейм сервере данные ошибки ---------- 1. ERROR in \SagasSuperClass.java (at line 141)AutoChat(Archon,Text[13].replace("PLAYERNAME",st2.getPlayer().getName()));^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files----------2. ERROR in \SagasSuperClass.java (at line 141)AutoChat(Archon,Text[13].replace("PLAYERNAME",st2.getPlayer().getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------3. ERROR in \SagasSuperClass.java (at line 305)AutoChat(npc,Text[13].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------4. ERROR in \SagasSuperClass.java (at line 405)AutoChat(npc,Text[0].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------5. ERROR in \SagasSuperClass.java (at line 410)AutoChat(npc,Text[1].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------6. ERROR in \SagasSuperClass.java (at line 417)AutoChat(npc,Text[6].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------7. ERROR in \SagasSuperClass.java (at line 430)AutoChat(npc,Text[14].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------8. ERROR in \SagasSuperClass.java (at line 437)AutoChat(npc,Text[15].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------9. ERROR in \SagasSuperClass.java (at line 444)AutoChat(npc,Text[7].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------10. ERROR in \SagasSuperClass.java (at line 452)AutoChat(npc,Text[8].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------11. ERROR in \SagasSuperClass.java (at line 462)AutoChat(npc,Text[9].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------12. ERROR in \SagasSuperClass.java (at line 464)AutoChat(npc,Text[10].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------13. ERROR in \SagasSuperClass.java (at line 475)AutoChat(npc,Text[11].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------14. ERROR in \SagasSuperClass.java (at line 477)AutoChat(npc,Text[12].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------15. ERROR in \SagasSuperClass.java (at line 732)AutoChat(npc,Text[16].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------16. ERROR in \SagasSuperClass.java (at line 736)AutoChat(npc,Text[17].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------17. ERROR in \SagasSuperClass.java (at line 746)AutoChat(npc,Text[5].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------18. ERROR in \SagasSuperClass.java (at line 770)AutoChat(npc,Text[5].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------19. ERROR in \SagasSuperClass.java (at line 832)AutoChat(npc,Text[4].replace("PLAYERNAME",st1.getPlayer().getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------20. ERROR in \SagasSuperClass.java (at line 878)AutoChat(npc,Text[12].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------21. ERROR in \SagasSuperClass.java (at line 894)AutoChat(npc,Text[4].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------22. ERROR in \SagasSuperClass.java (at line 901)AutoChat(npc,Text[5].replace("PLAYERNAME",player.getName()));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------22 problems (22 errors)The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class filesThe method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)The method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)Failed executing script: C:\server\gameserver\data\scripts\quests\SagasScripts\SagasSuperClass.java. See SagasSuperClass.java.error.log for details.Annotation processing got disabled, since it requires a 1.6 compliant JVM----------1. ERROR in \Q620_FourGoblets.java (at line 3)import java.util.Arrays;^^^^^^^^^^^^^^^^The import java.util.Arrays cannot be resolved----------2. ERROR in \Q620_FourGoblets.java (at line 223)Arrays.sort(RCP_REWARDS);^^^^^^Arrays cannot be resolved----------3. ERROR in \Q620_FourGoblets.java (at line 225)if (Arrays.binarySearch(RCP_REWARDS, id) > 0)^^^^^^Arrays cannot be resolved----------3 problems (3 errors)The import java.util.Arrays cannot be resolvedArrays cannot be resolvedArrays cannot be resolvedFailed executing script: C:\server\gameserver\data\scripts\quests\Q620_FourGoblets\Q620_FourGoblets.java. See Q620_FourGoblets.java.error.log for details.Event IIeklo:................................Initialized3AXBAT 6A3bI:................................InitializedAnnotation processing got disabled, since it requires a 1.6 compliant JVMAnnotation processing got disabled, since it requires a 1.6 compliant JVMAnnotation processing got disabled, since it requires a 1.6 compliant JVMAnnotation processing got disabled, since it requires a 1.6 compliant JVMAnnotation processing got disabled, since it requires a 1.6 compliant JVM----------1. ERROR in \ShadowWeapons.java (at line 50)htmltext = st.showHtmlFile("exchange.htm").replace("%msid%", String.valueOf(multisellId));^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files----------2. ERROR in \ShadowWeapons.java (at line 50)htmltext = st.showHtmlFile("exchange.htm").replace("%msid%", String.valueOf(multisellId));^^^^^^^The method replace(char, char) in the type String is not applicable for the arguments (String, String)----------2 problems (2 errors)The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class filesThe method replace(char, char) in the type java.lang.String is not applicable for the arguments (java.lang.String, java.lang.String)Failed executing script: C:\server\gameserver\data\scripts\custom\ShadowWeapons\ShadowWeapons.java. See ShadowWeapons.java.error.log for details. как исправить данную ошибку сборка L2jx Изменено 26 июля, 2017 пользователем LoveYogurt Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Руслан_Миндубаев 4 Опубликовано 26 июля, 2017 Возможно, не подходит версия Явы. Посмотри и проверь какую надо и смотри какая стоит. Но это не точно) 1 Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
LoveYougurt 155 Опубликовано 26 июля, 2017 (изменено) Возможно, не подходит версия Явы. Посмотри и проверь какую надо и смотри какая стоит. Но это не точно) ява последняя стоит а вот сам файл где ошибка package ai.individual; import java.util.List; import javolution.util.FastList; import net.sf.l2j.Config; import net.sf.l2j.gameserver.ai.CtrlIntention; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.instancemanager.GrandBossManager; import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.L2Spawn; import net.sf.l2j.gameserver.model.L2Attackable; import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.zone.type.L2BossZone; import net.sf.l2j.gameserver.network.serverpackets.NpcSay; import net.sf.l2j.gameserver.network.serverpackets.PlaySound; import net.sf.l2j.gameserver.templates.StatsSet; import net.sf.l2j.util.Rnd; import ai.group_template.L2AttackableAIScript; public class Orfen extends L2AttackableAIScript { private static final int[][] Pos = {{43728,17220,-4342}, {55024,17368,-5412},{53504,21248,-5486},{53248,24576,-5262}}; private static final String[] Text = {"PLAYERNAME, stop kidding yourthis about your own powerlessness!", "PLAYERNAME, I’ll make you feel what true fear is!", "You’re really stupid to have challenged me. PLAYERNAME! Get ready!", "PLAYERNAME, do you think that’s going to work?!"}; private static final int ORFEN = 29014; //private static final int RAIKEL = 29015; private static final int RAIKEL_LEOS = 29016; //private static final int RIBA = 29017; private static final int RIBA_IREN = 29018; private static boolean _IsTeleported; private static List _Minions = new FastList(); private static L2BossZone _Zone; private static final byte ALIVE = 0; private static final byte DEAD = 1; public Orfen(int id, String name, String descr) { super(id,name,descr); int[] mobs = {ORFEN, RAIKEL_LEOS, RIBA_IREN}; this.registerMobs(mobs); _IsTeleported = false; _Zone = GrandBossManager.getInstance().getZone(Pos[0][0],Pos[0][1],Pos[0][2]); StatsSet info = GrandBossManager.getInstance().getStatsSet(ORFEN); int status = GrandBossManager.getInstance().getBossStatus(ORFEN); if (status == DEAD) { // load the unlock date and time for Orfen from DB long temp = info.getLong("respawn_time") - System.currentTimeMillis(); // if Orfen is locked until a certain time, mark it so and start the unlock timer // the unlock time has not yet expired. if (temp > 0) this.startQuestTimer("orfen_unlock", temp, null, null); else { // the time has already expired while the server was offline. Immediately spawn Orfen. int i = Rnd.get(10); int x = 0; int y = 0; int z = 0; if (i < 4) { x = Pos[1][0]; y = Pos[1][1]; z = Pos[1][2]; } else if (i < 7) { x = Pos[2][0]; y = Pos[2][1]; z = Pos[2][2]; } else { x = Pos[3][0]; y = Pos[3][1]; z = Pos[3][2]; } L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN,x,y,z,0,false,0); GrandBossManager.getInstance().setBossStatus(ORFEN,ALIVE); this.spawnBoss(orfen); } } else { int loc_x = info.getInteger("loc_x"); int loc_y = info.getInteger("loc_y"); int loc_z = info.getInteger("loc_z"); int heading = info.getInteger("heading"); int hp = info.getInteger("currentHP"); int mp = info.getInteger("currentMP"); L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN,loc_x,loc_y,loc_z,heading,false,0); orfen.setCurrentHpMp(hp,mp); this.spawnBoss(orfen); } } public void setSpawnPoint(L2NpcInstance npc,int index) { ((L2Attackable) npc).clearAggroList(); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); L2Spawn spawn = npc.getSpawn(); spawn.setLocx(Pos[index][0]); spawn.setLocy(Pos[index][1]); spawn.setLocz(Pos[index][2]); npc.teleToLocation(Pos[index][0],Pos[index][1],Pos[index][2]); } public void spawnBoss(L2GrandBossInstance npc) { GrandBossManager.getInstance().addBoss(npc); npc.broadcastPacket(new PlaySound(1, "BS01_A", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ())); this.startQuestTimer("check_orfen_pos",10000,npc,null,true); //Spawn minions int x = npc.getX(); int y = npc.getY(); L2NpcInstance mob; mob = addSpawn(RAIKEL_LEOS,x+100,y+100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); mob = addSpawn(RAIKEL_LEOS,x+100,y-100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); mob = addSpawn(RAIKEL_LEOS,x-100,y+100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); mob = addSpawn(RAIKEL_LEOS,x-100,y-100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); this.startQuestTimer("check_minion_loc",10000,npc,null,true); } @@override public String onAdvEvent (String event, L2NpcInstance npc, L2PcInstance player) { if (event.equalsIgnoreCase("orfen_unlock")) { int i = Rnd.get(10); int x = 0; int y = 0; int z = 0; if (i < 4) { x = Pos[1][0]; y = Pos[1][1]; z = Pos[1][2]; } else if (i < 7) { x = Pos[2][0]; y = Pos[2][1]; z = Pos[2][2]; } else { x = Pos[3][0]; y = Pos[3][1]; z = Pos[3][2]; } L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN,x,y,z,0,false,0); GrandBossManager.getInstance().setBossStatus(ORFEN,ALIVE); this.spawnBoss(orfen); } else if (event.equalsIgnoreCase("check_orfen_pos")) { if (_IsTeleported && npc.getCurrentHp() > npc.getMaxHp() * 0.95 || !_Zone.isInsideZone(npc) && !_IsTeleported) { setSpawnPoint(npc,Rnd.get(3)+1); _IsTeleported = false; } else if (_IsTeleported && !_Zone.isInsideZone(npc)) setSpawnPoint(npc,0); } else if (event.equalsIgnoreCase("check_minion_loc")) { for (int i=0;i<_Minions.size();i++) { L2Attackable mob = _Minions.get(i); if (!npc.isInsideRadius(mob,3000,false,false)) { mob.teleToLocation(npc.getX(),npc.getY(),npc.getZ()); ((L2Attackable) npc).clearAggroList(); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); } } } else if (event.equalsIgnoreCase("despawn_minions")) { for (int i=0;i<_Minions.size();i++) { L2Attackable mob = _Minions.get(i); if (mob != null) mob.decayMe(); } _Minions.clear(); } else if (event.equalsIgnoreCase("spawn_minion")) { L2NpcInstance mob = addSpawn(RAIKEL_LEOS,npc.getX(),npc.getY(),npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); } return super.onAdvEvent(event, npc, player); } @@override public String onSkillSee (L2NpcInstance npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet) { if (npc.getNpcId() == ORFEN) { L2Character originalCaster = isPet? caster.getPet(): caster; if (skill.getAggroPoints() > 0 && Rnd.get(5) == 0 && npc.isInsideRadius(originalCaster,1000,false,false)) { npc.broadcastPacket(new NpcSay(npc.getObjectId(),0,npc.getNpcId(),Text[Rnd.get(4)].replace("PLAYERNAME",caster.getName().toString()))); originalCaster.teleToLocation(npc.getX(),npc.getY(),npc.getZ()); npc.setTarget(originalCaster); npc.doCast(SkillTable.getInstance().getInfo(4064,1)); } } return super.onSkillSee(npc,caster,skill,targets,isPet); } @@override public String onFactionCall (L2NpcInstance npc, L2NpcInstance caller, L2PcInstance attacker, boolean isPet) { if (caller == null || npc == null) return super.onFactionCall(npc, caller, attacker, isPet); int npcId = npc.getNpcId(); int callerId = caller.getNpcId(); if (npcId == RAIKEL_LEOS && Rnd.get(20) == 0) { npc.setTarget(attacker); npc.doCast(SkillTable.getInstance().getInfo(4067,4)); } else if (npcId == RIBA_IREN) { int chance = 1; if (callerId == ORFEN) chance = 9; if (callerId != RIBA_IREN && caller.getCurrentHp() < caller.getMaxHp() / 2 && Rnd.get(10) < chance) { npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); npc.setTarget(caller); npc.doCast(SkillTable.getInstance().getInfo(4516,1)); } } return super.onFactionCall(npc, caller, attacker, isPet); } @@override public String onAttack (L2NpcInstance npc, L2PcInstance attacker, int damage, boolean isPet) { int npcId = npc.getNpcId(); if (npcId == ORFEN) { if (npc.getCurrentHp() - damage < npc.getMaxHp() / 2 && !_IsTeleported) { setSpawnPoint(npc,0); _IsTeleported = true; } else if (npc.isInsideRadius(attacker,1000,false,false) && !npc.isInsideRadius(attacker,300,false,false) && Rnd.get(10) == 0) { npc.broadcastPacket(new NpcSay(npc.getObjectId(),0,npcId,Text[Rnd.get(3)].replace("PLAYERNAME",attacker.getName().toString()))); attacker.teleToLocation(npc.getX(),npc.getY(),npc.getZ()); npc.setTarget(attacker); npc.doCast(SkillTable.getInstance().getInfo(4064,1)); } } else if (npcId == RIBA_IREN) { if (npc.getCurrentHp() - damage < npc.getMaxHp() / 2) { npc.setTarget(attacker); npc.doCast(SkillTable.getInstance().getInfo(4516,1)); } } return super.onAttack(npc, attacker, damage, isPet); } @@override public String onKill (L2NpcInstance npc, L2PcInstance killer, boolean isPet) { if (npc.getNpcId() == ORFEN) { npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ())); GrandBossManager.getInstance().setBossStatus(ORFEN,DEAD); //time is 48hour +/- 20hour long respawnTime = Config.Interval_Of_Orfen_Spawn + Rnd.get(Config.Random_Of_Orfen_Spawn); this.startQuestTimer("orfen_unlock", respawnTime, null, null); // also save the respawn time so that the info is maintained past reboots StatsSet info = GrandBossManager.getInstance().getStatsSet(ORFEN); info.set("respawn_time",System.currentTimeMillis() + respawnTime); GrandBossManager.getInstance().setStatsSet(ORFEN,info); this.cancelQuestTimer("check_minion_loc",npc,null); this.cancelQuestTimer("check_orfen_pos",npc,null); this.startQuestTimer("despawn_minions",20000,null,null); this.cancelQuestTimers("spawn_minion"); } else if (GrandBossManager.getInstance().getBossStatus(ORFEN) == ALIVE && npc.getNpcId() == RAIKEL_LEOS) { _Minions.remove(npc); this.startQuestTimer("spawn_minion",360000,npc,null); } return super.onKill(npc,killer,isPet); } public static void main(String[] args) { new Orfen(-1,"Orfen","ai"); } } Изменено 26 июля, 2017 пользователем LoveYogurt Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Руслан_Миндубаев 4 Опубликовано 26 июля, 2017 ява последняя стоит а вот сам файл где ошибка package ai.individual; import java.util.List; import javolution.util.FastList; import net.sf.l2j.Config; import net.sf.l2j.gameserver.ai.CtrlIntention; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.instancemanager.GrandBossManager; import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.L2Spawn; import net.sf.l2j.gameserver.model.L2Attackable; import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.zone.type.L2BossZone; import net.sf.l2j.gameserver.network.serverpackets.NpcSay; import net.sf.l2j.gameserver.network.serverpackets.PlaySound; import net.sf.l2j.gameserver.templates.StatsSet; import net.sf.l2j.util.Rnd; import ai.group_template.L2AttackableAIScript; public class Orfen extends L2AttackableAIScript { private static final int[][] Pos = {{43728,17220,-4342}, {55024,17368,-5412},{53504,21248,-5486},{53248,24576,-5262}}; private static final String[] Text = {"PLAYERNAME, stop kidding yourthis about your own powerlessness!", "PLAYERNAME, I’ll make you feel what true fear is!", "You’re really stupid to have challenged me. PLAYERNAME! Get ready!", "PLAYERNAME, do you think that’s going to work?!"}; private static final int ORFEN = 29014; //private static final int RAIKEL = 29015; private static final int RAIKEL_LEOS = 29016; //private static final int RIBA = 29017; private static final int RIBA_IREN = 29018; private static boolean _IsTeleported; private static List _Minions = new FastList(); private static L2BossZone _Zone; private static final byte ALIVE = 0; private static final byte DEAD = 1; public Orfen(int id, String name, String descr) { super(id,name,descr); int[] mobs = {ORFEN, RAIKEL_LEOS, RIBA_IREN}; this.registerMobs(mobs); _IsTeleported = false; _Zone = GrandBossManager.getInstance().getZone(Pos[0][0],Pos[0][1],Pos[0][2]); StatsSet info = GrandBossManager.getInstance().getStatsSet(ORFEN); int status = GrandBossManager.getInstance().getBossStatus(ORFEN); if (status == DEAD) { // load the unlock date and time for Orfen from DB long temp = info.getLong("respawn_time") - System.currentTimeMillis(); // if Orfen is locked until a certain time, mark it so and start the unlock timer // the unlock time has not yet expired. if (temp > 0) this.startQuestTimer("orfen_unlock", temp, null, null); else { // the time has already expired while the server was offline. Immediately spawn Orfen. int i = Rnd.get(10); int x = 0; int y = 0; int z = 0; if (i < 4) { x = Pos[1][0]; y = Pos[1][1]; z = Pos[1][2]; } else if (i < 7) { x = Pos[2][0]; y = Pos[2][1]; z = Pos[2][2]; } else { x = Pos[3][0]; y = Pos[3][1]; z = Pos[3][2]; } L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN,x,y,z,0,false,0); GrandBossManager.getInstance().setBossStatus(ORFEN,ALIVE); this.spawnBoss(orfen); } } else { int loc_x = info.getInteger("loc_x"); int loc_y = info.getInteger("loc_y"); int loc_z = info.getInteger("loc_z"); int heading = info.getInteger("heading"); int hp = info.getInteger("currentHP"); int mp = info.getInteger("currentMP"); L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN,loc_x,loc_y,loc_z,heading,false,0); orfen.setCurrentHpMp(hp,mp); this.spawnBoss(orfen); } } public void setSpawnPoint(L2NpcInstance npc,int index) { ((L2Attackable) npc).clearAggroList(); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); L2Spawn spawn = npc.getSpawn(); spawn.setLocx(Pos[index][0]); spawn.setLocy(Pos[index][1]); spawn.setLocz(Pos[index][2]); npc.teleToLocation(Pos[index][0],Pos[index][1],Pos[index][2]); } public void spawnBoss(L2GrandBossInstance npc) { GrandBossManager.getInstance().addBoss(npc); npc.broadcastPacket(new PlaySound(1, "BS01_A", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ())); this.startQuestTimer("check_orfen_pos",10000,npc,null,true); //Spawn minions int x = npc.getX(); int y = npc.getY(); L2NpcInstance mob; mob = addSpawn(RAIKEL_LEOS,x+100,y+100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); mob = addSpawn(RAIKEL_LEOS,x+100,y-100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); mob = addSpawn(RAIKEL_LEOS,x-100,y+100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); mob = addSpawn(RAIKEL_LEOS,x-100,y-100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); this.startQuestTimer("check_minion_loc",10000,npc,null,true); } @@override public String onAdvEvent (String event, L2NpcInstance npc, L2PcInstance player) { if (event.equalsIgnoreCase("orfen_unlock")) { int i = Rnd.get(10); int x = 0; int y = 0; int z = 0; if (i < 4) { x = Pos[1][0]; y = Pos[1][1]; z = Pos[1][2]; } else if (i < 7) { x = Pos[2][0]; y = Pos[2][1]; z = Pos[2][2]; } else { x = Pos[3][0]; y = Pos[3][1]; z = Pos[3][2]; } L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN,x,y,z,0,false,0); GrandBossManager.getInstance().setBossStatus(ORFEN,ALIVE); this.spawnBoss(orfen); } else if (event.equalsIgnoreCase("check_orfen_pos")) { if (_IsTeleported && npc.getCurrentHp() > npc.getMaxHp() * 0.95 || !_Zone.isInsideZone(npc) && !_IsTeleported) { setSpawnPoint(npc,Rnd.get(3)+1); _IsTeleported = false; } else if (_IsTeleported && !_Zone.isInsideZone(npc)) setSpawnPoint(npc,0); } else if (event.equalsIgnoreCase("check_minion_loc")) { for (int i=0;i<_Minions.size();i++) { L2Attackable mob = _Minions.get(i); if (!npc.isInsideRadius(mob,3000,false,false)) { mob.teleToLocation(npc.getX(),npc.getY(),npc.getZ()); ((L2Attackable) npc).clearAggroList(); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); } } } else if (event.equalsIgnoreCase("despawn_minions")) { for (int i=0;i<_Minions.size();i++) { L2Attackable mob = _Minions.get(i); if (mob != null) mob.decayMe(); } _Minions.clear(); } else if (event.equalsIgnoreCase("spawn_minion")) { L2NpcInstance mob = addSpawn(RAIKEL_LEOS,npc.getX(),npc.getY(),npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); } return super.onAdvEvent(event, npc, player); } @@override public String onSkillSee (L2NpcInstance npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet) { if (npc.getNpcId() == ORFEN) { L2Character originalCaster = isPet? caster.getPet(): caster; if (skill.getAggroPoints() > 0 && Rnd.get(5) == 0 && npc.isInsideRadius(originalCaster,1000,false,false)) { npc.broadcastPacket(new NpcSay(npc.getObjectId(),0,npc.getNpcId(),Text[Rnd.get(4)].replace("PLAYERNAME",caster.getName().toString()))); originalCaster.teleToLocation(npc.getX(),npc.getY(),npc.getZ()); npc.setTarget(originalCaster); npc.doCast(SkillTable.getInstance().getInfo(4064,1)); } } return super.onSkillSee(npc,caster,skill,targets,isPet); } @@override public String onFactionCall (L2NpcInstance npc, L2NpcInstance caller, L2PcInstance attacker, boolean isPet) { if (caller == null || npc == null) return super.onFactionCall(npc, caller, attacker, isPet); int npcId = npc.getNpcId(); int callerId = caller.getNpcId(); if (npcId == RAIKEL_LEOS && Rnd.get(20) == 0) { npc.setTarget(attacker); npc.doCast(SkillTable.getInstance().getInfo(4067,4)); } else if (npcId == RIBA_IREN) { int chance = 1; if (callerId == ORFEN) chance = 9; if (callerId != RIBA_IREN && caller.getCurrentHp() < caller.getMaxHp() / 2 && Rnd.get(10) < chance) { npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); npc.setTarget(caller); npc.doCast(SkillTable.getInstance().getInfo(4516,1)); } } return super.onFactionCall(npc, caller, attacker, isPet); } @@override public String onAttack (L2NpcInstance npc, L2PcInstance attacker, int damage, boolean isPet) { int npcId = npc.getNpcId(); if (npcId == ORFEN) { if (npc.getCurrentHp() - damage < npc.getMaxHp() / 2 && !_IsTeleported) { setSpawnPoint(npc,0); _IsTeleported = true; } else if (npc.isInsideRadius(attacker,1000,false,false) && !npc.isInsideRadius(attacker,300,false,false) && Rnd.get(10) == 0) { npc.broadcastPacket(new NpcSay(npc.getObjectId(),0,npcId,Text[Rnd.get(3)].replace("PLAYERNAME",attacker.getName().toString()))); attacker.teleToLocation(npc.getX(),npc.getY(),npc.getZ()); npc.setTarget(attacker); npc.doCast(SkillTable.getInstance().getInfo(4064,1)); } } else if (npcId == RIBA_IREN) { if (npc.getCurrentHp() - damage < npc.getMaxHp() / 2) { npc.setTarget(attacker); npc.doCast(SkillTable.getInstance().getInfo(4516,1)); } } return super.onAttack(npc, attacker, damage, isPet); } @@override public String onKill (L2NpcInstance npc, L2PcInstance killer, boolean isPet) { if (npc.getNpcId() == ORFEN) { npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ())); GrandBossManager.getInstance().setBossStatus(ORFEN,DEAD); //time is 48hour +/- 20hour long respawnTime = Config.Interval_Of_Orfen_Spawn + Rnd.get(Config.Random_Of_Orfen_Spawn); this.startQuestTimer("orfen_unlock", respawnTime, null, null); // also save the respawn time so that the info is maintained past reboots StatsSet info = GrandBossManager.getInstance().getStatsSet(ORFEN); info.set("respawn_time",System.currentTimeMillis() + respawnTime); GrandBossManager.getInstance().setStatsSet(ORFEN,info); this.cancelQuestTimer("check_minion_loc",npc,null); this.cancelQuestTimer("check_orfen_pos",npc,null); this.startQuestTimer("despawn_minions",20000,null,null); this.cancelQuestTimers("spawn_minion"); } else if (GrandBossManager.getInstance().getBossStatus(ORFEN) == ALIVE && npc.getNpcId() == RAIKEL_LEOS) { _Minions.remove(npc); this.startQuestTimer("spawn_minion",360000,npc,null); } return super.onKill(npc,killer,isPet); } public static void main(String[] args) { new Orfen(-1,"Orfen","ai"); } } Раскрою секрет, но многие сборки требуют весьма не последнюю версию явы, семерку например) 1 Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
LoveYougurt 155 Опубликовано 26 июля, 2017 (изменено) Раскрою секрет, но многие сборки требуют весьма не последнюю версию явы, семерку например) щас попробую поставить 7u21 и отпишу слуш внатуре с явой была проблема) спасибо) Изменено 26 июля, 2017 пользователем LoveYogurt Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Руслан_Миндубаев 4 Опубликовано 26 июля, 2017 ява последняя стоит а вот сам файл где ошибка package ai.individual; import java.util.List; import javolution.util.FastList; import net.sf.l2j.Config; import net.sf.l2j.gameserver.ai.CtrlIntention; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.instancemanager.GrandBossManager; import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.L2Spawn; import net.sf.l2j.gameserver.model.L2Attackable; import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.zone.type.L2BossZone; import net.sf.l2j.gameserver.network.serverpackets.NpcSay; import net.sf.l2j.gameserver.network.serverpackets.PlaySound; import net.sf.l2j.gameserver.templates.StatsSet; import net.sf.l2j.util.Rnd; import ai.group_template.L2AttackableAIScript; public class Orfen extends L2AttackableAIScript { private static final int[][] Pos = {{43728,17220,-4342}, {55024,17368,-5412},{53504,21248,-5486},{53248,24576,-5262}}; private static final String[] Text = {"PLAYERNAME, stop kidding yourthis about your own powerlessness!", "PLAYERNAME, I’ll make you feel what true fear is!", "You’re really stupid to have challenged me. PLAYERNAME! Get ready!", "PLAYERNAME, do you think that’s going to work?!"}; private static final int ORFEN = 29014; //private static final int RAIKEL = 29015; private static final int RAIKEL_LEOS = 29016; //private static final int RIBA = 29017; private static final int RIBA_IREN = 29018; private static boolean _IsTeleported; private static List _Minions = new FastList(); private static L2BossZone _Zone; private static final byte ALIVE = 0; private static final byte DEAD = 1; public Orfen(int id, String name, String descr) { super(id,name,descr); int[] mobs = {ORFEN, RAIKEL_LEOS, RIBA_IREN}; this.registerMobs(mobs); _IsTeleported = false; _Zone = GrandBossManager.getInstance().getZone(Pos[0][0],Pos[0][1],Pos[0][2]); StatsSet info = GrandBossManager.getInstance().getStatsSet(ORFEN); int status = GrandBossManager.getInstance().getBossStatus(ORFEN); if (status == DEAD) { // load the unlock date and time for Orfen from DB long temp = info.getLong("respawn_time") - System.currentTimeMillis(); // if Orfen is locked until a certain time, mark it so and start the unlock timer // the unlock time has not yet expired. if (temp > 0) this.startQuestTimer("orfen_unlock", temp, null, null); else { // the time has already expired while the server was offline. Immediately spawn Orfen. int i = Rnd.get(10); int x = 0; int y = 0; int z = 0; if (i < 4) { x = Pos[1][0]; y = Pos[1][1]; z = Pos[1][2]; } else if (i < 7) { x = Pos[2][0]; y = Pos[2][1]; z = Pos[2][2]; } else { x = Pos[3][0]; y = Pos[3][1]; z = Pos[3][2]; } L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN,x,y,z,0,false,0); GrandBossManager.getInstance().setBossStatus(ORFEN,ALIVE); this.spawnBoss(orfen); } } else { int loc_x = info.getInteger("loc_x"); int loc_y = info.getInteger("loc_y"); int loc_z = info.getInteger("loc_z"); int heading = info.getInteger("heading"); int hp = info.getInteger("currentHP"); int mp = info.getInteger("currentMP"); L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN,loc_x,loc_y,loc_z,heading,false,0); orfen.setCurrentHpMp(hp,mp); this.spawnBoss(orfen); } } public void setSpawnPoint(L2NpcInstance npc,int index) { ((L2Attackable) npc).clearAggroList(); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); L2Spawn spawn = npc.getSpawn(); spawn.setLocx(Pos[index][0]); spawn.setLocy(Pos[index][1]); spawn.setLocz(Pos[index][2]); npc.teleToLocation(Pos[index][0],Pos[index][1],Pos[index][2]); } public void spawnBoss(L2GrandBossInstance npc) { GrandBossManager.getInstance().addBoss(npc); npc.broadcastPacket(new PlaySound(1, "BS01_A", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ())); this.startQuestTimer("check_orfen_pos",10000,npc,null,true); //Spawn minions int x = npc.getX(); int y = npc.getY(); L2NpcInstance mob; mob = addSpawn(RAIKEL_LEOS,x+100,y+100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); mob = addSpawn(RAIKEL_LEOS,x+100,y-100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); mob = addSpawn(RAIKEL_LEOS,x-100,y+100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); mob = addSpawn(RAIKEL_LEOS,x-100,y-100,npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); this.startQuestTimer("check_minion_loc",10000,npc,null,true); } @@override public String onAdvEvent (String event, L2NpcInstance npc, L2PcInstance player) { if (event.equalsIgnoreCase("orfen_unlock")) { int i = Rnd.get(10); int x = 0; int y = 0; int z = 0; if (i < 4) { x = Pos[1][0]; y = Pos[1][1]; z = Pos[1][2]; } else if (i < 7) { x = Pos[2][0]; y = Pos[2][1]; z = Pos[2][2]; } else { x = Pos[3][0]; y = Pos[3][1]; z = Pos[3][2]; } L2GrandBossInstance orfen = (L2GrandBossInstance) addSpawn(ORFEN,x,y,z,0,false,0); GrandBossManager.getInstance().setBossStatus(ORFEN,ALIVE); this.spawnBoss(orfen); } else if (event.equalsIgnoreCase("check_orfen_pos")) { if (_IsTeleported && npc.getCurrentHp() > npc.getMaxHp() * 0.95 || !_Zone.isInsideZone(npc) && !_IsTeleported) { setSpawnPoint(npc,Rnd.get(3)+1); _IsTeleported = false; } else if (_IsTeleported && !_Zone.isInsideZone(npc)) setSpawnPoint(npc,0); } else if (event.equalsIgnoreCase("check_minion_loc")) { for (int i=0;i<_Minions.size();i++) { L2Attackable mob = _Minions.get(i); if (!npc.isInsideRadius(mob,3000,false,false)) { mob.teleToLocation(npc.getX(),npc.getY(),npc.getZ()); ((L2Attackable) npc).clearAggroList(); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); } } } else if (event.equalsIgnoreCase("despawn_minions")) { for (int i=0;i<_Minions.size();i++) { L2Attackable mob = _Minions.get(i); if (mob != null) mob.decayMe(); } _Minions.clear(); } else if (event.equalsIgnoreCase("spawn_minion")) { L2NpcInstance mob = addSpawn(RAIKEL_LEOS,npc.getX(),npc.getY(),npc.getZ(),0,false,0); mob.setIsRaidMinion(true); _Minions.add((L2Attackable) mob); } return super.onAdvEvent(event, npc, player); } @@override public String onSkillSee (L2NpcInstance npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet) { if (npc.getNpcId() == ORFEN) { L2Character originalCaster = isPet? caster.getPet(): caster; if (skill.getAggroPoints() > 0 && Rnd.get(5) == 0 && npc.isInsideRadius(originalCaster,1000,false,false)) { npc.broadcastPacket(new NpcSay(npc.getObjectId(),0,npc.getNpcId(),Text[Rnd.get(4)].replace("PLAYERNAME",caster.getName().toString()))); originalCaster.teleToLocation(npc.getX(),npc.getY(),npc.getZ()); npc.setTarget(originalCaster); npc.doCast(SkillTable.getInstance().getInfo(4064,1)); } } return super.onSkillSee(npc,caster,skill,targets,isPet); } @@override public String onFactionCall (L2NpcInstance npc, L2NpcInstance caller, L2PcInstance attacker, boolean isPet) { if (caller == null || npc == null) return super.onFactionCall(npc, caller, attacker, isPet); int npcId = npc.getNpcId(); int callerId = caller.getNpcId(); if (npcId == RAIKEL_LEOS && Rnd.get(20) == 0) { npc.setTarget(attacker); npc.doCast(SkillTable.getInstance().getInfo(4067,4)); } else if (npcId == RIBA_IREN) { int chance = 1; if (callerId == ORFEN) chance = 9; if (callerId != RIBA_IREN && caller.getCurrentHp() < caller.getMaxHp() / 2 && Rnd.get(10) < chance) { npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, null, null); npc.setTarget(caller); npc.doCast(SkillTable.getInstance().getInfo(4516,1)); } } return super.onFactionCall(npc, caller, attacker, isPet); } @@override public String onAttack (L2NpcInstance npc, L2PcInstance attacker, int damage, boolean isPet) { int npcId = npc.getNpcId(); if (npcId == ORFEN) { if (npc.getCurrentHp() - damage < npc.getMaxHp() / 2 && !_IsTeleported) { setSpawnPoint(npc,0); _IsTeleported = true; } else if (npc.isInsideRadius(attacker,1000,false,false) && !npc.isInsideRadius(attacker,300,false,false) && Rnd.get(10) == 0) { npc.broadcastPacket(new NpcSay(npc.getObjectId(),0,npcId,Text[Rnd.get(3)].replace("PLAYERNAME",attacker.getName().toString()))); attacker.teleToLocation(npc.getX(),npc.getY(),npc.getZ()); npc.setTarget(attacker); npc.doCast(SkillTable.getInstance().getInfo(4064,1)); } } else if (npcId == RIBA_IREN) { if (npc.getCurrentHp() - damage < npc.getMaxHp() / 2) { npc.setTarget(attacker); npc.doCast(SkillTable.getInstance().getInfo(4516,1)); } } return super.onAttack(npc, attacker, damage, isPet); } @@override public String onKill (L2NpcInstance npc, L2PcInstance killer, boolean isPet) { if (npc.getNpcId() == ORFEN) { npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ())); GrandBossManager.getInstance().setBossStatus(ORFEN,DEAD); //time is 48hour +/- 20hour long respawnTime = Config.Interval_Of_Orfen_Spawn + Rnd.get(Config.Random_Of_Orfen_Spawn); this.startQuestTimer("orfen_unlock", respawnTime, null, null); // also save the respawn time so that the info is maintained past reboots StatsSet info = GrandBossManager.getInstance().getStatsSet(ORFEN); info.set("respawn_time",System.currentTimeMillis() + respawnTime); GrandBossManager.getInstance().setStatsSet(ORFEN,info); this.cancelQuestTimer("check_minion_loc",npc,null); this.cancelQuestTimer("check_orfen_pos",npc,null); this.startQuestTimer("despawn_minions",20000,null,null); this.cancelQuestTimers("spawn_minion"); } else if (GrandBossManager.getInstance().getBossStatus(ORFEN) == ALIVE && npc.getNpcId() == RAIKEL_LEOS) { _Minions.remove(npc); this.startQuestTimer("spawn_minion",360000,npc,null); } return super.onKill(npc,killer,isPet); } public static void main(String[] args) { new Orfen(-1,"Orfen","ai"); } } L2jx IT по крайней мере довольно старая может быть, попробуй поставить Яву 7.21+ Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
iFlash 1 Опубликовано 27 июля, 2017 поставь другую ява и будет тебе счастье Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Urban 78 Опубликовано 27 июля, 2017 поставь другую ява и будет тебе счастье банально внести пару правок и не нужно яву менять.... Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты