Esempio n. 1
0
            public InternalTimer(Mobile owner, FalseCoin weapon)
                : base(TimeSpan.FromSeconds(0))
            {
                m_Owner  = owner;
                m_Weapon = weapon;


                int val = (int)owner.Skills[SkillName.Magery].Value;

                if (val > 100)
                {
                    val = 100;
                }

                Delay    = TimeSpan.FromSeconds(val);
                Priority = TimerPriority.TwoFiftyMS;
            }
Esempio n. 2
0
        public void Target(Gold gold)
        {
            if (!Caster.CanSee(gold))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }

            else if (CheckSequence())
            {
                if (Caster.BeginAction(typeof(RogueFalseCoinSpell)))
                {
                    if (this.Scroll != null)
                    {
                        Scroll.Consume();
                    }
                    FalseCoin fake = new FalseCoin();
                    fake.m_Amount = gold.Amount * 5;
                    fake.Name     = "" + (gold.Amount * 5) + " Gold Coins";
                    m_Fake        = fake;
                    Caster.AddToBackpack(fake);
                    Caster.PlaySound(0x2E6);

                    IEntity from = new Entity(Serial.Zero, new Point3D(Caster.X, Caster.Y, Caster.Z + 50), Caster.Map);
                    IEntity to   = new Entity(Serial.Zero, new Point3D(Caster.X, Caster.Y, Caster.Z), Caster.Map);
                    Effects.SendMovingParticles(from, to, 0x1EC6, 1, 0, false, false, 33, 3, 9501, 1, 0, EffectLayer.Head, 0x100);
                    StopTimer(Caster);

                    Timer t = new InternalTimer(Caster, m_Fake);

                    m_Timers[Caster] = t;

                    t.Start();
                }
            }

            FinishSequence();
        }