Jump to content
  • 0

Refresh NPC Prompt without "next;"


Vach

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

Hello!

Does anyone know if this is possible? I'd like a NPC message to refresh every time a menu prompt is selected, instead of the next button. I have a looping message for a certain NPC and I think this would be way better than forcing the player to hit next AND THEN the menu prompt.

Link to comment
Share on other sites

Recommended Posts


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

Sleep?xD you can do many things with that :3

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

I don't think that would help in this situation; I want the NPC operations to continue as normal I just don't want the next button in the UI to be a requirement to do this.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

I don't understand :3

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

When you use the "next;" script command, it provides the player with a "next" button on the NPC interface UI, and when that button is pushed, the display with the NPC messages refreshes - becoming blank for the next "mes" command.

I want the function of the refresh without actually having to push the next button.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

Mes "Hi";

Sleep2 1000;

Mes "Hi refreshed(?)";

You can also incluide "if's" in there..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

In that situation both messages would still be on the same display, and I can't have there be a delay in the script either.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

And if it is what i im thinking about.. I think i've seen that in an Arsinoe Script(?)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

I'm not familiar with that. Can I see it?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

Yeah.. In the first quests i think..

Well.. Search 'Arsinoe Aerie Pink' in google..xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

prontera,151,178,5	script	kjsdhfdsf	100,{
mes "select 'Get ME!' at correct seconds to get the most red potions !";
mes "choose it at 14:03:01 will get 1 red potion";
mes "choose it at 14:03:20 will get 20 red potions";
mes "choose it at 14:03:59 will get 59 red potions !!";
next;
while (1) {
	select gettimetick(2) +"",
		gettimestr("%Y-%m/%d %H;%M;%S%p",40), // if you mean refresh this one ... nope, impossible
		"Get ME!!";
	if ( @menu == 3 ) {
		getitem 501, gettime(1);
		mes "You get "+ gettime(1) +" Red potions";
		close;
	}
}
close; // doesn't read	
}

now I wonder what @M45T3R is talking about ....

what is 1st quest ?

http://aerie-pinkpanther.googlecode.com/svn/Dragormina/Server/npc/Arsinoe/Quetes/

I see so many script file here

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

The starter quest o: it's a lineal history :3

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

submenu1:

mes "[" + @name$ + "]";
if(EP7_LANGUE == 0) {mes "Le sommeil vient vite, vous dormez profondement ...";
sleep2 2000;
mes "D'étranges visions, comme un rêve ...";
sleep2 2000;
mes "Une spirale vous entraine ...";
close2;
warp "ars_dun21",152,99;
end; }

if(EP7_LANGUE == 1) {mes "Sleep comes quickly, you sleep deeply ...";
sleep2 2000;
mes "Some strange visions, like a dream ...";
sleep2 2000;
mes "A spiral leads you ...";
close2;
warp "ars_dun21",152,99;
end; }

if(EP7_LANGUE == 2) {mes "El sueño te cae de golpe, y duermes profundamente ...";
sleep2 2000;
mes "Algunas visiones extrañas, como en un sueño ...";
sleep2 2000;
mes "Una espiral te conduce ...";
close2;
warp "ars_dun21",152,99;
end; }

if(EP7_LANGUE == 5) {mes "O sono está vindo rápido, de leve...";
sleep2 2000;
mes "Algumas visões estranhas, como um sonho...";
sleep2 2000;
mes "Algo está me chamando...";
close2;
warp "ars_dun21",152,99;
end; }

if you mean this ... no I don't think Vach is talking about this ...

you're talking about

prontera,151,178,5	script    Yoda    100,{
mes "close your eyes ....";
sleep2 1000;
mes "feel your surrounding ....";
sleep2 1000;
mes "... the force is within you ...";
sleep2 1000;
unitkill getcharid(3); // haha I like to play joke XD
end;
}

this ? XD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

O: it's the same thing :3 .. I forget it xD.. Egh you win me :P i've been close to post the 'while' script xD! But im on a cellphone.. So.. It's a little difficult @_@!

Bad english.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

What Vach want's is currently not possible. Vach wants:

mes "blah blah blah";
mes "blah blah";
mes "blah";
menu "asdf",-;
//Everything below this line needs to appear as if having used the 'next' command, but without actually using the command.
mes "1234";
mes "5678";
close;

