Jump to content
  • 0

Need help with RBInfo


Thrusteris

Question

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
Link to comment
Share on other sites

Recommended Posts

  • 0

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
Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0
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? 

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

  • 0
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 ?

Link to comment
Share on other sites

  • 0
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
Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0
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
Link to comment
Share on other sites

  • 0
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
Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0
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 ?

Link to comment
Share on other sites

  • 0
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????????

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt  
    • Server Rates: » Xp 500x. » Sp 500x. » Aden 500x. » Drop 1x. » PartyXp 2x. » PartySp 2x. » Starting character level -61. Enchant rates: » Safe enchant +4. » Blessed and simple scrolls max enchant (+16). » Crystal scrolls max enchant (+20). » Simple enchant scrolls chance – 65%. » Blessed enchant scrolls chance – 100%. » Crystal enchant scrolls chance – 50% Augmentations: » Mid life stone skill chance – 5%. » High life stone skill chance – 10%. » Top life stone skill chance – 20%. » Augments 1+1 Unique features: » Main town – Giran » Automatic-Manual Potions. » Working 2 castle sieges. (Giran-Aden) » SPS cancel lasts 10 seconds and than buffs come back. » Stackable scrolls, lifestones, book of giants. » Unique pvp zone » More then 11 active raid bosses. » Wedding system. » Unique farming areas. » Npc skill enchanter. » Full npc buffer with auto buff. » Max count of buffs – 55. » Max subclasses – 4. » Free and no quest class change. » Free and no quest sub class. » Raid boss drop nobless item. » No weight limit. » Unique protection anti-hwy armor for archers/daggers etc. » Ingame password change. » Top pvp/pk/online ranks NPC. » Unique monsters & NPC. » Interlude retail skills. » Server up-time [24/7] [99]%. » Perfect class balance (all class can kill all class depending on players skill and setup knowledge,gear,augmentations). » Announcements on double kills triple kills etc. » Announcements on Grand Boss death , with the name of the killer as well as clan name of the player. » Information Npc in game with all servers infromations. Custom server gear : 1). Titanium Armor Lv.1 2). Epic Armor Lv.2 3). Epic Weapons-Kamikaze-Black S grade (Same Stats) 4). Demonic-Angelic Wings-Baium Hair-Custom Accessories (SameStats) 5). Custom Fighter/Mage tattoo Lv1-Lv2-Lv3 6). Shirt (STR,CON,INT +1) 7). Custom Shields Server Commands: .tvtjoin .tvtleave – Join or leave tvt event. .ctfjoin .ctfleave – Join or leave ctf event. .dmjoin .dmleave – Join of leave dm event. .online – current online players count. .repair – repairs stuck character in world. .menu – opens online menu panel. .exit – PVP zone exit in case you are bullied. .changepassword - Opens online menu then u can change ur password in game. .farm - Enable/disable autofarm Event system: » TVT event » CTF event » DM event » Tournament Event » Party Zone » Unique event shop. Olympiad game: » Retail olympiad game. » Competition period [1] week. » Olympiad start time [18:00] end [00:00] GMT+2. » New Heroes every Sunday.
    • Tomorrow grand opening lests go 🙂 
    • New season of Warfire X150 has been postponed to September 28th.
  • Topics

×
×
  • Create New...