Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 12-08-2007, 06:35 PM   #1 (permalink)
CEO
Forum Expert
 
CEO's Avatar
 
Join Date: Jun 2004
Age: 47
Posts: 776
Default Start Location Gump

Send this gump to new characters to allow them to select starting city locations.



There are several ways to force this gump to popup after the new player/character has entered the world. What I did is modify the OnTick routine of WelcomeTimer.cs to:

Code:
		protected override void OnTick()
		{
            if (m_State < m_Count)
            {
                m_Mobile.SendMessage(0x35, m_Messages[m_State++]);
                m_Mobile.SendGump(new Server.Gumps.StartLocationGump(m_Mobile, Map.Trammel, 2));
            }

			if ( m_State == m_Count )
				Stop();
		}
The line:

Code:
                m_Mobile.SendGump(new Server.Gumps.StartLocationGump(m_Mobile, Map.Trammel, 2));
is really the only change. If you don't have Trammel, change the line to read Map.Felluca. Option 2 is the default for Britian Sweet Dreams.


Making location changes

There are 2 tables, one to draw a dot and city name on the map, the other is a one-to-one correspondence of the dot table and defines the location for that dot.
Code:
        private int[,] m_CityInfo = new int[9, 3] { { 1011032, 80, 130 },   // Yew
                                                    { 1011031, 224, 79 },   // Minoc   
                                                    { 1011028, 149, 188},   // Britian
                                                    { 1011344, 372, 145},   // Moonglow
                                                    { 1011029, 177, 293},   // Trinsic
                                                    { 1011345, 312, 234},   // Magincia
                                                    { 1011343, 137, 380},   // Jhelom
                                                    { 1011347, 75, 233},    // Skara Brae
                                                    { 1011030, 249, 124}};  // Vesper

        private Point3D[] m_CityLocations = new Point3D[] { 
                                                    new Point3D( 535, 992, 0),      // Yew (City Center)
                                                    new Point3D( 2477, 399, 15),    // Minoc (The Barnacle)   
                                                    new Point3D( 1504, 1620, 21),   // Britian (Sweet Dreams Inn)
                                                    new Point3D( 4403, 1155, 0),    // Moonglow (The Scholar's Inn)
                                                    new Point3D( 1840, 2729, 0),    // Trinsic (The Traveler's Inn)
                                                    new Point3D( 4403, 1156, 0),    // Magincia
                                                    new Point3D( 1364, 3822, 0),    // Jhelom (The Morning Star Inn)
                                                    new Point3D( 612, 2242, 0),     // Skara Brae (The Falconer's Inn)
                                                    new Point3D( 2778, 971, 0)};    // Vesper
You can change the city locations by simple changing the x/y/z cords in m_CityLocations for that specific dot/city.

Adding a new dot on the map, is fairly easy, but involves a couple of extra things. Add new entries into the tables, then change the 9 in "private int[,] m_CityInfo = new int[9, 3]" and "for (int i = 0; i < 9; i++)" to the new length of the table. Also change the 109 in "else if (info.ButtonID >= 100 && info.ButtonID <= 109)" to whatever the new table length is plus 100. Also in the table m_CityInfo the first value is the localized name of the city. If you add some other unique location you'll need to find something in the language file to display. For instance, 3000126 displays "Starting Location". The next two numbers are the x/y location of where to put the dot on the gump/map.

The gump as it is closely matches the gump you get when creating an advanced character (although that is still overridden in both EA and RunUO) shards. I selected the locations myself so are not the actual ones, in most cases I used an inn. In a few cases a tavern or the city center.
Attached Files
File Type: cs StartLocationGump.cs (3.8 KB, 114 views)
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list.
Please don't add me to your friends list, I have enough friends. Thx

Last edited by CEO; 12-08-2007 at 06:56 PM.
CEO is offline   Reply With Quote
Old 12-08-2007, 06:55 PM   #2 (permalink)
Forum Novice
 
Varkasal's Avatar
 
Join Date: Jun 2004
Age: 37
Posts: 189
Default CEO you are awsome...

Thanks man appreciate it nice job .. and quick i might add .... what ever happened to the script request forum they used to have here on the run uo site ?
well no matter i got what i wanted ... great job CEO now to plug it in and see how well it works .
__________________
Varkasal ......... Admin of Forgotten World A RunUO Server
Varkasal is offline   Reply With Quote
Old 12-08-2007, 07:22 PM   #3 (permalink)
Forum Novice
 
Varkasal's Avatar
 
Join Date: Jun 2004
Age: 37
Posts: 189
Default

Works great ill still have to put them in jail to start since they appear in the world first ... just feel bad for them if they close the gump ... cause they will be stuck in jail ... and ill probably leave them there a while .... lol. Excelent job though Ceo ... now i gotta see if i can call the gump up in character creation before entering the world ... that would be ideal .
__________________
Varkasal ......... Admin of Forgotten World A RunUO Server

Last edited by Varkasal; 12-08-2007 at 07:24 PM.
Varkasal is offline   Reply With Quote
Old 12-08-2007, 08:50 PM   #4 (permalink)
Forum Novice
 
Zylara's Avatar
 
Join Date: May 2007
Location: Sittin on the dock of the bay, in Moonglow
Posts: 149
Default

Put in some chairs in and a few nasty monsters in the cells so they can have something to do. Nice fast work CEO, it looks great!
Zylara is offline   Reply With Quote
Old 12-09-2007, 03:03 PM   #5 (permalink)
Newbie
 
used212's Avatar
 
Join Date: Apr 2007
Age: 29
Posts: 12
Thumbs up This was very useful ! ty saved me alot time :)

very nice ! thanks again
__________________
:p
used212 is offline   Reply With Quote
Old 12-09-2007, 03:58 PM   #6 (permalink)
Newbie
 
