[Info] Zone

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Mage
Posts: 277
Joined: Fri Apr 17, 2009 2:29 pm

[Info] Zone

Post by Mage »

Hi boys,

In my server same time there is this error:

Code: Select all

java.lang.NullPointerException	at net.sf.l2j.gameserver.datatables.MapRegionTable.getTeleToLocation(MapRegionTable.java:575)	at net.sf.l2j.gameserver.model.actor.L2Character.teleToLocation(L2Character.java:684)	at handlers.skillhandlers.Recall.useSkill(Unknown Source)	at net.sf.l2j.gameserver.model.actor.L2Character.callSkill(L2Character.java:6465)	at net.sf.l2j.gameserver.model.actor.L2Character.onMagicHitTimer(L2Character.java:6189)	at net.sf.l2j.gameserver.model.actor.L2Character$MagicUseTask.run(L2Character.java:2535)	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)	at java.util.concurrent.FutureTask.run(FutureTask.java:138)	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)	at java.lang.Thread.run(Thread.java:619)
I think that this is an error of Zone.

Is it possible to create a big Zone in all world, if the player dead in a point where there isn't the zone, he will be teleporter in the big city ? (for example Giran)

Thank :)
Forum rules: Please do not use or alter the official L2J Avatars/Signatures/Names for your personal use.
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Re: [Info] Zone

Post by Probe »

can't see what the error is without seeing the code, in what script did the error appear?
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [Info] Zone

Post by janiii »

the exception comes from this place:

Code: Select all

// Get the nearest town// TODO: Micht: Maybe we should add some checks to prevent exception here.coord = [b]TownManager.getClosestTown(activeChar)[/b].getSpawnLoc();
the null value comes from:

Code: Select all

    public final static L2TownZone getTown(int townId)    {    	for (L2ZoneType temp : ZoneManager.getInstance().getAllZones())    	{        	if (temp instanceof L2TownZone && ((L2TownZone) temp).getTownId() == townId)        		return (L2TownZone) temp;    	}        [b]return null;[/b]    }
there are no town zones defined for the town ids: 18, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Mage
Posts: 277
Joined: Fri Apr 17, 2009 2:29 pm

Re: [Info] Zone

Post by Mage »

Oh yes :)

in return null; is it possible set a teleport? for exmple:

Code: Select all

    public final static L2TownZone getTown(int townId)    {    	for (L2ZoneType temp : ZoneManager.getInstance().getAllZones())    	{        	if (temp instanceof L2TownZone && ((L2TownZone) temp).getTownId() == townId)        		return (L2TownZone) temp;    	}[color=#FF0000][b]player.teleToLocation(X, Y, Z);[/b][/color]        [b]return null;[/b]    }
How can i import "player"?

Very Thank Janii
Forum rules: Please do not use or alter the official L2J Avatars/Signatures/Names for your personal use.
Mage
Posts: 277
Joined: Fri Apr 17, 2009 2:29 pm

Re: [Info] Zone

Post by Mage »

Janii i tried, can this work?

Code: Select all

    public final static L2TownZone getTown(int townId)    {    	for (L2ZoneType temp : ZoneManager.getInstance().getAllZones())     	{    	if (temp instanceof L2TownZone && ((L2TownZone) temp).getTownId() == townId)    	return (L2TownZone) temp;    	}   [color=#FF0000]    [b]	return getTown(11);[/b][/color]    }
I change "return null;" with "return getTown(11);"

Now if there isn't "zone" the player will be teleport in giran town? True? (with to village)
Forum rules: Please do not use or alter the official L2J Avatars/Signatures/Names for your personal use.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [Info] Zone

Post by janiii »

Mage wrote:Now if there isn't "zone" the player will be teleport in giran town? True? (with to village)
yeah, that should work :)
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
Mage
Posts: 277
Joined: Fri Apr 17, 2009 2:29 pm

Re: [Info] Zone

Post by Mage »

janiii wrote:
Mage wrote:Now if there isn't "zone" the player will be teleport in giran town? True? (with to village)
yeah, that should work :)
Perfect, but does the error in GS appear? or nothing?
Forum rules: Please do not use or alter the official L2J Avatars/Signatures/Names for your personal use.
Post Reply