Jump to content

Question

Posted

Good evening, Mr. I am creating a raid boss lock rage (so that the players can not hide the boss), which causes the boss to walk a certain distance back to the respawn retail .. however it is not working properly, I did based on the frozen retail .. could anyone tell me what I still lack?

 

Code: 

Config.java

 

RBLOCKRAGECUSTOM = Integer.parseInt(bossSettings.getProperty("RBlockRageCustom", "5000"));

 
if (RBLOCKRAGECUSTOM > 0 && RBLOCKRAGECUSTOM < 10)
{
LOGGER.info("ATTENTION: RBlockRage, if enabled (>0), must be >=10");
LOGGER.info(" -- RBlockRage setted to 100 by default");
RBLOCKRAGECUSTOM = 10;
}
 
RBS_SPECIFIC_LOCK_RAGECUSTOM = new HashMap<>();
 
final String RBS_SPECIFIC_LOCK_RAGECUSTOM_String = bossSettings.getProperty("RaidBossesSpecificLockRageCustom", "");
 
if (!RBS_SPECIFIC_LOCK_RAGECUSTOM_String.equals(""))
{
 
final String[] locked_bosses = RBS_SPECIFIC_LOCK_RAGECUSTOM_String.split(";");
 
for (final String actual_boss_rage : locked_bosses)
{
final String[] boss_ragecustom = actual_boss_rage.split(",");
 
int specific_ragecustom = Integer.parseInt(boss_ragecustom[1]);
 
if (specific_ragecustom > 0 && specific_ragecustom < 10)
{
LOGGER.info("ATTENTION: RaidBossesSpecificLockRage Value for boss " + boss_ragecustom[0] + ", if enabled (>0), must be >=100");
LOGGER.info(" -- RaidBossesSpecificLockRage Value for boss " + boss_ragecustom[0] + " setted to 100 by default");
specific_ragecustom = 10;
}
 
RBS_SPECIFIC_LOCK_RAGECUSTOM.put(Integer.parseInt(boss_ragecustom[0]), specific_ragecustom);
}
 
}

 
L2GrandBossInstance:
Code:
 

       int rb_lock_rangecustom = Config.RBLOCKRAGECUSTOM;
       if (Config.RBS_SPECIFIC_LOCK_RAGECUSTOM.get(Integer.valueOf(bossSpawn.getNpcid())) != null) {
         rb_lock_rangecustom = Config.RBS_SPECIFIC_LOCK_RAGECUSTOM.get(Integer.valueOf(bossSpawn.getNpcid())).intValue();
       }
       if ((rb_lock_rangecustom >= 10) && (!L2GrandBossInstance.this.isInsideRadius(bossSpawn.getLocx(), bossSpawn.getLocy(), bossSpawn.getLocz(), rb_lock_rangecustom, true, false))) {
         L2GrandBossInstance.this.teleToLocation(bossSpawn.getLocx(), bossSpawn.getLocy(), bossSpawn.getLocz(), true);
       }

 

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.


×
×
  • Create New...