Jump to content
  • 0

[L2jServerH5] Chat question mark handle


sylwuu

Question

Hello,

today i'm working on party voice command system and i'm stuck.

I broadcast message with question mark to all active players but I don't have idea how to detect click and handle it. I spend all day on it and message with button is all what i've done.  I was trying to made custom listener but unsuccessfully. I don't even know is that possible.

I'm looking for advice or direciton where to search in code something similar

 

Best wishes

Edited by sylwuu
Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0
6 minutes ago, sylwuu said:

obraz.png.0cd312b6451e78550ca206b2fa1021fb.png

 

I need to know how to handle action after click on this small question mark.

In your way after broadcast this message question mark appear but this is not what i need or i don't get how this things are connected

 

I'm not sure if this event is handled by server at least in lower chronicles such as HighFive, but you can find the L2GameClientPacket and log this way:

 

try
{
    System.out.println("Packet: " + getClass().getSimpleName());
    readImpl();
    return true;
}

 

Upon click it will show you if it handled by server or not in console.

  • Thanks 1
Link to comment
Share on other sites

  • 0
5 hours ago, sylwuu said:

My mistake. Unfortunatelly i can't delete/move post

Ok. Also afcourse you can handle it. The packet you're lookin for is the RequestTutorialQuestionMark

  • Like 1
Link to comment
Share on other sites

  • 0

Thank you for your answer

I put sendMessage to  RequestTutorialQuestionMark and OnPlayerTutorialQuestionMark but it don't work for my button. Ofc I check it on tutorial button and i receive message so I think my chat button have a wrong type.

I made chat button by

"\b\tType=1 \tID=" + id + "\t \tColor=0 \tUnderline=0 \tTitle=\u001B\u001B\b"

I already tried couple numbers for type but except above only Type=2 works and on click it's show empty black box but not handled like tutorial question mark.

I'm tested another listeners from EventType class but i didn't found any connected to my question mark

Link to comment
Share on other sites

  • 0
10 minutes ago, sylwuu said:

Thank you for your answer

I put sendMessage to  RequestTutorialQuestionMark and OnPlayerTutorialQuestionMark but it don't work for my button. Ofc I check it on tutorial button and i receive message so I think my chat button have a wrong type.

I made chat button by

"\b\tType=1 \tID=" + id + "\t \tColor=0 \tUnderline=0 \tTitle=\u001B\u001B\b"

I already tried couple numbers for type but except above only Type=2 works and on click it's show empty black box but not handled like tutorial question mark.

I'm tested another listeners from EventType class but i didn't found any connected to my question mark

 

Question mark is server packet and it's called this way player.sendPacket(new TutorialShowQuestionMark(number)); What exactly are you talkin about html?

  • Like 1
Link to comment
Share on other sites

  • 0
13 minutes ago, sylwuu said:

Not quite, it's text passing as paremeter of BroadCast.toAllOnlinePlayers(new CreatureSay(0, Say2.PARTY, "[Party]" , text)); and in this way i receive question mark button in chat

 

What are you talking about? RequestTutorialQuestionMark is handled by TutorialShowQuestionMark which it's a gameserver packet which you send to the player. 

 

You want to make an event? Go wherever you send a message and send also the player.sendPacket(new TutorialShowQuestionMark(number)); and replace the 'number' with your event ID. 

Edited by Kara
  • Like 1
Link to comment
Share on other sites

  • 0

obraz.png.0cd312b6451e78550ca206b2fa1021fb.png

 

I need to know how to handle action after click on this small question mark.

In your way after broadcast this message question mark appear but this is not what i need or i don't get how this things are connected

Link to comment
Share on other sites

  • 0

On this subject everything went well.

 

The topic can be closed I have a problem with something else but it's not related and I'll dig a little before ask for help

 

Sorry for late reply

Best Wishes

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...