Tassadar Posted November 7, 2017 Group: Members Topic Count: 52 Topics Per Day: 0.02 Content Count: 107 Reputation: 5 Joined: 07/21/16 Last Seen: January 27 Share Posted November 7, 2017 Good morning everyone. How do I show npc how many "X" items the player is loading? Example: mes "This npc works with Revenge Coins!" mes "you have: (25) Coins of revenge!" I found the countitem command, but I did not understand the operation. Thank you very much in advance. Quote Link to comment Share on other sites More sharing options...
0 Haziel Posted November 7, 2017 Group: Content Moderator Topic Count: 22 Topics Per Day: 0.00 Content Count: 639 Reputation: 609 Joined: 11/25/11 Last Seen: March 7 Share Posted November 7, 2017 (edited) To use that kind of command, you must understand that, countitem is a function, it means it gets a value and converts it based on it's parameters. The player who interacts with the NPC is the one countitem will count items from, so, if you want your npc to display how many red potions he has: mes "You have: " + countitem(501) + " Red Potions!"; Where 501 is the Red Potion ID. Edited November 7, 2017 by Haziel 1 Quote Link to comment Share on other sites More sharing options...
Question
Tassadar
Good morning everyone.
How do I show npc how many "X" items the player is loading?
Example:
mes "This npc works with Revenge Coins!"
mes "you have: (25) Coins of revenge!"
I found the countitem command, but I did not understand the operation.
Thank you very much in advance.
Link to comment
Share on other sites
1 answer 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.