Пример #1
0
            // Crescimento da PRANTA
            protected override void OnTick()
            {
                count++;
                plantable.InvalidateProperties();
                if (count == 1)
                {
                    plantable.ItemID = 3254; // matinho q ta crescendo
                }
                if (count == 2)
                {
                    // crescendo ela toda
                    var planta = plantable.GetToPlant();

                    planta.nomeQuemPlantou = plantador;
                    planta.plantouQuando   = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
                    planta.MoveToWorld(plantable.Location, plantable.Map);
                    plantable.Consume();
                }
            }
Пример #2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                IPoint3D p = targeted as IPoint3D;

                if (p == null || from.Map == null)
                {
                    return;
                }

                if (p is LandTarget)
                {
                    var target = (LandTarget)p;

                    if (target.TileID != 9)
                    {
                        from.SendMessage("Voce apenas pode plantar isto em fazendas");
                        return;
                    }

                    if (from.CheckSkill(SkillName.Herding, toPlant.GetMinSkill(), toPlant.GetMaxSkill()))
                    {
                        from.Emote("* plantando *");
                        from.Animate(AnimationType.Attack, 3);
                        toPlant.DropToWorld(from, target.Location);
                        toPlant.Movable = false;
                        new GrowTimer(toPlant, from.Name).Start();
                        Effects.PlaySound(target.Location, from.Map, 0x12E);
                        toPlant.plantada = true;
                        toPlant.InvalidateProperties();
                    }
                    else
                    {
                        from.SendMessage("Voce nao conseguiu colocar a planta corretamente");
                    }
                }
            }