Jump to content

Recommended Posts

Posted

Hello there, this is the latest feature I coded for my open source project and it will be implemented, soon after some additions. This system, which is really close to the instance system in the newer chronicles, allows to spawn npc at different dimensions and travel there. This allows you to host multiple events at the same place at the same time, host multiple farm/pvp areas at the same place at the same time, and much more. Players and mobs cannot see another players and another mobs who exist at a different dimension.I am going to do some more modifications before I commit it. Here, you can leach an early version of it.

 

 

Here, you can find the diff patch for l2jpes and the modified .sql:

http://pastebin.com/TxGmtJUn

http://www.4shared.com/document/gobiNCor/spawnlist.html?

 

For those who are going to test this on a live server and they already have spawnlist installed, run this at your mysql command line:

alter table `spawnlist` add column `dimensionid` int(3) NOT NULL DEFAULT '1' ; 

 

It is pretty similar with http://maxcheaters.com/forum/index.php?topic=279639.0.

 

Regards.

Posted

To spawn ingame a monster to a specific dimension just go to the dimension and use //spawn normally.

 

To spawn a monster in the coding part just set the selected dimension id to the l2spawn object.

Posted

+       private static void changeDimension(L2PlayerInstance player, int dimensionId) {
+               player.setDimensionId(dimensionId);
+              
+               for (L2Object object:L2World.getInstance().getAllVisibleObjects().values()) {
+                       if (object.getDimensionId() == player.getDimensionId()) {
+                               if (!player.getKnownList().knowsObject(object) && player.getKnownList().getDistanceToWatchObject(object) < 1800)
+                                       player.getKnownList().addKnownObject(object);
+                              
+                               if (!object.getKnownList().knowsObject(player) && object.getKnownList().getDistanceToWatchObject(player) < 1800)
+                                       object.getKnownList().addKnownObject(player);
+                       }else{
+                               if (player.getKnownList().knowsObject(object))
+                                       player.getKnownList().removeKnownObject(object);
+                              
+                               if (object.getKnownList().knowsObject(player))
+                                       object.getKnownList().removeKnownObject(player);
+                       }      
+               }

 

or just:

 

 

at L2Character:

@Override
public void setInstanceId(int i)
{
	super.setInstanceId(i);
	teleToLocation(getX(), getY(), getZ(), 1);
}

 

Your code is bugged, too bad of you...

 

where are the skill checks, TARGET_PARTY etc, they need instanceId check too.

 

btw check the Action.java clientpacket, it will be buggy if you dont add:

	if (obj.getInstanceId() != activeChar.getInstanceId())
	{
		activeChar.sendPacket(ActionFailed.STATIC_PACKET);
		return;
	}

 

to avoid some bugs, like Itention.FOLLOW from an object of different instance...

 

Just add the checks you miss many

Posted

+       private static void changeDimension(L2PlayerInstance player, int dimensionId) {
+               player.setDimensionId(dimensionId);
+              
+               for (L2Object object:L2World.getInstance().getAllVisibleObjects().values()) {
+                       if (object.getDimensionId() == player.getDimensionId()) {
+                               if (!player.getKnownList().knowsObject(object) && player.getKnownList().getDistanceToWatchObject(object) < 1800)
+                                       player.getKnownList().addKnownObject(object);
+                              
+                               if (!object.getKnownList().knowsObject(player) && object.getKnownList().getDistanceToWatchObject(player) < 1800)
+                                       object.getKnownList().addKnownObject(player);
+                       }else{
+                               if (player.getKnownList().knowsObject(object))
+                                       player.getKnownList().removeKnownObject(object);
+                              
+                               if (object.getKnownList().knowsObject(player))
+                                       object.getKnownList().removeKnownObject(player);
+                       }      
+               }

 

or just:

 

 

at L2Character:

@Override
public void setInstanceId(int i)
{
	super.setInstanceId(i);
	teleToLocation(getX(), getY(), getZ(), 1);
}

 

lol what?

 

Instance system is not implemented in interlude by default, where did you find setInstance?

 

About the other checks you are right, anyway it is an early version, that's why I haven't implement it yet.

Posted

setInstance = setDimension just the name changes, when I made this about some months ago I named it instance cause it was instance, so thats why you see instance, but does it really matter ? its the same thing, you update the KnowList manually (the dump way) and I did it with teleport which is the ideal for the specific work

Posted

setInstance = setDimension just the name changes, when I made this about some months ago I named it instance cause it was instance, so thats why you see instance, but does it really matter ? its the same thing, you update the KnowList manually (the dump way) and I did it with teleport which is the ideal for the specific work

 

In your code you use setinstance to change the player's instance, and then you reteleported him to the same position. Good, but how you tell the code that hey he has different instance id from the others, let's remove him from their knownlists.

 

In your code, teletolocation may need modification or else the instance id won't matter.

Posted

In your code you use setinstance to change the player's instance, and then you reteleported him to the same position. Good, but how you tell the code that hey he has different instance id from the others, let's remove him from their knownlists.

 

In your code, teletolocation may need modification or else the instance id won't matter.

 

teleport not only revalidates, it updates KnowList too, lol. And since you re-update the instance there is where the check comes

 

updateKnowList()

if (obj1.dimensionId != obj2.dimensionId)

        continue;

 

this runs during the teleport KnowList update

Posted

teleport not only revalidates, it updates KnowList too, lol

It does but in the terms of distance, visibility, etc not by instance id. You have to add the specific criteria by yourself to make it edit the knownlist by the instance id, too.

 

Who cares by the end, of the day, I am already working on the checks and a window to manage the dimensions.

Posted

So, the second version is out.

  • Added missing checks. (ty xdem for mentioning)
  • Added a window where you can manage* the dimensions.
  • Added config to set max available dimensions.

 

*You can only check how many object each dimension includes.

 

Some checks are propably still missing, I will have one more look before commiting it.

Posted

Update to Freya/h5?

Lol... instances already exist in freya/h5... try reading...

 

This system, which is really close to the instance system in the newer chronicles,

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • ## SuperPoint Editor   SuperPoint Editor is a practical visual editor for Lineage II PTS 'SuperPoint.bin' files. It is built for people who need to inspect, fix, rebuild, and draw server routes without digging through binary data by hand.   ### What You Can Do   - Open and edit 'SuperPoint.bin' files. - Export BIN data into a readable TXT format. - Save edited data back into a valid BIN file. - Validate routes before saving. - Work with SuperPoint routes, points, directed connections, and path records in tables. - Add, duplicate, delete, and reorder points. - Create direct and reverse connections between route points. - Automatically generate connections between neighboring points. - Edit raw point coordinates: 'X', 'Y', 'Z', 'Index', and 'Delay'. - Keep route names and internal route data organized. - Use either English or Ukrainian interface language.   ### C4 Server Support   Some C4 servers have 'SuperPoint.bin', but do not have 'superpointinfo.txt' in scripts. The editor supports this case directly. When 'superpointinfo.txt' is not found near the BIN file, the editor can open the BIN in C4 mode. In this mode, 'Fstring ID' is disabled because that value belongs to 'superpointinfo.txt', not to the BIN itself. The editor will not generate or modify 'superpointinfo.txt' while working in this mode. This keeps C4 data clean and avoids creating script files that the server does not actually use.   ### superpointinfo.txt Support   For chronicles that do use 'superpointinfo.txt', the editor can load and synchronize it together with the BIN data. When saving, the editor updates route nodes and coordinates while preserving existing metadata such as: - 'npc_name' - 'move_type' - 'fstring_index' - 'social_number' - 'delay' New nodes are generated with safe default values, so existing script metadata is not accidentally wiped.   ### Geodata Tools   The editor can also open converted geodata '.dat' files and display them as a map. This makes route editing much more visual. You can: - Load geodata and inspect the terrain by layer. - Zoom and pan around the map. - Create a new SuperPoint directly from a map cell. - Draw a route by clicking on the geodata. - Drag existing points to new positions. - Automatically snap 'X/Y' to the selected geo cell. - Use the selected geodata layer to fill the point 'Z'. - See all routes on the map or focus only on the selected one. This is especially useful when building new NPC movement paths or correcting bad route coordinates.   ### Connections and Paths   SuperPoint connections are directional. A connection from point '3' to point '2' is not the same as a connection from point '2' to point '3'. The editor makes this explicit by separating: - route points, - directed connections, - and the actual path records used by each connection. For simple cases, it can create direct path records automatically. For more complex movement, you can edit the path points manually. ### Built for Safe Editing The editor includes validation before saving, so common structural problems can be caught before a broken BIN is produced. It also verifies rebuilt BIN files through the converter engine. The goal is simple: edit quickly, but do not silently damage server data.   ### Unknown Field   This small 'Unknown' field is part of the original BIN structure. Most official-looking files keep it as '0', and for regular route editing there is usually no reason to change it. The editor exposes it so nothing from the BIN is hidden or lost. If you do not know exactly what your server uses it for, keep it at '0'. Download
    • NpcGrp não salva no interlúdio e da crítico quando coloca ele no cliente, já testei ele antes.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..