Hi, im working in this faction mod, and adapted a TvT event from the forum, now its working fine.
The only problem is that faction attack restriction interferes with TVT Event, so when 2 players from same faction are in tvt , they cannot attack each other,
found this in l2character:
if (this instanceof L2PcInstance)
{
L2PcInstance player = (L2PcInstance) this;
L2PcInstance trgtF = null;
boolean cond = true;
if (!player.isInSiege() && !player.isInOlympiadMode() && !player.isInsideZone(ZONE_PVP)) {
if (target instanceof L2PcInstance)
trgtF = (L2PcInstance) target;
else if (target instanceof L2SummonInstance)
trgtF = ((L2SummonInstance)target).getOwner();
else if (target instanceof L2PetInstance)
trgtF = ((L2PetInstance)target).getOwner();
if (trgtF != null && trgtF != player)
{
if (trgtF.getFactionId() == player.getFactionId() && player.getFactionId() > 0)
cond = false;
else if (trgtF.getFactionId() == 0 || player.getFactionId() == 0)
cond = false;
}
if (!cond)
return;
}
and this in l2pcinstance:
if (skill.isPvpSkill()) // pvp skill
{
// CHECK IF OKAY
if (!isInSiege() && !isInOlympiadMode()) {
if (getFactionId() != target.getActingPlayer().getFactionId() && !isInsidePeaceZone(this, target))
return true;
}
// in clan war player can attack whites even with sleep etc.
if (getClan() != null && ((L2PcInstance)target).getClan() != null)
{
if(getClan().isAtWarWith(((L2PcInstance)target).getClan().getClanId()))
return true;
}
}
else if ((skilldat != null && !skilldat.isCtrlPressed() && skill.isOffensive() && !srcIsSummon)
|| (skilldatpet != null && !skilldatpet.isCtrlPressed() && skill.isOffensive() && srcIsSummon))
{
if (!isInSiege() && !isInOlympiadMode()) {
if (getFactionId() != target.getActingPlayer().getFactionId() && !isInsidePeaceZone(this, target))
return true;
}
// in clan war player can attack whites even with sleep etc.
if (getClan() != null && ((L2PcInstance)target).getClan() != null)
{
if (getClan().isAtWarWith(((L2PcInstance)target).getClan().getClanId()))
return true;
}
i tried adding "if (!isInSiege() && !isInOlympiadMode() && !isInFunEvent) { but it does not work.
🌍 Server Name: L2 LORENA x30
🕰️ Opening Date: November 14, 2025 – 19:00 UTC+2
🎮 Chronicle: Interlude (Retail-like experience)
⚖️ Rates: x30 (MID PVP, long-term server NO-WIPE)
🌐 Website: https://l2-lorena.com/
💬 Discord: https://discord.gg/URz974tPW
---
🔥 INTRODUCTION
L2 LORENA brings back the true Interlude experience – no Pay2Win, no overpowered gear.
A clean, balanced, and international Lineage II world with a long-term vision.
If you're tired of servers dying in 2 weeks, this is for you.
---
⚔️ MAIN FEATURES (check the website for Full Description)
✔️ True Interlude gameplay + trash server Interface
✔️ International community
✔️ Smart anti-bot protection
✔️ Balanced class PvP
✔️ Working Olympiad & Clan Wars
✔️ Manual farm, auto farm to.
✔️ Offline shop, party EXP bonus
✔️ SellBuss System
✔️ Dressme System
---
🏆 DISCORD INVITE CONTEST (LIVE NOW)
Want to help build the server and get rewarded?
🥇 1st: 30 COL
🥈 2nd: 20 COL
🥉 3rd: 10 COL
Use `/invites` in our Discord to get your personal link!
---
⚔️ Top PvP Player → 50 COL(Month)
👑 Best Performing Clan → 100 COL (to clan leader) Month
All based on in-game performance and community activity.
---
📅 LAUNCH INFO
- Grand Opening: **14 November, 19:00 UTC+2**
- Website: https://l2-lorena.com/
- Discord: https://discord.gg/URz974tPW
Join the movement. No Pay2Win. No nonsense. Just Nostalgia.
See you on the battlefield.
Hello everyone, this is ADENA L2REBORN / LU4 / MASTERWORK
We also have items, epics, etc.
discord - adver745645
Our prices are reasonable, so have a nice shopping and a nice day.
Question
Kotegaeshi92
Hi, im working in this faction mod, and adapted a TvT event from the forum, now its working fine.
The only problem is that faction attack restriction interferes with TVT Event, so when 2 players from same faction are in tvt , they cannot attack each other,
found this in l2character:
if (this instanceof L2PcInstance) { L2PcInstance player = (L2PcInstance) this; L2PcInstance trgtF = null; boolean cond = true; if (!player.isInSiege() && !player.isInOlympiadMode() && !player.isInsideZone(ZONE_PVP)) { if (target instanceof L2PcInstance) trgtF = (L2PcInstance) target; else if (target instanceof L2SummonInstance) trgtF = ((L2SummonInstance)target).getOwner(); else if (target instanceof L2PetInstance) trgtF = ((L2PetInstance)target).getOwner(); if (trgtF != null && trgtF != player) { if (trgtF.getFactionId() == player.getFactionId() && player.getFactionId() > 0) cond = false; else if (trgtF.getFactionId() == 0 || player.getFactionId() == 0) cond = false; } if (!cond) return; }and this in l2pcinstance:
if (skill.isPvpSkill()) // pvp skill { // CHECK IF OKAY if (!isInSiege() && !isInOlympiadMode()) { if (getFactionId() != target.getActingPlayer().getFactionId() && !isInsidePeaceZone(this, target)) return true; } // in clan war player can attack whites even with sleep etc. if (getClan() != null && ((L2PcInstance)target).getClan() != null) { if(getClan().isAtWarWith(((L2PcInstance)target).getClan().getClanId())) return true; } } else if ((skilldat != null && !skilldat.isCtrlPressed() && skill.isOffensive() && !srcIsSummon) || (skilldatpet != null && !skilldatpet.isCtrlPressed() && skill.isOffensive() && srcIsSummon)) { if (!isInSiege() && !isInOlympiadMode()) { if (getFactionId() != target.getActingPlayer().getFactionId() && !isInsidePeaceZone(this, target)) return true; } // in clan war player can attack whites even with sleep etc. if (getClan() != null && ((L2PcInstance)target).getClan() != null) { if (getClan().isAtWarWith(((L2PcInstance)target).getClan().getClanId())) return true; }i tried adding "if (!isInSiege() && !isInOlympiadMode() && !isInFunEvent) { but it does not work.
Any idea or suggestion ? it will be appreciated
Edited by Kotegaeshi920 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now