Identification and item abilities

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: Identification and item abilities
Warrior
Member # 2838
Profile #0
1)Is there a call that identifies the party items, so designers can make for example a machine that works like an identification device?

2)I want to make an item that just works if you have another, for example lets say that we have a wand that just works if you have a magma crystal, is there a way to make that each time you use the wand a magma crystal is taken away and that if you don't have magma crystals you can't use the wand?

--------------------
…../|,-‘`¯¯`\(o)_\,----,,,_………
…( `\(o),,_/` ¯ : o : :: o`-, … I'm under your bed.
Posts: 118 | Registered: Wednesday, April 2 2003 08:00
Shock Trooper
Member # 4154
Profile #1
2) This can be done by giving the item a custom ability and scripting the ability into your scenario data. Be mindful that you cannot take such a wand into another scenario, though.

--------------------
You're a moron if you think I'm not.
Posts: 213 | Registered: Friday, March 26 2004 08:00
Shock Trooper
Member # 954
Profile #2
I don't know about #1, but #2 should be pretty basic. First define the item, similarly like I've done below...

begindefineitem 445;
it_name = "Wand";
it_full_name = "Wand of Magma";
it_ability_1 = 207;
it_ability_str_1 = 10;

"207" means it will call a state in the scenario script. "10" is the number of the state to call. Then, in the scenario script, put something similar to this...

beginstate 10;
if (has_item(446) == 1) {
take_item(446);
set_state_continue(12);
}
else
message_dialog("You're out of magma crystals.","");
break;

Yours will be different, but you should get the general idea from this.

[ Saturday, July 24, 2004 19:28: Message edited by: Shyguy ]
Posts: 246 | Registered: Thursday, April 11 2002 07:00