Jump to content

Question

Posted (edited)

Hey guys.

 

So I wanted to ask about this NPC that I found in one (pre-configured) pack (Excess to be exact), I added it to my own server, but I don't understand how do I change/edit the info on this NPC, like remove or add RaidBoss info.

 

This NPC has an id of 93000.

 

And this is what I get when I open 93000.xml in the directory of ->gameserver/data/html/default/93000.xml

 

It's clearly not the right code for the one I see in game.
 

I saw this line :

Quote

<button value="Bosses Info" action="bypass -h custom_raidinfo" width=90 height=15 back="sek.cbui94" fore="sek.cbui94">

 

I searched everywhere, for whole 3 to 4 hours, for smth called "raidinfo", and nothing. Correct me if I'm wrong, but I think that I need to fiddle with JAVA files in order to change the RBInfo list ? If so, can anyone tell me how to do it? BTW.. I'm still a newbie with coding JAVA files, so if it's hard to change anything, I may let this one slide, and go on without it.

 

EDIT: I know that in the second screenshot the opened file is called 90001.xml, It's just because I renamed it to check if the NPC will fail to show anything at all like html is missing or smth.. But it didn't work
 

Using L2jFrozen.

Chronicle - Interlude.

Edited by Thrusteris

Recommended Posts

  • 0
Posted (edited)

indeed, you have to make some changes in your sources (if this manager is coded in java and not python.)

Open your eclipse and click at Search in your tools. then write the bypass in text box. something like that

fbe45734b8e005476589309d203efd45.png

 

and paste in code tag what you found in order to help you

Edited by melron
  • Upvote 1
  • 0
Posted
3 minutes ago, Thrusteris said:

Any info or links to where I can find a tutorial on how to de-compile .jar files and after I'm done editing them to compile them again ?

decompiling .jar can be done,but it can give you some errors or changes to the codes.

Anyways the pack you talk about already has a link for the sources,download import them on eclipse,and start edit

  • 0
Posted
1 hour ago, Thrusteris said:

 

So I wanted to ask about this NPC that I found in one (pre-configured) pack (Excess to be exact), I added it to my own server, but I don't understand how do I change/edit the info on this NPC, like remove or add RaidBoss info.

 

 

Wait, As i can understand by your words, you found this npc in another pre-configured pack? And added it to your own server? Without sources? How is that possible? 

  • 0
Posted
Just now, melron said:

 

Wait, As i can understand by your words, you found this npc in another pre-configured pack? And added it to your own server? Without sources? How is that possible? 

 

probably installed it in the db, and it's htmls,can be done, but ofc without working,he just installed the npc but without it's features.

  • 0
Posted
Spoiler

package com.l2jfrozen.gameserver.model.actor.instance;

import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.ai.CtrlIntention;
import com.l2jfrozen.gameserver.ai.L2CharacterAI;
import com.l2jfrozen.gameserver.datatables.sql.NpcTable;
import com.l2jfrozen.gameserver.managers.GrandBossManager;
import com.l2jfrozen.gameserver.managers.RaidBossSpawnManager;
import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
import com.l2jfrozen.gameserver.network.serverpackets.MyTargetSelected;
import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jfrozen.gameserver.network.serverpackets.ValidateLocation;
import com.l2jfrozen.gameserver.powerpak.RaidInfo.RaidInfoHandler;
import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
import com.l2jfrozen.gameserver.templates.StatsSet;
import java.util.Iterator;
import java.util.logging.Logger;
import javolution.text.TextBuilder;
import javolution.util.FastList;

