Jump to content

Recommended Posts

Posted

Hello MxC Community, i decided to share something that Eminence was using for the Jail System.

 

More info:.

When somebody goes to the Jail Zone, he gains one Skill ( of your choice ), is really really simple.

 

So Lets Start:

 

Open the L2JailZone.java file wich is located right here: [glow=red,2,300]java/net/sf/l2j/gameserver/model/zone/type/L2JailZone.java[/glow]

And add the lines ( when somebody ENTER'S the Jail Zone )

+			character.startAbnormalEffect(0x2000);
+			if (character.getKnownSkill(Your Skill ID) == null)
+			{
+							character.addSkill(SkillTable.getInstance().getInfo(Your Skill ID, 1));
+			}

 

And add the lines after ( remove this skill when he LEFTS the Jail zone )

+			character.stopAbnormalEffect((short) 0x2000);
+			if (character.getKnownSkill(Your Skill ID) != null)
+			{
+							character.removeSkill(SkillTable.getInstance().getInfo(Your Skill ID, 1));
+			}

 

And do not forget to add the imports: ( In the same file )

 

+import net.sf.l2j.gameserver.datatables.SkillTable;

 

 

And here is the diff file to add it easier :P:

Index: /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/model/zone/type/L2JailZone.java
===================================================================
--- /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/model/zone/type/L2JailZone.java (revision 28)
+++ /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/model/zone/type/L2JailZone.java (revision 183)
@@ -18,5 +18,4 @@
package net.sf.l2j.gameserver.model.zone.type;

+import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.model.L2Character;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
@@ -44,9 +43,4 @@
			character.setInsideZone(L2Character.ZONE_JAIL, true);
			character.setInsideZone(L2Character.ZONE_PVP, true);
+			character.startAbnormalEffect(0x2000);
+			if (character.getKnownSkill(Your skill id) == null)
+			{
+							character.addSkill(SkillTable.getInstance().getInfo(Your skill id, 1));
+			}
			((L2PcInstance)character).sendPacket(new SystemMessage(SystemMessageId.ENTERED_COMBAT_ZONE));
		}
@@ -60,9 +54,4 @@
			character.setInsideZone(L2Character.ZONE_JAIL, false);
			character.setInsideZone(L2Character.ZONE_PVP, false);
+			character.stopAbnormalEffect((short) 0x2000);
+			if (character.getKnownSkill(Your skill id) != null)
+			{
+							character.removeSkill(SkillTable.getInstance().getInfo(Your skill id, 1));
+			}
			((L2PcInstance)character).sendPacket(new SystemMessage(SystemMessageId.LEFT_COMBAT_ZONE));
		}

 

This code is not only for Jail Zone, you can add it on any zone you would like is just an example. Hope you like it.

 

  • 3 weeks later...
  • 1 year later...

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

    • First of all i don't use this account to do anything other than just reported that someone scammed me few bucks 3 days ago.  Second, who says i did scam, my name is ahead many topics because i had the most clients in the forum. Afcourse i had bad deals since 2017.    Also do i even know you? PM me if you have some issue do not write in public as if you are some savior or want maxcheaters owneship. 
    • 🔥 Lin2Web CMS Version 2.0 : New Engine! 🔥                 A fully rebuilt, fast and modern CMS for Lineage 2 servers. ✅ Player panel: game accounts, warehouse, send items to game, HWID/IP protection, unstuck ✅ Donate: 20+ payment systems (PayPal, Stripe, CoinPayments, CryptoCloud, FreeKassa and more) ✅ Services: name/gender change, karma clear, premium, item & skin transfer, starter packs ✅ Bonuses: promo codes, referrals, vote rewards, season, clan leader and streamer rewards ✅ Statistics: PvP/PK, clans, heroes, olympiad, castles, raid & epic bosses ✅ Live map with online players ✅ Events calendar, news, guides, FAQ ✅ Support ticket system ✅ UTM tracking for ads ✅ Full admin panel ✅ Multi-language, multi-server, custom themes   Site cms: Lin2Web.com   🖥 Supported Servers: L2J: Lucera2, L2J-Scripts, aCis, L2J-Eternity, L2JMobius, L2JFrozen, L2JSunrise, L2JHellas, PWSoft, Fandc, L2J Orion, and others PTS: Vanganth, Depmax64 (AdvExt), MyExt64   Telegram Discord
    • 🔥 Fresh batch ready! Buy 2, Get 1 Free deal is live on our shop. Instant delivery 24/7.
    • Dont try trash topic malaka 🙂
    • cmon! just don't trust anyone and work alone! do what you need with mxc and developers here. o OAED erxete gia tous "developers" ean to epiases
  • 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..