sahisahi
Member
I made a chest that only can be open if a player carry certain item (working)
im also trying to only let players lift items from that chest if they are carrying that item. (Not working so far)
EDIT: ahhh i realized the OnDragLift refers to the chest himself not the items inside :S
im also trying to only let players lift items from that chest if they are carrying that item. (Not working so far)
Code:
public override bool OnDragLift(Mobile from)
{
PlayerMobile mobile = (PlayerMobile)from;
Container pack = from.Backpack;
Item am = from.Backpack.FindItemByType(typeof(Diamantenegrokey));
if (am != null)
{
return true;
// from.SendMessage("WE HAVE THE KEY!");
}
else
{
return false;
// from.SendMessage("WE DONT HAVE THE KEY!");
}
base.OnDragLift(from);
}
EDIT: ahhh i realized the OnDragLift refers to the chest himself not the items inside :S
Last edited: