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>
Code: Select all
INSERT INTO `zone_vertices` (`id`,`order`,`x`,`y`) VALUES (ID,0,-82188,-220370),(ID,1,-81598,-219786),
on this part:
Code: Select all
_pointsWithKarmas = new int[21][3];
Code: Select all
//Town Name _pointsWithKarmas[36][0] = -82188; _pointsWithKarmas[36][1] = -220370; _pointsWithKarmas[36][2] = -7903;
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

Code: Select all
case 36: nearestTown = "Town Name"; break;
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);//??
Code: Select all
case 35: return getTown(36);//??