Window stay on action

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Void
Posts: 7
Joined: Thu Jan 03, 2008 2:05 pm
Location: Romania

Window stay on action

Post by Void »

I'm having a hard time finding a way to keep the same window open after pressing a link inside a npc's html (a bypass to the server). Anyone got a little hint for me?

Thanks in advance.
Fulminus
L2j Veteran
L2j Veteran
Posts: 1554
Joined: Mon Oct 10, 2005 6:49 pm

Post by Fulminus »

I am not sure I understand what you are saying.

Are you saying that when you click on a link, the dialog closes instead of showing you the next page of that dialog?
Or are you saying that if you have a dialog open (say from some NPC or shop or whatever that you were talking to earlier) and you speak with some other NPC, the first dialog closes and in its place you only see the last NPC's text?
I'm a joyful, merriful, playful, curious, young, little elf!!! :-)
I'm also a High(tech) Elf, (computer) wiz!
Void
Posts: 7
Joined: Thu Jan 03, 2008 2:05 pm
Location: Romania

Post by Void »

fulminus wrote:I am not sure I understand what you are saying.

Are you saying that when you click on a link, the dialog closes instead of showing you the next page of that dialog?
Or are you saying that if you have a dialog open (say from some NPC or shop or whatever that you were talking to earlier) and you speak with some other NPC, the first dialog closes and in its place you only see the last NPC's text?
No... let me explain through an example:

I'm talking to npc X, the dialog window opens. Inside I have some text and some buttons that bypass commands to the server :
<button value="Text" action="bypass -h npc_%objectId%_MyCommand 1">
<button value="Text" action="bypass -h npc_%objectId%_MyCommand 2">
...
I want to do more than one bypass without talking to the npc again (window closes when you click one of the buttons)
Fulminus
L2j Veteran
L2j Veteran
Posts: 1554
Joined: Mon Oct 10, 2005 6:49 pm

Post by Fulminus »

When you click on a bypass, a command is sent to the server and an action is taken. Typically, that action opens another htm dialog, or some different interface (like a shop, multisell, augmentation, skill-learn, etc).

You can easily code your bypasses such that, after the run the requested command, they reopen the same htm that the player was just viewing. Technically, this will close the dialog and pop-up a new dialog that happens to have the same text. However, as far as the player can see, it's just the same page staying up (except refreshing the scroll to the top of the text again). If your text can fit without scrolling, the player won't even know the difference...
I'm a joyful, merriful, playful, curious, young, little elf!!! :-)
I'm also a High(tech) Elf, (computer) wiz!
Post Reply