Javascript for number of items value?

● ARCHIVED · READ-ONLY
Started by Woland 3 posts View original ↗
  1. I am using the hide dialogue choices plugin and it works based on switches or other values. Basically like this:

    hide_choice(5, "$gameSwitches.value(59) === false")

    I would like it to also hide the choice if I have 0 of a certain item but I don't know the js callout for this. Basically, I need someone to tell me what the "thenumberofitem" is in the script below :)

    hide_choice(5, "$gameSwitches.value(59) === false" || "$thenumberofitem(12) === 0")

    Thank you in advance!
  2. You could use this script call to get number of an item: $gameParty.numItems($dataItems[itemId])
  3. works like a charm, thank you!