Jump to content
  • 0
Sign in to follow this  
Keru

Invalid menu selection on npc (after warp)

Question

I'm trying to warp a player to a special position on the map, after the warp, the conversation with the npc should go on.

But there is an error after this short script:

FishPond,63,46,6	script	WarpTest	555,{	mes "I Will warp you!";	warp "FishPond",64,42;	mes "So what happens here?";	select("Something");     //Here seems to be the problem	mes "And now?";	close;}

 

After i choose the "Something" in the select, i get the message now logging out.

In the map server appears the following warning message:

Invalid menu selection on npc 110074997:'WarpTest' - got 1, valid range is [1..0] (player AID: X,CID:X, name:'Keru')!

 

Do i have to reattach some ids to the script again or something like that?

Share this post


Link to post
Share on other sites

16 answers to this question

Recommended Posts

  • 0

The issue is the reload of the npc after a warp, a possible workaround is this:

FishPond, 63, 46, 6	script	WarpTest	555,{	mes "I Will warp you!";	close2;	charTeleported = 1;	warp "FishPond", 64, 42;	end;		OnPCLoadMapEvent:		if(  !charTeleported ) end;		charTeleported = 0;		mes "So what happens here?";		 switch(select("Something:Something else")) {			case 1:				mes "And now?";				close;			break;							case 2:				mes "Menu option 2";				close;			break;		}	end;		OnInit:		setmapflag  "FishPond", mf_loadevent;	end;}
Edited by Winterfox

Share this post


Link to post
Share on other sites
  • 0
Try this.
 
FishPond,63,46,6	script	WarpTest    555	,{    mes "I Will warp you!";    close2;    warp "FishPond",64,42;    mes "So what happens here?";    switch(select("Something:Something else")) { //Here seems to be the problemcase 1: //Option 1, which is Something    mes "And now?";    close;case 2: //Option 2, which is Something else   mes "Menu option 2";close;end;}}
Edited by Aeromesi

Share this post


Link to post
Share on other sites
  • 0

Did you test it in-game? it should be working by all means. options have cases (labels) so everything should work Ill test it on my server really quick o.O

Share this post


Link to post
Share on other sites
  • 0

Yes I have tested it, i'll even copy pasted your script to prevent errors.

 

Edit: The screenshot is after i choose something in the menu

post-7209-0-47555200-1437775229_thumb.png

Edited by Keru

Share this post


Link to post
Share on other sites
  • 0

This issue by design. After warp server forgot any npc related things.

Probably need change this. Need talk with other devs. Reset happend in clif_parse_LoadEndAck.

Or better some one create bug on github bug tracker?

Share this post


Link to post
Share on other sites
  • 0

why not just use a addtimer or sleep2 here ?

just delay the execution of next script/command .... so that it will prompt out the message after they warped to the map...

Share this post


Link to post
Share on other sites
  • 0

Curious @@4144 could the removal of this check possibly interfere with other things? Maybe reloading the npc after a warp is mandatory for certain things, or will cause other bugs? Maybe that's why it was coded in eAthena? Not sure but it's just a thought.

Share this post


Link to post
Share on other sites
  • 0

addtimer can make player reattached again

e.g.
 

prontera,154,173,5	script	testtestest02	100,{	mes "I Will warp you!";        addtimer 1000, strnpcinfo(0)+"::OnReattach";	warp "prt_fild08",169,186;OnReattach:        	mes "So what happens here?";	select("Something");	mes "And now?";	close;}
Edited by Angelmelody

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.