was trying to find a scripting way to do it
grapevine.cs
public override void OnDoubleClick(Mobile from)
{
if((ItemID == 3358 || ItemID == 3363) && Movable == false && m_NextHarvest < DateTime.UtcNow)
//
{
from.AddToBackpack(new GrapeBunch());
m_NextHarvest = DateTime.UtcNow + TimeSpan.FromSeconds(HarvestWait);
}
}
but on grapebunch.cs
public override int LabelNumber { get { return 1022513; } }
[Constructable]
public GrapeBunch() : base(1, 3354)
itemid may be different?
is there another way to addtopack ondoubleclick?
maybe make a basetreeaddon but will it effect labelnumber ?
add an xml spawner.. grapes fall, pick em up, hope the ground dont become wine!! horses will drink em.. ya!
/*grapevine.cs*/
public override void OnDoubleClick(Mobile from)
{
if((ItemID == 3358 || ItemID == 3363) && Movable == false && m_NextHarvest < DateTime.UtcNow)
{
from.AddToBackpack(new GrapeBunch());
m_NextHarvest = DateTime.UtcNow + TimeSpan.FromSeconds(HarvestWait);
}
}
/*Grapebunch.cs*/
/*
public override int LabelNumber { get { return 1022513; } }
[Constructable]
public GrapeBunch()
: base(1, 3354)
*/
public override void OnDoubleClick(Mobile from)
{
if (ItemID == 3358 || ItemID == 3363
|| (ItemID == 3354 && LabelNumber == 1022513)
&& Movable == false
&& m_NextHarvest < DateTime.UtcNow)
{
from.AddToBackpack(new GrapeBunch());
m_NextHarvest = DateTime.UtcNow + TimeSpan.FromSeconds(HarvestWait);
}
}
else if (targeted is StaticTarget)
{
int itemID = ((StaticTarget)targeted).ItemID;
if (itemID == 0xD15 || itemID == 0xD16) // red mushroom
{
PlayerMobile player = from as PlayerMobile;
if (player != null)
{
QuestSystem qs = player.Quest;
if (qs is WitchApprenticeQuest)
{
FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective;
if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.RedMushrooms)
{
player.SendLocalizedMessage(1055036); // You slice a red cap mushroom from its stem.
obj.Complete();
if (Siege.SiegeShard && m_Item is IUsesRemaining)
{
Siege.CheckUsesRemaining(from, m_Item);
}
return;
}
}
}
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.