public class L2RBManagerInstance
  extends L2FolkInstance
{
  private static Logger _log = Logger.getLogger(RaidInfoHandler.class.getName());
  
  public L2RBManagerInstance(int objectId, L2NpcTemplate template)
  {
    super(objectId, template);
  }
  
  public void onAction(L2PcInstance activeChar)
  {
    if (!canTarget(activeChar)) {
      return;
    }
    if (this != activeChar.getTarget())
    {
      activeChar.setTarget(this);
      
      activeChar.sendPacket(new MyTargetSelected(getObjectId(), 0));
      
      activeChar.sendPacket(new ValidateLocation(this));
    }
    else if (!canInteract(activeChar))
    {
      activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
    }
    else
    {
      showHtmlWindow(activeChar);
    }
    activeChar.sendPacket(new ActionFailed());
  }
  
  private void showHtmlWindow(L2PcInstance activeChar)
  {
    TextBuilder tb = new TextBuilder();
    tb.append("<html>");
    tb.append("<body>");
    tb.append("<title>RaidBoss Manager</title>");
    tb.append("<br1>");
    tb.append("<img src=\"l2excess.npclogo\" width=250 height=80>");
    tb.append("<img src=\"L2UI.SquareGray\" width=300 height=1>");
    tb.append("<table bgcolor=\"000000\" width=310>");
    for (Iterator i$ = Config.RAID_INFO_IDS_LIST.iterator(); i$.hasNext();)
    {
      int boss = ((Integer)i$.next()).intValue();
      
      String name = "";
      L2NpcTemplate 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 = 0L;
      if (NpcTable.getInstance().getTemplate(boss).type.equals("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).type.equals("L2GrandBoss")) {
          continue;
        }
        actual_boss_stat = GrandBossManager.getInstance().getStatsSet(boss);
        if (actual_boss_stat != null) {
          delay = actual_boss_stat.getLong("respawn_time");
        }
      }
      if (delay <= System.currentTimeMillis())
      {
        tb.append("<tr>");
        tb.append("<td><font color=\"005C7E\">" + name + "</font></td>");
        tb.append("<td><center><font color=\"00FF00\">Is Alive</font></td>");
        tb.append("</tr>");
      }
      else
      {
        int hours = (int)((delay - System.currentTimeMillis()) / 1000L / 60L / 60L);
        int mins = (int)((delay - hours * 60 * 60 * 1000 - System.currentTimeMillis()) / 1000L / 60L);
        int seconts = (int)((delay - (hours * 60 * 60 * 1000 + mins * 60 * 1000) - System.currentTimeMillis()) / 1000L);
        tb.append("<tr>");
        tb.append("<td><font color=\"005C7E\">" + name + "</font></td>");
        tb.append("<td><center>Respawn in: " + hours + " : " + mins + " : " + seconts + "</td>");
        tb.append("</tr>");
      }
    }
    tb.append("</table>");
    tb.append("</body>");
    tb.append("</html>

Found this, can I change anything in this file ?

  • 0
Posted (edited)
6 minutes ago, camenomat0 said:

 

probably installed it in the db, and it's htmls,can be done, but ofc without working,he just installed the npc but without it's features.

well no, just look at the html he posted . To appear the html with all the raidbosses names/status , a bypass must be launched . So something is wrong here :D

Edited by melron
  • 0
Posted
2 minutes ago, Thrusteris said:

Found this, can I change anything in this file ?

 

Even if you used decompiler to search for it, As you can see the results are not correct. But, as i can see a config is there to handle all the id's.

Config.RAID_INFO_IDS_LIST 

Search again with the decompiler in Config.java and search RAID_INFO_IDS_LIST  = bla bla ... You will see how the config name is written

  • 0
Posted (edited)

Oh god.. There's no way for me to do this now, I guess I will stop fiddling with eclipse before I break anything, Guys, thanks for the info now, I will save everything you wrote and leave it for later. Time for me to watch some tutorials of Eclipse editing, cuz I had no idea what I was doing.. :D 

Edited by Thrusteris
  • 0
Posted (edited)
1 hour ago, Thrusteris said:

Oh god.. There's no way for me to do this now, I guess I will stop fiddling with eclipse before I break anything, Guys, thanks for the info now, I will save everything you wrote and leave it for later. Time for me to watch some tutorials of Eclipse editing, cuz I had no idea what I was doing.. :D 

1st of all ignore Melron, he is in love lately and he don't know what he is talking about. Last code he did contained hearts, kisses and bdsm.

2nd without source simply, close the server, close the maxcheaters, close the computer and go out for a coffee cause you can't do a shit. 

 

Now if you decide to get a source you simply can create a new Instance (Copy paste an existed template) and inside at showHtmlWindow(player) 

write a code like: 

 

private static int[] RAID = { };

private static String getColor(int i)
{
	if (i==0)
		return "FFFFFF";
	if (i==1)
		return "55555";
	return "00000";	
}

@Override
public void showChatWindow(final L2PcInstance player)
{
	StringBuilder st = new StringBuilder();
	st.append("<html><body><title>Raid Info</title>");
    st.append("<table width=420>");
    int index = 0;
      
    st.append("<tr>");
    st.append("<td width=30>Pos.</td>");
    st.append("<td width=30>Name</td>");
    st.append("</tr>");
      
    for (final int boss : RAID)
    {
      	index ++;
        String name = NpcTable.getInstance().getTemplate(boss).getName();
        int status = GrandBossManager.getInstance().getBossStatus(boss);

      	st.append("<tr>");
     	st.append("<td width=30>" + index + "</td>");
        st.append("<td width=30><font color= "+ getColor(status) + ">" + name + "</font></td>");
        st.append("</tr>");
     }
      
      st.append("</table>");
      
      NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
      html.setHtml(tb.toString());
	  player.sendPacket(html);
}

 

Don't bother just copy paste the code without adjusting i wrote it in Sublime and i dont even know if syntax is ok. (especially for html part)... Just to give you

the idea of how to make your code.

Edited by Evie Frye
  • 0
Posted (edited)
18 hours ago, Evie Frye said:

1st of all ignore Melron, he is in love lately and he don't know what he is talking about. Last code he did contained hearts, kisses and bdsm.

2nd without source simply, close the server, close the maxcheaters, close the computer and go out for a coffee cause you can't do a shit. 

 

Don't bother just copy paste the code without adjusting i wrote it in Sublime and i dont even know if syntax is ok. (especially for html part)... Just to give you

the idea of how to make your code.

 

Me and Boolean hate you too... <3

 

getColor(status == 1)

private static String getColor(boolean alive) 
{
	return alive ? "FFFFFF" : "55555";
}

 

Edited by melron
  • 0
Posted
6 hours ago, melron said:

 

Me and Boolean hate you too... <3

 


getColor(status == 1)

private static String getColor(boolean alive) 
{
	return alive ? "FFFFFF" : "55555";
}

 

 

I made it like this cause there are 4 Stages of boss. 

 

0 = Normal

1 = Waiting

2  = Fighting

3 = Dead

  • 0
Posted
2 hours ago, Evie Frye said:

 

I made it like this cause there are 4 Stages of boss. 

 

0 = Normal

1 = Waiting

2  = Fighting

3 = Dead

Who cares about the other states except dead/alive :P

Do you have it like this in your own unique server with unique farm areas ?

  • 0
Posted
1 minute ago, melron said:

Who cares about the other states except dead/alive :P

Do you have it like this in your own unique server with unique farm areas ?

 

At least i have 100% balanced server, No curruption, FULL anti-ddos server, Unique farm zone that change every 1 hour, No bug No lag server

do you?? DO YOU????????

Guest
This topic is now closed to further replies.


  • Posts

    • Hello community, I’d like to share an improved version of the L2smr editor for StaticMeshes, focused on solving some workflow issues I found in the original tool. CreditsThis project is based on the original acmi/L2smr repository https://github.com/acmi/L2smr , created by acmi, and I updated it to Java 17 with some additional features. Issues in the original L2smr Too many windows: each StaticMesh opened in a new one → cluttered desktop. No search: navigating through hundreds of StaticMeshActors was slow and tedious. Added improvements Flexible views Single Window Mode: reuse one window instead of opening new ones. Multiple Window Mode: still available for those who prefer having several views open simultaneously. Real-time Search Field Instant filtering as you type. Case-insensitive search. “Reset” button to quickly clear the search.     Installation and Execution: Clone the repository: git clone https://github.com/Jeep12/l2smr.git cd l2smr        2.Build the project:   ./gradlew build        3. Run the application:     ./run.bat      Or simply double-click on run.bat.     The run.bat script automatically extracts JavaFX from the included javafx-17.0.2.zip file in the javafx/ directory, sets up the required libraries, and launches the application. You don’t    need to install JavaFX separately.      Repository: https://github.com/Jeep12/l2smr     Maybe these features already existed in another version or fork, and they might not be very big changes, but since I didn’t know about them and found them necessary, I decided to          implement them myself and wanted to share them.      
    • no....Mobius L2Clientdat and L2FileEditor can do that...but still cant works with TaiWanese Grand Crusade ,especially Armorgrp.dat and Armorgrp-Classic.dat
    • L2GOLD - Halcyon x45 Project Classic Interlude   C6 - Classic Interlude: Protocol 110     Is a complete copy of L2Gold in Classic [110 Protocol] with L2OFF files.   Fully L2Gold Features - Daily Quest - Daily Mining Quest - Ancient Weapons -Refine System  -Rebirth System -Fully configurable everything you want -Gold stats/Gold skills/Gold items working 100% -Zones 100% alike  -Unique donations system (npc or voicedcommand .donate) - On Enchant success announcement ( if +16 for weapon, 8 for armor , 7 for jewel) - Announce of Castle Lord - Announce of Hero  - Olympiad Max A grade - Olympiad Buffs on matches changed to Gold Alike - Working fully Dreadbane   - AI Mods: Static Time for RB   Automated Events: Squash Watermelon RB Event High rate  (those are fully automated)   Server is running a Test Server: Online to anyone can test it.   Game Client: https://www.mediafire.com/file/1d8xe18rvgi04lx/L2_Classic_Interlude_Client_V2.rar/file   Game Patch: https://www.mediafire.com/file/3z4b8ezy93h2z1g/L2Halcyon+Gold+Patch.rar/file   GM Accounts: ID: root pass root [ accounts go from  root1 until root20 ]   Regular Accounts Registrations: http://84.247.164.27/?page=register   Some Screenshots: https://imgur.com/a/o7TxzTN   Contact me here via PM (only serious buyers).    Price of the product: Fully Server Pack + Source ( 250 Euros )
    • ✨ A Service with Vibes  Vibe SMS ✨   Vibe SMS is not just a platform for working with numbers. We’ve built it to be simple, convenient, and stress-free, so your tasks get done without hassle. We value real communication: we listen to your ideas, provide support, and make sure everyone feels calm and confident. With us, you’re not just a client  you’re part of a space built on trust, support, and a human touch. Vibe SMS is a place where people matter and where we create an atmosphere you’ll want to stay in.   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms
  • 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