Jump to content

Recommended Posts

Posted

Well, I decided to share this little guide, cause I see many people that have problem with their buffers.

The most common is 'You don't meet the criteria...', with this guide you can fix that.

Anyway let's start :

 

As an example, I took a random L2jfree buffer. We are gonna 'adapt' it for our pack, I chose L2Emu.

First, we open the __init__.py of our buffer , which is usually located here, in the folder 9999_NPCBuffer.

 

...\gameserver\data\scripts\custom\9999_NPCBuffer

 

 

We open the init, and we see the first lines. These are the imports, which the buffer uses, so it can be loaded by the gameserver.

 

import sys
from com.l2jfree.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from com.l2jfree.gameserver.datatables import SkillTable
from com.l2jfree			       import L2DatabaseFactory
from com.l2jfree.gameserver.model.quest import State
from com.l2jfree.gameserver.model.quest import QuestState
from com.l2jfree.gameserver.model.quest.jython import QuestJython as JQuest

 

 

We want to make them compatible with L2Emu. (or w/e pack you use)

Now, we open our pack, and we go in this path :

 

...\gameserver\data\scripts\custom

 

There we find these default quests (8003_Search,6050_KetraOrcSupport)

I chose them cause they have all the imports that we are gonna need.

Open their __init__.py , see at the top of the file the emu imports :

 

8003_Search

import sys

from com.l2emu.gameserver.model.quest   import State

from com.l2emu.gameserver.model.quest   import QuestState  

from com.l2emu.gameserver.datatables   import NpcTable

from com.l2emu.gameserver.templates.chars   import L2NpcTemplate

from com.l2emu.gameserver.model.actor.instance   import L2PcInstance

from com.l2emu.gameserver.datatables         import SpawnTable

from com.l2emu.gameserver.datatables   import ItemTable

from com.l2emu.gameserver.network.serverpackets   import RadarControl

from com.l2emu                   import L2DatabaseFactory

from com.l2emu.gameserver.model.quest.jython   import QuestJython as JQuest

 

from java.util                           import Iterator

from com.l2emu                                 import Config

 

 

6050_KetraOrcSupport

import sys

from com.l2emu.gameserver.model.quest import State

from com.l2emu.gameserver.model.quest import QuestState

from com.l2emu.gameserver.model.quest.jython import QuestJython as JQuest

from com.l2emu.gameserver.datatables import SkillTable

from com.l2emu.gameserver.network.serverpackets import WareHouseWithdrawalList

from com.l2emu.gameserver.network.serverpackets import ActionFailed

 

I highlighted the needed imports.

 

 

Ok, now we go at our L2jfree buffer __init__.py, we open it , and then we replace the l2jfree imports, with our emu.

(in this case <> means replacing the 1st one with the 2nd one. :P)

 

 

import sys 
from com.l2jfree.gameserver.model.actor.instance import L2PcInstance <> from com.l2emu.gameserver.model.actor.instance      import L2PcInstance
from java.util import Iterator 
from com.l2jfree.gameserver.datatables import SkillTable <> from com.l2emu.gameserver.datatables import SkillTable 
from com.l2jfree import L2DatabaseFactory <> from com.l2emu import L2DatabaseFactory 
from com.l2jfree.gameserver.model.quest import State <> from com.l2emu.gameserver.model.quest import State 
from com.l2jfree.gameserver.model.quest import QuestState <> from com.l2emu.gameserver.model.quest import QuestState
from com.l2jfree.gameserver.model.quest.jython import QuestJython as JQuest <> from com.l2emu.gameserver.model.quest.jython import QuestJython as JQuest 

 

 

Our buffer imports should look now like this one :

 

 

import sys 
from com.l2emu.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator 
from com.l2emu.gameserver.datatables import SkillTable 
from com.l2emu import L2DatabaseFactory 
from com.l2emu.gameserver.model.quest import State 
from com.l2emu.gameserver.model.quest import QuestState
from com.l2emu.gameserver.model.quest.jython import QuestJython as JQuest

 

 

You are done! Now your buffer is compatible with the pack/project that you use.Simple , wasn't it? ;)

Hope I helped, cause it took me some time to write down these info.

 

p.s : Well, in some cases you can just replace the l2jfree with the l2emu word, but on the other hand, in some projects these imports are quite different. So, with this way you can be sure that you didn't make any mistakes.

p.s (2) : Something I noticed , some emu packs don't support this line, so if you wanna use a buffer in emu, you should remove it. Otherwise, you will be getting an error in your buffer.

 

st.getPlayer().restoreHPMP()

 

  • 10 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Hello,iv got fafurion running localy just for fun and seems that files dont have geodata couse i can hit through walls so are mobs.Anyone can tell me how to activate geodata or where to insert geodata files?
    • L2Extend_Server_by_Guytis_Rev_201.rar Trojan:Script/Sabsik.FLA!ml   LOL
    • Good luck with your g/o 😃
    • You're talking complete nonsense. The source code of SphereAPI, which handles all requests, is closed and has never been published anywhere.     That return $this doesn't affect anything, PHP just ignores it. Why are you showing it?     Yes, of course I want that, and I’m asking you — go ahead and hack it, I’d even be thankful. The most you can probably do is launch a DDoS attack, but that’s not hacking. The IP you see is just a public one, used by default to handle requests. There are many other IPs involved, which aren’t disclosed for privacy reasons. So, when should I expect your hacker attack? If you fail, it means you talked big for nothing. I hope you're not all talk and can actually back up your words. UPD: To make your task easier, I have disabled limits on incorrect and failed requests, so your site/IP won't get blocked.
    • Lineage2Dex Interlude+ x50 Server launches TODAY!       The wait is over – the Lineage2Dex Interlude+ x50 Server launches TODAY! Grand Opening - April 26 at 19:00 (UTC+3) Over 10,000 registered accounts are ready to dive in! Beta with massive activity over, thx all who participate on it! It's time to begin your real Jorney! 👉 Read full roadmap 👉 Full server description 👉 Download and registration The server will be split into 3 stages, each featuring multiple content episodes. Stage 1: April 26 – May 18 Welcome to the Classic Interlude Phase. This stage is built with minimal custom content, focused on delivering that pure Interlude experience. It’s perfect for both new players unfamiliar with our project and veterans who enjoy a traditional start. Expect a smooth and nostalgic journey with familiar mechanics. Stage 2: May 19 – June 22 Time to expand the world! As most Interlude content gets completed, we gradually introduce new elements. Hellbound will open first, followed by weekly content updates. Midway through this stage, the Isle of Prayer will become available — a new zone featuring Dynasty Gear and fresh challenges. Stage 3: From June 23 Welcome to full content access! Some location become to High-level location, offering great reward! Once this phase concludes, a full merge with Union server will take place — and yes, all your characters and items will carry over safely. We wish everyone a smooth start, fair play, and tons of fun on the new x50 server! See you in-game!
  • Topics

×
×
  • Create New...