Where are states defining item usage defined?

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Where are states defining item usage defined?
Warrior
Member # 6682
Profile #0
For example,
in the valleydy scenario script, a scepter that heals all sorts of nasty effects is used whenever state 18 is executed.. But in which file (or does it need to be defined in the scenario editor?) is state 18 defined for BoA to know that everytime the scepter is used, "beginstate 18" in the scenario script needs to be executed?

Weird thing is that when I open the .bas file in the editor, and go to the location where the scepter is in the "Student Halls" of the Lower Part of the School of Magery, it doesn't appear to be a normal item from one of the item submenus.

Thanks!

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00
Councilor
Member # 6600
Profile Homepage #1
It would be defined in the valleydydata file. It's item 476 in the scenario.

Dikiyoba.
Posts: 4346 | Registered: Friday, December 23 2005 08:00
...b10010b...
Member # 869
Profile Homepage #2
Items are defined in the scenario's data script (valleydydata.txt). Specifically, this part:

quote:
begindefineitem 476;
// imported for all wands
clear;
it_name = "Rod";
it_full_name = "Rod of Healing";
it_variety = 21;
it_floor_which_sheet = 1032;
it_floor_which_icon = 8;
it_inventory_icon = 9;
it_ability_1 = 208;
it_ability_str_1 = 18;

it_value = 0;
it_weight = 100;
it_identified = 1;
it_once_per_day = 1;
it_magic = 1;
Item ability 208 calls a scenario script state on use, and the "strength" field tells it which state to call.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Warrior
Member # 6682
Profile #3
Ahhhh... That "strength" field completely threw me off!

Thanks!

[ Sunday, June 04, 2006 12:50: Message edited by: Lancer ]

--------------------
Lancer
Posts: 73 | Registered: Friday, January 13 2006 08:00