RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

RunUO 2.0 Final Re-Pack

Phr3d13

Sorceror
Its in each of the individual vendor scripts
What you want is in each individual vendor. For example, in Blacksmith.cs, you have something like this:

Code:
        public override Item CreateBulkOrder( Mobile from, bool fromContextMenu )
        {
            PlayerMobile pm = from as PlayerMobile;

            if ( pm != null && pm.NextSmithBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()) )
            {
                double theirSkill = pm.Skills[SkillName.Blacksmith].Base;

                if ( theirSkill >= 70.1 )
                    pm.NextSmithBulkOrder = TimeSpan.FromHours( 6.0 );
                else if ( theirSkill >= 50.1 )
                    pm.NextSmithBulkOrder = TimeSpan.FromHours( 2.0 );
                else
                    pm.NextSmithBulkOrder = TimeSpan.FromHours( 1.0 );

                if ( theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble() )
                    return new LargeSmithBOD();

                return SmallSmithBOD.CreateRandomFor( from );
            }

            return null;
        }
 

maximus_dc

Wanderer
Tks Phr3d13, but I compared the vendor script from this pack and one from a clean Runuo and they're practically the same, but the problem is I need to when u complete a BOD and deliver to the vendor the countdown to pick a new one resets automatically (the bod system on the clean Runuo server work like this), but on this pack server that doesn't happen, u still need to wait until the countdown reaches 0 even when u deliver a complete bod.

This is the code from this pack:
Code:
#region Bulk Orders
        public override Item CreateBulkOrder( Mobile from, bool fromContextMenu )
        {
            PlayerMobile pm = from as PlayerMobile;

            if ( pm != null && pm.NextTailorBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()) )
            {
                double theirSkill = pm.Skills[SkillName.Tailoring].Base;

                if ( theirSkill >= 70.1 )
                    pm.NextTailorBulkOrder = TimeSpan.FromHours( 6.0 );
                else if ( theirSkill >= 50.1 )
                    pm.NextTailorBulkOrder = TimeSpan.FromHours( 2.0 );
                else
                    pm.NextTailorBulkOrder = TimeSpan.FromHours( 1.0 );

                if ( theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble() )
                    return new LargeTailorBOD();

                return SmallTailorBOD.CreateRandomFor( from );
            }

            return null;
        }

        public override bool IsValidBulkOrder( Item item )
        {
            return ( item is SmallTailorBOD || item is LargeTailorBOD );
        }

        public override bool SupportsBulkOrders( Mobile from )
        {
            return ( from is PlayerMobile && from.Skills[SkillName.Tailoring].Base > 0 );
        }

        public override TimeSpan GetNextBulkOrder( Mobile from )
        {
            if ( from is PlayerMobile )
                return ((PlayerMobile)from).NextTailorBulkOrder;

            return TimeSpan.Zero;
        }

        public override void OnSuccessfulBulkOrderReceive( Mobile from )
        {
            if( Core.SE && from is PlayerMobile )
                ((PlayerMobile)from).NextTailorBulkOrder = TimeSpan.Zero;
        }
        #endregion

code from the clean runuo server:

Code:
#region Bulk Orders
        public override Item CreateBulkOrder( Mobile from, bool fromContextMenu )
        {
            PlayerMobile pm = from as PlayerMobile;

            if ( pm != null && pm.NextTailorBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()) )
            {
                double theirSkill = pm.Skills[SkillName.Tailoring].Base;

                if ( theirSkill >= 70.1 )
                    pm.NextTailorBulkOrder = TimeSpan.FromHours( 6.0 );
                else if ( theirSkill >= 50.1 )
                    pm.NextTailorBulkOrder = TimeSpan.FromHours( 2.0 );
                else
                    pm.NextTailorBulkOrder = TimeSpan.FromHours( 1.0 );

                if ( theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble() )
                    return new LargeTailorBOD();

                return SmallTailorBOD.CreateRandomFor( from );
            }

            return null;
        }

        public override bool IsValidBulkOrder( Item item )
        {
            return ( item is SmallTailorBOD || item is LargeTailorBOD );
        }

        public override bool SupportsBulkOrders( Mobile from )
        {
            return ( from is PlayerMobile && from.Skills[SkillName.Tailoring].Base > 0 );
        }

        public override TimeSpan GetNextBulkOrder( Mobile from )
        {
            if ( from is PlayerMobile )
                return ((PlayerMobile)from).NextTailorBulkOrder;

            return TimeSpan.Zero;
        }

        public override void OnSuccessfulBulkOrderReceive( Mobile from )
        {
            if( Core.SE && from is PlayerMobile )
                ((PlayerMobile)from).NextTailorBulkOrder = TimeSpan.Zero;
        }
        #endregion
 

tass23

Page
No, Playermobile isn't going to have anything. Although, you can [props yourself and see BOD timers on page two or three in the [props menu. Maybe there is some modd that Sean included in this re-pack that changes BOD turn in times.
 

Phr3d13

Sorceror
its this in blacksmith.cs that sets the timer to zero when you turn in a bod right?
Code:
public override void OnSuccessfulBulkOrderReceive( Mobile from )
		{
			if( Core.SE && from is PlayerMobile )
				((PlayerMobile)from).NextSmithBulkOrder = TimeSpan.Zero;
		}
does the
Code:
if( Core.SE && from is PlayerMobile )
mean that if you are using se it will do that, or se or higher?
 

tass23

Page
I believe it would be SE, yes. Because I'm running AOS and When I turn in any type of BOD, I'm still on the two hour timer from when I picked up the one I just turned in.
 

maximus_dc

Wanderer
Wow, tks so much guy!!!


But unfortunately that's too advanced for me, I tot was something like change false or true or some timing thing! lol
I don't know where I could start to "fix" this, anyway I just want a Like Osi server to play with my others uo enthusiastic friends.


Tks tass23 and Phr3d13 you're good people!!
 

tass23

Page
Maximus, you could try sending Sean a message and see if he ever ran into this problem. I'm not saying he'll have an answer for you, but it's worth a shot at this point I guess. ;)
 

Dreadfull

Sorceror
I must say, great idea and a great package. I will definitely take a look at it.

I added console commands to the setup that I am running with.. Did notice one little bug.. SocketOptions.cs has it predefined to pull port 7279 instead of 2593. Not sure if that is how you wanted it setup or not.
 

beebee

Sorceror
How can I patch this server to the latest client version 7.0.14.0 i have tried and it freezes up my char.If there is a way how would i get it to patch?
 
Top