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.

  Reveal hidden contents

 

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

  Reveal hidden contents

 

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">

Expand  

 

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
  On 3/6/2018 at 2:09 PM, 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 ?

Expand  

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
  On 3/6/2018 at 12:42 PM, 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.

 

Expand  

 

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
  On 3/6/2018 at 2:24 PM, 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? 

Expand  

 

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
  Reveal hidden contents

Found this, can I change anything in this file ?

  • 0
Posted (edited)
  On 3/6/2018 at 2:28 PM, 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.

Expand  

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
  On 3/6/2018 at 2:29 PM, Thrusteris said:

Found this, can I change anything in this file ?

Expand  

 

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)
  On 3/6/2018 at 3:07 PM, 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 

Expand  

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)
  On 3/6/2018 at 4:03 PM, 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.

Expand  

 

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
  On 3/7/2018 at 4:36 AM, melron said:

 

Me and Boolean hate you too... <3

 

getColor(status == 1)

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

 

Expand  

 

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

 

0 = Normal

1 = Waiting

2  = Fighting

3 = Dead

  • 0
Posted
  On 3/7/2018 at 11:07 AM, Evie Frye said:

 

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

 

0 = Normal

1 = Waiting

2  = Fighting

3 = Dead

Expand  

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
  On 3/7/2018 at 1:36 PM, 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 ?

Expand  

 

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.


×
×
  • Create New...