L2JMobius
Free Users => General Discussion => Topic started by: shonjkdev on November 05, 2020, 08:12:01 PM
-
Hi guys, how are you?
Could someone help me with this mod?
I can't put it in mobius, since it's different from the other packs: C and I'm sooo new to java :(
Index: config/head/boss.properties
===================================================================
--- config/head/boss.properties (revisão 1118)
+++ config/head/boss.properties (cópia de trabalho)
@@ -9,6 +9,11 @@
# Default: True
PlayersCanHealRb = True
+# This config defines the Raid Boss that leaves you Flag by attacking them.
+# Creditos : Tayran.JavaDev
+# Format : RaidFlagIDs = bossId1,bossId2.bossId3
+RaidFlagIDs = 25001,25002
+
# Return GrandBosses/RaidBosses to spawnpoint
# ATTENTION: if specific boss lock rage is defined, it has
# major priority then this one.
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java (revisão 1118)
@@ -3807,6 +3869,16 @@
public static String RAID_INFO_IDS;
public static FastList<Integer> RAID_INFO_IDS_LIST = new FastList<>();
+
+ public static String RAID_FLAG_IDS;
+ public static List<Integer> RAID_FLAG_LIST = new ArrayList<>();
+
+
// ============================================================
public static void loadBossConfig()
{
@@ -3819,6 +3891,13 @@
bossSettings.load(is);
is.close();
+ RAID_FLAG_IDS = bossSettings.getProperty("RaidFlagIDs", "29020,29019,25517,25523,25524");
+ RAID_FLAG_LIST = new FastList<>();
+ for (final String id : RAID_FLAG_IDS.split(","))
+ {
+ RAID_FLAG_LIST.add(Integer.parseInt(id));
+ }
+
ALT_RAIDS_STATS_BONUS = Boolean.parseBoolean(bossSettings.getProperty("AltRaidsStatsBonus", "True"));
RBLOCKRAGE = Integer.parseInt(bossSettings.getProperty("RBlockRage", "5000"));
Index: head-src/com/l2jfrozen/gameserver/model/L2Character.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/L2Character.java (revisão 1118)
+++ head-src/com/l2jfrozen/gameserver/model/L2Character.java (cópia de trabalho)
@@ -1161,6 +1161,23 @@
return;
}
}
+
+ // Boss Flag MOD by Tayran.JavaDev
+ if (target instanceof L2RaidBossInstance)
+ {
+ if(Config.RAID_FLAG_LIST.contains(((L2RaidBossInstance) target).getNpcId()))
+ {
+ ((L2PcInstance) this).updatePvPStatus();
+ }
+
+ }
+ else if (target instanceof L2GrandBossInstance)
+ {
+ if(Config.RAID_FLAG_LIST.contains(((L2GrandBossInstance) target).getNpcId()))
+ {
+ ((L2PcInstance) this).updatePvPStatus();
+ }
+ }
// GeoData Los Check here (or dz > 1000)
if (!GeoData.getInstance().canSeeTarget(this, target))
@@ -1848,7 +1865,23 @@
{
this.sendPacket(ActionFailed.STATIC_PACKET);
return;
+ }
+
+ // on attack Boss player Flag. MOD by Tayran.JavaDev
+ if (activeChar instanceof L2PcInstance && target instanceof L2RaidBossInstance)
+ {
+ if(Config.RAID_FLAG_LIST.contains(((L2RaidBossInstance) target).getNpcId()))
+ {
+ ((L2PcInstance) activeChar).updatePvPStatus();
+ }
}
+ else if (activeChar instanceof L2PcInstance && target instanceof L2GrandBossInstance)
+ {
+ if(Config.RAID_FLAG_LIST.contains(((L2GrandBossInstance) target).getNpcId()))
+ {
+ ((L2PcInstance) activeChar).updatePvPStatus();
+ }
+ }
if (activeChar instanceof L2PcInstance && target instanceof L2NpcInstance && Config.DISABLE_ATTACK_NPC_TYPE)
{
-
Hey friend, take the test. :)
=======================================================================================
Index: org.l2jmobius.Config;
=======================================================================================
public static List<Integer> RAID_INFO_IDS_LIST = new ArrayList<>();
+ public static String RAID_FLAG_IDS;
+ public static List<Integer> RAID_FLAG_LIST = new ArrayList<>();
public static boolean AUTO_LOOT;
RAID_INFO_IDS_LIST.add(Integer.parseInt(id));
}
+ RAID_FLAG_IDS = bossConfig.getString("RaidFlagIDs", "29020,29019,25517,25523,25524");
+ RAID_FLAG_LIST = new ArrayList<>();
+ for (final String id : RAID_FLAG_IDS.split(","))
+ {
+ RAID_FLAG_LIST.add(Integer.parseInt(id));
+ }
// High Priestess van Halter
=======================================================================================
Index: org.l2jmobius.gameserver.model.actor.Creature;
=======================================================================================
---------- Line 817 ----------
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
+
+ // Boss Flag MOD by Tayran.JavaDev
+ if (target instanceof RaidBossInstance)
+ {
+ if (Config.RAID_FLAG_LIST.contains(((RaidBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) this).updatePvPStatus();
+ }
+
+ }
+ else if (target instanceof GrandBossInstance)
+ {
+ if (Config.RAID_FLAG_LIST.contains(((GrandBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) this).updatePvPStatus();
+ }
+ }
// GeoData Los Check here (or dz > 1000)
if (!GeoEngine.getInstance().canSeeTarget(this, target))
---------- Line 1507 ----------
// Player can't heal rb config
if (!Config.PLAYERS_CAN_HEAL_RB && (creature instanceof PlayerInstance) && !((PlayerInstance) creature).isGM() && ((target instanceof RaidBossInstance) || (target instanceof GrandBossInstance)) && ((skill.getSkillType() == SkillType.HEAL) || (skill.getSkillType() == SkillType.HEAL_PERCENT)))
{
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
+
+ // on attack Boss player Flag. MOD by Tayran.JavaDev
+ if ((creature instanceof PlayerInstance) && (target instanceof RaidBossInstance))
+ {
+ if (Config.RAID_FLAG_LIST.contains(((RaidBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) creature).updatePvPStatus();
+ }
+ }
+ else if ((creature instanceof PlayerInstance) && (target instanceof GrandBossInstance))
+ {
+ if (Config.RAID_FLAG_LIST.contains(((GrandBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) creature).updatePvPStatus();
+ }
+ }
if ((creature instanceof PlayerInstance) && (target instanceof NpcInstance) && Config.DISABLE_ATTACK_NPC_TYPE)
{
final String mob
=======================================================================================
Index: game\config\main\RaidBoss.ini
=======================================================================================
# Default: True
PlayersCanHealRb = True
+# This config defines the Raid Boss that leaves you Flag by attacking them.
+# Creditos : Tayran.JavaDev
+# Format : RaidFlagIDs = bossId1,bossId2.bossId3
+RaidFlagIDs = 25001,25002
# Return GrandBosses/RaidBosses to spawnpoint
# ATTENTION: if specific boss lock rage is defined, it has
-
is it possible to also add that it takes the id of common monsters?
-
Modify junin00's code and just add the checks for MonsterInstance:
=======================================================================================
Index: org.l2jmobius.Config;
=======================================================================================
public static List<Integer> RAID_INFO_IDS_LIST = new ArrayList<>();
+ public static String RAID_FLAG_IDS;
+ public static List<Integer> RAID_FLAG_LIST = new ArrayList<>();
public static boolean AUTO_LOOT;
RAID_INFO_IDS_LIST.add(Integer.parseInt(id));
}
+ RAID_FLAG_IDS = bossConfig.getString("RaidFlagIDs", "29020,29019,25517,25523,25524");
+ RAID_FLAG_LIST = new ArrayList<>();
+ for (final String id : RAID_FLAG_IDS.split(","))
+ {
+ RAID_FLAG_LIST.add(Integer.parseInt(id));
+ }
// High Priestess van Halter
=======================================================================================
Index: org.l2jmobius.gameserver.model.actor.Creature;
=======================================================================================
---------- Line 817 ----------
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
+
+ // Boss Flag MOD by Tayran.JavaDev
+ if (target instanceof RaidBossInstance)
+ {
+ if (Config.RAID_FLAG_LIST.contains(((RaidBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) this).updatePvPStatus();
+ }
+
+ }
+ else if (target instanceof GrandBossInstance)
+ {
+ if (Config.RAID_FLAG_LIST.contains(((GrandBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) this).updatePvPStatus();
+ }
+ }
+ else if (target instanceof MonsterInstance)
+ {
+ if (Config.RAID_FLAG_LIST.contains(((MonsterInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) this).updatePvPStatus();
+ }
+ }
// GeoData Los Check here (or dz > 1000)
if (!GeoEngine.getInstance().canSeeTarget(this, target))
---------- Line 1507 ----------
// Player can't heal rb config
if (!Config.PLAYERS_CAN_HEAL_RB && (creature instanceof PlayerInstance) && !((PlayerInstance) creature).isGM() && ((target instanceof RaidBossInstance) || (target instanceof GrandBossInstance)) && ((skill.getSkillType() == SkillType.HEAL) || (skill.getSkillType() == SkillType.HEAL_PERCENT)))
{
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
+
+ // on attack Boss player Flag. MOD by Tayran.JavaDev
+ if ((creature instanceof PlayerInstance) && (target instanceof RaidBossInstance))
+ {
+ if (Config.RAID_FLAG_LIST.contains(((RaidBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) creature).updatePvPStatus();
+ }
+ }
+ else if ((creature instanceof PlayerInstance) && (target instanceof GrandBossInstance))
+ {
+ if (Config.RAID_FLAG_LIST.contains(((GrandBossInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) creature).updatePvPStatus();
+ }
+ }
+ else if ((creature instanceof PlayerInstance) && (target instanceof MonsterInstance))
+ {
+ if (Config.RAID_FLAG_LIST.contains(((MonsterInstance) target).getNpcId()))
+ {
+ ((PlayerInstance) creature).updatePvPStatus();
+ }
+ }
if ((creature instanceof PlayerInstance) && (target instanceof NpcInstance) && Config.DISABLE_ATTACK_NPC_TYPE)
{
final String mob
=======================================================================================
Index: game\config\main\RaidBoss.ini
=======================================================================================
# Default: True
PlayersCanHealRb = True
+# This config defines the Raid Boss that leaves you Flag by attacking them.
+# Creditos : Tayran.JavaDev
+# Format : RaidFlagIDs = bossId1,bossId2.bossId3
+RaidFlagIDs = 25001,25002
# Return GrandBosses/RaidBosses to spawnpoint
# ATTENTION: if specific boss lock rage is defined, it has