Yuna Posted October 16, 2016 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 96 Reputation: 5 Joined: 03/16/16 Last Seen: May 30, 2023 Share 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 Link to comment Share on other sites More sharing options...
0 Emistry Posted October 16, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share 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 Link to comment Share on other sites More sharing options...
0 Emistry Posted October 16, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share 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 Link to comment Share on other sites More sharing options...
0 Yuna Posted October 16, 2016 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 96 Reputation: 5 Joined: 03/16/16 Last Seen: May 30, 2023 Author Share 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 Link to comment Share on other sites More sharing options...
0 Akkarin Posted October 16, 2016 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1632 Joined: 03/26/12 Last Seen: April 15 Share 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 Link to comment Share on other sites More sharing options...
0 Yuna Posted October 16, 2016 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 96 Reputation: 5 Joined: 03/16/16 Last Seen: May 30, 2023 Author Share 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 Link to comment Share on other sites More sharing options...
0 Yuna Posted October 16, 2016 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 96 Reputation: 5 Joined: 03/16/16 Last Seen: May 30, 2023 Author Share Posted October 16, 2016 Thank you! Quote Link to comment Share on other sites More sharing options...
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 LiloLink to comment
Share on other sites
6 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.