//! Runs an arbitrary item script 'name' on a constant item named 'hotscript'.
//! Returns the script ID.
int RunAScript(int name)
{
itemdata id = Game->LoadItemData(Game->GetItem("hotscript"));
int script_number = Game->GetItemScript(name);
id->Script = script_number;
id->RunScript();
return script_number;
}
//! Runs an arbitrary item script.
//! Itemname is the name of the item used to run script scriptname.
//! Returns the script number.
int RunAScript(int scriptname, int itemname)
{
itemdata id = Game->LoadItemData(Game->GetItem("hotscript"));
int script_number = Game->GetItemScript(scriptname);
id->Script = script_number;
id->RunScript();
return script_number;
}
Comments