Turnip Blues
Can somebody tell me how to have a script check if you have an item in your inventory and then do something depending on whether the player has it or not? Or where I can see an example?
Thanks.
Thanks.
There are a few commands...
count_item("item-bah");
returns how many item-bahs you have.
compare_weapon("item-bah");
returns 1 if item-bah is currently armed, this was used in the original Dink at the goblin sanctuary.
I think there's at least one more command, but I forgot it. For magic simply change "weapon" or "item" to "magic".
To do something do something like
if (count_item("item-bah") > 0)
{
say("Bah", 1);
kill_game();
}
or
int &bah = compare_weapon("item-bah");
if (&bah == 1)
{
say("Bah", 1);
restart_game();
}
count_item("item-bah");
returns how many item-bahs you have.
compare_weapon("item-bah");
returns 1 if item-bah is currently armed, this was used in the original Dink at the goblin sanctuary.
I think there's at least one more command, but I forgot it. For magic simply change "weapon" or "item" to "magic".
To do something do something like
if (count_item("item-bah") > 0)
{
say("Bah", 1);
kill_game();
}
or
int &bah = compare_weapon("item-bah");
if (&bah == 1)
{
say("Bah", 1);
restart_game();
}
Thank you! My turnip is saved and it's all your doing!