Jump to content
  • 0

Grand Boss Infos For Acis And Normal Raid Bosses


Question

Posted

How i can put in the npc normal raid bosses ?

 

This is the topic and npc who is im using. -> http://www.maxcheaters.com/topic/169025-grand-boss-infos-for-acis/

 

I tried to change normal raid bosses to grand bosses but i have problem with respawn. They have 0sec respawn. Then i need to change grand bosses to raid bosses but i need to change something in the code.Anyone can help me with something?

10 answers to this question

Recommended Posts

  • 0
Posted


/*

* This program is free software: you can redistribute it and/or modify it under

* the terms of the GNU General Public License as published by the Free Software

* Foundation, either version 3 of the License, or (at your option) any later

* version.

*

* This program is distributed in the hope that it will be useful, but WITHOUT

* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more

* details.

*

* You should have received a copy of the GNU General Public License along with

* this program. If not, see <http://www.gnu.org/licenses/>.

*/

package custom.BossRespawn;

 

 

import net.sf.l2j.gameserver.datatables.NpcTable;

import net.sf.l2j.gameserver.instancemanager.GrandBossManager;

import net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager;

import net.sf.l2j.gameserver.model.actor.L2Npc;

import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;

import net.sf.l2j.gameserver.model.quest.Quest;

import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

import net.sf.l2j.gameserver.templates.StatsSet;

 

public class BossRespawn extends Quest

{

private static final int NPC_ID = 50022;

private static final int[] BOSSES = {25325, 29006, 29014, 29019, 29020, 29022, 29028, 29045};

 

public BossRespawn(int questid, String name, String descr)

{

super(questid, name, descr);

addFirstTalkId(NPC_ID);

}

 

@Override

public String onFirstTalk(L2Npc npc, L2PcInstance pc)

{

if(npc == null || pc == null)

return null;

 

if(npc.getNpcId() == NPC_ID)

{

sendInfo(pc);

}

return null;

}

 

private static void sendInfo(L2PcInstance activeChar)

{

StringBuilder tb = new StringBuilder();

tb.append("<html><head><title>Lineage II Addicted - Bosses Spectate</title></head><body>");

tb.append("<center><img src=\"l2ui_ch3.herotower_deco\" width=256 height=32>");

tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");

tb.append("<table bgcolor=000000 width=300 height=40>");

tb.append("<tr>");

tb.append("<td width=\"300\" align=\"center\"><font color=\"666666\">Welcome " + activeChar.getName() +" in Lineage II</font><font color=\"FF9900\"> -Addicted-</font></td>");

tb.append("</tr>");

tb.append("</table>");

tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");

tb.append("<br>");

tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");

tb.append("</center>");

tb.append("<center>");

tb.append("<table bgcolor=000000 width=300 height=12>");

tb.append("<tr>");

tb.append("<td width=\"300\" align=\"center\"><font color=\"FF0000\">{Bosses Spectate}</font></td>");

tb.append("</tr>");

tb.append("<tr>");

tb.append("<td width=\"300\" align=\"center\"><font color=\"666666\">Online bosses status</font></td>");

tb.append("</tr>");

tb.append("</table>");

tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");

tb.append("<br>");

tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");

tb.append("<table border=0 bgcolor=000000 width=300 height=30>");

 

for(int boss : BOSSES)

{

String name = "";

NpcTemplate template = null;

if((template = NpcTable.getInstance().getTemplate(boss)) != null){

name = template.getName();

}else{

_log.warning("[RaidInfoHandler][sendInfo] Raid Boss with ID "+boss+" is not defined into NpcTable");

continue;

}

 

StatsSet actual_boss_stat = null;

GrandBossManager.getInstance().getStatsSet(boss);

long delay = 0;

 

if(NpcTable.getInstance().getTemplate(boss).isType("L2RaidBoss")){

actual_boss_stat=RaidBossSpawnManager.getInstance().getStatsSet(boss);

if(actual_boss_stat!=null)

delay = actual_boss_stat.getLong("respawn_time");

}else if(NpcTable.getInstance().getTemplate(boss).isType("L2GrandBoss")){

actual_boss_stat=GrandBossManager.getInstance().getStatsSet(boss);

if(actual_boss_stat!=null)

delay = actual_boss_stat.getLong("respawn_time");

}else

continue;

 

if (delay <= System.currentTimeMillis())

{

tb.append("<tr><td width=\"300\" align=\"center\"><font color=\"FF9900\">" + name + " is</font>" + "<font color=\"5EA82E\"> Alive</font></td></tr>");

}

else

{

int hours = (int) ((delay - System.currentTimeMillis()) / 1000 / 60 / 60);

int mins = (int) (((delay - (hours * 60 * 60 * 1000)) - System.currentTimeMillis()) / 1000 / 60);

tb.append("<tr><td width=\"300\" align=\"center\"><font color=\"FF9900\">" + name + " is respawning in</font>" +"<font color=\"FF0000\"> " + hours + "h and " + mins + "min</font></td></tr>");

}

}

 

tb.append("</table>");

tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");

tb.append("</center>");

tb.append("<br>");

tb.append("<center>");

tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");

tb.append("<table border=0 bgcolor=000000 width=300 height=20>");

tb.append("<tr>");

tb.append("<td align=\"center\" width=\"300\"><font color=\"666666\">Vote for us :</font><font color=\"FF5555\"> www.l2addicted.eu</font></td>");

tb.append("</tr>");

tb.append("</table>");

tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");

tb.append("</center>");

tb.append("</body></html>");

 

 

NpcHtmlMessage msg = new NpcHtmlMessage(NPC_ID);

msg.setHtml(tb.toString());

 

activeChar.sendPacket(msg);

 

}

 

public static void main(String[] args)

{

new BossRespawn(-1, "BossRespawn", "custom");

}

}

  • 0
