Hello!Just having a problem,the script is an item,when double click it and you have got the required items in your backpack,this first item self-delete and turn into new item.
With normal items required 8not quantity) script runs without problems,when i try to find quantity server crash when i double click it,here the method:
I know the code is wrong,whats the correct path to do that? Thank you so much!!!
With normal items required 8not quantity) script runs without problems,when i try to find quantity server crash when i double click it,here the method:
C#:
public override void OnDoubleClick( Mobile m )
{
Item a = m.Backpack.FindItemByType( typeof(IronIngot) );/////50<-----
if ( a.Amount >= 50 )
{
Item b = m.Backpack.FindItemByType( typeof(Log) );//////50<------
if ( b.Amount >= 50 )
{
Item c = m.Backpack.FindItemByType( typeof(Dagger) );
if ( c != null )
{
Item d = m.Backpack.FindItemByType( typeof(Pickaxe) );
if ( d != null )
{
Item e = m.Backpack.FindItemByType( typeof(DoubleAxe) );
if ( e != null )
{
m.AddToBackpack( new NewItem() );
a.Delete();
b.Delete();
c.Delete();
d.Delete();
e.Delete();
m.SendMessage( "You get the new test item!" );
this.Delete();
}