Jump to content
  • 0

Refresh NPC Prompt without "next;"


Question

Posted

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.

Recommended Posts

Posted

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.

Posted

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.

Posted (edited)

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
Posted

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

Posted

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.

Posted (edited)

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
Posted (edited)

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
Posted (edited)

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
Posted (edited)

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
Posted

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.

Posted

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;
}

Posted

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.

Posted

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...