|
||
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Jun 2004
Age: 47
Posts: 776
|
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();
}
Code:
m_Mobile.SendGump(new Server.Gumps.StartLocationGump(m_Mobile, Map.Trammel, 2)); 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
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.
__________________
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. |
|
|
|
|
|
#2 (permalink) |
|
Forum Novice
Join Date: Jun 2004
Age: 37
Posts: 189
|
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 |
|
|
|
|
|
#3 (permalink) |
|
Forum Novice
Join Date: Jun 2004
Age: 37
Posts: 189
|
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. |
|
|
|
|
|
#8 (permalink) | |
|
Forum Novice
Join Date: Jan 2005
Age: 30
Posts: 117
|
Quote:
|
|
|
|
|
|
|
#9 (permalink) |
|
Forum Expert
Join Date: Jun 2004
Age: 47
Posts: 776
|
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 |
|
|
|
|
|
#12 (permalink) |
|
Account Terminated
Join Date: Jul 2006
Age: 29
Posts: 240
|
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
|
|
|
|
|
|
#18 (permalink) |
|
Forum Expert
Join Date: Jun 2004
Age: 47
Posts: 776
|
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 |
|
|
|
|
|
#19 (permalink) |
|
Forum Expert
|
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();
}
}
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|