To quote from the Cookbook -- nice thing to have..
You do have the item code in file that starts somewhat like:
beginscenarioscript;
body;
beginstate LOAD_SCEN_STATE;
...
then all you need to do...
Quote:
Once you have defined your special item, your next task is to create an appropriate script which gives the party the special item in the appropriate situation. For example, you might want to give the party an item in response while talking with a non-player character (see "dialogue" below), or searching an object (see "special objects" below). No matter what type of script you use, however, you'll want to use the:
change_spec_item(itemNum, howMany);
command to give the party 'howMany' copies of special item number 'itemNum'. For example:
change_spec_item(4, 1);
will give the party special item number 4.
To remove a special item, you can either call change_spec_item() with a negative 'howMany' value, or else use the:
take_special_item(itemNum);
command, which takes one special item number 'itemNum' from the party.
Finally, you can check to see how many of a particular special item the party has by using the:
has_special_item(itemNum)
call, which returns the number of special item number 'itemNum' the party currently has. This means that you can do things like:
if (has_special_item(4) > 0) {
...
}
to perform an action only if the party has at least one copy of special item number 4.
Do hope this helps....
James