I'm a display case collector with the eventual goal of having one of every displayable item in my case. Sometimes, when I'm adventuring in a new area (or an old area with changes), I'll lose track of what new items I've gotten and I'll forget to case them. Thus what I'm trying to make is a script that can look over my inventory, compare it to my case, and tell me a list of every displayable item in my inventory that's not in my case. For some reason, though, it's listing every item as not present in my case. I can't figure out where the problem is myself, so I was hoping someone here might be able to see what's wrong.
And as a side question, is there a constant in Mafia for the current highest-known item number? I hate just sticking "9999" in there for the loop, but I also don't want to have to keep updating it as new items come out. And if there's a better way to do that than looping over item numbers, I'd certainly like to know that too.
And as a side question, is there a constant in Mafia for the current highest-known item number? I hate just sticking "9999" in there for the loop, but I also don't want to have to keep updating it as new items come out. And if there's a better way to do that than looping over item numbers, I'd certainly like to know that too.
Code:
void main()
{
for i from 1 upto 9999 {
if (is_displayable(to_item(i)))
{
if ((item_amount(to_item(i)) > 0) && (display_amount(to_item(i)) == 0))
{
print(to_string(to_item(i)));
}
}
}
}