Jump to content
  • 0

Raid Manager


Question

Posted (edited)

when i spawn 93000 raid info Raid Manager

it says

i will show all epic bosses info's you need 

When i press on the Button -> Epics Info's <-

nothing happens nothing shows up. nothing pops up.

any fixes ?

 

 

 

L2Jfrozen pack

Edited by ozan

11 answers to this question

Recommended Posts

  • 0
Posted

probably something wrong with html's bypasses

 

any gs console error occured?

 

No Errors

 

 

NPC ID must be between: 1 - 65535.

 

i did not create this npc its official from frozen so but i will try ur idea 

  • 0
Posted

No Errors

 

 

 

i did not create this npc its official from frozen so but i will try ur idea 

Well then post the instance of the npc so we can see what's wrong. (model/actor/instance, there should be a java file name smth like L2RaidInfoManagerInstance)

  • 0
Posted (edited)
 

Well then post the instance of the npc so we can see what's wrong. (model/actor/instance, there should be a java file name smth like L2RaidInfoManagerInstance)

 

 

 

L2GrandBossInstance.java

 

 

/*
 * L2jFrozen Project - www.l2jfrozen.com 
 * 
 * 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 com.l2jfrozen.gameserver.model.actor.instance;
 
import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.managers.GrandBossManager;
import com.l2jfrozen.gameserver.managers.RaidBossPointsManager;
import com.l2jfrozen.gameserver.model.L2Character;
import com.l2jfrozen.gameserver.model.L2Summon;
import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
import com.l2jfrozen.gameserver.network.SystemMessageId;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
import com.l2jfrozen.util.random.Rnd;
 
/**
 * This class manages all Grand Bosses.
 * @version $Revision: 1.0.0.0 $ $Date: 2006/06/16 $
 */
public final class L2GrandBossInstance extends L2MonsterInstance
{
private static final int BOSS_MAINTENANCE_INTERVAL = 20000;
 
/**
* Constructor for L2GrandBossInstance. This represent all grandbosses.
* @param objectId ID of the instance
* @param template L2NpcTemplate of the instance
*/
public L2GrandBossInstance(final int objectId, final L2NpcTemplate template)
{
super(objectId, template);
}
 
@Override
protected int getMaintenanceInterval()
{
return BOSS_MAINTENANCE_INTERVAL;
}
 
@Override
public boolean doDie(final L2Character killer)
{
if (!super.doDie(killer))
return false;
 
L2PcInstance player = null;
 
if (killer instanceof L2PcInstance)
player = (L2PcInstance) killer;
else if (killer instanceof L2Summon)
player = ((L2Summon) killer).getOwner();
 
if (player != null)
{
SystemMessage msg = new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL);
broadcastPacket(msg);
msg = null;
if (player.getParty() != null)
{
for (final L2PcInstance member : player.getParty().getPartyMembers())
{
RaidBossPointsManager.addPoints(member, getNpcId(), (getLevel() / 2) + Rnd.get(-5, 5));
}
}
else
RaidBossPointsManager.addPoints(player, getNpcId(), (getLevel() / 2) + Rnd.get(-5, 5));
}
return true;
}
 
@Override
public void onSpawn()
{
super.onSpawn();
if (!this.getSpawn().is_customBossInstance())
GrandBossManager.getInstance().addBoss(this);
}
 
@Override
protected void manageMinions()
{
_minionList.spawnMinions();
_minionMaintainTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable()
{
@Override
public void run()
{
// Teleport raid boss home if it's too far from home location
final L2Spawn bossSpawn = getSpawn();
 
int rb_lock_range = Config.RBLOCKRAGE;
if (Config.RBS_SPECIFIC_LOCK_RAGE.get(bossSpawn.getNpcid()) != null)
{
rb_lock_range = Config.RBS_SPECIFIC_LOCK_RAGE.get(bossSpawn.getNpcid());
}
 
if (rb_lock_range >= 100 && !isInsideRadius(bossSpawn.getLocx(), bossSpawn.getLocy(), bossSpawn.getLocz(), rb_lock_range, true, false))
{
teleToLocation(bossSpawn.getLocx(), bossSpawn.getLocy(), bossSpawn.getLocz(), true);
// healFull(); // Prevents minor exploiting with it
}
 
_minionList.maintainMinions();
}
}, 60000, getMaintenanceInterval());
}
 
