How start quest even in onAdvEvent

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
KGB1st
Posts: 230
Joined: Sat Jul 26, 2014 5:58 pm

How start quest even in onAdvEvent

Post by KGB1st »

I've some event in onAdvEvent. In this event I wrote a html and sended result to player.

Code: Select all

@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
   case "some event":
   {
      String some_html = "<button ... -bypass COMMAND .../>";
      
      showResult(player, some_html, null);
      
      break;
   }
   
   if(event.startsWith("COMMAND"))
   {
      SOME CODE HERE.. AND FROM HERE I NEED REDIRECT PLAYER BACK to THE "some event"
   }
   
   return htmltext;
   
   // it's example :\
}
This some_html contains another bypass command, I need redirecting player again to the "some event" after using this command.
Can you help me? Pls.... :roll:
Last edited by KGB1st on Wed Nov 18, 2015 7:27 am, edited 1 time in total.
User avatar
Gladicek
Posts: 634
Joined: Wed Jan 19, 2011 6:25 pm
Location: Czech Republic

Re: How start quest even in onAdvEvent

Post by Gladicek »

First at all it should be like this (only one event now :problem: ) And now I don't get that what you wanna do next. You wanna call this event again or another one?
Gist by: Gladicek
ImageImage
L2J retired
User avatar
KGB1st
Posts: 230
Joined: Sat Jul 26, 2014 5:58 pm

Re: How start quest even in onAdvEvent

Post by KGB1st »

Gladicek wrote:And now I don't get that what you wanna do next. You wanna call this event again or another one?

Code: Select all

@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
   case "some event":
   {
      String some_html = "<button ... -bypass COMMAND .../>";
      
      showResult(player, some_html, null);
      
      break;
   }
   
   if(event.startsWith("COMMAND"))
   {
      SOME CODE HERE.. AND FROM HERE I NEED REDIRECT PLAYER BACK to THE "some event"
   }
   
   return htmltext;
   
   // it's example :\
}
User avatar
Gladicek
Posts: 634
Joined: Wed Jan 19, 2011 6:25 pm
Location: Czech Republic

Re: How start quest even in onAdvEvent

Post by Gladicek »

You wanna call that event again? Why? :D You can call just for htmltext some_html to show that bypass again from COMMAND event. Or its gonna do something when you call some_event again? It would be easier when you would say what that thing should do, because for now its retarded (no offense).
ImageImage
L2J retired
User avatar
KGB1st
Posts: 230
Joined: Sat Jul 26, 2014 5:58 pm

Re: How start quest even in onAdvEvent

Post by KGB1st »

wtf? Is my request hard? I need use some functon for this bypass and redirect player again on the same html.
I told about it because I'm too lazy for creating new html files.
User avatar
Gladicek
Posts: 634
Joined: Wed Jan 19, 2011 6:25 pm
Location: Czech Republic

Re: How start quest even in onAdvEvent

Post by Gladicek »

Gladicek wrote:You wanna call that event again? Why? :D You can call just for htmltext some_html to show that bypass again from COMMAND event. Or its gonna do something when you call some_event again? It would be easier when you would say what that thing should do, because for now its retarded (no offense).
htmltext = "some_html";
ImageImage
L2J retired
User avatar
KGB1st
Posts: 230
Joined: Sat Jul 26, 2014 5:58 pm

Re: How start quest even in onAdvEvent

Post by KGB1st »

I understand. Make this String to public and call with showResult? :think:
It works but variables in this part not changed. It's dynamic HTML - it's answer for your question why called again/
User avatar
Gladicek
Posts: 634
Joined: Wed Jan 19, 2011 6:25 pm
Location: Czech Republic

Re: How start quest even in onAdvEvent

Post by Gladicek »

And that's why I asked you for "complete" info about it.
ImageImage
L2J retired
User avatar
KGB1st
Posts: 230
Joined: Sat Jul 26, 2014 5:58 pm

Re: How start quest even in onAdvEvent

Post by KGB1st »

I'm not pro in Java and can not understand many questions correctly :wave:
SaveGame
Posts: 121
Joined: Thu Oct 30, 2014 9:54 pm

Re: How start quest even in onAdvEvent

Post by SaveGame »

KGB1st wrote:I'm not pro in English and can not understand many questions correctly :wave:
fixed :problem:
Image
User avatar
KGB1st
Posts: 230
Joined: Sat Jul 26, 2014 5:58 pm

Re: How start quest even in onAdvEvent

Post by KGB1st »

Close. Changed.
HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Re: How start quest even in onAdvEvent

Post by HorridoJoho »

Code: Select all

@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
    String htmltext = null;

    switch (event)
    {
        case "COMMAND":
            // do COMMAND things
            // don't put break; so "some event" is executed after this "COMMAND" and when event is "some event"
        case "some event":
            htmltext = "<button ... -bypass COMMAND .../>";
            break;
    }

    return htmltext;
}
Sdw
L2j Veteran
L2j Veteran
Posts: 855
Joined: Mon May 03, 2010 8:38 am
Location: France

Re: How start quest even in onAdvEvent

Post by Sdw »

You got owned by a bot, nize
philippe05
Posts: 1
Joined: Wed Feb 20, 2019 2:33 pm

Re: How start quest even in onAdvEvent

Post by philippe05 »

Gladicek wrote: Mon Nov 16, 2015 1:55 pm You wanna call that event again? Why? :D You can call just for htmltext some_html to show that bypass again from COMMAND event. Or its gonna do something when you call some_event again référenceur freelance paris ? It would be easier when you would say what that thing should do, because for now its retarded (no offense).
Maybe it's just a small delay to the too many deliveries they have to make.
Post Reply