Clock work assembly
Posted: Mon Apr 20, 2009 10:02 pm
Here is what i have done in the function i have made but not working way i want it to.
What i want to do is
this you double click the item checks to see if you have this items
PowerCrystal
IronIngot
BronzeIngot
Gears
and the amount you need for those items
the amount i need taken from each one of those itsm is
1
50
50
5
well i still don't understand how to make it check for items by id in a fucntion or remove items by a id/color
all i got was code form dough or bread trying to figure it out. any kind of help would rock.
Code: Select all
function onUseChecked ( pUser, iUsed )
{
// remove one dough
var iMakeResource = pUser.ResourceCount( 0x103D ); // is there enough resources to use up to make it
if( iMakeResource < 1 )
{
pUser.SysMessage( "You don't seem to have any dough!" );
return;
}
else
pUser.UseResource( 1, 0x103D ); // uses up a resource (amount, item ID, item colour)
// check the skill
//if( !pUser.CheckSkill( 13, 0, 200 ) ) // character to check, skill #, minimum skill, and maximum skill
//{
// pUser.SysMessage( "You burnt the dough to crisp." );
// return;
//}
//var itemMade = CreateDFNItem( pUser.socket, pUser, "0x103b", 1, "ITEM", true ); // makes a loaf of bread
//pUser.SysMessage( "You bake a loaf of bread." );
return false;
}this you double click the item checks to see if you have this items
PowerCrystal
IronIngot
BronzeIngot
Gears
and the amount you need for those items
the amount i need taken from each one of those itsm is
1
50
50
5
well i still don't understand how to make it check for items by id in a fucntion or remove items by a id/color
all i got was code form dough or bread trying to figure it out. any kind of help would rock.