Make a custom real town (solved)

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
Bariudol
Posts: 10
Joined: Mon Apr 20, 2009 5:26 pm
Location: Argentina

Make a custom real town (solved)

Post by Bariudol »

L2J Revision Number: 3023
L2JDP Revision Number: 6087

This was posted on Datapack support, but i edited the post and reposted it here that is the corresponding place. As the title of the post says i want to know how to make a custom town but i dont want it to be only a peace zone but a real town, wen players die arround it get teleported there. I know i have to change some things in the core.
I founded the .java files that i think i should modify for making this possible, the problem is that i just don't get how does the mapregiontable works. Cause i see 17 regions on mapregiontable but i don't know what sec0 , sec1, etc; are. Could someone please post a litle example of a custom town? or explain me how to do it right? I'm thinking on doing it like this:

On Zone.xml

Code: Select all

    <zone id='ID' type='Town' shape='Cuboid' minZ='-7905' maxZ='-8000'>        <stat name='name' val='Town Name'/>        <stat name='townId' val='36'/>        <stat name='taxById' val='1'/>        <stat name='spawnX' val='-82188'/>        <stat name='spawnY' val='-220370'/>        <stat name='spawnZ' val='-7903'/>    </zone>
On zone_vertices Table on database

Code: Select all

INSERT INTO `zone_vertices` (`id`,`order`,`x`,`y`) VALUES (ID,0,-82188,-220370),(ID,1,-81598,-219786),
On MapRegionTable.java
on this part:

Code: Select all

_pointsWithKarmas = new int[21][3];
(21 = Castles? Areas?)

Code: Select all

        //Town Name        _pointsWithKarmas[36][0] = -82188;        _pointsWithKarmas[36][1] = -220370;        _pointsWithKarmas[36][2] = -7903;
on this part: get area castle
I think if i don't add a "case" for my custom town it will get like Aden castle area right?

Code: Select all

    case 36:        castle = 9;        break; //Town
The same with this i think :roll:

Code: Select all

    case 36:        nearestTown = "Town Name";        break;
On TownManager.java
Don't know how to modify this i think if i don't change something here it will send mi to floran as default :S
Get Near town

Code: Select all

case 36:                return getTown(36);//??
Get Second near town

Code: Select all

 case 35:                return getTown(36);//??
could someone help me with this? am i in the right way? what should i change? Please someone explain me how does mapregiontable works in the database. Thanks.
Last edited by Bariudol on Fri May 22, 2009 6:32 pm, edited 1 time in total.
Bariudol
Posts: 10
Joined: Mon Apr 20, 2009 5:26 pm
Location: Argentina

Re: Make a custom real town

Post by Bariudol »

Finally i founded out how to do it, thanks for reading my post. I'll post a guide of how to make a custom town soon when i finish with my owns.
Polo
Posts: 117
Joined: Tue Oct 11, 2005 1:41 pm
Contact:

Re: Make a custom real town (solved)

Post by Polo »

nice. If you create a guide post it into the wiki :D I think it would help others
User avatar
plim
Posts: 226
Joined: Mon Sep 01, 2008 3:39 pm
Location: Catalunya, Barcelona

Re: Make a custom real town (solved)

Post by plim »

Hi! Could you please post the info about how to set up this custom town? I'm very interested. Thanks :mrgreen:
Image
Post Reply