Posted
/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package custom.BossRespawn;


import net.sf.l2j.gameserver.datatables.NpcTable;
import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
import net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager;
import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
import net.sf.l2j.gameserver.model.quest.Quest;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
import net.sf.l2j.gameserver.templates.StatsSet;

public class BossRespawn extends Quest
{
	private static final int NPC_ID = 50022;
	private static final int[] BOSSES = {25325, 29006, 29014, 29019, 29020, 29022, 29028, 29045};

	public BossRespawn(int questid, String name, String descr)
	{
		super(questid, name, descr);
		addFirstTalkId(NPC_ID);
	}
	
	@Override
	public String onFirstTalk(L2Npc npc, L2PcInstance pc)
	{
		if(npc == null || pc == null)
			return null;

		if(npc.getNpcId() == NPC_ID)
		{
			sendInfo(pc);
		}
			return null;
	}

	private static void sendInfo(L2PcInstance activeChar)
	{
		StringBuilder tb = new StringBuilder();
		tb.append("<html><head><title>Lineage II Addicted - Bosses Spectate</title></head><body>");
		tb.append("<center><img src=\"l2ui_ch3.herotower_deco\" width=256 height=32>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<table bgcolor=000000 width=300 height=40>");
		tb.append("<tr>");
		tb.append("<td width=\"300\" align=\"center\"><font color=\"666666\">Welcome " + activeChar.getName() +" in Lineage II</font><font color=\"FF9900\"> -Addicted-</font></td>");
		tb.append("</tr>");
		tb.append("</table>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<br>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("</center>");
		tb.append("<center>");
		tb.append("<table bgcolor=000000 width=300 height=12>");
		tb.append("<tr>");
		tb.append("<td width=\"300\" align=\"center\"><font color=\"FF0000\">{Bosses Spectate}</font></td>");
		tb.append("</tr>");
		tb.append("<tr>");
		tb.append("<td width=\"300\" align=\"center\"><font color=\"666666\">Online bosses status</font></td>");
		tb.append("</tr>");
		tb.append("</table>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<br>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<table border=0 bgcolor=000000 width=300 height=30>");

		for(int boss : BOSSES)
		{
			String name = "";
			NpcTemplate template = null;
			if((template = NpcTable.getInstance().getTemplate(boss)) != null){
				name = template.getName();
			}else{
				_log.warning("[RaidInfoHandler][sendInfo] Raid Boss with ID "+boss+" is not defined into NpcTable");
				continue;
			}
			 
			StatsSet actual_boss_stat = null;
			GrandBossManager.getInstance().getStatsSet(boss);
			long delay = 0;
			
			if(NpcTable.getInstance().getTemplate(boss).isType("L2RaidBoss")){
				actual_boss_stat=RaidBossSpawnManager.getInstance().getStatsSet(boss);
				if(actual_boss_stat!=null)
					delay = actual_boss_stat.getLong("respawn_time");
			}else if(NpcTable.getInstance().getTemplate(boss).isType("L2GrandBoss")){
				actual_boss_stat=GrandBossManager.getInstance().getStatsSet(boss);
				if(actual_boss_stat!=null)
					delay = actual_boss_stat.getLong("respawn_time");
			}else
				continue;
			
			if (delay <= System.currentTimeMillis())
			{
				tb.append("<tr><td width=\"300\" align=\"center\"><font color=\"FF9900\">" + name + " is</font>" + "<font color=\"5EA82E\"> Alive</font></td></tr>");
			}
			else
			{
				int hours = (int) ((delay - System.currentTimeMillis()) / 1000 / 60 / 60);
				int mins = (int) (((delay - (hours * 60 * 60 * 1000)) - System.currentTimeMillis()) / 1000 / 60);
				tb.append("<tr><td width=\"300\" align=\"center\"><font color=\"FF9900\">" + name + " is respawning in</font>" +"<font color=\"FF0000\"> " + hours + "h and " + mins + "min</font></td></tr>");
			}
		}

		tb.append("</table>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("</center>");
		tb.append("<br>");
		tb.append("<center>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<table border=0 bgcolor=000000 width=300 height=20>");
		tb.append("<tr>");
		tb.append("<td align=\"center\" width=\"300\"><font color=\"666666\">Vote for us :</font><font color=\"FF5555\"> www.l2addicted.eu</font></td>");
		tb.append("</tr>");
		tb.append("</table>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("</center>");
		tb.append("</body></html>");
		
		
		NpcHtmlMessage msg = new NpcHtmlMessage(NPC_ID);
		msg.setHtml(tb.toString());
		
		activeChar.sendPacket(msg);
		
	}

	public static void main(String[] args)
	{
		new BossRespawn(-1, "BossRespawn", "custom");
	}
}

That is good code but i have problem , actual_boss_stat=RaidBossSpawnManager.getInstance().getStatsSet(boss); 

getstatsset... This method is wrong , do you know something for it?

  • 0
Posted

That is good code but i have problem , actual_boss_stat=RaidBossSpawnManager.getInstance().getStatsSet(boss); 

getstatsset... This method is wrong , do you know something for it?

hmm try to add these on RaidBossSpawnManager

	public StatsSet getStatsSet(int bossId)
	{
		return _storedInfo.get(bossId);
	}
	
	public L2RaidBossInstance getBoss(int bossId)
	{
		return _bosses.get(bossId);
	}
  • 0
Posted (edited)

 

hmm try to add these on RaidBossSpawnManager

	public StatsSet getStatsSet(int bossId)
	{
		return _storedInfo.get(bossId);
	}
	
	public L2RaidBossInstance getBoss(int bossId)
	{
		return _bosses.get(bossId);
	}

StatsSet : Long value required , but found: null for key: respawn_time.

Edited by rlfem123
  • 0
Posted (edited)

?

I edited my post read it again. 

StatsSet : Long value required , but found: null for key: respawn_time.

Edited by rlfem123
  • 0
Posted

I edited my post read it again. 

StatsSet : Long value required , but found: null for key: respawn_time.

for a reason i changed the respawn_time when i gave it to u but in mine i got it like this.

/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package custom.BossRespawn;


import net.sf.l2j.gameserver.datatables.NpcTable;
import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
import net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager;
import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
import net.sf.l2j.gameserver.model.quest.Quest;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
import net.sf.l2j.gameserver.templates.StatsSet;

public class BossRespawn extends Quest
{
	private static final int NPC_ID = 50022;
	private static final int[] BOSSES = {25325, 29006, 29014, 29019, 29020, 29022, 29028, 29045};

	public BossRespawn(int questid, String name, String descr)
	{
		super(questid, name, descr);
		addFirstTalkId(NPC_ID);
	}
	
	@Override
	public String onFirstTalk(L2Npc npc, L2PcInstance pc)
	{
		if(npc == null || pc == null)
			return null;

		if(npc.getNpcId() == NPC_ID)
		{
			sendInfo(pc);
		}
			return null;
	}

	private static void sendInfo(L2PcInstance activeChar)
	{
		StringBuilder tb = new StringBuilder();
		tb.append("<html><head><title>Lineage II Addicted - Bosses Spectate</title></head><body>");
		tb.append("<center><img src=\"l2ui_ch3.herotower_deco\" width=256 height=32>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<table bgcolor=000000 width=300 height=40>");
		tb.append("<tr>");
		tb.append("<td width=\"300\" align=\"center\"><font color=\"666666\">Welcome " + activeChar.getName() +" in Lineage II</font><font color=\"FF9900\"> -Addicted-</font></td>");
		tb.append("</tr>");
		tb.append("</table>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<br>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("</center>");
		tb.append("<center>");
		tb.append("<table bgcolor=000000 width=300 height=12>");
		tb.append("<tr>");
		tb.append("<td width=\"300\" align=\"center\"><font color=\"FF0000\">{Bosses Spectate}</font></td>");
		tb.append("</tr>");
		tb.append("<tr>");
		tb.append("<td width=\"300\" align=\"center\"><font color=\"666666\">Online bosses status</font></td>");
		tb.append("</tr>");
		tb.append("</table>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<br>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<table border=0 bgcolor=000000 width=300 height=30>");

		for(int boss : BOSSES)
		{
			String name = "";
			NpcTemplate template = null;
			if((template = NpcTable.getInstance().getTemplate(boss)) != null){
				name = template.getName();
			}else{
				_log.warning("[RaidInfoHandler][sendInfo] Raid Boss with ID "+boss+" is not defined into NpcTable");
				continue;
			}
			 
			StatsSet actual_boss_stat = null;
			GrandBossManager.getInstance().getStatsSet(boss);
			long delay = 0;
			
			if(NpcTable.getInstance().getTemplate(boss).isType("L2RaidBoss")){
				actual_boss_stat=RaidBossSpawnManager.getInstance().getStatsSet(boss);
				if(actual_boss_stat!=null)
					delay = actual_boss_stat.getLong("respawnTime");
			}else if(NpcTable.getInstance().getTemplate(boss).isType("L2GrandBoss")){
				actual_boss_stat=GrandBossManager.getInstance().getStatsSet(boss);
				if(actual_boss_stat!=null)
					delay = actual_boss_stat.getLong("respawn_time");
			}else
				continue;
			
			if (delay <= System.currentTimeMillis())
			{
				tb.append("<tr><td width=\"300\" align=\"center\"><font color=\"FF9900\">" + name + " is</font>" + "<font color=\"5EA82E\"> Alive</font></td></tr>");
			}
			else
			{
				int hours = (int) ((delay - System.currentTimeMillis()) / 1000 / 60 / 60);
				int mins = (int) (((delay - (hours * 60 * 60 * 1000)) - System.currentTimeMillis()) / 1000 / 60);
				tb.append("<tr><td width=\"300\" align=\"center\"><font color=\"FF9900\">" + name + " is respawning in</font>" +"<font color=\"FF0000\"> " + hours + "h and " + mins + "min</font></td></tr>");
			}
		}

		tb.append("</table>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("</center>");
		tb.append("<br>");
		tb.append("<center>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("<table border=0 bgcolor=000000 width=300 height=20>");
		tb.append("<tr>");
		tb.append("<td align=\"center\" width=\"300\"><font color=\"666666\">Vote for us :</font><font color=\"FF5555\"> www.l2addicted.eu</font></td>");
		tb.append("</tr>");
		tb.append("</table>");
		tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
		tb.append("</center>");
		tb.append("</body></html>");
		
		
		NpcHtmlMessage msg = new NpcHtmlMessage(NPC_ID);
		msg.setHtml(tb.toString());
		
		activeChar.sendPacket(msg);
		
	}

	public static void main(String[] args)
	{
		new BossRespawn(-1, "BossRespawn", "custom");
	}
}

try this one

Guest
This topic is now closed to further replies.


  • Posts

    • aCis (“another Crappy interlude server”) is a commercial project I would not use even if paid. l2jfrozen yes, a 10 year old, effectively dead project produces more reliable results and at least works. l2jhellas also works. aCis might as well be renamed KPMIS (“Keep Paying My Interlude Server”): endless fixes, freemium, and no realistic path to true L2OFF parity, but its recommended like hell. lucera is even better the downside is you just need to dive into code and no sources   lets leave it at that
    • Download Here: https://sitehunterus.blogspot.com/2025/12/exelo-combo-tool-v2.html VirusTotal https://www.virustotal.com/gui/file/2acd067847ee092c7986f55c9f77620d89505d1c0bda34a0ee8f55b9c2905c11?nocache=1 Visit my Blogger list to download 100% free software https://www.freetoolss.com/ https://blackhat8.blogspot.com/ https://hack-crack9.blogspot.com/ https://hackernoons.blogspot.com/ https://sharetools99.blogspot.com/
    • Care to detail why ?   L2JHellas probably got the same issue, it's inherent to L2J if you don't rework Player intentions (and solving it with a Config < 500 attack is stupid, if it works for attack it works for other types of desires), also last time I checked L2JHellas he was using my changesets to fix its own stuff (which is ok, copy-paste my knownlist system which is 10y old is fine, but don't say it will act different since it's literally the same sub-system).   About Lucera code source isn't available so it's easy to say it's better, internally you got no clue what is happening and RU forks got the "feeling" to get everything, but everything is half done, everytime I put an eye on such sources (whatever based on l2ru, they only know how to copy-paste each other).   In the other hand, you seem to use aCis since years (I think I see your name since a decade, and you still use it since you made this topic :   Be a little more appreciative about the work done, it's not only mine but my community aswell, and if you find something, consider to report rather than getting such an idiotic behavior.   I understand you're not forced to share any type of fixes, and than people tend to feel superior when they fix something than aCis didn't yet fix. The thing is, for each bug you found, I found and fixed 10x more than you.   409 is way beyond 382 in all possible ways, if you believe the versus good for you, but don't make ppl believe it's the case, because it's not. There's at least 400+ fixed issues (and that's counting 10 issues by revision, which is kinda low) and entire new systems (spawns, SCHs, pathfind, whole AI implemented, Desire system,...).
    • better than using 409... Search for L2jHellas or Lucera and you won't have any headaches.
  • 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