Zirius Posted December 22, 2014 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 23 Reputation: 1 Joined: 07/22/14 Last Seen: June 13, 2016 Share Posted December 22, 2014 Hello! Can somebody help me how to run loop on "getinventorylist" array. Suppose, let's say, we want +10 Muffler and +10 Manteau as quest requirement, how do you successfully check for it and delete it? ??? Any example? Thanks! Quote Link to comment Share on other sites More sharing options...
Emistry Posted December 22, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10015 Reputation: 2348 Joined: 10/28/11 Last Seen: 1 hour ago Share Posted December 22, 2014 you can use countitem2 to check for specific refined item and use delitem2 to delete the refined item 1 Quote Link to comment Share on other sites More sharing options...
Luciar Posted December 22, 2014 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 177 Reputation: 21 Joined: 01/31/12 Last Seen: March 8, 2020 Share Posted December 22, 2014 Updated from the wiki: getinventorylist; for(.@i = 0; .@i < @inventorylist_count; .@i += 1){ if(@inventorylist_id[.@i] == 512){ // 512 is the item id for apple mes "You have an apple with you!"; close; } } mes "You don't have an apple with you :("; close; Read which variables are set by getinventorylist; Here 1 Quote Link to comment Share on other sites More sharing options...
Question
Zirius
Hello! Can somebody help me how to run loop on "getinventorylist" array.
Suppose, let's say, we want +10 Muffler and +10 Manteau as quest requirement, how do you successfully check for it and delete it? ???
Any example?
Thanks!
Link to comment
Share on other sites
2 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.