@Override
public boolean isRaid()
{
return true;
}
 
public void healFull()
{
super.setCurrentHp(super.getMaxHp());
super.setCurrentMp(super.getMaxMp());
}
}
Edited by SweeTs
  • 0
Posted (edited)

 

 
 

 

 

L2GrandBossInstance.java

/*
 * L2jFrozen Project - www.l2jfrozen.com 
 * 
 * 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 com.l2jfrozen.gameserver.model.actor.instance;
 
import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.managers.GrandBossManager;
import com.l2jfrozen.gameserver.managers.RaidBossPointsManager;
import com.l2jfrozen.gameserver.model.L2Character;
import com.l2jfrozen.gameserver.model.L2Summon;
import com.l2jfrozen.gameserver.model.spawn.L2Spawn;
import com.l2jfrozen.gameserver.network.SystemMessageId;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
import com.l2jfrozen.util.random.Rnd;
 
/**
 * This class manages all Grand Bosses.
 * @version $Revision: 1.0.0.0 $ $Date: 2006/06/16 $
 */
public final class L2GrandBossInstance extends L2MonsterInstance
{
private static final int BOSS_MAINTENANCE_INTERVAL = 20000;
 
/**
* Constructor for L2GrandBossInstance. This represent all grandbosses.
* @param objectId ID of the instance
* @param template L2NpcTemplate of the instance
*/
public L2GrandBossInstance(final int objectId, final L2NpcTemplate template)
{
super(objectId, template);
}
 
@Override
protected int getMaintenanceInterval()
{
return BOSS_MAINTENANCE_INTERVAL;
}
 
@Override
public boolean doDie(final L2Character killer)
{
if (!super.doDie(killer))
return false;
 
L2PcInstance player = null;
 
if (killer instanceof L2PcInstance)
player = (L2PcInstance) killer;
else if (killer instanceof L2Summon)
player = ((L2Summon) killer).getOwner();
 
if (player != null)
{
SystemMessage msg = new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL);
broadcastPacket(msg);
msg = null;
if (player.getParty() != null)
{
for (final L2PcInstance member : player.getParty().getPartyMembers())
{
RaidBossPointsManager.addPoints(member, getNpcId(), (getLevel() / 2) + Rnd.get(-5, 5));
}
}
else
RaidBossPointsManager.addPoints(player, getNpcId(), (getLevel() / 2) + Rnd.get(-5, 5));
}
return true;
}
 
@Override
public void onSpawn()
{
super.onSpawn();
if (!this.getSpawn().is_customBossInstance())
GrandBossManager.getInstance().addBoss(this);
}
 
@Override
protected void manageMinions()
{
_minionList.spawnMinions();
_minionMaintainTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable()
{
@Override
public void run()
{
// Teleport raid boss home if it's too far from home location
final L2Spawn bossSpawn = getSpawn();
 
int rb_lock_range = Config.RBLOCKRAGE;
if (Config.RBS_SPECIFIC_LOCK_RAGE.get(bossSpawn.getNpcid()) != null)
{
rb_lock_range = Config.RBS_SPECIFIC_LOCK_RAGE.get(bossSpawn.getNpcid());
}
 
if (rb_lock_range >= 100 && !isInsideRadius(bossSpawn.getLocx(), bossSpawn.getLocy(), bossSpawn.getLocz(), rb_lock_range, true, false))
{
teleToLocation(bossSpawn.getLocx(), bossSpawn.getLocy(), bossSpawn.getLocz(), true);
// healFull(); // Prevents minor exploiting with it
}
 
_minionList.maintainMinions();
}
}, 60000, getMaintenanceInterval());
}
 
@Override
public boolean isRaid()
{
return true;
}
 
public void healFull()
{
super.setCurrentHp(super.getMaxHp());
super.setCurrentMp(super.getMaxMp());
}
}

I don't get this, it should extends L2NpcInstance no L2MonsterInstance normaly in the code we could see

