protected override void OnTick() { Point3D p = _Locs[_Tick]; Effects.SendLocationEffect(new Point3D(Altar.X + p.X, Altar.Y + p.Y, Altar.Z + p.Z), Altar.Map, 0x3709, 30, 10); Effects.PlaySound(Altar.Location, Altar.Map, 0x208); int index = _Tick / 4; if (_Tick > 0 && index < Altar.Braziers.Count && (_Tick + 1) % 4 == 0) { Server.Timer.DelayCall(TimeSpan.FromSeconds(1), () => { AddonComponent torch = new AddonComponent(6571); Altar.Torches.Add(torch); Point3D to = Altar.Braziers[index].Location; torch.MoveToWorld(new Point3D(to.X, to.Y, to.Z + 17), Altar.Map); Effects.PlaySound(to, Altar.Map, 0x47); }); } _Tick++; if (_Tick >= _Locs.Length) { Altar.Complete(Occupier); Stop(); } }
public override void Execute(CommandEventArgs e, object obj) { try { Item item = obj as Item; m_found++; if (item != null) { m_processed++; AddonComponent ac = new AddonComponent(item.ItemID); ac.MoveToWorld(item.Location, item.Map); item.Delete(); } AddResponse(String.Format("done.")); } catch (Exception exe) { LogHelper.LogException(exe); e.Mobile.SendMessage(exe.Message); } }