ServUO Version
Publish 58
Ultima Expansion
Endless Journey
on grapevines item id is====
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.FromHours(HarvestWait);
}
}
ongrapebunch itemid is ==
public GrapeBunch() : base(1, 3354)
and so on dblclick there is nothing!!
ive changed them, ive changed to false artifact, still no grapes from grapevines in yew?
 
Try posting the whole thing.. hard to figure out whats wrong with only that but.. your item ID is 3354 and not 3358/3363 .. or maybe its because you didnt set it to movable false and youre trying to double-click it from your backpack..
 
public class GrapeVine : Item
{
public override bool IsArtifact { get { return false; } }
private DateTime m_NextHarvest;
private readonly double HarvestWait = 4;

public override int LabelNumber { get { return 1149954; } }

[Constructable]
public GrapeVine() : base(Utility.Random(3355, 10))
{
m_NextHarvest = DateTime.UtcNow;
}

public override void OnDoubleClick(Mobile from)
{
if((ItemID == 3354 || ItemID == 3363) && Movable == true && m_NextHarvest < DateTime.UtcNow)
{
from.AddToBackpack(new GrapeBunch());
m_NextHarvest = DateTime.UtcNow + TimeSpan.FromHours(HarvestWait);
}
}
the rest is serial



public class GrapeBunch : Food
{
public override bool IsArtifact { get { return false; } }
public override int LabelNumber { get { return 1022513; } }

[Constructable]
public GrapeBunch() : base(1, 3354)
{
Weight = 1.0;
FillFactor = 1;
Stackable = true;
}
rest is serial
this is same script on all servuo publishes pretty much. cant produce grapes in yew
 
Last edited:
Its easy to debug those problems, add

Console.WriteLine("1");

then Console.WriteLine("2"); and so on

add it between lines then check console, to see where it reachs, then theres the issue before that line

i feel like its either
C#:
m_NextHarvest = DateTime.UtcNow;
or the
C#:
 ItemID
 
i changed itemid for grapevine, went in game and props the vine itself to find another item id, perhaps this grapevine is for the item and not the grapevines in yew! also itemid with props a grapebunch laying on floor and it was different. ill try add grapevine and grapebunch!
ultimate goal is that grapevines in yew give grapes..
 
Back