Page 1 of 1

How start quest even in onAdvEvent

Posted: Mon Nov 16, 2015 6:14 am
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:

Re: How start quest even in onAdvEvent

Posted: Mon Nov 16, 2015 11:33 am
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

Re: How start quest even in onAdvEvent

Posted: Mon Nov 16, 2015 1:37 pm
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 :\
}

Re: How start quest even in onAdvEvent

Posted: Mon Nov 16, 2015 1:55 pm
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).

Re: How start quest even in onAdvEvent

Posted: Mon Nov 16, 2015 6:01 pm
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.

Re: How start quest even in onAdvEvent

Posted: Mon Nov 16, 2015 8:13 pm
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";

Re: How start quest even in onAdvEvent

Posted: Tue Nov 17, 2015 8:10 am
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/

Re: How start quest even in onAdvEvent

Posted: Tue Nov 17, 2015 12:17 pm
by Gladicek
And that's why I asked you for "complete" info about it.

Re: How start quest even in onAdvEvent

Posted: Tue Nov 17, 2015 1:40 pm
by KGB1st
I'm not pro in Java and can not understand many questions correctly :wave:

Re: How start quest even in onAdvEvent

Posted: Tue Nov 17, 2015 5:57 pm
by SaveGame
KGB1st wrote:I'm not pro in English and can not understand many questions correctly :wave:
fixed :problem:

Re: How start quest even in onAdvEvent

Posted: Wed Nov 18, 2015 7:27 am
by KGB1st
Close. Changed.

Re: How start quest even in onAdvEvent

Posted: Thu Jun 08, 2017 3:56 pm
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;
}

Re: How start quest even in onAdvEvent

Posted: Sun Jul 09, 2017 10:00 am
by Sdw
You got owned by a bot, nize

Re: How start quest even in onAdvEvent

Posted: Wed Feb 20, 2019 2:35 pm
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.