michal555's Avatar
 
Join Date: Dec 2006
Posts: 65
Default

yeah! thx CEO
michal555 is offline   Reply With Quote
Old 12-12-2007, 08:58 AM   #7 (permalink)
Forum Novice
 
Join Date: Mar 2007
Age: 20
Posts: 175
Default

Sorry to bother, but i get String errors, that the numbers cannot be found...,
Instead of the "City" test, i get that message, compiles fine tho.
DarkViper2006 is offline   Reply With Quote
Old 12-12-2007, 09:11 AM   #8 (permalink)
Forum Novice
 
Join Date: Jan 2005
Age: 30
Posts: 117
Default

Quote:
Originally Posted by Varkasal View Post
Works great ill still have to put them in jail to start since they appear in the world first ... just feel bad for them if they close the gump ... cause they will be stuck in jail ... and ill probably leave them there a while .... lol. Excelent job though Ceo ... now i gotta see if i can call the gump up in character creation before entering the world ... that would be ideal .
Create a teleporter to a default location in your jail, or a public moongate.
__________________
Dumples

I play on Age of Valor
Behringer is offline   Reply With Quote
Old 12-12-2007, 10:38 AM   #9 (permalink)
CEO
Forum Expert
 
CEO's Avatar
 
Join Date: Jun 2004
Age: 47
Posts: 776
Default

Quote:
Originally Posted by DarkViper2006 View Post
Sorry to bother, but i get String errors, that the numbers cannot be found...,
Instead of the "City" test, i get that message, compiles fine tho.
You're using an old client that doesn't have the localized strings. Update your client.
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list.
Please don't add me to your friends list, I have enough friends. Thx
CEO is offline   Reply With Quote
Old 06-19-2008, 04:44 PM   #10 (permalink)
Forum Novice
 
Join Date: Apr 2007
Age: 30
Posts: 105
Default

sorry for my message

Last edited by UoTurkey; 06-19-2008 at 04:51 PM.
UoTurkey is offline   Reply With Quote
Old 06-19-2008, 04:53 PM   #11 (permalink)
Master of the Internet
 
Join Date: Mar 2006
Location: Germany
Age: 17
Posts: 14,546
Send a message via AIM to Suil Ban Send a message via MSN to Suil Ban
Default

What exactly is this used for? Making custom starting locations on the map?
__________________

Now open - uo15.net - The best in Publish 15 emulation
Suil Ban is offline   Reply With Quote
Old 06-19-2008, 05:47 PM   #12 (permalink)
Account Terminated
 
Join Date: Jul 2006
Age: 29
Posts: 240
Default

Quote:
Originally Posted by Suil Ban View Post
What exactly is this used for? Making custom starting locations on the map?
with some alterations this could be made to set up your own start locations instead of the default ones.. you could make them only able to start at 3 locations instead of all of them.. i mean its not to hard to understand.. but I dont mind helping you out Suilie if you need it.=P
Zaphieon is offline   Reply With Quote
Old 07-01-2008, 05:53 PM   #13 (permalink)
Forum Novice
 
Join Date: Apr 2007
Age: 30
Posts: 105
Default

It is excellent but the gump appears twice how to solve it ?
UoTurkey is offline   Reply With Quote
Old 07-02-2008, 11:48 AM   #14 (permalink)
Forum Novice
 
Join Date: Apr 2007
Age: 30
Posts: 105
Default

How ??????????
UoTurkey is offline   Reply With Quote
Old 07-04-2008, 03:18 PM   #15 (permalink)
Forum Novice
 
Join Date: Apr 2007
Age: 30
Posts: 105
Default

Oopppps Uppppp
UoTurkey is offline   Reply With Quote
Old 07-06-2008, 01:57 PM   #16 (permalink)
Forum Novice
 
Join Date: Apr 2007
Age: 30
Posts: 105
Default

hey ceo are you there ???
UoTurkey is offline   Reply With Quote
Old 07-11-2008, 06:29 PM   #17 (permalink)
Forum Novice
 
Join Date: Apr 2007
Age: 30
Posts: 105
Default

heyyyyyyyy
UoTurkey is offline   Reply With Quote
Old 07-11-2008, 06:34 PM   #18 (permalink)
CEO
Forum Expert
 
CEO's Avatar
 
Join Date: Jun 2004
Age: 47
Posts: 776
Default

I can't help you, stop reposting. If I knew a mod (or had the ability) I'd delete them all. A total waste of space. I'm sure whatever it is (it doesn't happen for me), by now over the past week or more you could have figured out SOMETHING on your own. I'm not your support bitch. Goodbye.
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list.
Please don't add me to your friends list, I have enough friends. Thx
CEO is offline   Reply With Quote
Old 08-26-2008, 06:14 AM   #19 (permalink)
Forum Expert
 
Pyro-Tech's Avatar
 
Join Date: Oct 2003
Location: Carbondale, IL
Age: 23
Posts: 1,801
Send a message via MSN to Pyro-Tech
Default

I had an issue with it popping up twice...what i did was put it in the second section of that code:

Code:
        protected override void OnTick()
        {
            if (m_State < m_Count)
            {
                m_Mobile.SendMessage(0x35, m_Messages[m_State++]);
            }

            if ( m_State == m_Count )
                        {
                          m_Mobile.SendGump(new Server.Gumps.StartLocationGump(m_Mobile, Map.Trammel, 2));
                       Stop();
                         }
        }
this way, it will show any message you have, then show the gump

and UOTurkey...be paitient...i found my problem pretty easy, look next time.

and i know this is somewhat a dead thread...but i thought someone else might like the suggestion on putting the code
__________________

Pyro-Tech is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5