Yuna Posted October 16, 2016 Posted October 16, 2016 (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 October 16, 2016 by Lilo Quote
0 Emistry Posted October 16, 2016 Posted October 16, 2016 if ( countitem( 512 ) ) { menu "Option 1",opt1,"Option 2",opt2,"Option 3",opt3; } else { menu "Option 4",opt4,"Option 5",opt5,"Option 6",opt6; } Quote
0 Emistry Posted October 16, 2016 Posted October 16, 2016 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":"" ); Quote
0 Yuna Posted October 16, 2016 Author Posted October 16, 2016 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; Quote
0 Akkarin Posted October 16, 2016 Posted October 16, 2016 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. Quote
0 Yuna Posted October 16, 2016 Author Posted October 16, 2016 (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 October 16, 2016 by Lilo Quote
Question
Yuna
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 Lilo6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.