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!

Tillerman Gump!

Do you like this script?


  • Total voters
    13

evany

Sorceror
UPDATED

- I improved the OnDoubleClick method to check for the owner ( in the original tillerman.cs this wasn't checked). Please upgrade the code with the one provided below.

- I added to the gump a button to toggle the transparency.

- Added tooltips to the buttons. (Just comment the lines inside TillermanGump.cs if you don't want them enabled ).

_____________________________________________________________________

Are you tired of having to say "forward", "backward", "drop anchor", etc... ???

Well, so do I, so I created a gump to control the tillerman without the annoying typing.

Here's a preview pic:



Yes, I know it's not very nice for the eye, but it's practical!

You can improve it anyway you want.

  • You move by clicking the 8 points of the compass ( the four dots at the edges and the W, N, S, E ).
  • To stop, simply click the red button.
  • To turn to a side, use the left or right arrow.
  • To turn around, use the down arrow.
  • Toggle One Step makes the ship move one tile at a time.
  • Raise anchor becomes Drop anchor, depending on it's current state.
  • The little paper at the bottom-right is for renaming the ship.
The gump is movable, so you can place it anywhere you want.

There might be some bugs. If you find any, post them here and I'll take a look.

Consider this release as a Beta, because I didn't fully test it .

How to install:

In BaseBoat.cs,

At the top, put this:

Code:
using Server.Gumps;
Thanks kenferguson for pointing that out.

Around line 735, inside public void EndDryDock( Mobile from )

Code:
from.CloseGump( typeof( TillerManGump ) );

In Tillerman.cs,

At the top add:

Code:
using Server.Gumps;
Thanks kenferguson for pointing that out.


And change the OnDoubleClick method to match this:

Code:
public override void OnDoubleClick( Mobile from )
{
            if ( m_Boat != null )
            {
                if( m_Boat.Owner == from || from.AccessLevel >= AccessLevel.Administrator )
                {
                    if( m_Boat.Contains( from ) )
                    {
                        from.SendGump( new TillerManGump( from, m_Boat, false ) ); //m_Boat.BeginRename( from );
                    }
                    else
                    {
                        m_Boat.BeginDryDock( from );
                    }
                }
                else from.SendLocalizedMessage( 501023 ); // You must be the owner to use this item
            }
}

And finally drop somewhere you like the TillermanGump.cs file.

I uploaded all the files I mentioned in case I forgot something.

Enjoy!!
 

Attachments

  • BaseBoat.cs
    42.9 KB · Views: 30
  • TillerMan.cs
    2.6 KB · Views: 30
  • TillerManGump.cs
    5.4 KB · Views: 38

Macil

Sorceror
Is there any way to have this overlay on a second instance of the pre-existing radar map so you can still see where you're going without having to have a map open separately?
 

evany

Sorceror
Is there any way to have this overlay on a second instance of the pre-existing radar map so you can still see where you're going without having to have a map open separately?

You can change the gump Id of the compass used to this one: 0x232F ( 9007 ).

So it should be:

Code:
// COMPASS IMAGE
            AddImage( 0, 0, 9007 );

That is a compass image with a transparent background, so you can move it over your UoMap and still se through it.

If you want to, also, you can make the gump turn into the bigger compass ( 9006 ), so you can have both images to use above the radar.

This is the result:



It'd be cool if there was a way to know if the players has the map open and where it is, so you can automatically place this above it without having to drag it.
 

evany

Sorceror
Updated!

See changes in the first post and download the new TillermanGump.cs file. Also update your OnDoubleClick methdo with the new one provided.

Comment!
 
Top