Jump to content
  • 0

2 different menu options


Question

Posted (edited)

Im trying to make this npc give out 2 different menu options depending on if you carry a certain item.

 

for example:

 

by default the menu is offering (option 1:option 2:option 3)

 

but if you have an apple for example in your inventory the menus options would change to  (option 4:option 5:option 6)

 

Not sure how to do it, the ways i tried out didn't work, hoping somebody is able to help :)

 

Thank you!

Edited by Lilo

6 answers to this question

Recommended Posts

  • 0
Posted

something like...


	select( 
		( countitem( 512 ) <= 0 ) ? "Option 1":"",
		( countitem( 512 ) <= 0 ) ? "Option 2":"",
		( countitem( 512 ) <= 0 ) ? "Option 3":"",
		( countitem( 512 ) >= 1 ) ? "Option 4":"",
		( countitem( 512 ) >= 1 ) ? "Option 5":"",
		( countitem( 512 ) >= 1 ) ? "Option 6":""
	);
  • 0
Posted

the menu I have is:

menu "Option 1",opt1,
"Option 2",opt2,
"Option 3",opt3;

with an apple it should be

 

menu "Option 4",opt4,
"Option 5",opt5,
"Option 6",opt6;
  • 0
Posted

 

the menu I have is:

menu "Option 1",opt1,
"Option 2",opt2,
"Option 3",opt3;

with an apple it should be

 

menu "Option 4",opt4,
"Option 5",opt5,
"Option 6",opt6;

Did you try Emistry's solution? It already looks like it will suit your needs.

  • 0
Posted (edited)

 

 

the menu I have is:

menu "Option 1",opt1,
"Option 2",opt2,
"Option 3",opt3;

with an apple it should be

 

menu "Option 4",opt4,
"Option 5",opt5,
"Option 6",opt6;

Did you try Emistry's solution? It already looks like it will suit your needs.

 

 

 

I did (it errored)

also, my menu is different, it's using menu instead of select.

 

How would I do what emistry suggested with a menu like what I post is what I'm asking.

Edited by Lilo

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...