netoluan Posted July 19, 2015 Posted July 19, 2015 (edited) for aCis,someone has a npc just show if boss is alive or dead? i need not show time for respawn Edited July 19, 2015 by netoluan Quote
0 mpampatsaa Posted July 19, 2015 Posted July 19, 2015 i have aCis pack and i have Boss Info only shows alive or dead for bosses Queen Ant, Core, Orfen, Antharas, Baium, Zaken, Valakas, Frintezza <npc id="5" idTemplate="30951" name="Boss Info" title=""> <set name="level" val="70"/> <set name="radius" val="7"/> <set name="height" val="18"/> <set name="rHand" val="0"/> <set name="lHand" val="0"/> <set name="type" val="L2Npc"/> <set name="exp" val="0"/> <set name="sp" val="0"/> <set name="hp" val="2444.46819"/> <set name="mp" val="1345.8"/> <set name="hpRegen" val="7.5"/> <set name="mpRegen" val="2.7"/> <set name="pAtk" val="688.86373"/> <set name="pDef" val="295.91597"/> <set name="mAtk" val="470.40463"/> <set name="mDef" val="216.53847"/> <set name="crit" val="4"/> <set name="atkSpd" val="253"/> <set name="str" val="40"/> <set name="int" val="21"/> <set name="dex" val="30"/> <set name="wit" val="20"/> <set name="con" val="43"/> <set name="men" val="20"/> <set name="corpseTime" val="7"/> <set name="walkSpd" val="50"/> <set name="runSpd" val="120"/> <set name="dropHerbGroup" val="0"/> <set name="attackRange" val="40"/> <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/> <skills> <skill id="4045" level="1"/> <skill id="4416" level="18"/> </skills> </npc> Quote
0 netoluan Posted July 19, 2015 Author Posted July 19, 2015 i have aCis pack and i have Boss Info only shows alive or dead for bosses Queen Ant, Core, Orfen, Antharas, Baium, Zaken, Valakas, Frintezza <npc id="5" idTemplate="30951" name="Boss Info" title=""> <set name="level" val="70"/> <set name="radius" val="7"/> <set name="height" val="18"/> <set name="rHand" val="0"/> <set name="lHand" val="0"/> <set name="type" val="L2Npc"/> <set name="exp" val="0"/> <set name="sp" val="0"/> <set name="hp" val="2444.46819"/> <set name="mp" val="1345.8"/> <set name="hpRegen" val="7.5"/> <set name="mpRegen" val="2.7"/> <set name="pAtk" val="688.86373"/> <set name="pDef" val="295.91597"/> <set name="mAtk" val="470.40463"/> <set name="mDef" val="216.53847"/> <set name="crit" val="4"/> <set name="atkSpd" val="253"/> <set name="str" val="40"/> <set name="int" val="21"/> <set name="dex" val="30"/> <set name="wit" val="20"/> <set name="con" val="43"/> <set name="men" val="20"/> <set name="corpseTime" val="7"/> <set name="walkSpd" val="50"/> <set name="runSpd" val="120"/> <set name="dropHerbGroup" val="0"/> <set name="attackRange" val="40"/> <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/> <skills> <skill id="4045" level="1"/> <skill id="4416" level="18"/> </skills> </npc> you can tell me the script ? without script i no can do anything :-\ Quote
0 mpampatsaa Posted July 19, 2015 Posted July 19, 2015 gameserver/java/extension.voiceCommands/BossInfo.java package Extensions.VoicedCommands; import net.sf.l2j.Config; import net.sf.l2j.gameserver.datatables.NpcTable; import net.sf.l2j.gameserver.handler.IVoicedCommandHandler; import net.sf.l2j.gameserver.instancemanager.GrandBossManager; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; public class BossInfo implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = { "bossinfo" }; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { StringBuilder tb = new StringBuilder(); NpcHtmlMessage msg = new NpcHtmlMessage(5); tb.append("<html><title>Grand Boss</title><body><br><center>"); tb.append("<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><br>"); for (int boss : Config.GRAND_BOSS_LIST) { String name = NpcTable.getInstance().getTemplate(boss).getName(); long delay = 0; delay = GrandBossManager.getInstance().getStatsSet(boss).getLong("respawn_time"); if (delay <= System.currentTimeMillis()) { tb.append("<font color=\"00C3FF\">" + name + "</color>: " + "<font color=\"9CC300\">Is Alive</color>" + "<br1>"); } 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("<font color=\"00C3FF\">" + name + "</color>" + "<font color=\"FFFFFF\">" + " " + "Respawn in :</color>" + " " + " <font color=\"32C332\">" + hours + " : " + mins + " : " + seconts + "</color><br1>"); } } tb.append("<br><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"); tb.append("</center></body></html>"); msg.setHtml(tb.toString()); activeChar.sendPacket(msg); return true; } @Override public String[] getVoicedCommandList() { return VOICED_COMMANDS; } } Quote
0 T9Text Posted July 19, 2015 Posted July 19, 2015 for aCis, someone has a npc just show if boss is alive or dead? i need not show time for respawn Already Shared on "L2J Share Section" Quote
0 netoluan Posted July 19, 2015 Author Posted July 19, 2015 Already Shared on "L2J Share Section" only have with time for respawn Quote
0 SweeTs Posted July 19, 2015 Posted July 19, 2015 only have with time for respawn Then, remove the part of the code responsible for the timer. Quote
0 netoluan Posted July 19, 2015 Author Posted July 19, 2015 (edited) Then, remove the part of the code responsible for the timer. but how add "dead" when he are dead? here for example http://www.maxcheaters.com/topic/169025-grand-boss-infos-for-acis/ you can give me a direction? Edited July 19, 2015 by netoluan Quote
0 DrenepiaWorld Posted July 19, 2015 Posted July 19, 2015 Do it via announcement dude lel code for raid boss death Index: java/net/sf/l2j/gameserver/model/actor/instance/L2RaidBossInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2RaidBossInstance.java (revision 62) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2RaidBossInstance.java (working copy) @@ -28,6 +28,7 @@ import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.PlaySound; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; +import net.sf.l2j.gameserver.util.Broadcast; import net.sf.l2j.util.Rnd; /** @@ -78,6 +79,11 @@ final L2PcInstance player = killer.getActingPlayer(); if (player != null) { +if (player.getClan() != null) +Broadcast.announceToOnlinePlayers("[Raid Boss]: "+getName() +" Foi morto por " + player.getName()+ " do clan: " + player.getClan().getName()); +else +Broadcast.announceToOnlinePlayers("[Raid Boss]: "+getName() +" Foi morto por " + player.getName()); broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL)); broadcastPacket(new PlaySound("systemmsg_e.1209")); and for spawn go to net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager search for "_log.info("RaidBoss: " + raidboss.getName() + " has spawned.");" and add on next line this code: Broadcast.announceToOnlinePlayers("[Raid Boss]: " + raidboss.getName() + " esta vivo!"); Quote
0 netoluan Posted July 19, 2015 Author Posted July 19, 2015 Do it via announcement dude lel code for raid boss death Index: java/net/sf/l2j/gameserver/model/actor/instance/L2RaidBossInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2RaidBossInstance.java (revision 62) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2RaidBossInstance.java (working copy) @@ -28,6 +28,7 @@ import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.PlaySound; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; +import net.sf.l2j.gameserver.util.Broadcast; import net.sf.l2j.util.Rnd; /** @@ -78,6 +79,11 @@ final L2PcInstance player = killer.getActingPlayer(); if (player != null) { +if (player.getClan() != null) +Broadcast.announceToOnlinePlayers("[Raid Boss]: "+getName() +" Foi morto por " + player.getName()+ " do clan: " + player.getClan().getName()); +else +Broadcast.announceToOnlinePlayers("[Raid Boss]: "+getName() +" Foi morto por " + player.getName()); broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL)); broadcastPacket(new PlaySound("systemmsg_e.1209")); and for spawn go to net.sf.l2j.gameserver.instancemanager.RaidBossSpawnManager search for "_log.info("RaidBoss: " + raidboss.getName() + " has spawned.");" and add on next line this code: Broadcast.announceToOnlinePlayers("[Raid Boss]: " + raidboss.getName() + " esta vivo!"); i need only in npc, info if he are alive or dead, I do not need to announce it is dead or alive, just show in npc, but thanks for try help me Quote
0 T9Text Posted July 19, 2015 Posted July 19, 2015 i need only in npc, info if he are alive or dead, I do not need to announce it is dead or alive, just show in npc, but thanks for try help me Omg.... here.... /* * 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.model.actor.L2Npc; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.quest.Quest; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; public class BossRespawn extends Quest { private static final int NPC_ID = 30951; private static final int[] BOSSES = {29001, 29006, 29014, 29019, 29020, 29022, 29028, 29045}; public BossRespawn(int questid, String name, String descr) { super(questid, name, descr); addFirstTalkId(NPC_ID); } public String onFirstTalk(L2Npc npc, L2PcInstance pc) { if(npc == null || pc == null) return null; if(npc.getNpcId() == NPC_ID) { sendInfo(pc); } return null; } private void sendInfo(L2PcInstance activeChar) { StringBuilder tb = new StringBuilder(); tb.append("<html><title>Grand Boss Info By Dleogr</title><body><br><center>"); tb.append("<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><br>"); 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("<font color=LEVEL>" + name + "</color>: " + "<font color=\"00FF00\">Is Alive</color>"+"<br1>"); } else { tb.append("<font color=LEVEL>" + name + "</color>: " + "<font color=\"FF0000\">Is Dead</color>"+"<br1>"); } } tb.append("<br><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"); tb.append("</center></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"); } } Quote
0 netoluan Posted July 19, 2015 Author Posted July 19, 2015 (edited) i will try Edited July 19, 2015 by netoluan Quote
0 netoluan Posted July 21, 2015 Author Posted July 21, 2015 Ok with npc..? It not work, he no actualize for DEAD when I kill a boss in list Quote
Question
netoluan
for aCis,
Edited by netoluansomeone has a npc just show if boss is alive or dead? i need not show time for respawn
19 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.