Reply to Re: Equipping magic during a cutscene
If you don't have an account, just leave the password field blank.
How about:
int &temp = get_magic("item-fb");
if (&temp > 0)
{ &cur_magic = &temp; arm_magic();
}
Which is the DinkC.chm example at the page about get_magic():
get_magic
Category: Inventory, Script
Version: 1.08+
Prototype: int get_magic(string script[9]);
get_magic returns the first slot of the given script in the player's magic inventory. Returns 0 if not found. This is useful if you want to arm the fireball, but you don't know what inventory slot it is in.
EDIT: get_item(); works in the same way.
int &temp = get_magic("item-fb");
if (&temp > 0)
{ &cur_magic = &temp; arm_magic();
}
Which is the DinkC.chm example at the page about get_magic():
get_magic
Category: Inventory, Script
Version: 1.08+
Prototype: int get_magic(string script[9]);
get_magic returns the first slot of the given script in the player's magic inventory. Returns 0 if not found. This is useful if you want to arm the fireball, but you don't know what inventory slot it is in.
EDIT: get_item(); works in the same way.