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

    • @Darafamboos let him know that this is already shared
    • Selling for 35 us umodel that opens any ukx , utx and static meshes from samurai updat 542 protocol . Leave me a pm if needed. 
    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • NEW HIDDENSTASH KEY SYSTEM INTRODUCED TO THE SITE   **Earn While You Spend - Introducing HS Cashback!**   Every purchase on our site now rewards you with **HS Keys cashback**   EVERY ONE WHO REGISTERS IN SITE UNTILL 15TH OF MAY GETS 2000 HS KEYS IN HES BALANE   Here's how it works:       **1 USD = 1000 HS Keys**   **Get 3% cashback** on every purchase   **Use your HS Keys to **save on your next order**   ---   ### ⚡ Why this is awesome   * Every order gives you value back   * Stack it with promos & HS usage   * Turn your spending into future discounts   ---   ### Example   Spend **$10** → Get **300 HS Keys** back   Spend **$50** → Get **1500 HS Keys** back   ---   ### Smart system (built for fairness)   * Cashback is rounded to keep things balanced   * Prevents abuse from tiny orders   * Rewards real buyers   ---   ### Start earning now   Every purchase = progress toward your next discount   Shop now and build your HS balance!   #cashback #gamingdeals #d2r #rewards #loyalty   Stay safe out there, heroes - and happy hunting! www.d2rhiddenstash.com     We just launched our new Affiliate Program — and it’s the easiest way to earn HS Keys.   Invite your friends using your personal link.   Example: If your friend spends $10 → you get 300 HS Keys No limits. No effort. Just share your link.   Get your referral link here: www.d2rhiddenstash.com/profile     Start earning today
    • It’s time for something new to rise. In a world filled with short-lived projects and empty promises, Emerge was created with a different vision — a vision built on experience, precision, and long-term commitment. This is not just another server launch. This is the beginning of something that is meant to last. 🌑 Eclipse x10 – A New Beginning Eclipse x10 is designed for players who seek more than just fast progression. It is built for those who value competition, balance, and a real Lineage II experience. From the very first day, every system has been carefully adjusted to provide a smooth and fair journey — where both solo players and clans can thrive. No shortcuts. No chaos. Only a structured and competitive world. ⚔️ What Awaits You • A balanced mid-rate environment (x10 core progression) • Stable and optimized gameplay • Fair systems with focus on long-term play • Competitive PvP and rewarding PvE • Active and dedicated administration • A project built with vision, not temporary hype 📊 Server Rates Basic: EXP/SP: x10 Adena: x5 Drop: x5 Spoil: x5 Secondary: Quests: x1 Seal Stones: x5 Life Stone Drop: x1 Enchant Scroll Drop: x1 Bosses: Raid Boss EXP/SP: x1 Raid Boss Drop: x1 Epic Boss EXP/SP: x1 Epic Boss Drop: x1 Enchant: Safe: +3 Max: +16 📅 Launch Information Grand Opening: 5 June 2026 The countdown has already begun. Clans are forming. Strategies are being prepared. The question is — will you be ready? 🔗 Join the Community Every strong server begins with a strong community. Be part of it from the very start. 💬 Discord: https://discord.gg/l2emerge 🌐 Website: https://www.l2emerge.com  
  • 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..