Jump to content
  • 0

Help Whit SeedOfDestrucction


Question

Posted

java.lang.NullPointerException

at zone_scripts.GraciaContinent.SeedOfDestruction.SeedOfDestruction.onAdvEvent(SeedOfDestruction.java:871)

at l2.brick.gameserver.model.quest.Quest.notifyEvent(Quest.java:448)

at l2.brick.gameserver.model.quest.QuestTimer$ScheduleTimerTask.run(QuestTimer.java:42)

at l2.brick.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:86)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

at java.util.concurrent.FutureTask.run(FutureTask.java:166)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722)

 

java.lang.NullPointerException

at zone_scripts.GraciaContinent.SeedOfDestruction.SeedOfDestruction.onAdvEvent(SeedOfDestruction.java:871)

at l2.brick.gameserver.model.quest.Quest.notifyEvent(Quest.java:448)

at l2.brick.gameserver.model.quest.QuestTimer$ScheduleTimerTask.run(QuestTimer.java:42)

at l2.brick.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:86)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

at java.util.concurrent.FutureTask.run(FutureTask.java:166)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722)

 

After ending Video Tiat happens. Use L2brick Freya

can someone help ?

public String onAdvEvent (String event, L2Npc npc, L2PcInstance player)
{
	InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
	if (tmpworld instanceof SODWorld)
	{
		SODWorld world = (SODWorld) tmpworld;
		teleCoord teleto = new teleCoord();
		teleto.instanceId = world.instanceId;
		if (event.equalsIgnoreCase("Part1"))
		{
			world.ZoneWaitForTP = false;

			broadcastPacket((new SpecialCamera(player.getObjectId(),3500,90,15,100,5000,0,0,1,0)),world);
			startQuestTimer("Part2", 100, world._MovePeltast,player);
		}
		else if (event.equalsIgnoreCase("Part2"))
		{
			MoveTo(world._MovePeltast,-250401,207130,-11957);
			broadcastPacket((new SpecialCamera(player.getObjectId(),300,90,5,6000,7000,0,0,1,0)),world);
			startQuestTimer("Part3",100,world._MovePeltast,null);
		}
		else if (event.equalsIgnoreCase("Part3"))
		{
			broadcastPacket((new SocialAction(world._priest,1)),world);
			broadcastPacket((new SpecialCamera(world._priest.getObjectId(),200,90,10,0,5000,0,0,1,0)),world);
			startQuestTimer("Part4",100, npc, null);
		}
		else if (event.equalsIgnoreCase("Part4"))
		{
			broadcastPacket((new SpecialCamera(world._priest.getObjectId(),200,90,5,2500,5000,0,0,1,0)),world);
			startQuestTimer("Part5",100,world._MovePeltast,null);
		}
		else if (event.equalsIgnoreCase("Part5"))
		{
			broadcastPacket((new SpecialCamera(world._MovePeltast.getObjectId(),150,90,5,0,5000,0,0,1,0)),world);
			startQuestTimer("Part6",100,world._MovePeltast,null);
		}
		else if (event.equalsIgnoreCase("Part6"))
		{
			broadcastPacket((new SpecialCamera(world._MovePeltast.getObjectId(),150,15,10,3000,5000,0,0,1,0)),world);
			MoveTo(world._priest,-250402,206519,-11905);
			broadcastPacket((new SocialAction(world._MovePeltast,1)),world);
			startQuestTimer("Part7",100, world._MovePeltast, null);
		}
		else if (event.equalsIgnoreCase("Part7"))
		{
			broadcastPacket((new SpecialCamera(world._priest.getObjectId(),1400,40,20,0,5000,0,0,1,0)),world);
			Delete(world._MovePeltast);
			startQuestTimer("Part8",100,world._priest,null);
		}
		else if (event.equalsIgnoreCase("Part8"))
		{
			broadcastPacket((new SpecialCamera(world._priest.getObjectId(),350,90,5,7000,8000,0,0,1,0)),world);
			startQuestTimer("Part9",100,world._priest,null);
		}
		else if (event.equalsIgnoreCase("Part9"))
		{
			broadcastPacket((new SpecialCamera(world._priest.getObjectId(),350,90,0,2500,15000,0,0,1,0)),world);
			startQuestTimer("Part10",100,world._priest,null);
		}
		else if (event.equalsIgnoreCase("Part10"))
		{
			world._ChangePortal = addSpawn(ChangePortal, -250402, 206519, -11905, 0, false, 0, false, world.instanceId);
			world._ChangePortal.setIsNoRndWalk(true);
			world._priest.doCast(SkillTable.getInstance().getInfo(5816, 1));
			startQuestTimer("Part11",300,world._priest,null);
			startQuestTimer("PartUnnamed",50,world._priest,null);
		}
		else if (event.equalsIgnoreCase("PartUnnamed"))
		{
			L2Skill _skill = SkillTable.getInstance().getInfo(5815, 1);
			for (L2Npc naezd : world.naezds)
				naezd.doCast(_skill);
			startQuestTimer("PartUnnamed",100,world._priest,null);
		}
		else if (event.equalsIgnoreCase("Part11"))
		{
			cancelQuestTimers("PartUnnamed");

			world._tiada = addSpawn(TIADA, -250400, 207271, -11961, 16285, false, 0, false, world.instanceId);
			world._tiada.setIsNoRndWalk(true);
			world._tiada.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
			world._naezdTR1 = addSpawn(NAEZD, -250154, 207203, -11970, 33818, false, 0, false, world.instanceId);
			world._naezdTR1.setIsNoRndWalk(true);
			world._naezdTR2 = addSpawn(NAEZD, -250209, 206941, -11966, 27379, false, 0, false, world.instanceId);
			world._naezdTR2.setIsNoRndWalk(true);
			world._naezdTL1 = addSpawn(NAEZD, -250652, 207203, -11970, 0, false, 0, false, world.instanceId);
			world._naezdTL1.setIsNoRndWalk(true);
			world._naezdTL2 = addSpawn(NAEZD, -250597, 206941, -11966, 6867, false, 0, false, world.instanceId);
			world._naezdTL2.setIsNoRndWalk(true);
			broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),400,90,5,1500,13000,0,0,1,0)),world);
			startQuestTimer("Part12",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part12"))
		{
			broadcastPacket((new SocialAction(world._tiada,1)),world);

			Delete(world._priest);
			Delete(world._ChangePortal);
			startQuestTimer("Part13",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part13"))
		{
			world._naezdTR2.doCast(SkillTable.getInstance().getInfo(5815, 1));
			world._naezdTL2.doCast(SkillTable.getInstance().getInfo(5815, 1));
			startQuestTimer("Part14",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part14"))
		{
			world._naezdTR1.doCast(SkillTable.getInstance().getInfo(5815, 1));
			world._naezdTL1.doCast(SkillTable.getInstance().getInfo(5815, 1));
			broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),600,90,5,4000,8000,0,0,1,0)),world);
			startQuestTimer("Part15",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part15"))
		{
			MoveTo(world._naezdTR1,-249576,207155, -11969);
			MoveTo(world._naezdTR2,-249576,207155, -11969);
			MoveTo(world._naezdTL1,-251465,206601, -11970);
			MoveTo(world._naezdTL2,-251465,206601, -11970);
			startQuestTimer("Part16",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part16"))
		{
			broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),1400,90,40,3000,3000,0,0,1,0)),world);
			startQuestTimer("Part17",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part17"))
		{
			broadcastPacket((new SpecialCamera(world._portalForCamera.getObjectId(),3500,37,1,0,2000,0,0,1,0)),world);
			startQuestTimer("Part18",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part18"))
		{
			L2Skill _skill = SkillTable.getInstance().getInfo(5833, 1);
			for (L2Npc mag : world._mags)
			{
				mag.setTarget(mag);
				mag.doCast(_skill);
			}
			broadcastPacket((new SpecialCamera(world._portalForCamera.getObjectId(),2400,60,1,5000,6000,0,0,1,0)),world);
			startQuestTimer("Part19",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part19"))
		{
			broadcastPacket((new SpecialCamera(world._portalForCamera.getObjectId(),2000,75,4,2000,3000,0,0,1,0)),world);
			startQuestTimer("Part20",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part20"))
		{
			broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),250,90,0,100,3000,0,0,1,0)),world);
			startQuestTimer("Part21",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part21"))
		{
			broadcastPacket((new SpecialCamera(world._tiada.getObjectId(),1500,90,5,5000,6500,0,0,1,0)),world);
			startQuestTimer("Part22",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("Part22"))
		{
			world._tiada.doCast(SkillTable.getInstance().getInfo(5818, 1));
			startQuestTimer("End!",100, world._tiada, null);
		}
		else if (event.equalsIgnoreCase("End!"))
		{
			for (L2PcInstance plr : world.PlayersInInstance)
			{
				if (plr == null || checkworld(plr) != 1) continue;
					//plr.teleToLocation(-250402, 210408, -11957);
				//if (plr.getPet() != null)
					//plr.getPet().teleToLocation(-250402, 210408, -11957);
					SetMovieMode(plr,false);
					Delete(world._portalForCamera);
			}
			for (L2Npc naezd : world.naezds)
				Delete(naezd);
		}
		else if (event.equalsIgnoreCase("KillTiadaPart1"))
		{
			for (L2PcInstance plr : world.PlayersInInstance)
			{
				if (plr == null || checkworld(plr) != 1) continue;
					SetMovieMode(plr,true);
					plr.showQuestMovie(6);
			}
			Delete(npc);
			for(L2Npc mob:InstanceManager.getInstance().getInstance(world.instanceId).getNpcs())
				mob.deleteMe();
			for (L2PcInstance plr : world.PlayersInInstance)
			{
				if (plr == null || checkworld(plr) != 1) continue;
					SetMovieMode(plr,false);
			}
		}
		else if (event.equalsIgnoreCase("Spawn"))
		{
			if (world.status <= 7)
			{
				L2PcInstance target = L2World.getInstance().getPlayer(world.allowed.get(Rnd.get(world.allowed.size())));
				if (world.deviceSpawnedMobCount < MAX_DEVICESPAWNEDMOBCOUNT
						&& target != null && target.getInstanceId() == npc.getInstanceId()
						&& !target.isDead())
				{
					L2Attackable mob = (L2Attackable) addSpawn(SPAWN_MOB_IDS[Rnd.get(SPAWN_MOB_IDS.length)], npc.getSpawn().getLocx(), npc.getSpawn().getLocy(), npc.getSpawn().getLocz(), npc.getSpawn().getHeading(), false,0,false,world.instanceId);
					world.deviceSpawnedMobCount++;
					mob.setSeeThroughSilentMove(true);
					mob.setRunning();
					mob.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, MOVE_TO_TIADA);
				}
			}
		}
	}
	return "";
}

7 answers to this question

Recommended Posts

  • 0
Posted

Well, somehow, npc is null.

 

Be sure the given npc is SPAWNED when you event on him. You probably make it disappears, then event on him and when the event is launched, he doesn't find the npc anymore.

 

To know which event is blocking, consider to edit :

return "";

for

return event;

And ingame see you chat section and check on which step it is stopping.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...