Edit: I guess the only way to do this, would be to create a new command, that sends the new mes packet to the client.

IMO i suggest it be the next; command just with a different syntax.

next{("New Line Text")}; OR next2 "New Line Text";

eg:

mes "blah"; next; mes "1234";
//would be the same as...
mes "blah"; next("1234");

Edited by GmOcean
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

I was going to say, the links were broken when I first looked but it doesn't matter because you have it there. I didn't really need the entire script anyway.

Anyway, Annie, yea... I'm thinking it's impossible. Your script doesn't really apply to what I am talking about, but it is the same scenario. Something more like this:

MainMenu:
mes "[NPC]";
mes "Hello! How are you!" // Make this stuff disappear without 'next;' command used.
menu "Stuff",-,
"More Stuff",-;
// Do stuff...
goto MainMenu:

EDIT:

Yes exactly, what GmOcean has said. Oh well! I guess I should make a request thread?

Edited by Vach
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

so what you are asking is you want a new script command to remove the previous mes message without using a next; script command ?

I don't think RO client can do that either

RO client is just accepting a packet from server and display the message below the previous line

*mes script command is just send message to the client, and client automatically display on new line like text file

*next command is just send a packet to tell the client, and the client itself clear the dialog box

I guess you should read clif.c more ....

there is no such feature in RO such as clear a single line from a dialog box

as RO client doesn't record the value of each new message

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

Yep

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Well, currently the 'next' command calls a clif packet, that Makes the next button appear -> wait for player to press -> display new blank window (assuming nothing else is displayed).

I would think it'd be possible to bypass the need to press the button and just make a new window appear. But i don't know src all to well.

Edit: @AnnieRuru - I see.. then, there really isn't anything we can do.

@Vach - You'll just have to deal with using sleep2, or next;

Edit2: You could always spam send black mes commands, just enough so that any previous text is moved up the window.... However, you'll still have the scroll bar, so it'll be a bit unappealing if someone were to look back on past text. BUT it would appear at first glance, that a new window is displayed lol.

Edited by GmOcean
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

I was going to say, that doesn't seem to difficult a proposition (again, just the way GmOcean said); but I am not super crazy versed with the source code right now... in fact most of my knowledge is in the databases.

It would essentially do exactly what calling a new script window does, make it blank and await input.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

Well maybe a way without source modification.

I can't test I don't have an emulator on my computer :(

Well when sending a npc message, you send the npc ID too.

How the client react when receving a message from a different npc ?

- Open a new window (I don't think)

- Concat with the current window content ? (maybe)

- Remove window content and add the new content ? (maybe)

- Crash ? (maybe xD)

Test it !

-	script	clean_msg	-1,{ OnProcess: mes ""; }

map,x,y,f	script	test	id,{

// Display 5 lines
mes "1","2","3","4", "5"; 

// wait 3 secondes to read lines
sleep2 3000;

// Try to send a new message from another npc
doevent "clean_msg::OnProcess";

// Execute the doevent now !
slee2 1;

mes "How the client react ?";
close;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

my 1st instinct tells me, is having 2 next button

http://www.eathena.ws/board/index.php?s=&showtopic=156925&view=findpost&p=863511

yes confirmed in latest rathena

prontera,150,177,5    script    npc1    100,{
   mes "line 1";
   doevent "npc2::Onaa";
   close;
}
-    script    npc2    -1,{
Onaa:
   mes "line 2";
   next;
   mes "cleared line";
   close;
}

post-8685-0-99618400-1352372690_thumb.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

Oh yeah, I remember this funny bug :D

Yeah so it just concat the result.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

Haha Annie, so funny, double buttons. Thank you both for trying, though.

GmOcean, wouldn't spamming blank lines cause the box to simply extend, putting new messages out of view? Otherwise, that could work for this purpose.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Lol, that's what I said. It'll only appear to be a new windows at first glance. But it would indeed just be the same chat window.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

Unless you interact directly to the character, it's impossible to refresh a popul text window without source modifications.

You can make it jump to the map at his currect position, to cancel the popup, but it's not really a great solution in my opinion, and also easily exploitable.

mes "line 1";
getmapxy .@map$, .@x, .@y, 0;
warp .@map$, .@x, .@y;
sleep2 100;
mes "line 2";

Oh god, this looks like really bad regardless from if it works or not... I shouldn't even post such trash xD

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...