Jump to content
  • 0

Question

Posted

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.

1 answer to this question

Recommended Posts

  • 0
Posted (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 by Haziel
  • Upvote 1

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