The Dink Network

Reply to Re: Equipping magic during a cutscene

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
October 9th 2007, 02:38 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
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.