Jump to content
  • 0

[Help Me]Faction can attack each other


Question

Posted

Hey guys, I created Faction Type Server and now i have one problem in my server (Light Vs Dark) Dark can kill Dark and Light Can Kill Light

Here is Screen Shot : shot00012fa.th.jpg

Thank you guys for help and sory for my bad eanglish

6 answers to this question

Recommended Posts

  • 0
Posted

I suppose you use KvN system which deeply sucks.

 

You have to change your PvP formula on L2PcInstance first, cause even if you are of the same faction you can kill. The only thing is you haven't adenas/pvp from the kill. So mod it properly.

 

After it depends of your chronicle, but as you want to block all, I suggest to add a condition in RequestActionUse (network.clientpackets).

 

You can mod too autoattackable on L2PcInstance and L2skill.

 

Refers to laikeriz faction system, which is the best faction engine shared through MXC. You can try to find fdlp one as well, even if it's more primitic.

 

About the violet thing, remove the setpvpflag call (or something near) in L2PcInstance if you want keep your name color. Violet is stupid, imagine with 50 others ppls if they all become violet lol.

  • 0
Posted

Index: C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/L2Character.java
===================================================================
--- C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/L2Character.java	(revision 3338)
+++ C:/workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/L2Character.java	(working copy)
@@ -759,6 +759,18 @@
		        	return;
		        }
	        }
+			if (((L2PcInstance) this).isffaction() && ((L2PcInstance) target).isffaction() && Config.FACTION_SYSTEM_ENABLE)
+			{
+			    ((L2PcInstance) this).sendMessage("Cant attack a player from your faction");
+			    sendPacket(ActionFailed.STATIC_PACKET);
+			    return;
+			}
+			if (((L2PcInstance) this).issfaction() && ((L2PcInstance) target).issfaction() && Config.FACTION_SYSTEM_ENABLE)
+			{
+			    ((L2PcInstance) this).sendMessage("Cant attack a player from your faction");
+			    sendPacket(ActionFailed.STATIC_PACKET);
+			    return;
+			}
			// Checking if target has moved to peace zone
			if (target.isInsidePeaceZone((L2PcInstance)this))
			{

 

Try this code :)

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

    • Both are in-game bots. I'm looking for an out-of-game bot ((one that doesn’t require the L2 client).     Hmm, never heard about this bot. Will check, thank you
    • 🎉 L2Mid is back! After a 3-year pause, we’re launching a new Interlude server based on the original Interlude client (old school 😉).   What to expect • The classic Interlude spirit • Old friends, rival clans, and returning legends • A season focused on pure nostalgia   This may be our final Interlude server. (maybe 😉) 🗓️ Opening: December 5, 2025 at 20:00 (GMT+2)   https://l2mid.com
    • Hello, i was wondering if there's a guide on how to add the enchanting armor glow system from  Ertheia or Lindvior to hi5?
    • I imported this file using Unreal Engine 2 Runtime, modified it, saved it back, and then placed it on the client. When I run the game and wear this back accessory, the client crashes!     2025.10.28 03:52:59 OS : Windows XP 5.1 (Build: 2600) CPU : GenuineIntel  Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz @ 3697 MHz 1023MB RAM Video : NVIDIA GeForce GT 730 (3064) PosCode : TS4(273) -119:-62:-1474 4/1 [0] SkeletalMesh MFighter_Fuckl2jangel.MFighter_Fuckl2jangel: Serial size mismatch: Got 383399, Expected 383403 History: LoadObject <- (SkeletalMesh MFighter_Fuckl2jangel.MFighter_Fuckl2jangel 8376427==8376427/8376498 7993028 383403) <- ULinkerLoad::Preload <- PreLoadObjects <- UObject::EndLoad <- UObject::StaticLoadObject <- (Engine.Mesh MFighter_Fuckl2jangel.MFighter_Fuckl2jangel NULL) <- UMeshComponent::LoadMeshComponent <- UMeshContainer::UpdateMeshComponents <- APawn::UpdateMeshComponents <- User::UpdatePawnMeshContainerByItem <- User::UpdatePawnMeshContainer <- User::SetPawnResource <- NCPawnView_InvenItemWnd::OnRButtonDown <- NCVirtualWndMain::SetFocusingWindow <- NCVirtualWndMain::DispatchWndMsg <- NConsoleWnd::DispatchWndMsg <- NConsoleWnd::MasterConsoleEventProcess <- UEngine::InputEvent <- UWindowsViewport::CauseInputEvent <- UWindowsViewport::UpdateInput <- UViewport::ReadInput <- APlayerController::Tick <- ALineagePlayerController::Tick <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- UMasterLevel::Tick <- TickLevel <- UGameEngine::Tick <- UpdateWorld <- MainLoop   I don't know what the reason is. Can you help me?
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock