I am looking for a capable scripter to help with minor scripts for some systems I am working on.
Systems are customized spell systems which will be released at a later date. Mostly just need some hints on how to accomplish certain effects in spells. Get kinda burnt out from animations and graphics brain goes to goo for scripting lol
 
Ok I need help with what should be a simple task.
This is for RunUO 2.6
I need a spell script to place a item on ground I have the item script but having issues how to create the script for the spell to place item. its for a fire totem that will shoot fireballs at targets which I have created or had hep being created here is fire totem script I have just need some help with how to place object with spell.
Code:
using System;

using Server;
using Server.Mobiles;
using System.Collections;
using System.Collections.Generic;
using Server.Spells;


namespace Server.Items

{
   
    public class FireTotem : Item
   
    {
               public Mobile m_Owner;       
        public EffectTimer m_Timer;

       
        public static TimeSpan TickDuration = TimeSpan.FromSeconds(3.0);       
       
        public DateTime m_Expiration = DateTime.UtcNow;

            public static int Range = 15;

             
        [Constructable]
            public FireTotem( Mobile owner, double duration ) : base()       
       
        {
            Name = "fire totem";
            Weight = 2.0;
            Movable = false;
                    m_Owner = owner;
           
            m_Expiration = DateTime.UtcNow + TimeSpan.FromSeconds(duration);

           
            Movable = false;      
            if (m_Timer == null)
               
            m_Timer = new EffectTimer(this);

           
            m_Timer.Start(); 
       
        }

            public static bool PlayerCanDamage(Mobile from, Mobile target)
            {
                    if (from == null)
                return false;

                    if (target == null)
                return false;

                    if (!target.Alive || target.IsDeadBondedPet)
                return false;

                    if (!target.CanBeDamaged())
                    return false;

                    if (!from.CanBeHarmful(target))
                return false;
           
                    int NotorietyResult = Notoriety.Compute(from, target);

                    if (NotorietyResult == Notoriety.CanBeAttacked)
                return true;

                    if (NotorietyResult == Notoriety.Criminal)
                return true;

                    if (NotorietyResult == Notoriety.Murderer)
                return true;

                    return false;
            }

       

        public class EffectTimer : Timer
       
        {
           
            public FireTotem m_FireTotem;

           

            public EffectTimer(FireTotem FireTotem): base(TimeSpan.Zero, TickDuration)
           
            {
               
                m_FireTotem = FireTotem;

               
                Priority = TimerPriority.TwoFiftyMS;
           
            }

           

            protected override void OnTick()
           
            {
               
                if (m_FireTotem == null)
               
                {
                   
                    Stop();
                   
                    return;
               
                }

               

                if (m_FireTotem.Deleted)
               
                {
                  
                    Stop();
                   
                    return;
               
                }

               

                if (DateTime.UtcNow >= m_FireTotem.m_Expiration)
               
                {
                   
                    m_FireTotem.Delete();
                   
                    return;
               
                }

               

                Queue m_Queue = new Queue();

                        var nearbyMobiles = m_FireTotem.Map.GetMobilesInRange(m_FireTotem.Location, Range);

               
                   
                foreach (Mobile mobile in nearbyMobiles)
               
                {
                   
                    if (mobile == null) continue;
                                if (mobile.AccessLevel > AccessLevel.Player) continue;
                                if (mobile.Hidden) continue;
                                if (!m_FireTotem.Map.LineOfSight(m_FireTotem.Location, mobile.Location)) continue;

                   
                    if (PlayerCanDamage(m_FireTotem.m_Owner, mobile))
                       
                    m_Queue.Enqueue(mobile);
               
                }

                           Point3D location = m_FireTotem.Location;
                        Map map = m_FireTotem.Map;

                        if (m_Queue.Count > 0)
                                Effects.PlaySound(location, map, 0x226);

                           while (m_Queue.Count > 0)
                        {
                                Mobile mobile = (Mobile)m_Queue.Dequeue();

                                if (mobile == null)
                                    continue;

                                IEntity startLocation = new Entity(Serial.Zero, new Point3D(location.X, location.Y, location.Z + 10), map);
                                IEntity endLocation = new Entity(Serial.Zero, new Point3D(mobile.Location.X, mobile.Location.Y, mobile.Location.Z + 5), map);
                   
                   
                    Effects.SendMovingEffect(startLocation, endLocation, 0x36D4, 8, 0, false, false, 0, 0);

                                double targetDistance = Utility.GetDistanceToSqrt(startLocation.Location, endLocation.Location);
                   
                    double destinationDelay = (double)targetDistance * .06;

                                Timer.DelayCall(TimeSpan.FromSeconds(destinationDelay), delegate
                                {
                                       if (mobile == null)
                                            return;

                                    int damage = Utility.RandomMinMax(10, 20);

                                    mobile.PlaySound(0x359);

                                    new Blood().MoveToWorld(mobile.Location, mobile.Map);
                                    AOS.Damage(mobile, damage, 100, 0, 0, 0, 0);
                                });
                        }
           
            }
           
        } 

       
       
        public override void OnAfterDelete()
       
        {
           
            if (m_Timer != null)
           
            {
               
                m_Timer.Stop();
               
                m_Timer = null;
           
            }

           
           
            base.OnAfterDelete();
       
        }

       

        public FireTotem(Serial serial): base(serial)
       
        {
       
        }

       

        public override void Serialize( GenericWriter writer )
       
        {
           
            base.Serialize( writer );
           
            writer.Write( (int) 0 ); 
            writer.Write(m_Expiration);
       
        }

       

        public override void Deserialize(GenericReader reader)
       
        {
           
            base.Deserialize( reader );
   
       
            int version = reader.ReadInt();

           
                     
            if (version >= 0)
           
            {
               
                m_Expiration = reader.ReadDateTime();
           
            }

           
           
                    if (m_Expiration <= DateTime.UtcNow)
                        Delete();           

                    else
                    {
                        if (m_Timer == null)
                            m_Timer = new EffectTimer(this);

                        m_Timer.Start();
                   }
   
        }
   
    }

}
 
if you want to pay for help he help you at a cost your shard will crash.

but i will help you for free.
 
I cant edit it you guys have all edits turned off....

I am sorry zerodowned didn't mean to let my opinions run wild.
 
If you don't need to place the item in a specific spot, you could probably cannibalize some code from the other summoning spells. Otherwise, you could cannibalize code from the [add command's targeting, I suspect.
 
If you create a Point3D in the spell like:
C#:
private Point3D m_P;

You can then go and define that Point3D using a traditional targeting method, and make a new void to place your object. You could also just use the casters location and movetoworld to drop your totem right on the caster.

You can check out Chain Lightning to see how they target just a point.
Edit: Rereading you might be looking for how to move things to the point?

C#:
<Item> item = new <Item> ();
                item.MoveToWorld (Point3D, Map);

That'll create the item on internal and then move it to the specified point and map.
 
Ok been banging my head against the wall on this one.
I Really need help with a spell script and ive looked everywhere to see if I can get it working with no luck im not going to post any code cause im pretty much at a loss here but if someone could help me out and write one script just one for this I can learn from it lol.
Fire Totem Spell
How I would like it to function:
1. Place totem on ground near feet or place with icon no more than 5 tiles from caster.
2. Shoots a fireball at hostile target. ( Aggressive monsters or flagged players).
3.Set a duration until it disappears.
4. Has hit points so it can be damaged.

And that is pretty much it should be simple but for the life of me I cant figure it out lol.

If I can get this script I would like to release my Shaman spell system this is like the only one I cant figure out lol
 
Back