Hello here is my instance the problem is i go to the instance but the mobs dont spawn any help?
package net.sf.l2j.gameserver.instances.Tsarka;import net.sf.l2j.gameserver.instancemanager.InstanceManager;import net.sf.l2j.gameserver.instancemanager.InstanceManager.InstanceWorld;import net.sf.l2j.gameserver.model.L2Party;import net.sf.l2j.gameserver.model.actor.L2Npc;import net.sf.l2j.gameserver.model.actor.L2Summon;import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;import net.sf.l2j.gameserver.model.olympiad.Olympiad;import net.sf.l2j.gameserver.model.quest.Quest;import net.sf.l2j.gameserver.model.quest.QuestState;import net.sf.l2j.gameserver.network.SystemMessageId;import net.sf.l2j.gameserver.network.serverpackets.ExShowScreenMessage;import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;publicclassTsarkaextendsQuest{//NPCsprivatestaticintKourampies=96012;privatestaticint EXIT_TELEPORTER =90013;//BOSSESprivatestaticfinalint[] BOSSES ={95602,95622,95623,95624,95644};//final bossesprivatestaticfinalint[] GRAND_BOSSES ={95634,95117};//MOBSprivatestaticfinalint[] MOBS ={22528,95132,22526,22363,21395,95107};privatestaticString qn ="Tsarka";privatestaticfinalint INSTANCEID =2001;//REQUIREMENTSprivatestaticboolean debug =false;privatestaticint levelReq =86;privatestaticint pvpReq =100;privatestaticint fameReq =0;privatestaticint pkReq =0;privateclass teleCoord {int instanceId;int x;int y;int z;}publicclassTsarkaWorldextendsInstanceWorld{publicTsarkaWorld(){InstanceManager.getInstance().super();}}publicTsarka(int questId,String name,String descr){super(questId, name, descr);
addStartNpc(Kourampies);
addTalkId(Kourampies);
addTalkId(EXIT_TELEPORTER);for(int boss : BOSSES)
addKillId(boss);for(int mob : MOBS)
addKillId(mob);for(int mob : GRAND_BOSSES)
addKillId(mob);}publicstaticvoid main(String[] args){newTsarka(-1, qn,"instances");}privateboolean checkConditions(L2PcInstance player,boolean single){if(debug || player.isGM())returntrue;else{final L2Party party = player.getParty();if(!single &&(party ==null|| party.getMemberCount()<4|| party.getMemberCount()>7)){
player.sendMessage("This is a 4-7 player party instance, so you must have a party of 4-7 people");returnfalse;}if(!single && party.getPartyLeaderOID()!= player.getObjectId()){
player.sendPacket(newSystemMessage(2185));returnfalse;}if(!single){/*if (!checkIPs(party))
return false;*/boolean canEnter =true;for(L2PcInstance ptm : party.getPartyMembers()){if(ptm ==null)returnfalse;if(ptm.getLevel()< levelReq){
ptm.sendMessage("You must be level "+levelReq+" to enter this instance");
canEnter =false;}elseif(ptm.getPvpKills()< pvpReq){
ptm.sendMessage("You must have "+pvpReq+" PvPs to enter this instance");
canEnter =false;}elseif(ptm.getPvpKills()< pkReq){
ptm.sendMessage("You must have "+pkReq+" PKs to enter this instance");
canEnter =false;}elseif(ptm.getPvpKills()< fameReq){
ptm.sendMessage("You must have "+fameReq+" fame to enter this instance");
canEnter =false;}elseif(ptm.getPvpFlag()!=0|| ptm.getKarma()>0){
ptm.sendMessage("You can't enter the instance while in PVP mode or have karma");
canEnter =false;}elseif(ptm.isInFunEvent()){
ptm.sendMessage("You can't enter the instance while in an event");
canEnter =false;}elseif(ptm.isInDuel()|| ptm.isInOlympiadMode()||Olympiad.getInstance().isRegistered(ptm)){
ptm.sendMessage("You can't enter the instance while in duel/oly");
canEnter =false;}elseif(System.currentTimeMillis()<InstanceManager.getInstance().getInstanceTime(ptm.getAccountName(), INSTANCEID)){
ptm.sendMessage("You can only enter this instance once every day, wait until the next 12AM");
canEnter =false;}elseif(!ptm.isInsideRadius(player,500,true,false)){
ptm.sendMessage("You're too far away from your party leader");
player.sendMessage("One of your party members is too far away");
canEnter =false;}else{finalInstanceWorld world =InstanceManager.getInstance().getPlayerWorld(player);if(world !=null){
ptm.sendMessage("You can't enter because you have entered into another instance that hasn't expired yet, try waiting 5 min");
canEnter =false;}}if(!canEnter){
ptm.sendMessage("You're preventing your party from entering an instance");if(ptm != player)
player.sendMessage(ptm.getName()+" is preventing you from entering the instance");returnfalse;}}}else{if(player.getLevel()< levelReq){
player.sendMessage("You must be level "+levelReq+" to enter this instance");returnfalse;}elseif(player.getPvpKills()< pvpReq){
player.sendMessage("You must have "+pvpReq+" PvPs to enter this instance");returnfalse;}elseif(player.getPvpFlag()!=0|| player.getKarma()>0){
player.sendMessage("You can't enter the instance while in PVP mode or have karma");returnfalse;}elseif(player.isInFunEvent()){
player.sendMessage("You can't enter the instance while in an event");returnfalse;}elseif(player.isInDuel()|| player.isInOlympiadMode()||Olympiad.getInstance().isRegistered(player)){
player.sendMessage("You can't enter the instance while in duel/oly");returnfalse;}}returntrue;}}privatevoid teleportplayer(L2PcInstance player, teleCoord teleto){
player.setInstanceId(teleto.instanceId);
player.teleToLocation(teleto.x, teleto.y, teleto.z);
L2Summon pet = player.getPet();if(pet !=null){
pet.setInstanceId(teleto.instanceId);
pet.teleToLocation(teleto.x, teleto.y, teleto.z);}}protectedint enterInstance(L2PcInstance player,Stringtemplate, teleCoord teleto){int instanceId =0;//check for existing instances for this playerInstanceWorld world =InstanceManager.getInstance().getPlayerWorld(player);//existing instanceif(world !=null){if(world.templateId != INSTANCEID){
player.sendPacket(newSystemMessage(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER));return0;}if(!checkConditions(player,true))return0;
teleto.instanceId = world.instanceId;
teleportplayer(player,teleto);return instanceId;}else//New instance{if(!checkConditions(player,false))return0;
instanceId =InstanceManager.getInstance().createDynamicInstance(template);
world =newTsarkaWorld();
world.instanceId = instanceId;
world.templateId = INSTANCEID;InstanceManager.getInstance().addWorld(world);
_log.info("Tsarka: new "+template+" Instance: "+ instanceId +" created by player: "+ player.getName());// teleport players
teleto.instanceId = instanceId;
L2Party party = player.getParty();if(party ==null){if(!player.isGM())return0;// this can happen only if debug is trueInstanceManager.getInstance().setInstanceTime(player.getAccountName(), INSTANCEID, getNextInstanceTime(TWODAYS));
world.allowed.add(player.getObjectId());
auditInstances(player,template, instanceId);
teleportplayer(player,teleto);}else{for(L2PcInstance partyMember : party.getPartyMembers()){
partyMember.sendMessage("You have entered the Dragon Valley Caves");InstanceManager.getInstance().setInstanceTime(partyMember.getAccountName(), INSTANCEID, getNextInstanceTime(TWODAYS));
world.allowed.add(partyMember.getObjectId());
auditInstances(partyMember,template, instanceId);
teleportplayer(partyMember,teleto);}
spawnExitGK((TsarkaWorld) world, player);}return instanceId;}}protectedvoid exitInstance(L2PcInstance player, teleCoord tele){
player.setInstanceId(0);
player.teleToLocation(tele.x, tele.y, tele.z);
L2Summon pet = player.getPet();if(pet !=null){
pet.setInstanceId(0);
pet.teleToLocation(tele.x, tele.y, tele.z);}}@OverridepublicString onTalk(L2Npc npc, L2PcInstance player){finalint npcId = npc.getNpcId();QuestState st = player.getQuestState(qn);if(st ==null)
st = newQuestState(player);if(npcId ==Kourampies){
teleCoord teleto =new teleCoord();
teleto.x =131175;
teleto.y =114415;
teleto.z =-3715;
enterInstance(player,"Tsarka.xml", teleto);}elseif(npcId == EXIT_TELEPORTER){finalInstanceWorld world =InstanceManager.getInstance().getPlayerWorld(player);if(world ==null||!(world instanceofTsarkaWorld))returnnull;
teleCoord teleto =new teleCoord();
teleto.x =-82993;
teleto.y =150860;
teleto.z =-3129;if(player.getParty()==null){
exitInstance(player, teleto);
player.sendPacket(newExShowScreenMessage("You have completed the Tsarka instance",6000));}else{for(L2PcInstance ptm : player.getParty().getPartyMembers()){
exitInstance(ptm, teleto);
player.sendPacket(newExShowScreenMessage("You have completed the Tsarka instance",6000));}}
st.exitQuest(true);}returnnull;}@OverridepublicString onKill(L2Npc npc, L2PcInstance killer,boolean isPet){returnnull;}publicvoid spawnExitGK(TsarkaWorld world, L2PcInstance player){
addSpawn(EXIT_TELEPORTER,153073,122107,-3805,0,false,0,false, world.instanceId);}}
Great! From what I can see, L2jmobius has very good reviews. Anyway, I've been testing it for months now and the file organization and modularity are impeccable. Everything is very easy to understand and locate. I'll need to learn with this datapack until I feel confident enough to buy the pro version.
BoberKurwa: I have the best security
People: No you dont
BoberKurwa: Hack me if you can
BoberKurwa: you suck by the way
https://prnt.sc/CXP7shjstc43
People: BoberKurwa
BoberKurwa: You ALL SUCK MY PROJECT IS THE BEST YOU CANT HACK IT
People: you have no security
https://prnt.sc/BjLkJ5WO1Pzn
BoberKurwa
https://prnt.sc/_jkOQfsPqUzu
https://prnt.sc/nyJ8X4eubtAH
Question
ThelwHelpRePaidia
Hello here is my instance the problem is i go to the instance but the mobs dont spawn any help?
3 answers to this question
Recommended Posts