Neshoba

Member
at line # 49 and line #87 pretty sure these are not in the right spot if somebody could put in right spot and add a note in there about it ,,, I would greatly appreciate it tryin to make this scary to pets and open a gate to next mob on death some things I can figure out but some stump Me
 

Attachments

  • PriestKingSerus.cs
    5 KB · Views: 5
This is what I've done in the past.

Code:
namespace Server.Mobiles
{

public class MobileDeleteTime : Timer
    {
        private Item mob;

        public MobileDeleteTime(Item m)
            : base(TimeSpan.FromSeconds(15))
        {
            mob = m;
            Priority = TimerPriority.OneSecond;
        }

        protected override void OnTick()
        {
            if (mob == null || mob.Deleted)
            {
                Stop();
                return;
            }

            mob.Delete();
        }
    }
and
Code:
        public override bool OnBeforeDeath()
        {
            // spawn the item
            Item item = (Item)Activator.CreateInstance(typeof(Moongate));
            Moongate moon = (Moongate)item;

            moon.TargetMap = Map.Trammel; //or map
            moon.Target = new Point3D(1422, 1697, 0); // Set map X,Y,Z location here

            // Map map = Map.Trammel;

            Point3D pnt = GetSpawnLocation();

            moon.MoveToWorld(pnt, this.Map);

            Timer m_timer = new MobileDeleteTime(item);
            m_timer.Start();
            return base.OnBeforeDeath();
        }

        //from champspawn.cs
        public Point3D GetSpawnLocation()
        {
            int m_SpawnRange = 2;
            Map map = Map;

            if (map == null)
                return Location;

            // Try 20 times to find a spawnable location.
            for (int i = 0; i < 20; i++)
            {
                int x = Location.X + (Utility.Random((m_SpawnRange * 2) + 1) - m_SpawnRange);
                int y = Location.Y + (Utility.Random((m_SpawnRange * 2) + 1) - m_SpawnRange);
                int z = Map.GetAverageZ(x, y);

                if (Map.CanSpawnMobile(new Point2D(x, y), z))
                    return new Point3D(x, y, z);
            }

            return Location;
    }
 
ok put it in tested it a few times and its still getting error reloaded the file with the changes in it Im missing something but don't know what it is :( the top clip You posted seems to be ok its the second clip that's throwing errors
----------------------------------------------------------------------------
JustUO - [http://www.playuo.org] Version 1.0
Publish 4
Core: .NET Framework Version 4.0.30319
Core: Optimizing for 2 processors
RandomImpl: CSPRandom (Software)
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ Neshobascripts/Custom Mobs/PriestKingSerus.cs:
CS1518: Line 73: Expected class, delegate, enum, interface, or struct
CS1518: Line 80: Expected class, delegate, enum, interface, or struct
CS1518: Line 84: Expected class, delegate, enum, interface, or struct
CS1518: Line 90: Expected class, delegate, enum, interface, or struct
CS1518: Line 102: Expected class, delegate, enum, interface, or struct
CS1518: Line 103: Expected class, delegate, enum, interface, or struct
CS1022: Line 104: Type or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
yea sorry bout that totally spaced loading it earlier this is the 1 Im workin with
 

Attachments

  • PriestKingSerus.cs
    5 KB · Views: 5
Try this. Did a bit of a re-write on it. The Weapon Ability coding is useless for a mobile, they only work in weapons, so I removed it. Showing error free, but I have no way to test it. So good luck.
 

Attachments

  • PriestKingSerus.cs
    4.9 KB · Views: 8
got it in and 1 error at line 85 the type or namespace name DeleteMobileTime could not be found changed it to timer still no good but its way closer still had error at that line and thanks for cleaning it up a little
 
Last edited:
I sort of forgot the entire timer setup. :oops: Here ya go. I was doing it at work.
 

Attachments

  • PriestKingSerus.cs
    5.3 KB · Views: 21
awesome man it loaded no errors :):) gonna test and get the rest of quest set up thank You for takin time to help

(edit) 8/15/16
nice gate worked but not for 4 of the same bosses but I still have a use for the 1 :):) Thanks
 
Last edited:
This is not working for me, no matter what location/facet i setup, it says 'You cannot teleport to that location'
 
not at home rite now to look at My file ,, check this go to location of gate and use [where some of the maps say TerMur but are actualy trammel or fel also check if you have a region controller in the area that prevents travel to that location Ilshenar is good for blocking travel to some spots also some dungeons

I implemented this in for a 4 boss quest first boss is find teleport to it then then kill first boss for a gate to next and that 1 gates to next to open gates and last boss have to use travel book to get back to quest giver
 
No, no region controller, i tried from felucca to felucca, from trammel to felucca, from felucca to trammel.. it doesnt matter, something is blocking it :p
 
whats the gate clip say in script ??

public override void OnDeath( Container corpse )
{
//change the line below to the coords and map you want
Moongate gate = new Moongate( new Point3D( 6316, 2376, 15 ), Map.Trammel );

if( gate != null && !gate.Deleted && corpse != null && !corpse.Deleted )
{
gate.MoveToWorld( corpse.Location, corpse.Map );

//set how long you want the gate to stay open by changing the 30.0 in the line below
Timer.DelayCall( TimeSpan.FromSeconds( 45.0 ), new TimerCallback( gate.Delete ) );
should look like that
 
I added this:
it works :)

Code:
	public override void OnDeath( Container corpse )
{
//change the line below to the coords and map you want
Moongate gate = new Moongate( new Point3D( 6316, 2376, 15 ), Map.Trammel );

if( gate != null && !gate.Deleted && corpse != null && !corpse.Deleted )
{
gate.MoveToWorld( corpse.Location, corpse.Map );

//set how long you want the gate to stay open by changing the 30.0 in the line below
Timer.DelayCall( TimeSpan.FromSeconds( 10.0 ), new TimerCallback( gate.Delete ) );
}
base.OnDeath(corpse);
}
 
Last edited:

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back