@override

public onByPassFeedback    

 

but in this code i dont see anything like this.

Why you just dont google and find 1 grandboss manager? its really easy Npc.. this seem really wrong.. 

 

Well here an example 

public class L2GrandBossManagerInstance extends L2Npc
{
	private static final int[] BOSSES =
	{
		29001, 29006, 29014, 29019, 29020, 29022, 29028, 29045
	};
	
	public L2GrandBossManagerInstance(int objectId, L2NpcTemplate template)
	{
		super(objectId, template);
	}
	
	@Override
	public void onAction(L2PcInstance player)
	{
		if (!canTarget(player)) {
			return;
		}
		
		if (this != player.getTarget())
		{
			player.setTarget(this);
			
			player.sendPacket(new MyTargetSelected(getObjectId(), 0));
			
			player.sendPacket(new ValidateLocation(this));
		}
		else if (!canInteract(player))
		{
			player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
		}
		else
		{
			showHtmlWindow(player);
		}
		
		player.sendPacket(new ActionFailed());
	}
	
	private void showHtmlWindow(L2PcInstance activeChar)
	{
		showRbInfo(activeChar);
		
		activeChar.sendPacket(new ActionFailed());
	}
	
	private final void showRbInfo(L2PcInstance player)
	{
		NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
		TextBuilder tb = new TextBuilder();
		tb.append("<html><title>Chat</title><body><br>");
		tb.append("<br>");
    	tb.append("<font color=0174DF>Grand Boss Info:</font>");
    	tb.append("<center>");
    	tb.append("<img src=L2UI.SquareWhite width=280 height=1><br>");
    	tb.append("</center>");
    	tb.append("<br>");
    	tb.append("<center>");
    	tb.append("<table width = 280>");
		for(int boss : BOSSES )
		{
			String name = NpcTable.getInstance().getTemplate(boss).getName();
			long delay = GrandBossManager.getInstance().getStatsSet(boss).getLong("respawn_time");
			if (delay <= System.currentTimeMillis())
			{
				tb.append("<tr>");
				tb.append("<td><font color=\"FA5858\">" + name + "</color>:</td> " + "<td><font color=\"00BFFF\">Is Alive</color></td>"+"<br1>");
				tb.append("</tr>");
			}
			else
			{
				int hours = (int) ((delay - System.currentTimeMillis()) / 1000 / 60 / 60);
				int mins = (int) (((delay - (hours * 60 * 60 * 1000)) - System.currentTimeMillis()) / 1000 / 60);
				int seconts = (int) (((delay - ((hours * 60 * 60 * 1000) + (mins * 60 * 1000))) - System.currentTimeMillis()) / 1000);
				tb.append("<tr>");
				tb.append("<td><font color=\"FA5858\">" + name + "</color></td>" + "<td><font color=\"00BFFF\">" +" " + "Respawn in :</color></td>" + " " + "<td><font color=\"00BFFF\">" + hours + " : " + mins + " : " + seconts + "</color></td><br1>");
				tb.append("</tr>");
			}
		}
		tb.append("</table>");
		tb.append("</center>");
		tb.append("<br><center>");
    	tb.append("<br><img src=L2UI.SquareWhite width=280 height=1><br>");
    	tb.append("<td><button value=\"Back\" action=\"bypass -h npc_%objectId%_Chat_service/services.htm\" width=134 height=21 back=\"L2UI_ch3.BigButton3_over\" fore=\"L2UI_ch3.BigButton3\"></td>");
    	tb.append("</center>");
    	tb.append("</body></html>");
    	html.setHtml(tb.toString());
		html.replace("%objectId%", String.valueOf(getObjectId()));
		player.sendPacket(html);
	}
}

Try this and report. Also you can change the private static final int[] BOSSES =

into an int Array[] configuration and seperate them with ,  so you can add config of what bosses you want

and no need compile every time... 

Edited by AccessDenied
  • 0
Posted

Bcs its frozen, shit code. In your example onAction is useless and like you said, use overriden showChatWindow.

Guest
This topic is now closed to further replies.


×
×
  • Create New...